Package net.rudp
Class ReliableServerSocket.ReliableClientSocket
- java.lang.Object
-
- java.net.Socket
-
- net.rudp.ReliableSocket
-
- net.rudp.ReliableServerSocket.ReliableClientSocket
-
- All Implemented Interfaces:
java.io.Closeable,java.lang.AutoCloseable
- Enclosing class:
- ReliableServerSocket
public class ReliableServerSocket.ReliableClientSocket extends ReliableSocket
-
-
Field Summary
-
Fields inherited from class net.rudp.ReliableSocket
_endpoint, _in, _out, _sock
-
-
Constructor Summary
Constructors Constructor Description ReliableClientSocket(java.net.DatagramSocket sock, java.net.SocketAddress endpoint)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidcloseSocket()Closes the underlying UDP socket.protected voidinit(java.net.DatagramSocket sock, ReliableSocketProfile profile)Initializes socket and sets it up for receiving incoming traffic.protected voidlog(java.lang.String msg)Log routine.protected net.rudp.impl.SegmentreceiveSegmentImpl()Reads in a segment from the underlying UDP socket.protected voidsegmentReceived(net.rudp.impl.Segment s)-
Methods inherited from class net.rudp.ReliableSocket
addListener, addStateListener, bind, close, closeImpl, connect, connect, getChannel, getInetAddress, getInputStream, getKeepAlive, getLocalAddress, getLocalPort, getLocalSocketAddress, getOutputStream, getPort, getReceiveBufferSize, getRemoteSocketAddress, getSendBufferSize, getTcpNoDelay, isBound, isClosed, isConnected, isInputShutdown, isOutputShutdown, read, removeListener, removeStateListener, reset, reset, sendSegmentImpl, setKeepAlive, setReceiveBufferSize, setSendBufferSize, setSoTimeout, setTcpNoDelay, shutdownInput, shutdownOutput, write
-
-
-
-
Method Detail
-
init
protected void init(java.net.DatagramSocket sock, ReliableSocketProfile profile)Description copied from class:ReliableSocketInitializes socket and sets it up for receiving incoming traffic.- Overrides:
initin classReliableSocket- Parameters:
sock- the datagram socket.profile- the socket profile.
-
receiveSegmentImpl
protected net.rudp.impl.Segment receiveSegmentImpl()
Description copied from class:ReliableSocketReads in a segment from the underlying UDP socket.- Overrides:
receiveSegmentImplin classReliableSocket- Returns:
- s the segment.
-
segmentReceived
protected void segmentReceived(net.rudp.impl.Segment s)
-
closeSocket
protected void closeSocket()
Description copied from class:ReliableSocketCloses the underlying UDP socket.- Overrides:
closeSocketin classReliableSocket
-
log
protected void log(java.lang.String msg)
Description copied from class:ReliableSocketLog routine.- Overrides:
login classReliableSocket
-
-