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 void
closeSocket()
Closes the underlying UDP socket.protected void
init(java.net.DatagramSocket sock, ReliableSocketProfile profile)
Initializes socket and sets it up for receiving incoming traffic.protected void
log(java.lang.String msg)
Log routine.protected net.rudp.impl.Segment
receiveSegmentImpl()
Reads in a segment from the underlying UDP socket.protected void
segmentReceived(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:ReliableSocket
Initializes socket and sets it up for receiving incoming traffic.- Overrides:
init
in classReliableSocket
- Parameters:
sock
- the datagram socket.profile
- the socket profile.
-
receiveSegmentImpl
protected net.rudp.impl.Segment receiveSegmentImpl()
Description copied from class:ReliableSocket
Reads in a segment from the underlying UDP socket.- Overrides:
receiveSegmentImpl
in classReliableSocket
- Returns:
- s the segment.
-
segmentReceived
protected void segmentReceived(net.rudp.impl.Segment s)
-
closeSocket
protected void closeSocket()
Description copied from class:ReliableSocket
Closes the underlying UDP socket.- Overrides:
closeSocket
in classReliableSocket
-
log
protected void log(java.lang.String msg)
Description copied from class:ReliableSocket
Log routine.- Overrides:
log
in classReliableSocket
-
-