open class WebSocket : WebSocketBase
Represents a client-side WebSocket. NOTE: This class has been automatically generated from the io.vertx.core.http.WebSocket non RX-ified interface using Vert.x codegen.
WebSocket(delegate: WebSocket) |
static val __TYPE_ARG: TypeArg<WebSocket> |
open fun binaryHandlerID(): String
When a Given this ID, a different event loop can send a binary frame to that event handler using the event bus and that buffer will be received by this instance in its own event loop and written to the underlying connection. This allows you to write data to other WebSockets which are owned by different event loops. |
|
open fun binaryMessageHandler(handler: Handler<Buffer>): WebSocketBase
Set a binary message handler on the connection. This handler serves a similar purpose to |
|
open fun close(): Unit
Close the WebSocket. |
|
open fun closeHandler(handler: Handler<Void>): WebSocket |
|
open fun drainHandler(handler: Handler<Void>): WebSocket |
|
open fun end(t: Buffer): Unit
Same as open fun end(): Unit
|
|
open fun endHandler(endHandler: Handler<Void>): WebSocket |
|
open fun equals(other: Any?): Boolean |
|
open fun exceptionHandler(handler: Handler<Throwable>): WebSocket |
|
open fun frameHandler(handler: Handler<WebSocketFrame>): WebSocket |
|
open fun getDelegate(): WebSocket |
|
open fun handler(handler: Handler<Buffer>): WebSocket |
|
open fun hashCode(): Int |
|
open fun isSsl(): Boolean |
|
open fun localAddress(): SocketAddress |
|
open static fun newInstance(arg: WebSocket): WebSocket |
|
open fun pause(): WebSocket |
|
open fun pongHandler(handler: Handler<Buffer>): WebSocketBase
Set a pong message handler on the connection. This handler will be invoked every time a pong message is received on the server, and can be used by both clients and servers since the RFC 6455 Sections 5.5.2 and 5.5.3 do not specify whether the client or server sends a ping. Pong frames may be at most 125 bytes (octets). There is no ping handler since pings should immediately be responded to with a pong with identical content Pong frames may be received unsolicited. |
|
open fun remoteAddress(): SocketAddress |
|
open fun resume(): WebSocket |
|
open fun setWriteQueueMaxSize(maxSize: Int): WebSocket |
|
open fun subProtocol(): String
Returns the websocket sub protocol selected by the websocket handshake. On the server, the value will be |
|
open fun textHandlerID(): String
When a Given this ID, a different event loop can send a text frame to that event handler using the event bus and that buffer will be received by this instance in its own event loop and written to the underlying connection. This allows you to write data to other WebSockets which are owned by different event loops. |
|
open fun textMessageHandler(handler: Handler<String>): WebSocketBase
Set a text message handler on the connection. This handler will be called similar to the , but the buffer will be converted to a String first |
|
open fun toFlowable(): Flowable<Buffer> |
|
open fun toObservable(): Observable<Buffer> |
|
open fun toString(): String |
|
open fun write(data: Buffer): WebSocket |
|
open fun writeBinaryMessage(data: Buffer): WebSocket |
|
open fun writeFinalBinaryFrame(data: Buffer): WebSocket |
|
open fun writeFinalTextFrame(text: String): WebSocket |
|
open fun writeFrame(frame: WebSocketFrame): WebSocket |
|
open fun writePing(data: Buffer): WebSocketBase
Writes a ping to the connection. This will be written in a single frame. Ping frames may be at most 125 bytes (octets). This method should not be used to write application data and should only be used for implementing a keep alive or to ensure the client is still responsive, see RFC 6455 Section 5.5.2. There is no pingHandler because RFC 6455 section 5.5.2 clearly states that the only response to a ping is a pong with identical contents. |
|
open fun writePong(data: Buffer): WebSocketBase
Writes a pong to the connection. This will be written in a single frame. Pong frames may be at most 125 bytes (octets). This method should not be used to write application data and should only be used for implementing a keep alive or to ensure the client is still responsive, see RFC 6455 Section 5.5.2. There is no need to manually write a Pong, as the server and client both handle responding to a ping with a pong automatically and this is exposed to users.RFC 6455 Section 5.5.3 states that pongs may be sent unsolicited in order to implement a one way heartbeat. |
|
open fun writeQueueFull(): Boolean
This will return |
|
open fun writeTextMessage(text: String): WebSocket |