recv

fun recv(size: Int): ByteArray

Received a message from a remote device

See Also: srt_recv

Return

the ByteArray that contains the received message.

Parameters

size

Size of the expected message.

Throws

if it has failed to send message

if a timeout has been triggered


fun recv(buffer: ByteArray, offset: Int = 0, byteCount: Int = buffer.size): Int

Received a message from a remote device

See Also: srt_recv

Return

the number of bytes received.

Parameters

buffer

the ByteArray where received data are copied to.

offset

the offset in the specified buffer.

byteCount

the size of the specified buffer.

Throws

if it has failed to send message

if a timeout has been triggered


fun recv(size: Int, msgCtrl: MsgCtrl): ByteArray

Received a message from a remote device

See Also: srt_recvmsg2

Return

the ByteArray that contains the received message.

Parameters

size

Size of the expected message.

msgCtrl

the MsgCtrl that contains extra parameter

Throws

if it has failed to send message

if a timeout has been triggered


fun recv(buffer: ByteArray, offset: Int = 0, byteCount: Int = buffer.size, msgCtrl: MsgCtrl): Int

Received a message from a remote device

See Also: srt_recvmsg2

Return

the number of bytes received.

Parameters

buffer

the ByteArray where received data are copied to.

offset

the offset in the specified buffer.

byteCount

the size of the specified buffer.

msgCtrl

the MsgCtrl that contains extra parameter

Throws

if it has failed to send message

if a timeout has been triggered