Error Set ListenError [src]

Errors

AccessDenied SocketError

Permission to create a socket of the specified type and/or pro‐tocol is denied.

AddressFamilyNotSupported SocketError

The implementation does not support the specified address family.

AddressInUse BindError

The given address is already in use, or in the case of Internet domain sockets, The port number was specified as zero in the socket address structure, but, upon attempting to bind to an ephemeral port, it was determined that all port numbers in the ephemeral port range are currently in use. See the discussion of /proc/sys/net/ipv4/ip_local_port_range ip(7).

AddressNotAvailable BindError

A nonexistent interface was requested or the requested address was not local.

AlreadyBound BindError
AlreadyConnected ListenError

Already connected

FileDescriptorNotASocket ListenError

The file descriptor sockfd does not refer to a socket.

FileNotFound BindError

A component in the directory prefix of the socket pathname does not exist.

InvalidProtocolOption SetSockOptError

The option is not supported by the protocol.

NameTooLong BindError

addr is too long.

NetworkSubsystemFailed BindError

The network subsystem has failed.

NoDevice SetSockOptError
NotDir BindError

A component of the path prefix is not a directory.

OperationNotSupported ListenError

The socket is not of a type that supports the listen() operation.

PermissionDenied SetSockOptError

Setting the socket option requires more elevated permissions.

ProcessFdQuotaExceeded SocketError

The per-process limit on the number of open file descriptors has been reached.

ProtocolFamilyNotAvailable SocketError

Unknown protocol, or protocol family not available.

ProtocolNotSupported SocketError

The protocol type or the specified protocol is not supported within this domain.

ReadOnlyFileSystem BindError

The socket inode would reside on a read-only filesystem.

SocketNotBound ListenError

Socket has not been bound yet

SocketTypeNotSupported SocketError

The socket type is not supported by the protocol.

SymLinkLoop BindError

Too many symbolic links were encountered in resolving addr.

SystemFdQuotaExceeded SocketError

The system-wide limit on the total number of open files has been reached.

SystemResources SocketError

Insufficient memory is available. The socket cannot be created until sufficient resources are freed.

TimeoutTooBig SetSockOptError

The send and receive timeout values are too big to fit into the timeout fields in the socket structure.

Unexpected UnexpectedError

The Operating System returned an undocumented error code.

This error is in theory not possible, but it would be better to handle this error than to invoke undefined behavior.

When this error code is observed, it usually means the Zig Standard Library needs a small patch to add the error code to the error set for the respective function.

Source

pub const ListenError = posix.SocketError || posix.BindError || posix.ListenError || posix.SetSockOptError || posix.GetSockNameError