public interface ProtocolEngine
| Modifier and Type | Field and Description | 
|---|---|
| static int | BY_APPLICATIONDisconnect reason: The application disconnected | 
| Modifier and Type | Method and Description | 
|---|---|
| void | disconnect(int reason,
          String description)Disconnect the Engine | 
| ProtocolContext | getContext() | 
| SocketConnection | getSocketConnection()Get the  SocketConnectionfor this connection. | 
| boolean | isConnected()Is the protocol connected. | 
| void | onSocketClose()The socket has closed. | 
| void | onSocketConnect(SocketConnection connection)The socket is connected and the protocol can now start. | 
| boolean | onSocketRead(ByteBuffer applicationData)Data has arrived on the socket. | 
| SocketWriteCallback | onSocketWrite(ByteBuffer applicationData)The socket is ready for writing. | 
| boolean | wantsToWrite()Determines whether the protocol wants to write to the socket. | 
static final int BY_APPLICATION
void onSocketConnect(SocketConnection connection)
connection - SocketConnectionvoid onSocketClose()
boolean onSocketRead(ByteBuffer applicationData)
applicationData - ByteBufferSocketWriteCallback onSocketWrite(ByteBuffer applicationData)
applicationData - ByteBufferboolean wantsToWrite()
boolean isConnected()
SocketConnection getSocketConnection()
SocketConnection for this connection.void disconnect(int reason,
                String description)
reason - description - ProtocolContext getContext()
Copyright © 2025. All rights reserved.