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))
}

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))

Functions

pub fn merge_with_defaults(options: List(TcpOption)) -> List(
  TcpOption,
)
pub fn to_map(options: List(TcpOption)) -> Map(Atom, Dynamic)
Search Document