Module nix::sys::socket
[−]
[src]
Socket interface functions
Modules
| sockopt |
Structs
| CmsgIterator | |
| CmsgSpace |
A structure used to make room in a cmsghdr passed to recvmsg. The size and alignment match that of a cmsghdr followed by a T, but the fields are not accessible, as the actual types will change on a call to recvmsg. |
| IpMembershipRequest |
Request for multicast socket operations |
| Ipv4Addr | |
| Ipv6Addr | |
| Ipv6MembershipRequest |
Request for ipv6 multicast socket operations |
| LinkAddr |
Hardware Address |
| MsgFlags |
Flags for send/recv and their relatives |
| NetlinkAddr | |
| RecvMsg | |
| SockFlag |
Additional socket options |
| UnixAddr |
A wrapper around |
| UnixCredentials |
Unix credentials of the sending process. |
| cmsghdr | |
| msghdr | |
| sockaddr | |
| sockaddr_in | |
| sockaddr_in6 | |
| sockaddr_storage | |
| sockaddr_un |
Enums
| AddressFamily |
These constants specify the protocol family to be used
in |
| ControlMessage |
A type-safe wrapper around a single control message. More types may be added to this enum; do not exhaustively pattern-match it. Further reading |
| InetAddr | |
| IpAddr | |
| Shutdown | |
| SockAddr |
Represents a socket address |
| SockLevel |
The protocol level at which to get / set socket options. Used as an
argument to |
| SockProtocol |
Constants used in |
| SockType |
These constants are used to specify the communication semantics
when creating a socket with |
Traits
| GetSockOpt |
Represents a socket option that can be accessed or set. Used as an argument
to |
| SetSockOpt |
Represents a socket option that can be accessed or set. Used as an argument
to |
Functions
| accept |
Accept a connection on a socket |
| accept4 |
Accept a connection on a socket |
| bind |
Bind a name to a socket |
| connect |
Initiate a connection on a socket |
| getpeername |
Get the address of the peer connected to the socket |
| getsockname |
Get the current address to which the socket |
| getsockopt |
Get the current value for the requested socket option |
| listen |
Listen for connections on a socket |
| recv |
Receive data from a connection-oriented socket. Returns the number of bytes read |
| recvfrom |
Receive data from a connectionless or connection-oriented socket. Returns the number of bytes read and the socket address of the sender. |
| recvmsg |
Receive message in scatter-gather vectors from a socket, and optionally receive ancillary data into the provided buffer. If no ancillary data is desired, use () as the type parameter. |
| send |
Send data to a connection-oriented socket. Returns the number of bytes read |
| sendmsg |
Send data in scatter-gather vectors to a socket, possibly accompanied by ancillary data. Optionally direct the message at the given address, as with sendto. |
| sendto |
Send a message to a socket |
| setsockopt |
Sets the value for the requested socket option |
| shutdown |
Shut down part of a full-duplex connection. |
| sockaddr_storage_to_addr⚠ |
Return the appropriate |
| socket |
Create an endpoint for communication |
| socketpair |
Create a pair of connected sockets |
Type Definitions
| sa_family_t |