send

fun send(msg: ByteBuffer): Int

Sends a message to a remote party.

See Also: srt_send

Return

the number of byte sent

Parameters

msg

the ByteBuffer to send. It must be allocate with ByteBuffer.allocateDirect. It sends ByteBuffer from ByteBuffer.position to ByteBuffer.limit.

See also

Throws

if it has failed to send message

if a timeout has been triggered


fun send(msg: ByteArray, offset: Int, size: Int): Int

Sends a message to a remote party.

See Also: srt_send

Return

the number of byte sent

Parameters

msg

the ByteArray to send

offset

the offset of the msg

size

the size of the msg to send

See also

Throws

if it has failed to send message

if a timeout has been triggered


fun send(msg: ByteArray): Int

Sends a message to a remote party.

See Also: srt_send

Return

the number of byte sent

Parameters

msg

the ByteArray to send

See also

Throws

if it has failed to send message

if a timeout has been triggered


fun send(msg: String): Int

Sends a message to a remote party.

See Also: srt_send

Return

the number of byte sent

Parameters

msg

the String to send

See also

Throws

if it has failed to send message

if a timeout has been triggered


fun send(msg: ByteBuffer, ttl: Int = -1, inOrder: Boolean = false): Int

Sends a message to a remote party.

See Also: srt_sendmsg

Return

the number of byte sent

Parameters

msg

the ByteBuffer to send. It must be allocate with ByteBuffer.allocateDirect. It sends ByteBuffer from ByteBuffer.position to ByteBuffer.limit.

ttl

the time (in ms) to wait for a successful delivery. -1 means no time limitation.

inOrder

Required to be received in the order of sending.

See also

Throws

if it has failed to send message

if a timeout has been triggered


fun send(msg: ByteArray, offset: Int, size: Int, ttl: Int = -1, inOrder: Boolean = false): Int

Sends a message to a remote party.

See Also: srt_sendmsg

Return

the number of byte sent

Parameters

msg

the ByteArray to send

offset

the offset of the msg

size

the size of the msg to send

ttl

the time (in ms) to wait for a successful delivery. -1 means no time limitation.

inOrder

Required to be received in the order of sending.

See also

Throws

if it has failed to send message

if a timeout has been triggered


fun send(msg: ByteArray, ttl: Int = -1, inOrder: Boolean = false): Int

Sends a message to a remote party.

See Also: srt_sendmsg

Return

the number of byte sent

Parameters

msg

the ByteArray to send

ttl

the time (in ms) to wait for a successful delivery. -1 means no time limitation.

inOrder

Required to be received in the order of sending.

See also

Throws

if it has failed to send message

if a timeout has been triggered


fun send(msg: String, ttl: Int = -1, inOrder: Boolean = false): Int

Sends a message to a remote party.

See Also: srt_sendmsg

Return

the number of byte sent

Parameters

msg

the String to send

ttl

the time (in ms) to wait for a successful delivery. -1 means no time limitation.

inOrder

Required to be received in the order of sending.

See also

Throws

if it has failed to send message

if a timeout has been triggered


fun send(msg: ByteBuffer, msgCtrl: MsgCtrl): Int

Sends a message to a remote party.

See Also: srt_sendmsg2

Return

the number of byte sent

Parameters

msg

the ByteBuffer to send. It must be allocate with ByteBuffer.allocateDirect. It sends ByteBuffer from ByteBuffer.position to ByteBuffer.limit.

msgCtrl

the MsgCtrl that contains extra parameter

See also

Throws

if it has failed to send message

if a timeout has been triggered


fun send(msg: ByteArray, offset: Int, size: Int, msgCtrl: MsgCtrl): Int

Sends a message to a remote party.

See Also: srt_sendmsg2

Return

the number of byte sent

Parameters

msg

the ByteArray to send

offset

the offset of the msg

size

the size of the msg to send

msgCtrl

the MsgCtrl that contains extra parameter

See also

Throws

if it has failed to send message

if a timeout has been triggered


fun send(msg: ByteArray, msgCtrl: MsgCtrl): Int

Sends a message to a remote party.

See Also: srt_sendmsg2

Return

the number of byte sent

Parameters

msg

the ByteArray to send

msgCtrl

the MsgCtrl that contains extra parameter

See also

Throws

if it has failed to send message

if a timeout has been triggered


fun send(msg: String, msgCtrl: MsgCtrl): Int

Sends a message to a remote party.

See Also: srt_sendmsg2

Return

the number of byte sent

Parameters

msg

the String to send

msgCtrl

the MsgCtrl that contains extra parameter

See also

Throws

if it has failed to send message

if a timeout has been triggered