Class WebSocketSession
java.lang.Object
com.pixelservices.flash.components.websocket.WebSocketSession
-
Constructor Summary
ConstructorsConstructorDescriptionWebSocketSession
(AsynchronousSocketChannel channel, RequestInfo requestInfo, String path) -
Method Summary
Modifier and TypeMethodDescriptionvoid
Closes the WebSocket connection with the specified status code and reasonGet the buffer for the WebSocket sessionGet the channel for the WebSocket sessiongetId()
getPath()
Get the request info instance (path, headers, method)void
sendBinaryMessage
(byte[] data) void
sendMessage
(String message) void
setBuffer
(ByteBuffer buffer) void
-
Constructor Details
-
WebSocketSession
-
-
Method Details
-
getChannel
Get the channel for the WebSocket session- Returns:
- The channel
-
getRequestInfo
Get the request info instance (path, headers, method)- Returns:
- The request info
-
getPath
-
getId
-
setId
-
getBuffer
Get the buffer for the WebSocket session- Returns:
- The buffer
-
setBuffer
-
sendMessage
-
sendBinaryMessage
public void sendBinaryMessage(byte[] data) -
close
Closes the WebSocket connection with the specified status code and reason- Parameters:
statusCode
- WebSocket close status code (1000 = normal, 1001 = going away, etc.)reason
- Reason for closing the connection (optional)
-