public interface StreamConnection
NioServer
, NioClient
and BlockingClient
to handle incoming
data streams.
Used to be callet StreamParser.Modifier and Type | Method and Description |
---|---|
void |
connectionClosed()
Called when the connection socket is closed
|
void |
connectionOpened()
Called when the connection socket is first opened
|
int |
getMaxMessageSize()
Returns the maximum message size of a message on the socket.
|
int |
receiveBytes(ByteBuffer buff)
Called when new bytes are available from the remote end.
|
void |
setWriteTarget(MessageWriteTarget writeTarget)
Called when this connection is attached to an upstream write target (ie a low-level connection handler).
|
void connectionClosed()
void connectionOpened()
int receiveBytes(ByteBuffer buff) throws Exception
Called when new bytes are available from the remote end. This should only ever be called by the single writeTarget associated with any given StreamConnection, multiple callers will likely confuse implementations.
Implementers/callers must follow the following conventions exactly:Exception
void setWriteTarget(MessageWriteTarget writeTarget)
int getMaxMessageSize()
Copyright © 2016. All rights reserved.