Skip to main content

rt_setsockopt

Description

The rt_setsockopt function is used to configure various operational parameters of an RTTP socket.

Syntax:

int rt_setsockopt(RTEngine engine, RTSOCKET s, int optname, void *optval, int optlen);

Parameters:

engine: The pointer to the RTTP engine instance returned by rt_init(). s: The RTTP socket descriptor. optname: The name of the RTTP socket option to set.

Option NameTypeMeaning
RTSO_MTUint32Maximum Transmission Unit (MTU)
RTSO_FECint32Whether to enable Forward Error Correction (FEC)
RTSO_FAST_ACKint32Whether to enable Fast Acknowledgment mechanism
RTSO_RCVBUFint32Maximum receive buffer size of the RTTP socket
RTSO_MODEint32RTTP transmission mode

optval: A pointer to the buffer specifying the requested option value. optlen: The size of the buffer (in bytes) pointed to by the optval parameter.

Return Value:

Returns 0 on success; returns a negative error code on failure.