| Modifier and Type | Method and Description |
|---|---|
| public void | |
| public void | |
| public void | |
| public void | closeConnection(int
the closing code code, String the closing message message)This will close the connection immediately without a proper close handshake. |
| public < The type of the attachment T> T | |
| public Draft | |
| public InetSocketAddress | Returns: the local socket address or null, if this socket is not boundReturns the address of the endpoint this socket is bound to, or |
| public IProtocol | Returns: the Sec-WebSocket-Protocol or null, if no draft availableReturns the used Sec-WebSocket-Protocol for this websocket connection |
| public ReadyState | Returns: Returns '0 = CONNECTING', '1 = OPEN', '2 = CLOSING' or '3 = CLOSED'Retrieve the WebSocket 'ReadyState'. |
| public InetSocketAddress | Returns: the remote socket address or null, if this socket is unconnectedReturns the address of the endpoint this socket is connected to, or |
| public String | Returns: Returns the decoded path component of this URI.Returns the HTTP Request-URI as defined by http://tools.ietf.org/html/rfc2616#section-5.1.2 If the opening handshake has not yet happened it will return null. |
| public SSLSession | Returns: the ssl session of this websocket instanceReturns the ssl session of websocket, if ssl/wss is used for this instance. |
| public boolean | |
| public boolean | Returns: true, if the websocket does use wss and therefore has a SSLSessionDoes this websocket use an encrypted (wss/ssl) or unencrypted (ws) connection |
| public boolean | |
| public boolean | |
| public boolean | Returns: true when no further frames may be submittedReturns true when no further frames may be submitted This happens before the socket connection is closed. |
| public boolean | |
| public void | |
| public void | |
| public void | |
| public void | sendFragmentedFrame(Opcode
This is only important for the first frame in the sequence. Opcode.TEXT,
Opcode.BINARY are allowed. op, ByteBuffer The buffer which contains the payload. It may have no bytes remaining. buffer, boolean true means the current frame is the last in the sequence. fin)Allows to send continuous/fragmented frames conveniently. |
| public void | |
| public void | sendFrame(Collection<Framedata>
the frames to send to the other end frames)Send a collection of frames to the other end |
| public void | |
| public < The type of the attachment T> void | setAttachment(T
The object to be attached to the user attachment)Setter for an attachment on the socket connection. |
| close | back to summary |
|---|---|
| public void close(int code, String message) sends the closing handshake. may be send in response to an other handshake.
| |
| close | back to summary |
|---|---|
| public void close(int code) sends the closing handshake. may be send in response to an other handshake.
| |
| close | back to summary |
|---|---|
| public void close() Convenience function which behaves like close(CloseFrame.NORMAL) | |
| closeConnection | back to summary |
|---|---|
| public void closeConnection(int code, String message) This will close the connection immediately without a proper close handshake. The code and the message therefore won't be transferred over the wire also they will be forwarded to onClose/onWebsocketClose.
| |
| getAttachment | back to summary |
|---|---|
| public <T> T getAttachment() Getter for the connection attachment.
| |
| getDraft | back to summary |
|---|---|
| public Draft getDraft() Getter for the draft
| |
| getLocalSocketAddress | back to summary |
|---|---|
| public InetSocketAddress getLocalSocketAddress() Returns the address of the endpoint this socket is bound to, or
| |
| getProtocol | back to summary |
|---|---|
| public IProtocol getProtocol() Returns the used Sec-WebSocket-Protocol for this websocket connection
| |
| getReadyState | back to summary |
|---|---|
| public ReadyState getReadyState() Retrieve the WebSocket 'ReadyState'. This represents the state of the connection. It returns a numerical value, as per W3C WebSockets specs.
| |
| getRemoteSocketAddress | back to summary |
|---|---|
| public InetSocketAddress getRemoteSocketAddress() Returns the address of the endpoint this socket is connected to, or
| |
| getResourceDescriptor | back to summary |
|---|---|
| public String getResourceDescriptor() Returns the HTTP Request-URI as defined by http://tools.ietf.org/html/rfc2616#section-5.1.2
| |
| getSSLSession | back to summary |
|---|---|
| public SSLSession getSSLSession() throws IllegalArgumentException Returns the ssl session of websocket, if ssl/wss is used for this instance.
| |
| hasBufferedData | back to summary |
|---|---|
| public boolean hasBufferedData() Checks if the websocket has buffered data
| |
| hasSSLSupport | back to summary |
|---|---|
| public boolean hasSSLSupport() Does this websocket use an encrypted (wss/ssl) or unencrypted (ws) connection
| |
| isClosed | back to summary |
|---|---|
| public boolean isClosed() Is the websocket in the state CLOSED
| |
| isClosing | back to summary |
|---|---|
| public boolean isClosing() Is the websocket in the state CLOSING
| |
| isFlushAndClose | back to summary |
|---|---|
| public boolean isFlushAndClose() Returns true when no further frames may be submitted
| |
| isOpen | back to summary |
|---|---|
| public boolean isOpen() Is the websocket in the state OPEN
| |
| send | back to summary |
|---|---|
| public void send(String text) Send Text data to the other end.
| |
| send | back to summary |
|---|---|
| public void send(ByteBuffer bytes) Send Binary data (plain bytes) to the other end.
| |
| send | back to summary |
|---|---|
| public void send(byte[] bytes) Send Binary data (plain bytes) to the other end.
| |
| sendFragmentedFrame | back to summary |
|---|---|
| public void sendFragmentedFrame(Opcode op, ByteBuffer buffer, boolean fin) Allows to send continuous/fragmented frames conveniently. If the first frame you send is also the last then it is not a fragmented frame and will received via onMessage instead of onFragmented even though it was send by this method.
| |
| sendFrame | back to summary |
|---|---|
| public void sendFrame(Framedata framedata) Send a frame to the other end
| |
| sendFrame | back to summary |
|---|---|
| public void sendFrame(Collection<Framedata> frames) Send a collection of frames to the other end
| |
| sendPing | back to summary |
|---|---|
| public void sendPing() Send a ping to the other end
| |
| setAttachment | back to summary |
|---|---|
| public <T> void setAttachment(T attachment) Setter for an attachment on the socket connection. The attachment may be of any type.
| |