glisten/socket/options
Types
Mapping to the {active, _}
option
pub type ActiveState {
Once
Passive
Count(Int)
Active
}
Constructors
-
Once
-
Passive
-
Count(Int)
-
Active
Mode for the socket. Currently list
is not supported
pub type SocketMode {
Binary
}
Constructors
-
Binary
Options for the TCP socket
pub type TcpOption {
Backlog(Int)
Nodelay(Bool)
Linger(#(Bool, Int))
SendTimeout(Int)
SendTimeoutClose(Bool)
Reuseaddr(Bool)
ActiveMode(ActiveState)
Mode(SocketMode)
Certfile(String)
Keyfile(String)
AlpnPreferredProtocols(List(String))
Inet6
Buffer(Int)
}
Constructors
-
Backlog(Int)
-
Nodelay(Bool)
-
Linger(#(Bool, Int))
-
SendTimeout(Int)
-
SendTimeoutClose(Bool)
-
Reuseaddr(Bool)
-
ActiveMode(ActiveState)
-
Mode(SocketMode)
-
Certfile(String)
-
Keyfile(String)
-
AlpnPreferredProtocols(List(String))
-
Inet6
-
Buffer(Int)
Constants
pub const default_options: List(TcpOption)
Functions
pub fn merge_with_defaults(
options: List(TcpOption),
) -> List(TcpOption)