pub enum SocketOption<'a> {
Show 23 variants
ReuseAddr(i32),
ReceiveTimeout(nrf_timeval),
SendTimeout(nrf_timeval),
BindToPdn(i32),
ExceptionalData(i32),
KeepOpen(i32),
Rai(i32),
SilenceAll(i32),
IpEchoReply(i32),
Ipv6EchoReply(i32),
Ipv6DelayedAddrRefresh(i32),
TcpServerSessionTimeout(i32),
TlsHostName(&'a str),
TlsPeerVerify(i32),
TlsSessionCache(i32),
TlsTagList(&'a [nrf_sec_tag_t]),
TlsCipherSuiteList(&'a [i32]),
TlsRole(i32),
TlsSessionCachePurge(i32),
DtlsHandshakeTimeout(i32),
DtlsCid(i32),
DtlsConnSave(i32),
DtlsConnLoad(i32),
}Expand description
Socket configuration options.
These options can be set using Socket::set_option to configure various
aspects of socket behavior including timeouts, TLS settings, PDN binding,
and protocol-specific options.
Variants§
ReuseAddr(i32)
Non-zero requests reuse of local addresses in bind (protocol-specific).
ReceiveTimeout(nrf_timeval)
Timeout value for socket receive and accept operations.
Minimum supported resolution is 1 millisecond.
SendTimeout(nrf_timeval)
Timeout value for socket send operation.
Minimum supported resolution is 1 millisecond.
BindToPdn(i32)
Bind this socket to a specific PDN ID.
ExceptionalData(i32)
Send data on socket as part of exceptional event.
Requires network support and PDN configuration with AT%EXCEPTIONALDATA.
KeepOpen(i32)
Keep the socket open when its PDN connection is lost, or the device is set to flight mode.
Rai(i32)
Release Assistance Indication (RAI).
Values: NRF_RAI_NO_DATA, NRF_RAI_LAST, NRF_RAI_ONE_RESP, NRF_RAI_ONGOING, NRF_RAI_WAIT_MORE
SilenceAll(i32)
Non-zero disables ICMP echo replies on both IPv4 and IPv6.
IpEchoReply(i32)
Non-zero enables ICMP echo replies on IPv4.
Ipv6EchoReply(i32)
Non-zero enables ICMP echo replies on IPv6.
Ipv6DelayedAddrRefresh(i32)
Non-zero delays IPv6 address refresh during power saving mode.
TcpServerSessionTimeout(i32)
Configure TCP server session inactivity timeout (0-135 seconds).
TlsHostName(&'a str)
Set the hostname used for peer verification.
TlsPeerVerify(i32)
Set the peer verification level.
Values: 0 (disabled), 1 (optional), 2 (required)
TlsSessionCache(i32)
Non-zero enables TLS session caching.
TlsTagList(&'a [nrf_sec_tag_t])
Set/get the security tag associated with a socket.
TlsCipherSuiteList(&'a [i32])
Set/get allowed cipher suite list.
TlsRole(i32)
Set the role for the connection (client or server).
Values: 0 (client), 1 (server)
TlsSessionCachePurge(i32)
Delete TLS session cache (write-only).
DtlsHandshakeTimeout(i32)
Set the DTLS handshake timeout.
Values: 0 (no timeout), or specific timeout values
DtlsCid(i32)
Set DTLS Connection ID setting.
Values: 0 (disabled), 1 (supported), 2 (enabled)
DtlsConnSave(i32)
Save DTLS connection (write-only).
DtlsConnLoad(i32)
Load DTLS connection (write-only).