Interface WsSession
- All Known Implementing Classes:
ClientWsConnection, WsConnection
public interface WsSession
WebSocket session.
-
Method Summary
Modifier and TypeMethodDescriptionClose session.ping(BufferData bufferData) Send ping.pong(BufferData bufferData) Send pong.default HttpPrologueprologue()The HTTP prologue received when opening this session.default WsProtocolConfigWebSocket protocol configuration for this session.send(BufferData bufferData, boolean last) Send binary fragment.Send text fragment.The underlying socket context.The WebSocket sub-protocol negotiated for this session.Terminate session.
-
Method Details
-
protocolConfig
WebSocket protocol configuration for this session.- Returns:
- WebSocket protocol configuration
-
send
-
send
Send binary fragment.- Parameters:
bufferData- buffer with datalast- if last fragment- Returns:
- this instance
-
ping
Send ping.- Parameters:
bufferData- buffer with data- Returns:
- this instance
-
pong
Send pong.- Parameters:
bufferData- buffer with data- Returns:
- this instance
-
close
Close session.- Parameters:
code- close code, may be one ofWsCloseCodesreason- reason description- Returns:
- this instance
-
terminate
WsSession terminate()Terminate session. Sends a close and closes the connection.- Returns:
- this instance
-
subProtocol
-
socketContext
-
prologue
The HTTP prologue received when opening this session. This will only be available on server sessions.- Returns:
- HTTP prologue
-