Atavism Version 2018.1AGIS API

atavism.server.network
Class ClientUDPConnection

java.lang.Object
  extended by atavism.server.network.ClientConnection
      extended by atavism.server.network.ClientUDPConnection

public class ClientUDPConnection
extends ClientConnection


Nested Class Summary
 
Nested classes/interfaces inherited from class atavism.server.network.ClientConnection
ClientConnection.AcceptCallback, ClientConnection.MessageCallback
 
Field Summary
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
           
 
Fields inherited from class atavism.server.network.ClientConnection
aggregatedReceives, aggregatedSends, connectionTypeRDP, connectionTypeTCP, connectionTypeUDP, lock, logMessageContents, packetAggregator, receivedMessagesAggregated, sentMessagesAggregated, unaggregatedReceives, unaggregatedSends
 
Constructor Summary
ClientUDPConnection(java.nio.channels.DatagramChannel datagramChannel)
           
ClientUDPConnection(java.nio.channels.DatagramChannel dc, ClientConnection.MessageCallback messageCallback)
           
 
Method Summary
 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)
           
 
Methods inherited from class atavism.server.network.ClientConnection
getAggregator, getAssociation, getLock, getLogMessageContents, setAssociation, setLogMessageContents, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

opcodeAggregatedVoicePacket

public static byte opcodeAggregatedVoicePacket

messageCallback

protected ClientConnection.MessageCallback messageCallback

channelMap

protected static java.util.Map<java.lang.Integer,java.nio.channels.DatagramChannel> channelMap

remoteAddr

protected java.lang.String remoteAddr

remotePort

protected java.lang.Integer remotePort

socket

protected java.nio.channels.DatagramChannel socket
Constructor Detail

ClientUDPConnection

public ClientUDPConnection(java.nio.channels.DatagramChannel datagramChannel)

ClientUDPConnection

public ClientUDPConnection(java.nio.channels.DatagramChannel dc,
                           ClientConnection.MessageCallback messageCallback)
Method Detail

initializeFromDatagramChannel

protected void initializeFromDatagramChannel(java.nio.channels.DatagramChannel datagramChannel)

IPAndPort

public java.lang.String IPAndPort()
Specified by:
IPAndPort in class ClientConnection

registerMessageCallback

public void registerMessageCallback(ClientConnection.MessageCallback messageCallback)
Specified by:
registerMessageCallback in class ClientConnection

send

public void send(AOByteBuffer buf)
Specified by:
send in class ClientConnection

sendInternal

public boolean sendInternal(AOByteBuffer buf)
Specified by:
sendInternal in class ClientConnection

sendIfPossible

public boolean sendIfPossible(AOByteBuffer buf)
Specified by:
sendIfPossible in class ClientConnection

sendMultibuf

public int sendMultibuf(java.util.List<AOByteBuffer> subMessages,
                        int currentSize)
Specified by:
sendMultibuf in class ClientConnection

open

public void open(java.lang.String hostname,
                 int remotePort)
Specified by:
open in class ClientConnection

connectionReset

public void connectionReset()
Specified by:
connectionReset in class ClientConnection

close

public void close()
Specified by:
close in class ClientConnection

isOpen

public boolean isOpen()
Specified by:
isOpen in class ClientConnection

canSend

public boolean canSend()
Specified by:
canSend in class ClientConnection

canSendInternal

public boolean canSendInternal()
Specified by:
canSendInternal in class ClientConnection

connectionKind

public int connectionKind()
Specified by:
connectionKind in class ClientConnection


Copyright © 2018 Dragonsan Studios Sp. z o.o.