[][src]Function linux::syscall::socket

pub fn socket(domain: c_int, ty: c_int, proto: c_int) -> c_int

Creates a socket.

[argument, domain] The domain of the socket.

[argument, ty] The type of the socket.

[argument, 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

  • link:man:socket(2)