Class NetworkGlueUDP
- java.lang.Object
-
- com.biglybt.core.networkmanager.impl.udp.NetworkGlueUDP
-
- All Implemented Interfaces:
NetworkGlue
,AEPriorityMixin
,PRUDPPrimordialHandler
public class NetworkGlueUDP extends java.lang.Object implements NetworkGlue, PRUDPPrimordialHandler, AEPriorityMixin
-
-
Field Summary
Fields Modifier and Type Field Description (package private) PRUDPPacketHandler
handler
private NetworkGlueListener
listener
(package private) static LogIDs
LOGID
(package private) java.util.LinkedList
msg_queue
(package private) AESemaphore
msg_queue_sem
(package private) AESemaphore
msg_queue_slot_sem
private long
total_bytes_received
(package private) long
total_bytes_sent
private long
total_packets_received
(package private) long
total_packets_sent
-
Fields inherited from interface com.biglybt.core.util.AEPriorityMixin
PRIORITY_HIGH, PRIORITY_LOW, PRIORITY_NORMAL
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
NetworkGlueUDP(NetworkGlueListener _listener)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getPriority()
long[]
getStats()
boolean
packetReceived(java.net.DatagramPacket packet)
int
send(int local_port, java.net.InetSocketAddress target, byte[] data)
-
-
-
Field Detail
-
LOGID
static final LogIDs LOGID
-
listener
private final NetworkGlueListener listener
-
handler
PRUDPPacketHandler handler
-
msg_queue
final java.util.LinkedList msg_queue
-
msg_queue_sem
final AESemaphore msg_queue_sem
-
msg_queue_slot_sem
final AESemaphore msg_queue_slot_sem
-
total_packets_received
private long total_packets_received
-
total_bytes_received
private long total_bytes_received
-
total_packets_sent
long total_packets_sent
-
total_bytes_sent
long total_bytes_sent
-
-
Constructor Detail
-
NetworkGlueUDP
protected NetworkGlueUDP(NetworkGlueListener _listener)
-
-
Method Detail
-
getPriority
public int getPriority()
- Specified by:
getPriority
in interfaceAEPriorityMixin
-
packetReceived
public boolean packetReceived(java.net.DatagramPacket packet)
- Specified by:
packetReceived
in interfacePRUDPPrimordialHandler
-
send
public int send(int local_port, java.net.InetSocketAddress target, byte[] data) throws java.io.IOException
- Specified by:
send
in interfaceNetworkGlue
- Throws:
java.io.IOException
-
getStats
public long[] getStats()
- Specified by:
getStats
in interfaceNetworkGlue
-
-