WebSocketConnection

Members

Functions

generateMask
byte[] generateMask()

Generate random 4bytes mask key

getIOState
IOState getIOState()

Get the IOState of the connection.

getPath
string getPath()
Undocumented in source. Be warned that the author may not have intended to support it.
getPolicy
WebSocketPolicy getPolicy()

The policy that the connection is running under.

getUpgradeRequest
HttpRequest getUpgradeRequest()

Get the websocket upgrade request.

getUpgradeResponse
HttpResponse getUpgradeResponse()

Get the websocket upgrade response.

isConnected
bool isConnected()

Get the read/write idle timeout.

sendData
FuturePromise!(bool) sendData(byte[] data)

Send binary message.

sendData
FuturePromise!(bool) sendData(ByteBuffer data)

Send binary message.

sendText
FuturePromise!(bool) sendText(string text)

Send text message.

Inherited Members

From OutgoingFrames

outgoingFrame
void outgoingFrame(WebSocketFrame frame, Callback callback)

A frame, and optional callback, intended for the network layer. <p> Note: the frame can undergo many transformations in the various layers and extensions present in the implementation. <p> If you are implementing a mutation, you are obliged to handle the incoming WriteCallback appropriately.

From HttpConnection

NAME
enum string NAME;
Undocumented in source.
getId
int getId()
Undocumented in source.
getTcpConnection
Connection getTcpConnection()
Undocumented in source.
getHttpVersion
HttpVersion getHttpVersion()
Undocumented in source.
getLocalAddress
Address getLocalAddress()
Undocumented in source.
getRemoteAddress
Address getRemoteAddress()
Undocumented in source.
onClose
HttpConnection onClose(Action1!(HttpConnection) handler)
Undocumented in source.
onException
HttpConnection onException(Action2!(HttpConnection, Exception) handler)
Undocumented in source.
getAttribute
Object getAttribute(string key)

Returns the value of the user-defined attribute of this connection.

setAttribute
void setAttribute(string key, Object value)

Sets a user-defined attribute.

removeAttribute
Object removeAttribute(string key)

Removes a user-defined attribute with the specified key.

containsAttribute
bool containsAttribute(string key)

@param key The key of the attribute we are looking for in the connection @return <tt>true</tt> if this connection contains the attribute with the specified <tt>key</tt>.

Meta