public interface PseudoTcpNotify
Modifier and Type | Method and Description |
---|---|
void |
onTcpClosed(PseudoTCPBase tcp,
IOException e)
Called when tcp enters closed state
|
void |
onTcpOpen(PseudoTCPBase tcp)
Called when TCP enters opened state
|
void |
onTcpReadable(PseudoTCPBase tcp)
Called when any data is available in read buffer
|
void |
onTcpWriteable(PseudoTCPBase tcp)
Called when there is free space available in the send buffer
|
WriteResult |
tcpWritePacket(PseudoTCPBase tcp,
byte[] buffer,
int len)
Called when protocol requests packet transfer through the network.
|
void onTcpOpen(PseudoTCPBase tcp)
tcp
- the socket that was openedvoid onTcpReadable(PseudoTCPBase tcp)
tcp
- the socket that became readablevoid onTcpWriteable(PseudoTCPBase tcp)
tcp
- the socket that became writablevoid onTcpClosed(PseudoTCPBase tcp, IOException e)
tcp
- the socket that was closede
- null means no errorWriteResult tcpWritePacket(PseudoTCPBase tcp, byte[] buffer, int len)
tcp
- the socket on which the write occurredbuffer
- the data that was writtenlen
- data lengthWriteResult
description for more infoCopyright © 2018. All rights reserved.