public interface StreamListener
Stream
events. It is guaranteed to only have one concurrent callback at a
time.Modifier and Type | Method and Description |
---|---|
void |
messageRead(InputStream message)
Called upon receiving a message from the remote end-point.
|
void |
onReady()
This indicates that the transport is now capable of sending additional messages
without requiring excessive buffering internally.
|
void messageRead(InputStream message)
InputStream
is
non-blocking and contains the entire message.
The provided message
InputStream
must be closed by the listener.
This method should return quickly, as the same thread may be used to process other streams.
message
- the bytes of the message.void onReady()