-
- All Superinterfaces:
ConnectionContext,FlowContext,SocketRef
public interface SocketContext extends SocketRef, FlowContext
Network socket context that manages asynchronous I/O operations for a non-blocking NIO network channel. ASocketContextis implicitly bound to aSocket, providing theSocketwith the ability to modify itsFlowControlstate, access its read and write buffers, tobecomea different kind ofSocket, and to close the socket.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidbecome(Socket socket)Rebinds thisSocketContextto a newsocketimplementation, thereby changing theSockethandler that receives network I/O callbacks.swim.codec.InputBufferinputBuffer()Returns the buffer into which input data is read by the underlying network socket.swim.codec.OutputBuffer<?>outputBuffer()Returns the buffer from which output data is written by the underlying network socket.SocketSettingssocketSettings()Returns the configuration parameters that govern the underlying network socket.-
Methods inherited from interface swim.io.ConnectionContext
cipherSuite, isClient, isConnected, isSecure, isServer, localAddress, localCertificates, localPrincipal, remoteAddress, remoteCertificates, remotePrincipal, securityProtocol
-
Methods inherited from interface swim.io.FlowContext
flowControl, flowControl, flowControl
-
-
-
-
Method Detail
-
socketSettings
SocketSettings socketSettings()
Returns the configuration parameters that govern the underlying network socket.
-
inputBuffer
swim.codec.InputBuffer inputBuffer()
Returns the buffer into which input data is read by the underlying network socket. The boundSocketreads from this buffer in response todoReadcallbacks.
-
outputBuffer
swim.codec.OutputBuffer<?> outputBuffer()
Returns the buffer from which output data is written by the underlying network socket. The boundSocketwrites to this buffer in repsonse todoWritecallbacks.
-
become
void become(Socket socket)
Rebinds thisSocketContextto a newsocketimplementation, thereby changing theSockethandler that receives network I/O callbacks.
-
-