public class RDPConnection extends ClientConnection implements java.lang.Cloneable
ClientConnection.AcceptCallback, ClientConnection.MessageCallback
Modifier and Type | Field and Description |
---|---|
static int |
aggregatedMsgId |
static int |
CLOSE_WAIT |
static int |
CLOSED |
protected static int |
defaultReceiveBufferSize |
static int |
FAST_RESEND_DELAY_MS
how often we resend packets in response to packets containing eacks
|
static int |
fragmentMsgId |
long |
lastReceiveTimestamp |
static int |
LISTEN |
static int |
OPEN |
int |
queueId |
static int |
RESEND_TIMEOUT_MS
maximum time (in milliseconds) a packet can be in the resend queue before
the connection closes itself - defaults to 20 seconds
|
long |
resendDelay |
long |
resendTimestamp |
static int |
SYN_RCVD |
static int |
SYN_SENT |
aggregatedReceives, aggregatedSends, connectionTypeRDP, connectionTypeTCP, connectionTypeUDP, lock, logMessageContents, logoutState, packetAggregator, receivedMessagesAggregated, sentMessagesAggregated, unaggregatedReceives, unaggregatedSends
Constructor and Description |
---|
RDPConnection() |
Modifier and Type | Method and Description |
---|---|
boolean |
canSend() |
boolean |
canSendInternal() |
void |
close()
sends a reset packet to the other side, sets the connection to
CLOSE_WAIT. the rdpserver will close the connection for real after
waiting for a bit
|
int |
connectionKind() |
void |
connectionReset() |
static boolean |
fragmentedBuffer(AOByteBuffer buf) |
ClientConnection.MessageCallback |
getCallback() |
java.nio.channels.DatagramChannel |
getDatagramChannel() |
static int |
getEventId(AOByteBuffer buf) |
long |
getInitialSendSeqNum() |
int |
getLocalPort() |
long |
getMaxReceiveSegmentSize() |
long |
getMaxSendUnacks() |
long |
getRcvCur() |
long |
getRcvIrs() |
long |
getRcvMax() |
java.net.InetAddress |
getRemoteAddr() |
int |
getRemotePort() |
long |
getSBufMax() |
long |
getSendNextSeqNum() |
long |
getSendUnackd() |
int |
getState() |
java.lang.String |
IPAndPort() |
boolean |
isClosed() |
boolean |
isClosing() |
boolean |
isOpen() |
boolean |
isSaturated() |
boolean |
isSequenced() |
void |
isSequenced(boolean isSequenced) |
void |
open(java.lang.String hostname,
int remotePort) |
protected RDPPacket |
receivePacket() |
void |
registerMessageCallback(ClientConnection.MessageCallback pcallback) |
void |
send(AOByteBuffer buf)
the external interface to the sending machinery.
|
boolean |
sendIfPossible(AOByteBuffer buf)
This version of send does packet fragmenting so that it happens
_above_ the level of the packet aggregator.
|
boolean |
sendInternal(AOByteBuffer buf)
main method to send data over the connection.
|
int |
sendMultibuf(java.util.List<AOByteBuffer> subMessages,
int currentSize)
This method sends multiple messages.
|
protected void |
sendPacketImmediate(RDPPacket packet,
boolean retransmit) |
void |
setCallback(ClientConnection.MessageCallback cb) |
void |
setDatagramChannel(java.nio.channels.DatagramChannel dc) |
void |
setInitialSendSeqNum(long seqNum) |
void |
setLocalPort(int port) |
void |
setMaxReceiveSegmentSize(int size) |
void |
setMaxReceiveSegmentSize(long max) |
void |
setMaxSendUnacks(long max) |
static void |
setOverrideMaxSendUnacks(int max)
this will override the maxsendunack variable that the client sends us
|
void |
setRcvCur(long rcvCur) |
void |
setRcvIrs(long rcvIrs) |
void |
setRcvMax(long max) |
void |
setRemoteAddr(java.net.InetAddress remoteAddr) |
void |
setRemotePort(int port) |
void |
setSBufMax(long max) |
void |
setSendUnackd(long num) |
void |
setState(int state) |
java.lang.String |
toString() |
static java.lang.String |
toStringState(int i) |
java.lang.String |
toStringVerbose() |
int |
unackLength() |
closeAggregator, getAssociation, getLock, getLogMessageContents, getLogoutState, setAssociation, setLogMessageContents, setLogoutState
public static int RESEND_TIMEOUT_MS
public static int FAST_RESEND_DELAY_MS
public static final int OPEN
public static final int LISTEN
public static final int CLOSED
public static final int SYN_SENT
public static final int SYN_RCVD
public static final int CLOSE_WAIT
protected static int defaultReceiveBufferSize
public static final int aggregatedMsgId
public static final int fragmentMsgId
public volatile long lastReceiveTimestamp
public volatile long resendTimestamp
public volatile long resendDelay
public final int queueId
public void registerMessageCallback(ClientConnection.MessageCallback pcallback)
registerMessageCallback
in class ClientConnection
public int connectionKind()
connectionKind
in class ClientConnection
public boolean isOpen()
isOpen
in class ClientConnection
public boolean isClosed()
public boolean isClosing()
public void open(java.lang.String hostname, int remotePort)
open
in class ClientConnection
public java.lang.String IPAndPort()
IPAndPort
in class ClientConnection
public void connectionReset()
connectionReset
in class ClientConnection
public void send(AOByteBuffer buf)
send
in class ClientConnection
public boolean sendIfPossible(AOByteBuffer buf)
sendIfPossible
in class ClientConnection
public boolean sendInternal(AOByteBuffer buf)
sendInternal
in class ClientConnection
public static boolean fragmentedBuffer(AOByteBuffer buf)
public static int getEventId(AOByteBuffer buf)
public int sendMultibuf(java.util.List<AOByteBuffer> subMessages, int currentSize)
sendMultibuf
in class ClientConnection
public boolean canSend()
canSend
in class ClientConnection
public boolean canSendInternal()
canSendInternal
in class ClientConnection
public int unackLength()
public void close()
close
in class ClientConnection
public void setMaxReceiveSegmentSize(int size)
public boolean isSequenced()
public void isSequenced(boolean isSequenced)
public void setState(int state)
public int getState()
public java.nio.channels.DatagramChannel getDatagramChannel()
public void setDatagramChannel(java.nio.channels.DatagramChannel dc)
public int getRemotePort()
public void setRemotePort(int port)
public int getLocalPort()
public void setLocalPort(int port)
public java.net.InetAddress getRemoteAddr()
public void setRemoteAddr(java.net.InetAddress remoteAddr)
public java.lang.String toString()
toString
in class ClientConnection
public java.lang.String toStringVerbose()
protected void sendPacketImmediate(RDPPacket packet, boolean retransmit)
protected RDPPacket receivePacket()
public ClientConnection.MessageCallback getCallback()
public void setCallback(ClientConnection.MessageCallback cb)
public long getMaxSendUnacks()
public void setMaxSendUnacks(long max)
public long getInitialSendSeqNum()
public void setInitialSendSeqNum(long seqNum)
public long getSendNextSeqNum()
public long getSendUnackd()
public void setSendUnackd(long num)
public long getRcvCur()
public void setRcvCur(long rcvCur)
public long getRcvMax()
public void setRcvMax(long max)
public long getRcvIrs()
public void setRcvIrs(long rcvIrs)
public long getSBufMax()
public void setSBufMax(long max)
public void setMaxReceiveSegmentSize(long max)
public long getMaxReceiveSegmentSize()
public static java.lang.String toStringState(int i)
public static void setOverrideMaxSendUnacks(int max)
public boolean isSaturated()
isSaturated
in class ClientConnection