Available on crate feature
socket
only.Expand description
Socket interface functions
Modules§
- Socket options as used by
setsockopt
andgetsockopt
.
Structs§
- CmsgIterator
uio
- Request for multicast socket operations
- Request for ipv6 multicast socket operations
- Hardware Address
- Flags for send/recv and their relatives
- RecvMsg
uio
Contains outcome of sending or receiving a message - Additional socket options
- An IPv4 socket address
- An IPv6 socket address
- SysControlAddr
ioctl
Apple system control socket - A wrapper around
sockaddr_un
. - Socket address for VMWare VSockets protocol
- Return type of
LocalPeerCred
Enums§
- These constants specify the protocol family to be used in
socket
andsocketpair
- A type-safe zero-copy wrapper around a single control message, as used with
sendmsg
. More types may be added to this enum; do not exhaustively pattern-match it. - A type-safe wrapper around a single control message, as used with
recvmsg
. - Constants used in
socket
andsocketpair
to specify the protocol to use. - These constants are used to specify the communication semantics when creating a socket with
socket()
Traits§
- Represents a socket option that can be retrieved.
- Represents a socket option that can be set.
- Anything that, in C, can be cast back and forth to
sockaddr
.
Functions§
- Accept a connection on a socket
- Bind a name to a socket
- Initiate a connection on a socket
- Get the address of the peer connected to the socket
fd
. - Get the current address to which the socket
fd
is bound. - Get the current value for the requested socket option
- Listen for connections on a socket
- Receive data from a connection-oriented socket. Returns the number of bytes read
- Receive data from a connectionless or connection-oriented socket. Returns the number of bytes read and, for connectionless sockets, the socket address of the sender.
- recvmsg
uio
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 data to a connection-oriented socket. Returns the number of bytes read
- sendmsg
uio
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. - Send a message to a socket
- Sets the value for the requested socket option
- Shut down part of a full-duplex connection.
- Create an endpoint for communication
- Create a pair of connected sockets
Type Aliases§
Unions§
- A container for any sockaddr type