open class NetSocket : ReadStream<Buffer>, WriteStream<Buffer>
Represents a socket-like interface to a TCP connection on either the client or the server side.
Instances of this class are created on the client side by an io.vertx.reactivex.core.net.NetClient when a connection to a server is made, or on the server side by a io.vertx.reactivex.core.net.NetServer when a server accepts a connection.
It implements both and so it can be used with io.vertx.reactivex.core.streams.Pump to pump data with flow control.
NOTE: This class has been automatically generated from the io.vertx.core.net.NetSocket non RX-ified interface using Vert.x codegen.
NetSocket(delegate: NetSocket) |
static val __TYPE_ARG: TypeArg<NetSocket> |
open fun close(): Unit
Close the NetSocket |
|
open fun closeHandler(handler: Handler<Void>): NetSocket
Set a handler that will be called when the NetSocket is closed |
|
open fun drainHandler(handler: Handler<Void>): NetSocket |
|
open fun end(t: Buffer): Unit
Same as open fun end(): Unit
|
|
open fun endHandler(endHandler: Handler<Void>): NetSocket |
|
open fun equals(other: Any?): Boolean |
|
open fun exceptionHandler(handler: Handler<Throwable>): NetSocket |
|
open fun getDelegate(): NetSocket |
|
open fun handler(handler: Handler<Buffer>): NetSocket |
|
open fun hashCode(): Int |
|
open fun indicatedServerName(): String
Returns the SNI server name presented during the SSL handshake by the client. |
|
open fun isSsl(): Boolean |
|
open fun localAddress(): SocketAddress |
|
open static fun newInstance(arg: NetSocket): NetSocket |
|
open fun pause(): NetSocket |
|
open fun remoteAddress(): SocketAddress |
|
open fun resume(): NetSocket |
|
open fun rxSendFile(filename: String): Completableopen fun rxSendFile(filename: String, offset: Long): Completableopen fun rxSendFile(filename: String, offset: Long, length: Long): Completable
Same as |
|
open fun sendFile(filename: String): NetSocketopen fun sendFile(filename: String, offset: Long): NetSocketopen fun sendFile(filename: String, offset: Long, length: Long): NetSocket
Tell the operating system to stream a file as specified by open fun sendFile(filename: String, resultHandler: Handler<AsyncResult<Void>>): NetSocketopen fun sendFile(filename: String, offset: Long, resultHandler: Handler<AsyncResult<Void>>): NetSocketopen fun sendFile(filename: String, offset: Long, length: Long, resultHandler: Handler<AsyncResult<Void>>): NetSocket
Same as |
|
open fun setWriteQueueMaxSize(maxSize: Int): NetSocket |
|
open fun toFlowable(): Flowable<Buffer> |
|
open fun toObservable(): Observable<Buffer> |
|
open fun toString(): String |
|
open fun upgradeToSsl(handler: Handler<Void>): NetSocketopen fun upgradeToSsl(serverName: String, handler: Handler<Void>): NetSocket
Upgrade channel to use SSL/TLS. Be aware that for this to work SSL must be configured. |
|
open fun write(data: Buffer): NetSocketopen fun write(str: String): NetSocket
Write a java.lang.String to the connection, encoded in UTF-8. open fun write(str: String, enc: String): NetSocket
Write a java.lang.String to the connection, encoded using the encoding |
|
open fun writeHandlerID(): String
When a Given this ID, a different event loop can send a buffer 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 connections which are owned by different event loops. |
|
open fun writeQueueFull(): Boolean
This will return |