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 Name | Type | Meaning |
|---|---|---|
RTSO_MTU | int32 | Maximum Transmission Unit (MTU) |
RTSO_FEC | int32 | Whether to enable Forward Error Correction (FEC) |
RTSO_FAST_ACK | int32 | Whether to enable Fast Acknowledgment mechanism |
RTSO_RCVBUF | int32 | Maximum receive buffer size of the RTTP socket |
RTSO_MODE | int32 | RTTP 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.