vertx / io.vertx.rxjava.core.datagram / DatagramSocket / send

send

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.

Parameters

packet - the io.vertx.rxjava.core.buffer.Buffer to write

port - the host port of the remote peer

host - the host address of the remote peer

handler - the io.vertx.rxjava.core.Handler to notify once the write completes.

Return
a reference to this, so the API can be used fluently

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.

Parameters

str - the java.lang.String to write

port - the host port of the remote peer

host - the host address of the remote peer

handler - the io.vertx.rxjava.core.Handler to notify once the write completes.

Return
a reference to this, so the API can be used fluently

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.

Parameters

str - the java.lang.String to write

enc - the charset used for encoding

port - the host port of the remote peer

host - the host address of the remote peer

handler - the io.vertx.rxjava.core.Handler to notify once the write completes.

Return
a reference to this, so the API can be used fluently