pub struct Connect {
    pub local: SocketAddr,
    pub timeout: Duration,
    pub min_version: SrtVersion,
    pub udp_recv_buffer_size: ByteCount,
    pub udp_send_buffer_size: ByteCount,
    pub ip_ttl: u8,
    pub linger: Option<Duration>,
}

Fields

local: SocketAddrtimeout: Duration

Connect timeout. This option applies to the caller and rendezvous connection modes. For the rendezvous mode (see SRTO_RENDEZVOUS) the effective connection timeout will be 10 times the value set with SRTO_CONNTIMEO.

Default is 3 seconds.

min_version: SrtVersion

SRTO_MINVERSION The minimum SRT version that is required from the peer. A connection to a peer that does not satisfy the minimum version requirement will be rejected. See SRTO_VERSION for the version format.

The default value is 0x010000 (SRT v1.0.0).

udp_recv_buffer_size: ByteCount

SRTO_UDP_RCVBUF

UDP Socket Receive Buffer Size. Configured in bytes, maintained in packets based on MSS value. Receive buffer must not be greater than FC size.

Default is 64k

udp_send_buffer_size: ByteCount

SRT_UDP_SNDBUF

UDP Socket Send Buffer Size. Configured in bytes, maintained in packets based on SRTO_MSS value.

Default is 64k

ip_ttl: u8

SRTO_IPTTL

IPv4 Time To Live (see IP_TTL option for IP) or IPv6 unicast hops (see IPV6_UNICAST_HOPS for IPv6) depending on socket address family. Applies to sender only.

When getting, the returned value is the user preset for non-connected sockets and the actual value for connected sockets. Sender: user configurable, default: 64

linger: Option<Duration>

Linger time on close (see SO_LINGER). Set to None to disable linger

Default is 180s

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Returns the “default value” for a type. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Compare self to key and return true if they are equal.

Performs the conversion.

Performs the conversion.

Should always be Self

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.