open class DatagramSocket : ReadStream<DatagramPacket>, Measured
A datagram socket can be used to send io.vertx.rxjava.core.datagram.DatagramPacket's to remote datagram servers and receive io.vertx.rxjava.core.datagram.DatagramPackets .
Usually you use a datagram socket to send UDP over the wire. UDP is connection-less which means you are not connected to the remote peer in a persistent way. Because of this you have to supply the address and port of the remote peer when sending data.
You can send data to ipv4 or ipv6 addresses, which also include multicast addresses.
Please consult the documentation for more information on datagram sockets.
NOTE: This class has been automatically generated from the io.vertx.core.datagram.DatagramSocket non RX-ified interface using Vert.x codegen.
DatagramSocket(delegate: DatagramSocket) |
static val __TYPE_ARG: TypeArg<DatagramSocket> |
open fun blockMulticastGroup(multicastAddress: String, sourceToBlock: String, handler: Handler<AsyncResult<DatagramSocket>>): DatagramSocket
Block the given address for the given multicast address and notifies the once the operation completes. open fun blockMulticastGroup(multicastAddress: String, networkInterface: String, sourceToBlock: String, handler: Handler<AsyncResult<DatagramSocket>>): DatagramSocket
Block the given address for the given multicast address on the given network interface and notifies the once the operation completes. |
|
open fun close(handler: Handler<AsyncResult<Void>>): Unit
Closes the io.vertx.rxjava.core.datagram.DatagramSocket implementation asynchronous and notifies the handler once done. open fun close(): Unit
Closes the io.vertx.rxjava.core.datagram.DatagramSocket. The close itself is asynchronous. |
|
open fun endHandler(endHandler: Handler<Void>): DatagramSocket |
|
open fun equals(other: Any?): Boolean |
|
open fun exceptionHandler(handler: Handler<Throwable>): DatagramSocket |
|
open fun getDelegate(): DatagramSocket |
|
open fun handler(handler: Handler<DatagramPacket>): DatagramSocket |
|
open fun hashCode(): Int |
|
open fun isMetricsEnabled(): Boolean
Whether the metrics are enabled for this measured object |
|
open fun listen(port: Int, host: String, handler: Handler<AsyncResult<DatagramSocket>>): DatagramSocket
Start listening on the given port and host. The handler will be called when the socket is listening. |
|
open fun listenMulticastGroup(multicastAddress: String, handler: Handler<AsyncResult<DatagramSocket>>): DatagramSocket
Joins a multicast group and listens for packets send to it. The is notified once the operation completes. open fun listenMulticastGroup(multicastAddress: String, networkInterface: String, source: String, handler: Handler<AsyncResult<DatagramSocket>>): DatagramSocket
Joins a multicast group and listens for packets send to it on the given network interface. The is notified once the operation completes. |
|
open fun localAddress(): SocketAddress
Return the io.vertx.rxjava.core.net.SocketAddress to which this io.vertx.rxjava.core.datagram.DatagramSocket is bound. |
|
open static fun newInstance(arg: DatagramSocket): DatagramSocket |
|
open fun pause(): DatagramSocket |
|
open fun resume(): DatagramSocket |
|
open fun rxBlockMulticastGroup(multicastAddress: String, sourceToBlock: String): Single<DatagramSocket>
Block the given address for the given multicast address and notifies the once the operation completes. open fun rxBlockMulticastGroup(multicastAddress: String, networkInterface: String, sourceToBlock: String): Single<DatagramSocket>
Block the given address for the given multicast address on the given network interface and notifies the once the operation completes. |
|
open fun rxClose(): Single<Void>
Closes the io.vertx.rxjava.core.datagram.DatagramSocket implementation asynchronous and notifies the handler once done. |
|
open fun rxListen(port: Int, host: String): Single<DatagramSocket>
Start listening on the given port and host. The handler will be called when the socket is listening. |
|
open fun rxListenMulticastGroup(multicastAddress: String): Single<DatagramSocket>
Joins a multicast group and listens for packets send to it. The is notified once the operation completes. open fun rxListenMulticastGroup(multicastAddress: String, networkInterface: String, source: String): Single<DatagramSocket>
Joins a multicast group and listens for packets send to it on the given network interface. The is notified once the operation completes. |
|
open fun rxSend(packet: Buffer, port: Int, host: String): Single<DatagramSocket>
Write the given io.vertx.rxjava.core.buffer.Buffer to the io.vertx.rxjava.core.net.SocketAddress. The io.vertx.rxjava.core.Handler will be notified once the write completes. open fun rxSend(str: String, port: Int, host: String): Single<DatagramSocket>
Write the given java.lang.String to the io.vertx.rxjava.core.net.SocketAddress using UTF8 encoding. The will be notified once the write completes. open fun rxSend(str: String, enc: String, port: Int, host: String): Single<DatagramSocket>
Write the given java.lang.String to the io.vertx.rxjava.core.net.SocketAddress using the given encoding. The will be notified once the write completes. |
|
open fun rxUnlistenMulticastGroup(multicastAddress: String): Single<DatagramSocket>
Leaves a multicast group and stops listening for packets send to it. The is notified once the operation completes. open fun rxUnlistenMulticastGroup(multicastAddress: String, networkInterface: String, source: String): Single<DatagramSocket>
Leaves a multicast group and stops listening for packets send to it on the given network interface. The is notified once the operation completes. |
|
open fun send(packet: Buffer, port: Int, host: String, handler: Handler<AsyncResult<DatagramSocket>>): DatagramSocket
Write the given io.vertx.rxjava.core.buffer.Buffer to the io.vertx.rxjava.core.net.SocketAddress. The io.vertx.rxjava.core.Handler will be notified once the write completes. open fun send(str: String, port: Int, host: String, handler: Handler<AsyncResult<DatagramSocket>>): DatagramSocket
Write the given java.lang.String to the io.vertx.rxjava.core.net.SocketAddress using UTF8 encoding. The will be notified once the write completes. open fun send(str: String, enc: String, port: Int, host: String, handler: Handler<AsyncResult<DatagramSocket>>): DatagramSocket
Write the given java.lang.String to the io.vertx.rxjava.core.net.SocketAddress using the given encoding. The will be notified once the write completes. |
|
open fun sender(port: Int, host: String): WriteStream<Buffer>
Returns a |
|
open fun toObservable(): Observable<DatagramPacket> |
|
open fun toString(): String |
|
open fun unlistenMulticastGroup(multicastAddress: String, handler: Handler<AsyncResult<DatagramSocket>>): DatagramSocket
Leaves a multicast group and stops listening for packets send to it. The is notified once the operation completes. open fun unlistenMulticastGroup(multicastAddress: String, networkInterface: String, source: String, handler: Handler<AsyncResult<DatagramSocket>>): DatagramSocket
Leaves a multicast group and stops listening for packets send to it on the given network interface. The is notified once the operation completes. |