Zig 0.17.0-dev (Split by item)

Shortcut keys
?
Show these tips
S
Focus search field
Esc
Clear focus & close tips
U
Jump to source code
↑
Move up in search results
↓
Move down in search results
↵
Go to active search result
This is an example of documentation generated by ZigDoc, an alternative to Zig's built-in Auto Doc feature. See also examples in other modes/formats. The project being documented here (as the example) is the Zig standard library. Public Struct

ListenOptions

Public Struct
std.Io.net.IpAddress.ListenOptions
pub const ListenOptions = struct

Fields

kernel_backlog: u31 = default_kernel_backlog

How many connections the kernel will accept on the application's behalf. If more than this many connections pool in the kernel, clients will start seeing "Connection refused".

reuse_address: bool = false

Sets SO_REUSEADDR and SO_REUSEPORT on POSIX. Sets SO_REUSEADDR on Windows, which is roughly equivalent.

mode: Socket.Mode = .stream

Only connection-oriented modes may be used here, which includes:

  • Socket.Mode.stream
  • Socket.Mode.seqpacket
protocol: Protocol = .tcp

Only connection-oriented protocols may be used here, which includes:

  • Protocol.tcp
  • Protocol.tp
  • Protocol.dccp
  • Protocol.sctp

File

Io/net.zig:226
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
    pub const ListenOptions = struct {
        /// How many connections the kernel will accept on the application's behalf.
        /// If more than this many connections pool in the kernel, clients will start
        /// seeing "Connection refused".
        kernel_backlog: u31 = default_kernel_backlog,
        /// Sets SO_REUSEADDR and SO_REUSEPORT on POSIX.
        /// Sets SO_REUSEADDR on Windows, which is roughly equivalent.
        reuse_address: bool = false,
        /// Only connection-oriented modes may be used here, which includes:
        /// * `Socket.Mode.stream`
        /// * `Socket.Mode.seqpacket`
        mode: Socket.Mode = .stream,
        /// Only connection-oriented protocols may be used here, which includes:
        /// * `Protocol.tcp`
        /// * `Protocol.tp`
        /// * `Protocol.dccp`
        /// * `Protocol.sctp`
        protocol: Protocol = .tcp,
    }