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, logoutState, 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) |
closeAggregator, getAssociation, getLock, getLogMessageContents, getLogoutState, isSaturated, setAssociation, setLogMessageContents, setLogoutState, toStringpublic 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 ClientConnectionpublic void registerMessageCallback(ClientConnection.MessageCallback messageCallback)
registerMessageCallback in class ClientConnectionpublic void send(AOByteBuffer buf)
send in class ClientConnectionpublic boolean sendInternal(AOByteBuffer buf)
sendInternal in class ClientConnectionpublic boolean sendIfPossible(AOByteBuffer buf)
sendIfPossible in class ClientConnectionpublic int sendMultibuf(java.util.List<AOByteBuffer> subMessages, int currentSize)
sendMultibuf in class ClientConnectionpublic void open(java.lang.String hostname,
int remotePort)
open in class ClientConnectionpublic void connectionReset()
connectionReset in class ClientConnectionpublic void close()
close in class ClientConnectionpublic boolean isOpen()
isOpen in class ClientConnectionpublic boolean canSend()
canSend in class ClientConnectionpublic boolean canSendInternal()
canSendInternal in class ClientConnectionpublic int connectionKind()
connectionKind in class ClientConnection