Function lrs::syscall::socket

Creates a socket.

Syntax

fn socket(domain: i32, ty: i32, proto: i32) -> i32

Arguments

NameDescription
domain

The domain of the socket.

ty

The type of the socket.

proto

The protocol of the socket.

Return value

Returns the socket or an error value.

Remarks

Unless lrs was compiled with the no-auto-cloexec flag, this function automatically adds the SOCK_CLOEXEC flag.

See also