blob: b49c0238cc2dc71d909f2aad41d0e1dabb33d69f [file] [log] [blame]
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="generator" content="rustdoc">
<meta name="description" content="API documentation for the Rust `socket` mod in crate `nix`.">
<meta name="keywords" content="rust, rustlang, rust-lang, socket">
<title>nix::sys::socket - Rust</title>
<link rel="stylesheet" type="text/css" href="../../../normalize.css">
<link rel="stylesheet" type="text/css" href="../../../rustdoc.css">
<link rel="stylesheet" type="text/css" href="../../../main.css">
</head>
<body class="rustdoc mod">
<!--[if lte IE 8]>
<div class="warning">
This old browser is unsupported and will most likely display funky
things.
</div>
<![endif]-->
<nav class="sidebar">
<p class='location'>Module socket</p><div class="block items"><ul><li><a href="#modules">Modules</a></li><li><a href="#structs">Structs</a></li><li><a href="#enums">Enums</a></li><li><a href="#constants">Constants</a></li><li><a href="#traits">Traits</a></li><li><a href="#functions">Functions</a></li><li><a href="#types">Type Definitions</a></li></ul></div><p class='location'><a href='../../index.html'>nix</a>::<wbr><a href='../index.html'>sys</a></p><script>window.sidebarCurrent = {name: 'socket', ty: 'mod', relpath: '../'};</script><script defer src="../sidebar-items.js"></script>
</nav>
<nav class="sub">
<form class="search-form js-only">
<div class="search-container">
<input class="search-input" name="search"
autocomplete="off"
placeholder="Click or press ‘S’ to search, ‘?’ for more options…"
type="search">
</div>
</form>
</nav>
<section id='main' class="content">
<h1 class='fqn'><span class='in-band'>Module <a href='../../index.html'>nix</a>::<wbr><a href='../index.html'>sys</a>::<wbr><a class="mod" href=''>socket</a></span><span class='out-of-band'><span id='render-detail'>
<a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">
[<span class='inner'>&#x2212;</span>]
</a>
</span><a class='srclink' href='../../../src/nix/sys/socket/mod.rs.html#1-677' title='goto source code'>[src]</a></span></h1>
<div class='docblock'><p>Socket interface functions</p>
<p><a href="http://man7.org/linux/man-pages/man7/socket.7.html">Further reading</a></p>
</div><h2 id='modules' class='section-header'><a href="#modules">Modules</a></h2>
<table>
<tr class=' module-item'>
<td><a class="mod" href="sockopt/index.html"
title='mod nix::sys::socket::sockopt'>sockopt</a></td>
<td class='docblock-short'>
</td>
</tr></table><h2 id='structs' class='section-header'><a href="#structs">Structs</a></h2>
<table>
<tr class=' module-item'>
<td><a class="struct" href="struct.CmsgIterator.html"
title='struct nix::sys::socket::CmsgIterator'>CmsgIterator</a></td>
<td class='docblock-short'>
</td>
</tr>
<tr class=' module-item'>
<td><a class="struct" href="struct.CmsgSpace.html"
title='struct nix::sys::socket::CmsgSpace'>CmsgSpace</a></td>
<td class='docblock-short'>
<p>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.</p>
</td>
</tr>
<tr class=' module-item'>
<td><a class="struct" href="struct.Ipv4Addr.html"
title='struct nix::sys::socket::Ipv4Addr'>Ipv4Addr</a></td>
<td class='docblock-short'>
</td>
</tr>
<tr class=' module-item'>
<td><a class="struct" href="struct.Ipv6Addr.html"
title='struct nix::sys::socket::Ipv6Addr'>Ipv6Addr</a></td>
<td class='docblock-short'>
</td>
</tr>
<tr class=' module-item'>
<td><a class="struct" href="struct.MsgFlags.html"
title='struct nix::sys::socket::MsgFlags'>MsgFlags</a></td>
<td class='docblock-short'>
</td>
</tr>
<tr class=' module-item'>
<td><a class="struct" href="struct.NetlinkAddr.html"
title='struct nix::sys::socket::NetlinkAddr'>NetlinkAddr</a></td>
<td class='docblock-short'>
</td>
</tr>
<tr class=' module-item'>
<td><a class="struct" href="struct.RecvMsg.html"
title='struct nix::sys::socket::RecvMsg'>RecvMsg</a></td>
<td class='docblock-short'>
</td>
</tr>
<tr class=' module-item'>
<td><a class="struct" href="struct.SockFlag.html"
title='struct nix::sys::socket::SockFlag'>SockFlag</a></td>
<td class='docblock-short'>
</td>
</tr>
<tr class=' module-item'>
<td><a class="struct" href="struct.UnixAddr.html"
title='struct nix::sys::socket::UnixAddr'>UnixAddr</a></td>
<td class='docblock-short'>
<p>A wrapper around <code>sockaddr_un</code>. We track the length of <code>sun_path</code> (excluding
a terminating null), because it may not be null-terminated. For example,
unconnected and Linux abstract sockets are never null-terminated, and POSIX
does not require that <code>sun_len</code> include the terminating null even for normal
sockets. Note that the actual sockaddr length is greater by
<code>offset_of!(libc::sockaddr_un, sun_path)</code></p>
</td>
</tr>
<tr class=' module-item'>
<td><a class="struct" href="struct.in6_addr.html"
title='struct nix::sys::socket::in6_addr'>in6_addr</a></td>
<td class='docblock-short'>
</td>
</tr>
<tr class=' module-item'>
<td><a class="struct" href="struct.in_addr.html"
title='struct nix::sys::socket::in_addr'>in_addr</a></td>
<td class='docblock-short'>
</td>
</tr>
<tr class=' module-item'>
<td><a class="struct" href="struct.ip_mreq.html"
title='struct nix::sys::socket::ip_mreq'>ip_mreq</a></td>
<td class='docblock-short'>
</td>
</tr>
<tr class=' module-item'>
<td><a class="struct" href="struct.ipv6_mreq.html"
title='struct nix::sys::socket::ipv6_mreq'>ipv6_mreq</a></td>
<td class='docblock-short'>
</td>
</tr>
<tr class=' module-item'>
<td><a class="struct" href="struct.linger.html"
title='struct nix::sys::socket::linger'>linger</a></td>
<td class='docblock-short'>
</td>
</tr>
<tr class=' module-item'>
<td><a class="struct" href="struct.sockaddr.html"
title='struct nix::sys::socket::sockaddr'>sockaddr</a></td>
<td class='docblock-short'>
</td>
</tr>
<tr class=' module-item'>
<td><a class="struct" href="struct.sockaddr_in.html"
title='struct nix::sys::socket::sockaddr_in'>sockaddr_in</a></td>
<td class='docblock-short'>
</td>
</tr>
<tr class=' module-item'>
<td><a class="struct" href="struct.sockaddr_in6.html"
title='struct nix::sys::socket::sockaddr_in6'>sockaddr_in6</a></td>
<td class='docblock-short'>
</td>
</tr>
<tr class=' module-item'>
<td><a class="struct" href="struct.sockaddr_storage.html"
title='struct nix::sys::socket::sockaddr_storage'>sockaddr_storage</a></td>
<td class='docblock-short'>
</td>
</tr>
<tr class=' module-item'>
<td><a class="struct" href="struct.sockaddr_un.html"
title='struct nix::sys::socket::sockaddr_un'>sockaddr_un</a></td>
<td class='docblock-short'>
</td>
</tr>
<tr class=' module-item'>
<td><a class="struct" href="struct.ucred.html"
title='struct nix::sys::socket::ucred'>ucred</a></td>
<td class='docblock-short'>
</td>
</tr></table><h2 id='enums' class='section-header'><a href="#enums">Enums</a></h2>
<table>
<tr class=' module-item'>
<td><a class="enum" href="enum.AddressFamily.html"
title='enum nix::sys::socket::AddressFamily'>AddressFamily</a></td>
<td class='docblock-short'>
</td>
</tr>
<tr class=' module-item'>
<td><a class="enum" href="enum.ControlMessage.html"
title='enum nix::sys::socket::ControlMessage'>ControlMessage</a></td>
<td class='docblock-short'>
<p>A type-safe wrapper around a single control message. More types may
be added to this enum; do not exhaustively pattern-match it.
<a href="http://man7.org/linux/man-pages/man3/cmsg.3.html">Further reading</a></p>
</td>
</tr>
<tr class=' module-item'>
<td><a class="enum" href="enum.InetAddr.html"
title='enum nix::sys::socket::InetAddr'>InetAddr</a></td>
<td class='docblock-short'>
</td>
</tr>
<tr class=' module-item'>
<td><a class="enum" href="enum.IpAddr.html"
title='enum nix::sys::socket::IpAddr'>IpAddr</a></td>
<td class='docblock-short'>
</td>
</tr>
<tr class=' module-item'>
<td><a class="enum" href="enum.Shutdown.html"
title='enum nix::sys::socket::Shutdown'>Shutdown</a></td>
<td class='docblock-short'>
</td>
</tr>
<tr class=' module-item'>
<td><a class="enum" href="enum.SockAddr.html"
title='enum nix::sys::socket::SockAddr'>SockAddr</a></td>
<td class='docblock-short'>
<p>Represents a socket address</p>
</td>
</tr>
<tr class=' module-item'>
<td><a class="enum" href="enum.SockLevel.html"
title='enum nix::sys::socket::SockLevel'>SockLevel</a></td>
<td class='docblock-short'>
<p>The protocol level at which to get / set socket options. Used as an
argument to <code>getsockopt</code> and <code>setsockopt</code>.</p>
</td>
</tr>
<tr class=' module-item'>
<td><a class="enum" href="enum.SockType.html"
title='enum nix::sys::socket::SockType'>SockType</a></td>
<td class='docblock-short'>
</td>
</tr></table><h2 id='constants' class='section-header'><a href="#constants">Constants</a></h2>
<table>
<tr class=' module-item'>
<td><a class="constant" href="constant.AF_INET.html"
title='constant nix::sys::socket::AF_INET'>AF_INET</a></td>
<td class='docblock-short'>
</td>
</tr>
<tr class=' module-item'>
<td><a class="constant" href="constant.AF_INET6.html"
title='constant nix::sys::socket::AF_INET6'>AF_INET6</a></td>
<td class='docblock-short'>
</td>
</tr>
<tr class=' module-item'>
<td><a class="constant" href="constant.AF_LOCAL.html"
title='constant nix::sys::socket::AF_LOCAL'>AF_LOCAL</a></td>
<td class='docblock-short'>
</td>
</tr>
<tr class=' module-item'>
<td><a class="constant" href="constant.AF_NETLINK.html"
title='constant nix::sys::socket::AF_NETLINK'>AF_NETLINK</a></td>
<td class='docblock-short'>
</td>
</tr>
<tr class=' module-item'>
<td><a class="constant" href="constant.AF_PACKET.html"
title='constant nix::sys::socket::AF_PACKET'>AF_PACKET</a></td>
<td class='docblock-short'>
</td>
</tr>
<tr class=' module-item'>
<td><a class="constant" href="constant.AF_UNIX.html"
title='constant nix::sys::socket::AF_UNIX'>AF_UNIX</a></td>
<td class='docblock-short'>
</td>
</tr>
<tr class=' module-item'>
<td><a class="constant" href="constant.INADDR_ANY.html"
title='constant nix::sys::socket::INADDR_ANY'>INADDR_ANY</a></td>
<td class='docblock-short'>
</td>
</tr>
<tr class=' module-item'>
<td><a class="constant" href="constant.INADDR_BROADCAST.html"
title='constant nix::sys::socket::INADDR_BROADCAST'>INADDR_BROADCAST</a></td>
<td class='docblock-short'>
</td>
</tr>
<tr class=' module-item'>
<td><a class="constant" href="constant.INADDR_NONE.html"
title='constant nix::sys::socket::INADDR_NONE'>INADDR_NONE</a></td>
<td class='docblock-short'>
</td>
</tr>
<tr class=' module-item'>
<td><a class="constant" href="constant.IPPROTO_IP.html"
title='constant nix::sys::socket::IPPROTO_IP'>IPPROTO_IP</a></td>
<td class='docblock-short'>
</td>
</tr>
<tr class=' module-item'>
<td><a class="constant" href="constant.IPPROTO_IPV6.html"
title='constant nix::sys::socket::IPPROTO_IPV6'>IPPROTO_IPV6</a></td>
<td class='docblock-short'>
</td>
</tr>
<tr class=' module-item'>
<td><a class="constant" href="constant.IPPROTO_TCP.html"
title='constant nix::sys::socket::IPPROTO_TCP'>IPPROTO_TCP</a></td>
<td class='docblock-short'>
</td>
</tr>
<tr class=' module-item'>
<td><a class="constant" href="constant.IPPROTO_UDP.html"
title='constant nix::sys::socket::IPPROTO_UDP'>IPPROTO_UDP</a></td>
<td class='docblock-short'>
</td>
</tr>
<tr class=' module-item'>
<td><a class="constant" href="constant.IPV6_ADD_MEMBERSHIP.html"
title='constant nix::sys::socket::IPV6_ADD_MEMBERSHIP'>IPV6_ADD_MEMBERSHIP</a></td>
<td class='docblock-short'>
</td>
</tr>
<tr class=' module-item'>
<td><a class="constant" href="constant.IPV6_DROP_MEMBERSHIP.html"
title='constant nix::sys::socket::IPV6_DROP_MEMBERSHIP'>IPV6_DROP_MEMBERSHIP</a></td>
<td class='docblock-short'>
</td>
</tr>
<tr class=' module-item'>
<td><a class="constant" href="constant.IP_ADD_MEMBERSHIP.html"
title='constant nix::sys::socket::IP_ADD_MEMBERSHIP'>IP_ADD_MEMBERSHIP</a></td>
<td class='docblock-short'>
</td>
</tr>
<tr class=' module-item'>
<td><a class="constant" href="constant.IP_DROP_MEMBERSHIP.html"
title='constant nix::sys::socket::IP_DROP_MEMBERSHIP'>IP_DROP_MEMBERSHIP</a></td>
<td class='docblock-short'>
</td>
</tr>
<tr class=' module-item'>
<td><a class="constant" href="constant.IP_MULTICAST_IF.html"
title='constant nix::sys::socket::IP_MULTICAST_IF'>IP_MULTICAST_IF</a></td>
<td class='docblock-short'>
</td>
</tr>
<tr class=' module-item'>
<td><a class="constant" href="constant.IP_MULTICAST_LOOP.html"
title='constant nix::sys::socket::IP_MULTICAST_LOOP'>IP_MULTICAST_LOOP</a></td>
<td class='docblock-short'>
</td>
</tr>
<tr class=' module-item'>
<td><a class="constant" href="constant.IP_MULTICAST_TTL.html"
title='constant nix::sys::socket::IP_MULTICAST_TTL'>IP_MULTICAST_TTL</a></td>
<td class='docblock-short'>
</td>
</tr>
<tr class=' module-item'>
<td><a class="constant" href="constant.MSG_CMSG_CLOEXEC.html"
title='constant nix::sys::socket::MSG_CMSG_CLOEXEC'>MSG_CMSG_CLOEXEC</a></td>
<td class='docblock-short'>
</td>
</tr>
<tr class=' module-item'>
<td><a class="constant" href="constant.MSG_CTRUNC.html"
title='constant nix::sys::socket::MSG_CTRUNC'>MSG_CTRUNC</a></td>
<td class='docblock-short'>
</td>
</tr>
<tr class=' module-item'>
<td><a class="constant" href="constant.MSG_DONTWAIT.html"
title='constant nix::sys::socket::MSG_DONTWAIT'>MSG_DONTWAIT</a></td>
<td class='docblock-short'>
</td>
</tr>
<tr class=' module-item'>
<td><a class="constant" href="constant.MSG_EOR.html"
title='constant nix::sys::socket::MSG_EOR'>MSG_EOR</a></td>
<td class='docblock-short'>
</td>
</tr>
<tr class=' module-item'>
<td><a class="constant" href="constant.MSG_ERRQUEUE.html"
title='constant nix::sys::socket::MSG_ERRQUEUE'>MSG_ERRQUEUE</a></td>
<td class='docblock-short'>
</td>
</tr>
<tr class=' module-item'>
<td><a class="constant" href="constant.MSG_OOB.html"
title='constant nix::sys::socket::MSG_OOB'>MSG_OOB</a></td>
<td class='docblock-short'>
</td>
</tr>
<tr class=' module-item'>
<td><a class="constant" href="constant.MSG_PEEK.html"
title='constant nix::sys::socket::MSG_PEEK'>MSG_PEEK</a></td>
<td class='docblock-short'>
</td>
</tr>
<tr class=' module-item'>
<td><a class="constant" href="constant.MSG_TRUNC.html"
title='constant nix::sys::socket::MSG_TRUNC'>MSG_TRUNC</a></td>
<td class='docblock-short'>
</td>
</tr>
<tr class=' module-item'>
<td><a class="constant" href="constant.SCM_RIGHTS.html"
title='constant nix::sys::socket::SCM_RIGHTS'>SCM_RIGHTS</a></td>
<td class='docblock-short'>
</td>
</tr>
<tr class=' module-item'>
<td><a class="constant" href="constant.SHUT_RD.html"
title='constant nix::sys::socket::SHUT_RD'>SHUT_RD</a></td>
<td class='docblock-short'>
</td>
</tr>
<tr class=' module-item'>
<td><a class="constant" href="constant.SHUT_RDWR.html"
title='constant nix::sys::socket::SHUT_RDWR'>SHUT_RDWR</a></td>
<td class='docblock-short'>
</td>
</tr>
<tr class=' module-item'>
<td><a class="constant" href="constant.SHUT_WR.html"
title='constant nix::sys::socket::SHUT_WR'>SHUT_WR</a></td>
<td class='docblock-short'>
</td>
</tr>
<tr class=' module-item'>
<td><a class="constant" href="constant.SOCK_CLOEXEC.html"
title='constant nix::sys::socket::SOCK_CLOEXEC'>SOCK_CLOEXEC</a></td>
<td class='docblock-short'>
</td>
</tr>
<tr class=' module-item'>
<td><a class="constant" href="constant.SOCK_DGRAM.html"
title='constant nix::sys::socket::SOCK_DGRAM'>SOCK_DGRAM</a></td>
<td class='docblock-short'>
</td>
</tr>
<tr class=' module-item'>
<td><a class="constant" href="constant.SOCK_NONBLOCK.html"
title='constant nix::sys::socket::SOCK_NONBLOCK'>SOCK_NONBLOCK</a></td>
<td class='docblock-short'>
</td>
</tr>
<tr class=' module-item'>
<td><a class="constant" href="constant.SOCK_RAW.html"
title='constant nix::sys::socket::SOCK_RAW'>SOCK_RAW</a></td>
<td class='docblock-short'>
</td>
</tr>
<tr class=' module-item'>
<td><a class="constant" href="constant.SOCK_RDM.html"
title='constant nix::sys::socket::SOCK_RDM'>SOCK_RDM</a></td>
<td class='docblock-short'>
</td>
</tr>
<tr class=' module-item'>
<td><a class="constant" href="constant.SOCK_SEQPACKET.html"
title='constant nix::sys::socket::SOCK_SEQPACKET'>SOCK_SEQPACKET</a></td>
<td class='docblock-short'>
</td>
</tr>
<tr class=' module-item'>
<td><a class="constant" href="constant.SOCK_STREAM.html"
title='constant nix::sys::socket::SOCK_STREAM'>SOCK_STREAM</a></td>
<td class='docblock-short'>
</td>
</tr>
<tr class=' module-item'>
<td><a class="constant" href="constant.SOL_IP.html"
title='constant nix::sys::socket::SOL_IP'>SOL_IP</a></td>
<td class='docblock-short'>
</td>
</tr>
<tr class=' module-item'>
<td><a class="constant" href="constant.SOL_IPV6.html"
title='constant nix::sys::socket::SOL_IPV6'>SOL_IPV6</a></td>
<td class='docblock-short'>
</td>
</tr>
<tr class=' module-item'>
<td><a class="constant" href="constant.SOL_NETLINK.html"
title='constant nix::sys::socket::SOL_NETLINK'>SOL_NETLINK</a></td>
<td class='docblock-short'>
</td>
</tr>
<tr class=' module-item'>
<td><a class="constant" href="constant.SOL_SOCKET.html"
title='constant nix::sys::socket::SOL_SOCKET'>SOL_SOCKET</a></td>
<td class='docblock-short'>
</td>
</tr>
<tr class=' module-item'>
<td><a class="constant" href="constant.SOL_TCP.html"
title='constant nix::sys::socket::SOL_TCP'>SOL_TCP</a></td>
<td class='docblock-short'>
</td>
</tr>
<tr class=' module-item'>
<td><a class="constant" href="constant.SOL_UDP.html"
title='constant nix::sys::socket::SOL_UDP'>SOL_UDP</a></td>
<td class='docblock-short'>
</td>
</tr>
<tr class=' module-item'>
<td><a class="constant" href="constant.SO_ACCEPTCONN.html"
title='constant nix::sys::socket::SO_ACCEPTCONN'>SO_ACCEPTCONN</a></td>
<td class='docblock-short'>
</td>
</tr>
<tr class=' module-item'>
<td><a class="constant" href="constant.SO_BINDTODEVICE.html"
title='constant nix::sys::socket::SO_BINDTODEVICE'>SO_BINDTODEVICE</a></td>
<td class='docblock-short'>
</td>
</tr>
<tr class=' module-item'>
<td><a class="constant" href="constant.SO_BROADCAST.html"
title='constant nix::sys::socket::SO_BROADCAST'>SO_BROADCAST</a></td>
<td class='docblock-short'>
</td>
</tr>
<tr class=' module-item'>
<td><a class="constant" href="constant.SO_BSDCOMPAT.html"
title='constant nix::sys::socket::SO_BSDCOMPAT'>SO_BSDCOMPAT</a></td>
<td class='docblock-short'>
</td>
</tr>
<tr class=' module-item'>
<td><a class="constant" href="constant.SO_BUSY_POLL.html"
title='constant nix::sys::socket::SO_BUSY_POLL'>SO_BUSY_POLL</a></td>
<td class='docblock-short'>
</td>
</tr>
<tr class=' module-item'>
<td><a class="constant" href="constant.SO_DEBUG.html"
title='constant nix::sys::socket::SO_DEBUG'>SO_DEBUG</a></td>
<td class='docblock-short'>
</td>
</tr>
<tr class=' module-item'>
<td><a class="constant" href="constant.SO_DOMAIN.html"
title='constant nix::sys::socket::SO_DOMAIN'>SO_DOMAIN</a></td>
<td class='docblock-short'>
</td>
</tr>
<tr class=' module-item'>
<td><a class="constant" href="constant.SO_DONTROUTE.html"
title='constant nix::sys::socket::SO_DONTROUTE'>SO_DONTROUTE</a></td>
<td class='docblock-short'>
</td>
</tr>
<tr class=' module-item'>
<td><a class="constant" href="constant.SO_ERROR.html"
title='constant nix::sys::socket::SO_ERROR'>SO_ERROR</a></td>
<td class='docblock-short'>
</td>
</tr>
<tr class=' module-item'>
<td><a class="constant" href="constant.SO_KEEPALIVE.html"
title='constant nix::sys::socket::SO_KEEPALIVE'>SO_KEEPALIVE</a></td>
<td class='docblock-short'>
</td>
</tr>
<tr class=' module-item'>
<td><a class="constant" href="constant.SO_LINGER.html"
title='constant nix::sys::socket::SO_LINGER'>SO_LINGER</a></td>
<td class='docblock-short'>
</td>
</tr>
<tr class=' module-item'>
<td><a class="constant" href="constant.SO_MARK.html"
title='constant nix::sys::socket::SO_MARK'>SO_MARK</a></td>
<td class='docblock-short'>
</td>
</tr>
<tr class=' module-item'>
<td><a class="constant" href="constant.SO_OOBINLINE.html"
title='constant nix::sys::socket::SO_OOBINLINE'>SO_OOBINLINE</a></td>
<td class='docblock-short'>
</td>
</tr>
<tr class=' module-item'>
<td><a class="constant" href="constant.SO_ORIGINAL_DST.html"
title='constant nix::sys::socket::SO_ORIGINAL_DST'>SO_ORIGINAL_DST</a></td>
<td class='docblock-short'>
</td>
</tr>
<tr class=' module-item'>
<td><a class="constant" href="constant.SO_PASSCRED.html"
title='constant nix::sys::socket::SO_PASSCRED'>SO_PASSCRED</a></td>
<td class='docblock-short'>
</td>
</tr>
<tr class=' module-item'>
<td><a class="constant" href="constant.SO_PEEK_OFF.html"
title='constant nix::sys::socket::SO_PEEK_OFF'>SO_PEEK_OFF</a></td>
<td class='docblock-short'>
</td>
</tr>
<tr class=' module-item'>
<td><a class="constant" href="constant.SO_PEERCRED.html"
title='constant nix::sys::socket::SO_PEERCRED'>SO_PEERCRED</a></td>
<td class='docblock-short'>
</td>
</tr>
<tr class=' module-item'>
<td><a class="constant" href="constant.SO_PRIORITY.html"
title='constant nix::sys::socket::SO_PRIORITY'>SO_PRIORITY</a></td>
<td class='docblock-short'>
</td>
</tr>
<tr class=' module-item'>
<td><a class="constant" href="constant.SO_PROTOCOL.html"
title='constant nix::sys::socket::SO_PROTOCOL'>SO_PROTOCOL</a></td>
<td class='docblock-short'>
</td>
</tr>
<tr class=' module-item'>
<td><a class="constant" href="constant.SO_RCVBUF.html"
title='constant nix::sys::socket::SO_RCVBUF'>SO_RCVBUF</a></td>
<td class='docblock-short'>
</td>
</tr>
<tr class=' module-item'>
<td><a class="constant" href="constant.SO_RCVBUFFORCE.html"
title='constant nix::sys::socket::SO_RCVBUFFORCE'>SO_RCVBUFFORCE</a></td>
<td class='docblock-short'>
</td>
</tr>
<tr class=' module-item'>
<td><a class="constant" href="constant.SO_RCVLOWAT.html"
title='constant nix::sys::socket::SO_RCVLOWAT'>SO_RCVLOWAT</a></td>
<td class='docblock-short'>
</td>
</tr>
<tr class=' module-item'>
<td><a class="constant" href="constant.SO_RCVTIMEO.html"
title='constant nix::sys::socket::SO_RCVTIMEO'>SO_RCVTIMEO</a></td>
<td class='docblock-short'>
</td>
</tr>
<tr class=' module-item'>
<td><a class="constant" href="constant.SO_REUSEADDR.html"
title='constant nix::sys::socket::SO_REUSEADDR'>SO_REUSEADDR</a></td>
<td class='docblock-short'>
</td>
</tr>
<tr class=' module-item'>
<td><a class="constant" href="constant.SO_REUSEPORT.html"
title='constant nix::sys::socket::SO_REUSEPORT'>SO_REUSEPORT</a></td>
<td class='docblock-short'>
</td>
</tr>
<tr class=' module-item'>
<td><a class="constant" href="constant.SO_RXQ_OVFL.html"
title='constant nix::sys::socket::SO_RXQ_OVFL'>SO_RXQ_OVFL</a></td>
<td class='docblock-short'>
</td>
</tr>
<tr class=' module-item'>
<td><a class="constant" href="constant.SO_SNDBUF.html"
title='constant nix::sys::socket::SO_SNDBUF'>SO_SNDBUF</a></td>
<td class='docblock-short'>
</td>
</tr>
<tr class=' module-item'>
<td><a class="constant" href="constant.SO_SNDBUFFORCE.html"
title='constant nix::sys::socket::SO_SNDBUFFORCE'>SO_SNDBUFFORCE</a></td>
<td class='docblock-short'>
</td>
</tr>
<tr class=' module-item'>
<td><a class="constant" href="constant.SO_SNDLOWAT.html"
title='constant nix::sys::socket::SO_SNDLOWAT'>SO_SNDLOWAT</a></td>
<td class='docblock-short'>
</td>
</tr>
<tr class=' module-item'>
<td><a class="constant" href="constant.SO_SNDTIMEO.html"
title='constant nix::sys::socket::SO_SNDTIMEO'>SO_SNDTIMEO</a></td>
<td class='docblock-short'>
</td>
</tr>
<tr class=' module-item'>
<td><a class="constant" href="constant.SO_TIMESTAMP.html"
title='constant nix::sys::socket::SO_TIMESTAMP'>SO_TIMESTAMP</a></td>
<td class='docblock-short'>
</td>
</tr>
<tr class=' module-item'>
<td><a class="constant" href="constant.SO_TYPE.html"
title='constant nix::sys::socket::SO_TYPE'>SO_TYPE</a></td>
<td class='docblock-short'>
</td>
</tr>
<tr class=' module-item'>
<td><a class="constant" href="constant.TCP_CORK.html"
title='constant nix::sys::socket::TCP_CORK'>TCP_CORK</a></td>
<td class='docblock-short'>
</td>
</tr>
<tr class=' module-item'>
<td><a class="constant" href="constant.TCP_KEEPIDLE.html"
title='constant nix::sys::socket::TCP_KEEPIDLE'>TCP_KEEPIDLE</a></td>
<td class='docblock-short'>
</td>
</tr>
<tr class=' module-item'>
<td><a class="constant" href="constant.TCP_MAXSEG.html"
title='constant nix::sys::socket::TCP_MAXSEG'>TCP_MAXSEG</a></td>
<td class='docblock-short'>
</td>
</tr>
<tr class=' module-item'>
<td><a class="constant" href="constant.TCP_NODELAY.html"
title='constant nix::sys::socket::TCP_NODELAY'>TCP_NODELAY</a></td>
<td class='docblock-short'>
</td>
</tr></table><h2 id='traits' class='section-header'><a href="#traits">Traits</a></h2>
<table>
<tr class=' module-item'>
<td><a class="trait" href="trait.GetSockOpt.html"
title='trait nix::sys::socket::GetSockOpt'>GetSockOpt</a></td>
<td class='docblock-short'>
<p>Represents a socket option that can be accessed or set. Used as an argument
to <code>getsockopt</code></p>
</td>
</tr>
<tr class=' module-item'>
<td><a class="trait" href="trait.SetSockOpt.html"
title='trait nix::sys::socket::SetSockOpt'>SetSockOpt</a></td>
<td class='docblock-short'>
<p>Represents a socket option that can be accessed or set. Used as an argument
to <code>setsockopt</code></p>
</td>
</tr></table><h2 id='functions' class='section-header'><a href="#functions">Functions</a></h2>
<table>
<tr class=' module-item'>
<td><a class="fn" href="fn.accept.html"
title='fn nix::sys::socket::accept'>accept</a></td>
<td class='docblock-short'>
<p>Accept a connection on a socket</p>
</td>
</tr>
<tr class=' module-item'>
<td><a class="fn" href="fn.accept4.html"
title='fn nix::sys::socket::accept4'>accept4</a></td>
<td class='docblock-short'>
<p>Accept a connection on a socket</p>
</td>
</tr>
<tr class=' module-item'>
<td><a class="fn" href="fn.bind.html"
title='fn nix::sys::socket::bind'>bind</a></td>
<td class='docblock-short'>
<p>Bind a name to a socket</p>
</td>
</tr>
<tr class=' module-item'>
<td><a class="fn" href="fn.connect.html"
title='fn nix::sys::socket::connect'>connect</a></td>
<td class='docblock-short'>
<p>Initiate a connection on a socket</p>
</td>
</tr>
<tr class=' module-item'>
<td><a class="fn" href="fn.getpeername.html"
title='fn nix::sys::socket::getpeername'>getpeername</a></td>
<td class='docblock-short'>
<p>Get the address of the peer connected to the socket <code>fd</code>.</p>
</td>
</tr>
<tr class=' module-item'>
<td><a class="fn" href="fn.getsockname.html"
title='fn nix::sys::socket::getsockname'>getsockname</a></td>
<td class='docblock-short'>
<p>Get the current address to which the socket <code>fd</code> is bound.</p>
</td>
</tr>
<tr class=' module-item'>
<td><a class="fn" href="fn.getsockopt.html"
title='fn nix::sys::socket::getsockopt'>getsockopt</a></td>
<td class='docblock-short'>
<p>Get the current value for the requested socket option</p>
</td>
</tr>
<tr class=' module-item'>
<td><a class="fn" href="fn.listen.html"
title='fn nix::sys::socket::listen'>listen</a></td>
<td class='docblock-short'>
<p>Listen for connections on a socket</p>
</td>
</tr>
<tr class=' module-item'>
<td><a class="fn" href="fn.recv.html"
title='fn nix::sys::socket::recv'>recv</a></td>
<td class='docblock-short'>
<p>Receive data from a connection-oriented socket. Returns the number of
bytes read</p>
</td>
</tr>
<tr class=' module-item'>
<td><a class="fn" href="fn.recvfrom.html"
title='fn nix::sys::socket::recvfrom'>recvfrom</a></td>
<td class='docblock-short'>
<p>Receive data from a connectionless or connection-oriented socket. Returns
the number of bytes read and the socket address of the sender.</p>
</td>
</tr>
<tr class=' module-item'>
<td><a class="fn" href="fn.recvmsg.html"
title='fn nix::sys::socket::recvmsg'>recvmsg</a></td>
<td class='docblock-short'>
<p>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.</p>
</td>
</tr>
<tr class=' module-item'>
<td><a class="fn" href="fn.send.html"
title='fn nix::sys::socket::send'>send</a></td>
<td class='docblock-short'>
<p>Send data to a connection-oriented socket. Returns the number of bytes read</p>
</td>
</tr>
<tr class=' module-item'>
<td><a class="fn" href="fn.sendmsg.html"
title='fn nix::sys::socket::sendmsg'>sendmsg</a></td>
<td class='docblock-short'>
<p>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.</p>
</td>
</tr>
<tr class=' module-item'>
<td><a class="fn" href="fn.sendto.html"
title='fn nix::sys::socket::sendto'>sendto</a></td>
<td class='docblock-short'>
</td>
</tr>
<tr class=' module-item'>
<td><a class="fn" href="fn.setsockopt.html"
title='fn nix::sys::socket::setsockopt'>setsockopt</a></td>
<td class='docblock-short'>
<p>Sets the value for the requested socket option</p>
</td>
</tr>
<tr class=' module-item'>
<td><a class="fn" href="fn.shutdown.html"
title='fn nix::sys::socket::shutdown'>shutdown</a></td>
<td class='docblock-short'>
<p>Shut down part of a full-duplex connection.</p>
</td>
</tr>
<tr class=' module-item'>
<td><a class="fn" href="fn.sockaddr_storage_to_addr.html"
title='fn nix::sys::socket::sockaddr_storage_to_addr'>sockaddr_storage_to_addr</a><a title='unsafe function' href='#'><sup></sup></a></td>
<td class='docblock-short'>
<p>Return the appropriate SockAddr type from a <code>sockaddr_storage</code> of a certain
size. In C this would usually be done by casting. The <code>len</code> argument
should be the number of bytes in the sockaddr_storage that are actually
allocated and valid. It must be at least as large as all the useful parts
of the structure. Note that in the case of a <code>sockaddr_un</code>, <code>len</code> need not
include the terminating null.</p>
</td>
</tr>
<tr class=' module-item'>
<td><a class="fn" href="fn.socket.html"
title='fn nix::sys::socket::socket'>socket</a></td>
<td class='docblock-short'>
<p>Create an endpoint for communication</p>
</td>
</tr>
<tr class=' module-item'>
<td><a class="fn" href="fn.socketpair.html"
title='fn nix::sys::socket::socketpair'>socketpair</a></td>
<td class='docblock-short'>
<p>Create a pair of connected sockets</p>
</td>
</tr></table><h2 id='types' class='section-header'><a href="#types">Type Definitions</a></h2>
<table>
<tr class=' module-item'>
<td><a class="type" href="type.InAddrT.html"
title='type nix::sys::socket::InAddrT'>InAddrT</a></td>
<td class='docblock-short'>
</td>
</tr>
<tr class=' module-item'>
<td><a class="type" href="type.IpMulticastTtl.html"
title='type nix::sys::socket::IpMulticastTtl'>IpMulticastTtl</a></td>
<td class='docblock-short'>
</td>
</tr>
<tr class=' module-item'>
<td><a class="type" href="type.sa_family_t.html"
title='type nix::sys::socket::sa_family_t'>sa_family_t</a></td>
<td class='docblock-short'>
</td>
</tr></table></section>
<section id='search' class="content hidden"></section>
<section class="footer"></section>
<aside id="help" class="hidden">
<div>
<h1 class="hidden">Help</h1>
<div class="shortcuts">
<h2>Keyboard Shortcuts</h2>
<dl>
<dt>?</dt>
<dd>Show this help dialog</dd>
<dt>S</dt>
<dd>Focus the search field</dd>
<dt>&larrb;</dt>
<dd>Move up in search results</dd>
<dt>&rarrb;</dt>
<dd>Move down in search results</dd>
<dt>&#9166;</dt>
<dd>Go to active search result</dd>
<dt>+</dt>
<dd>Collapse/expand all sections</dd>
</dl>
</div>
<div class="infos">
<h2>Search Tricks</h2>
<p>
Prefix searches with a type followed by a colon (e.g.
<code>fn:</code>) to restrict the search to a given type.
</p>
<p>
Accepted types are: <code>fn</code>, <code>mod</code>,
<code>struct</code>, <code>enum</code>,
<code>trait</code>, <code>type</code>, <code>macro</code>,
and <code>const</code>.
</p>
<p>
Search functions by type signature (e.g.
<code>vec -> usize</code> or <code>* -> vec</code>)
</p>
</div>
</div>
</aside>
<script>
window.rootPath = "../../../";
window.currentCrate = "nix";
</script>
<script src="../../../main.js"></script>
<script defer src="../../../search-index.js"></script>
</body>
</html>