WebSocketConnection
Represents endpoint of WebSocket connection.
Attributes
- Constructor
-
Create WebSocket connection using supplied socket.
- Graph
-
- Supertypes
-
trait AutoCloseableclass Objecttrait Matchableclass Any
Members list
Value members
Concrete methods
Closes WebSocket connection.
Closes WebSocket connection.
Attributes
- Note
-
This method does NOT send a Close frame. The user is responsible for sending an appropriate Close frame before invoking this method.
Tests whether WebSocket connection is open.
Tests whether WebSocket connection is open.
Attributes
Tests for secure WebSocket connection.
Tests for secure WebSocket connection.
Attributes
Reads next frame from WebSocket connection.
Reads next frame from WebSocket connection.
Value parameters
- timeout
-
timeout in milliseconds of any read operation;
0
is interpreted as indefinite
Attributes
- Throws
-
WebSocketError
if frame is invalid or otherwise unreadable
java.io.EOFExceptionif unexpected EOF occurs
java.io.InterruptedIOExceptionif timeout is exceeded
- Note
-
This method is synchronized on the WebSocket's input channel, permitting only one read request at a time.
Writes supplied frame to WebSocket connection.
Writes supplied frame to WebSocket connection.
Value parameters
- frame
-
WebSocket frame
Attributes
- Throws
-
java.io.EOFException
if payload truncation is detected
- Note
-
This method is synchronized on the WebSocket's output channel, permitting only one write request at a time.