public class ClientUDPConnection extends ClientConnection
ClientConnection.AcceptCallback, ClientConnection.MessageCallback
Modifier and Type | Field and Description |
---|---|
protected static java.util.Map<java.lang.Integer,java.nio.channels.DatagramChannel> |
channelMap |
protected ClientConnection.MessageCallback |
messageCallback |
static byte |
opcodeAggregatedVoicePacket |
protected java.lang.String |
remoteAddr |
protected java.lang.Integer |
remotePort |
protected java.nio.channels.DatagramChannel |
socket |
aggregatedReceives, aggregatedSends, connectionTypeRDP, connectionTypeTCP, connectionTypeUDP, lock, logMessageContents, packetAggregator, receivedMessagesAggregated, sentMessagesAggregated, unaggregatedReceives, unaggregatedSends
Constructor and Description |
---|
ClientUDPConnection(java.nio.channels.DatagramChannel datagramChannel) |
ClientUDPConnection(java.nio.channels.DatagramChannel dc,
ClientConnection.MessageCallback messageCallback) |
Modifier and Type | Method and Description |
---|---|
boolean |
canSend() |
boolean |
canSendInternal() |
void |
close() |
int |
connectionKind() |
void |
connectionReset() |
protected void |
initializeFromDatagramChannel(java.nio.channels.DatagramChannel datagramChannel) |
java.lang.String |
IPAndPort() |
boolean |
isOpen() |
void |
open(java.lang.String hostname,
int remotePort) |
void |
registerMessageCallback(ClientConnection.MessageCallback messageCallback) |
void |
send(AOByteBuffer buf) |
boolean |
sendIfPossible(AOByteBuffer buf) |
boolean |
sendInternal(AOByteBuffer buf) |
int |
sendMultibuf(java.util.List<AOByteBuffer> subMessages,
int currentSize) |
getAggregator, getAssociation, getLock, getLogMessageContents, setAssociation, setLogMessageContents, toString
public static byte opcodeAggregatedVoicePacket
protected ClientConnection.MessageCallback messageCallback
protected static java.util.Map<java.lang.Integer,java.nio.channels.DatagramChannel> channelMap
protected java.lang.String remoteAddr
protected java.lang.Integer remotePort
protected java.nio.channels.DatagramChannel socket
public ClientUDPConnection(java.nio.channels.DatagramChannel datagramChannel)
public ClientUDPConnection(java.nio.channels.DatagramChannel dc, ClientConnection.MessageCallback messageCallback)
protected void initializeFromDatagramChannel(java.nio.channels.DatagramChannel datagramChannel)
public java.lang.String IPAndPort()
IPAndPort
in class ClientConnection
public void registerMessageCallback(ClientConnection.MessageCallback messageCallback)
registerMessageCallback
in class ClientConnection
public void send(AOByteBuffer buf)
send
in class ClientConnection
public boolean sendInternal(AOByteBuffer buf)
sendInternal
in class ClientConnection
public boolean sendIfPossible(AOByteBuffer buf)
sendIfPossible
in class ClientConnection
public int sendMultibuf(java.util.List<AOByteBuffer> subMessages, int currentSize)
sendMultibuf
in class ClientConnection
public void open(java.lang.String hostname, int remotePort)
open
in class ClientConnection
public void connectionReset()
connectionReset
in class ClientConnection
public void close()
close
in class ClientConnection
public boolean isOpen()
isOpen
in class ClientConnection
public boolean canSend()
canSend
in class ClientConnection
public boolean canSendInternal()
canSendInternal
in class ClientConnection
public int connectionKind()
connectionKind
in class ClientConnection