/kdewebdev-3.5.10/php/ref.sockets.html
HTML | 1293 lines | 1275 code | 18 blank | 0 comment | 0 complexity | edf05fe11e218028b2545f5df9c2a90f MD5 | raw file
Possible License(s): AGPL-1.0, CC-BY-SA-3.0, GPL-2.0
- <HTML
- ><HEAD
- ><TITLE
- >Socket functions</TITLE
- ><META
- NAME="GENERATOR"
- CONTENT="Modular DocBook HTML Stylesheet Version 1.7"><LINK
- REL="HOME"
- TITLE="PHP Manual"
- HREF="index.html"><LINK
- REL="UP"
- TITLE="Function Reference"
- HREF="funcref.html"><LINK
- REL="PREVIOUS"
- TITLE="snmpwalkoid"
- HREF="function.snmpwalkoid.html"><LINK
- REL="NEXT"
- TITLE="socket_accept"
- HREF="function.socket-accept.html"><META
- HTTP-EQUIV="Content-type"
- CONTENT="text/html; charset=ISO-8859-1"></HEAD
- ><BODY
- CLASS="reference"
- BGCOLOR="#FFFFFF"
- TEXT="#000000"
- LINK="#0000FF"
- VLINK="#840084"
- ALINK="#0000FF"
- ><DIV
- CLASS="NAVHEADER"
- ><TABLE
- SUMMARY="Header navigation table"
- WIDTH="100%"
- BORDER="0"
- CELLPADDING="0"
- CELLSPACING="0"
- ><TR
- ><TH
- COLSPAN="3"
- ALIGN="center"
- >PHP Manual</TH
- ></TR
- ><TR
- ><TD
- WIDTH="10%"
- ALIGN="left"
- VALIGN="bottom"
- ><A
- HREF="function.snmpwalkoid.html"
- ACCESSKEY="P"
- >Prev</A
- ></TD
- ><TD
- WIDTH="80%"
- ALIGN="center"
- VALIGN="bottom"
- ></TD
- ><TD
- WIDTH="10%"
- ALIGN="right"
- VALIGN="bottom"
- ><A
- HREF="function.socket-accept.html"
- ACCESSKEY="N"
- >Next</A
- ></TD
- ></TR
- ></TABLE
- ><HR
- ALIGN="LEFT"
- WIDTH="100%"></DIV
- ><DIV
- CLASS="reference"
- ><A
- NAME="ref.sockets"
- ></A
- ><DIV
- CLASS="TITLEPAGE"
- ><H1
- CLASS="title"
- >XCVII. Socket functions</H1
- ><DIV
- CLASS="PARTINTRO"
- ><A
- NAME="AEN86785"
- ></A
- ><DIV
- CLASS="section"
- ><H1
- CLASS="section"
- ><A
- NAME="sockets.intro"
- ></A
- >Introduction</H1
- ><P
- > The socket extension implements a low-level interface to the socket
- communication functions based on the popular BSD sockets, providing the
- possibility to act as a socket server as well as a client.
- </P
- ><P
- > For a more generic client-side socket interface, see
- <A
- HREF="function.fsockopen.html"
- ><B
- CLASS="function"
- >fsockopen()</B
- ></A
- > and
- <A
- HREF="function.pfsockopen.html"
- ><B
- CLASS="function"
- >pfsockopen()</B
- ></A
- >.
- </P
- ><P
- > When using these functions, it is important to remember that while
- many of them have identical names to their C counterparts, they
- often have different declarations. Please be sure to read the
- descriptions to avoid confusion.
- </P
- ><P
- > Those unfamiliar with socket programming can find a lot
- of useful material in the appropriate Unix man pages, and there is a great
- deal of tutorial information on socket programming in C on the web, much
- of which can be applied, with slight modifications, to socket programming
- in PHP. The <A
- HREF="http://www.developerweb.net/sock-faq/"
- TARGET="_top"
- >UNIX Socket
- FAQ</A
- > might be a good start.
- </P
- ><DIV
- CLASS="warning"
- ><P
- ></P
- ><TABLE
- CLASS="warning"
- BORDER="1"
- WIDTH="100%"
- ><TR
- ><TD
- ALIGN="CENTER"
- ><B
- >Warning</B
- ></TD
- ></TR
- ><TR
- ><TD
- ALIGN="LEFT"
- ><P
- >This extension is
- <SPAN
- CLASS="emphasis"
- ><I
- CLASS="emphasis"
- >EXPERIMENTAL</I
- ></SPAN
- >. The behaviour of this extension --
- including the names of its functions and anything else documented
- about this extension -- may change without notice in a future release of PHP.
- Use this extension at your own risk.</P
- ></TD
- ></TR
- ></TABLE
- ></DIV
- ></DIV
- ><DIV
- CLASS="section"
- ><H1
- CLASS="section"
- ><A
- NAME="sockets.requirements"
- ></A
- >Requirements</H1
- ><P
- >No external libraries are needed to build this extension.</P
- ></DIV
- ><DIV
- CLASS="section"
- ><H1
- CLASS="section"
- ><A
- NAME="sockets.installation"
- ></A
- >Installation</H1
- ><P
- > The socket functions described here are part of an extension to
- PHP which must be enabled at compile time by giving the <TT
- CLASS="option"
- >--enable-sockets</TT
- > option to
- <B
- CLASS="command"
- >configure</B
- >.
- </P
- ></DIV
- ><DIV
- CLASS="section"
- ><H1
- CLASS="section"
- ><A
- NAME="sockets.configuration"
- ></A
- >Runtime Configuration</H1
- ><P
- >This extension has no configuration directives defined in <TT
- CLASS="filename"
- >php.ini</TT
- >.</P
- ></DIV
- ><DIV
- CLASS="section"
- ><H1
- CLASS="section"
- ><A
- NAME="sockets.resources"
- ></A
- >Resource Types</H1
- ><P
- >This extension has no resource types defined.</P
- ></DIV
- ><DIV
- CLASS="section"
- ><H1
- CLASS="section"
- ><A
- NAME="sockets.constants"
- ></A
- >Predefined Constants</H1
- ><P
- > The constants below are defined by this extension, and
- will only be available when the extension has either
- been compiled into PHP or dynamically loaded at runtime.
- </P
- ><P
- ></P
- ><DIV
- CLASS="variablelist"
- ><DL
- ><DT
- ><TT
- CLASS="constant"
- ><B
- >AF_UNIX</B
- ></TT
- >
- (<A
- HREF="language.types.integer.html"
- >integer</A
- >)</DT
- ><DD
- ><P
- >
- </P
- ></DD
- ><DT
- ><TT
- CLASS="constant"
- ><B
- >AF_INET</B
- ></TT
- >
- (<A
- HREF="language.types.integer.html"
- >integer</A
- >)</DT
- ><DD
- ><P
- >
- </P
- ></DD
- ><DT
- ><TT
- CLASS="constant"
- ><B
- >SOCK_STREAM</B
- ></TT
- >
- (<A
- HREF="language.types.integer.html"
- >integer</A
- >)</DT
- ><DD
- ><P
- >
- </P
- ></DD
- ><DT
- ><TT
- CLASS="constant"
- ><B
- >SOCK_DGRAM</B
- ></TT
- >
- (<A
- HREF="language.types.integer.html"
- >integer</A
- >)</DT
- ><DD
- ><P
- >
- </P
- ></DD
- ><DT
- ><TT
- CLASS="constant"
- ><B
- >SOCK_RAW</B
- ></TT
- >
- (<A
- HREF="language.types.integer.html"
- >integer</A
- >)</DT
- ><DD
- ><P
- >
- </P
- ></DD
- ><DT
- ><TT
- CLASS="constant"
- ><B
- >SOCK_SEQPACKET</B
- ></TT
- >
- (<A
- HREF="language.types.integer.html"
- >integer</A
- >)</DT
- ><DD
- ><P
- >
- </P
- ></DD
- ><DT
- ><TT
- CLASS="constant"
- ><B
- >SOCK_RDM</B
- ></TT
- >
- (<A
- HREF="language.types.integer.html"
- >integer</A
- >)</DT
- ><DD
- ><P
- >
- </P
- ></DD
- ><DT
- ><TT
- CLASS="constant"
- ><B
- >MSG_OOB</B
- ></TT
- >
- (<A
- HREF="language.types.integer.html"
- >integer</A
- >)</DT
- ><DD
- ><P
- >
- </P
- ></DD
- ><DT
- ><TT
- CLASS="constant"
- ><B
- >MSG_WAITALL</B
- ></TT
- >
- (<A
- HREF="language.types.integer.html"
- >integer</A
- >)</DT
- ><DD
- ><P
- >
- </P
- ></DD
- ><DT
- ><TT
- CLASS="constant"
- ><B
- >MSG_PEEK</B
- ></TT
- >
- (<A
- HREF="language.types.integer.html"
- >integer</A
- >)</DT
- ><DD
- ><P
- >
- </P
- ></DD
- ><DT
- ><TT
- CLASS="constant"
- ><B
- >MSG_DONTROUTE</B
- ></TT
- >
- (<A
- HREF="language.types.integer.html"
- >integer</A
- >)</DT
- ><DD
- ><P
- >
- </P
- ></DD
- ><DT
- ><TT
- CLASS="constant"
- ><B
- >SO_DEBUG</B
- ></TT
- >
- (<A
- HREF="language.types.integer.html"
- >integer</A
- >)</DT
- ><DD
- ><P
- >
- </P
- ></DD
- ><DT
- ><TT
- CLASS="constant"
- ><B
- >SO_REUSEADDR</B
- ></TT
- >
- (<A
- HREF="language.types.integer.html"
- >integer</A
- >)</DT
- ><DD
- ><P
- >
- </P
- ></DD
- ><DT
- ><TT
- CLASS="constant"
- ><B
- >SO_KEEPALIVE</B
- ></TT
- >
- (<A
- HREF="language.types.integer.html"
- >integer</A
- >)</DT
- ><DD
- ><P
- >
- </P
- ></DD
- ><DT
- ><TT
- CLASS="constant"
- ><B
- >SO_DONTROUTE</B
- ></TT
- >
- (<A
- HREF="language.types.integer.html"
- >integer</A
- >)</DT
- ><DD
- ><P
- >
- </P
- ></DD
- ><DT
- ><TT
- CLASS="constant"
- ><B
- >SO_LINGER</B
- ></TT
- >
- (<A
- HREF="language.types.integer.html"
- >integer</A
- >)</DT
- ><DD
- ><P
- >
- </P
- ></DD
- ><DT
- ><TT
- CLASS="constant"
- ><B
- >SO_BROADCAST</B
- ></TT
- >
- (<A
- HREF="language.types.integer.html"
- >integer</A
- >)</DT
- ><DD
- ><P
- >
- </P
- ></DD
- ><DT
- ><TT
- CLASS="constant"
- ><B
- >SO_OOBINLINE</B
- ></TT
- >
- (<A
- HREF="language.types.integer.html"
- >integer</A
- >)</DT
- ><DD
- ><P
- >
- </P
- ></DD
- ><DT
- ><TT
- CLASS="constant"
- ><B
- >SO_SNDBUF</B
- ></TT
- >
- (<A
- HREF="language.types.integer.html"
- >integer</A
- >)</DT
- ><DD
- ><P
- >
- </P
- ></DD
- ><DT
- ><TT
- CLASS="constant"
- ><B
- >SO_RCVBUF</B
- ></TT
- >
- (<A
- HREF="language.types.integer.html"
- >integer</A
- >)</DT
- ><DD
- ><P
- >
- </P
- ></DD
- ><DT
- ><TT
- CLASS="constant"
- ><B
- >SO_SNDLOWAT</B
- ></TT
- >
- (<A
- HREF="language.types.integer.html"
- >integer</A
- >)</DT
- ><DD
- ><P
- >
- </P
- ></DD
- ><DT
- ><TT
- CLASS="constant"
- ><B
- >SO_RCVLOWAT</B
- ></TT
- >
- (<A
- HREF="language.types.integer.html"
- >integer</A
- >)</DT
- ><DD
- ><P
- >
- </P
- ></DD
- ><DT
- ><TT
- CLASS="constant"
- ><B
- >SO_SNDTIMEO</B
- ></TT
- >
- (<A
- HREF="language.types.integer.html"
- >integer</A
- >)</DT
- ><DD
- ><P
- >
- </P
- ></DD
- ><DT
- ><TT
- CLASS="constant"
- ><B
- >SO_RCVTIMEO</B
- ></TT
- >
- (<A
- HREF="language.types.integer.html"
- >integer</A
- >)</DT
- ><DD
- ><P
- >
- </P
- ></DD
- ><DT
- ><TT
- CLASS="constant"
- ><B
- >SO_TYPE</B
- ></TT
- >
- (<A
- HREF="language.types.integer.html"
- >integer</A
- >)</DT
- ><DD
- ><P
- >
- </P
- ></DD
- ><DT
- ><TT
- CLASS="constant"
- ><B
- >SO_ERROR</B
- ></TT
- >
- (<A
- HREF="language.types.integer.html"
- >integer</A
- >)</DT
- ><DD
- ><P
- >
- </P
- ></DD
- ><DT
- ><TT
- CLASS="constant"
- ><B
- >SOL_SOCKET</B
- ></TT
- >
- (<A
- HREF="language.types.integer.html"
- >integer</A
- >)</DT
- ><DD
- ><P
- >
- </P
- ></DD
- ><DT
- ><TT
- CLASS="constant"
- ><B
- >PHP_NORMAL_READ</B
- ></TT
- >
- (<A
- HREF="language.types.integer.html"
- >integer</A
- >)</DT
- ><DD
- ><P
- >
- </P
- ></DD
- ><DT
- ><TT
- CLASS="constant"
- ><B
- >PHP_BINARY_READ</B
- ></TT
- >
- (<A
- HREF="language.types.integer.html"
- >integer</A
- >)</DT
- ><DD
- ><P
- >
- </P
- ></DD
- ><DT
- ><TT
- CLASS="constant"
- ><B
- >SOL_TCP</B
- ></TT
- >
- (<A
- HREF="language.types.integer.html"
- >integer</A
- >)</DT
- ><DD
- ><P
- >
- </P
- ></DD
- ><DT
- ><TT
- CLASS="constant"
- ><B
- >SOL_UDP</B
- ></TT
- >
- (<A
- HREF="language.types.integer.html"
- >integer</A
- >)</DT
- ><DD
- ><P
- >
- </P
- ></DD
- ></DL
- ></DIV
- ></DIV
- ><DIV
- CLASS="section"
- ><H1
- CLASS="section"
- ><A
- NAME="sockets.errors"
- ></A
- >Socket Errors</H1
- ><P
- > The socket extension was written to provide a useable interface to the
- powerful BSD sockets. Care has been taken that the functions work equally
- well on Win32 and Unix implementations. Almost all of the sockets
- functions may fail under certain conditions and therefore emit an
- <TT
- CLASS="constant"
- ><B
- >E_WARNING</B
- ></TT
- > message describing the error. Sometimes this
- doesn't happen to the desire of the developer. For example the function
- <A
- HREF="function.socket-read.html"
- ><B
- CLASS="function"
- >socket_read()</B
- ></A
- > may suddenly emit an
- <TT
- CLASS="constant"
- ><B
- >E_WARNING</B
- ></TT
- > message because the connection broke
- unexpectedly. It's common to suppress the warning with the
- <TT
- CLASS="literal"
- >@</TT
- >-operator and catch the error code within the
- application with the <A
- HREF="function.socket-last-error.html"
- ><B
- CLASS="function"
- >socket_last_error()</B
- ></A
- > function. You
- may call the <A
- HREF="function.socket-strerror.html"
- ><B
- CLASS="function"
- >socket_strerror()</B
- ></A
- > function with this error
- code to retrieve a string describing the error. See their description for
- more information.
- </P
- ><DIV
- CLASS="note"
- ><BLOCKQUOTE
- CLASS="note"
- ><P
- ><B
- >Note: </B
- >
- The <TT
- CLASS="constant"
- ><B
- >E_WARNING</B
- ></TT
- > messages generated by the socket
- extension are in english though the retrieved error message will appear
- depending on the current locale (<TT
- CLASS="constant"
- ><B
- >LC_MESSAGES</B
- ></TT
- >):
- <TABLE
- BORDER="0"
- BGCOLOR="#E0E0E0"
- CELLPADDING="5"
- ><TR
- ><TD
- ><PRE
- CLASS="php"
- >Warning - socket_bind() unable to bind address [98]: Die Adresse wird bereits verwendet</PRE
- ></TD
- ></TR
- ></TABLE
- >
- </P
- ></BLOCKQUOTE
- ></DIV
- ></DIV
- ><DIV
- CLASS="section"
- ><H1
- CLASS="section"
- ><A
- NAME="sockets.examples"
- ></A
- >Examples</H1
- ><P
- > <TABLE
- WIDTH="100%"
- BORDER="0"
- CELLPADDING="0"
- CELLSPACING="0"
- CLASS="EXAMPLE"
- ><TR
- ><TD
- ><DIV
- CLASS="example"
- ><A
- NAME="AEN87020"
- ></A
- ><P
- ><B
- >Example 1. Socket example: Simple TCP/IP server</B
- ></P
- ><P
- > This example shows a simple talkback server. Change the
- <TT
- CLASS="varname"
- >address</TT
- > and <TT
- CLASS="varname"
- >port</TT
- > variables
- to suit your setup and execute. You may then connect to the
- server with a command similar to: <B
- CLASS="command"
- >telnet 192.168.1.53
- 10000</B
- > (where the address and port match your
- setup). Anything you type will then be output on the server
- side, and echoed back to you. To disconnect, enter 'quit'.
- </P
- ><TABLE
- BORDER="0"
- BGCOLOR="#E0E0E0"
- CELLPADDING="5"
- ><TR
- ><TD
- ><PRE
- CLASS="php"
- >#!/usr/local/bin/php -q
- <?php
- error_reporting (E_ALL);
- /* Allow the script to hang around waiting for connections. */
- set_time_limit (0);
- /* Turn on implicit output flushing so we see what we're getting
- * as it comes in. */
- ob_implicit_flush ();
- $address = '192.168.1.53';
- $port = 10000;
- if (($sock = socket_create (AF_INET, SOCK_STREAM, 0)) < 0) {
- echo "socket_create() failed: reason: " . socket_strerror ($sock) . "\n";
- }
- if (($ret = socket_bind ($sock, $address, $port)) < 0) {
- echo "socket_bind() failed: reason: " . socket_strerror ($ret) . "\n";
- }
- if (($ret = socket_listen ($sock, 5)) < 0) {
- echo "socket_listen() failed: reason: " . socket_strerror ($ret) . "\n";
- }
- do {
- if (($msgsock = socket_accept($sock)) < 0) {
- echo "socket_accept() failed: reason: " . socket_strerror ($msgsock) . "\n";
- break;
- }
- /* Send instructions. */
- $msg = "\nWelcome to the PHP Test Server. \n" .
- "To quit, type 'quit'. To shut down the server type 'shutdown'.\n";
- socket_write($msgsock, $msg, strlen($msg));
- do {
- if (FALSE === ($buf = socket_read ($msgsock, 2048))) {
- echo "socket_read() failed: reason: " . socket_strerror ($ret) . "\n";
- break 2;
- }
- if (!$buf = trim ($buf)) {
- continue;
- }
- if ($buf == 'quit') {
- break;
- }
- if ($buf == 'shutdown') {
- socket_close ($msgsock);
- break 2;
- }
- $talkback = "PHP: You said '$buf'.\n";
- socket_write ($msgsock, $talkback, strlen ($talkback));
- echo "$buf\n";
- } while (true);
- socket_close ($msgsock);
- } while (true);
- socket_close ($sock);
- ?></PRE
- ></TD
- ></TR
- ></TABLE
- ></DIV
- ></TD
- ></TR
- ></TABLE
- >
- </P
- ><P
- > <TABLE
- WIDTH="100%"
- BORDER="0"
- CELLPADDING="0"
- CELLSPACING="0"
- CLASS="EXAMPLE"
- ><TR
- ><TD
- ><DIV
- CLASS="example"
- ><A
- NAME="AEN87028"
- ></A
- ><P
- ><B
- >Example 2. Socket example: Simple TCP/IP client</B
- ></P
- ><P
- > This example shows a simple, one-shot HTTP client. It simply
- connects to a page, submits a HEAD request, echoes the reply,
- and exits.
- </P
- ><TABLE
- BORDER="0"
- BGCOLOR="#E0E0E0"
- CELLPADDING="5"
- ><TR
- ><TD
- ><PRE
- CLASS="programlisting"
- ><?php
- error_reporting (E_ALL);
- echo "<h2>TCP/IP Connection</h2>\n";
- /* Get the port for the WWW service. */
- $service_port = getservbyname ('www', 'tcp');
- /* Get the IP address for the target host. */
- $address = gethostbyname ('www.example.com');
- /* Create a TCP/IP socket. */
- $socket = socket_create (AF_INET, SOCK_STREAM, 0);
- if ($socket < 0) {
- echo "socket_create() failed: reason: " . socket_strerror ($socket) . "\n";
- } else {
- echo "OK.\n";
- }
- echo "Attempting to connect to '$address' on port '$service_port'...";
- $result = socket_connect ($socket, $address, $service_port);
- if ($result < 0) {
- echo "socket_connect() failed.\nReason: ($result) " . socket_strerror($result) . "\n";
- } else {
- echo "OK.\n";
- }
- $in = "HEAD / HTTP/1.0\r\n\r\n";
- $out = '';
- echo "Sending HTTP HEAD request...";
- socket_write ($socket, $in, strlen ($in));
- echo "OK.\n";
- echo "Reading response:\n\n";
- while ($out = socket_read ($socket, 2048)) {
- echo $out;
- }
- echo "Closing socket...";
- socket_close ($socket);
- echo "OK.\n\n";
- ?></PRE
- ></TD
- ></TR
- ></TABLE
- ></DIV
- ></TD
- ></TR
- ></TABLE
- >
- </P
- ></DIV
- ></DIV
- ><DIV
- CLASS="TOC"
- ><DL
- ><DT
- ><B
- >Table of Contents</B
- ></DT
- ><DT
- ><A
- HREF="function.socket-accept.html"
- >socket_accept</A
- > -- Accepts a connection on a socket</DT
- ><DT
- ><A
- HREF="function.socket-bind.html"
- >socket_bind</A
- > -- Binds a name to a socket</DT
- ><DT
- ><A
- HREF="function.socket-clear-error.html"
- >socket_clear_error</A
- > -- Clears the error on the socket or the last error code</DT
- ><DT
- ><A
- HREF="function.socket-close.html"
- >socket_close</A
- > -- Closes a socket resource</DT
- ><DT
- ><A
- HREF="function.socket-connect.html"
- >socket_connect</A
- > -- Initiates a connection on a socket</DT
- ><DT
- ><A
- HREF="function.socket-create-listen.html"
- >socket_create_listen</A
- > -- Opens a socket on port to accept connections </DT
- ><DT
- ><A
- HREF="function.socket-create-pair.html"
- >socket_create_pair</A
- > -- Creates a pair of indistinguishable sockets and stores them in fds. </DT
- ><DT
- ><A
- HREF="function.socket-create.html"
- >socket_create</A
- > -- Create a socket (endpoint for communication)</DT
- ><DT
- ><A
- HREF="function.socket-get-option.html"
- >socket_get_option</A
- > -- Gets socket options for the socket </DT
- ><DT
- ><A
- HREF="function.socket-getpeername.html"
- >socket_getpeername</A
- > --
- Queries the remote side of the given socket which may either result in host/port
- or in a UNIX filesystem path, dependent on its type.
- </DT
- ><DT
- ><A
- HREF="function.socket-getsockname.html"
- >socket_getsockname</A
- > --
- Queries the local side of the given socket which may either result in host/port
- or in a UNIX filesystem path, dependent on its type.
- </DT
- ><DT
- ><A
- HREF="function.socket-iovec-add.html"
- >socket_iovec_add</A
- > -- Adds a new vector to the scatter/gather array </DT
- ><DT
- ><A
- HREF="function.socket-iovec-alloc.html"
- >socket_iovec_alloc</A
- > -- ...]) Builds a 'struct iovec' for use with sendmsg, recvmsg, writev, and readv </DT
- ><DT
- ><A
- HREF="function.socket-iovec-delete.html"
- >socket_iovec_delete</A
- > -- Deletes a vector from an array of vectors </DT
- ><DT
- ><A
- HREF="function.socket-iovec-fetch.html"
- >socket_iovec_fetch</A
- > -- Returns the data held in the iovec specified by iovec_id[iovec_position] </DT
- ><DT
- ><A
- HREF="function.socket-iovec-free.html"
- >socket_iovec_free</A
- > -- Frees the iovec specified by iovec_id </DT
- ><DT
- ><A
- HREF="function.socket-iovec-set.html"
- >socket_iovec_set</A
- > -- Sets the data held in iovec_id[iovec_position] to new_val </DT
- ><DT
- ><A
- HREF="function.socket-last-error.html"
- >socket_last_error</A
- > -- Returns the last error on the socket </DT
- ><DT
- ><A
- HREF="function.socket-listen.html"
- >socket_listen</A
- > -- Listens for a connection on a socket</DT
- ><DT
- ><A
- HREF="function.socket-read.html"
- >socket_read</A
- > -- Reads a maximum of length bytes from a socket</DT
- ><DT
- ><A
- HREF="function.socket-readv.html"
- >socket_readv</A
- > -- Reads from an fd, using the scatter-gather array defined by iovec_id </DT
- ><DT
- ><A
- HREF="function.socket-recv.html"
- >socket_recv</A
- > -- Receives data from a connected socket </DT
- ><DT
- ><A
- HREF="function.socket-recvfrom.html"
- >socket_recvfrom</A
- > -- Receives data from a socket, connected or not </DT
- ><DT
- ><A
- HREF="function.socket-recvmsg.html"
- >socket_recvmsg</A
- > -- Used to receive messages on a socket, whether connection-oriented or not </DT
- ><DT
- ><A
- HREF="function.socket-select.html"
- >socket_select</A
- > -- Runs the select() system call on the given arrays of sockets with a timeout specified by tv_sec and tv_usec </DT
- ><DT
- ><A
- HREF="function.socket-send.html"
- >socket_send</A
- > -- Sends data to a connected socket </DT
- ><DT
- ><A
- HREF="function.socket-sendmsg.html"
- >socket_sendmsg</A
- > -- Sends a message to a socket, regardless of whether it is connection-oriented or not </DT
- ><DT
- ><A
- HREF="function.socket-sendto.html"
- >socket_sendto</A
- > -- Sends a message to a socket, whether it is connected or not </DT
- ><DT
- ><A
- HREF="function.socket-set-nonblock.html"
- >socket_set_nonblock</A
- > -- Sets nonblocking mode for file descriptor fd </DT
- ><DT
- ><A
- HREF="function.socket-set-option.html"
- >socket_set_option</A
- > -- Sets socket options for the socket</DT
- ><DT
- ><A
- HREF="function.socket-shutdown.html"
- >socket_shutdown</A
- > -- Shuts down a socket for receiving, sending, or both. </DT
- ><DT
- ><A
- HREF="function.socket-strerror.html"
- >socket_strerror</A
- > -- Return a string describing a socket error</DT
- ><DT
- ><A
- HREF="function.socket-write.html"
- >socket_write</A
- > -- Write to a socket</DT
- ><DT
- ><A
- HREF="function.socket-writev.html"
- >socket_writev</A
- > -- Writes to a file descriptor, fd, using the scatter-gather array defined by iovec_id </DT
- ></DL
- ></DIV
- ></DIV
- ></DIV
- ><DIV
- CLASS="NAVFOOTER"
- ><HR
- ALIGN="LEFT"
- WIDTH="100%"><TABLE
- SUMMARY="Footer navigation table"
- WIDTH="100%"
- BORDER="0"
- CELLPADDING="0"
- CELLSPACING="0"
- ><TR
- ><TD
- WIDTH="33%"
- ALIGN="left"
- VALIGN="top"
- ><A
- HREF="function.snmpwalkoid.html"
- ACCESSKEY="P"
- >Prev</A
- ></TD
- ><TD
- WIDTH="34%"
- ALIGN="center"
- VALIGN="top"
- ><A
- HREF="index.html"
- ACCESSKEY="H"
- >Home</A
- ></TD
- ><TD
- WIDTH="33%"
- ALIGN="right"
- VALIGN="top"
- ><A
- HREF="function.socket-accept.html"
- ACCESSKEY="N"
- >Next</A
- ></TD
- ></TR
- ><TR
- ><TD
- WIDTH="33%"
- ALIGN="left"
- VALIGN="top"
- >snmpwalkoid</TD
- ><TD
- WIDTH="34%"
- ALIGN="center"
- VALIGN="top"
- ><A
- HREF="funcref.html"
- ACCESSKEY="U"
- >Up</A
- ></TD
- ><TD
- WIDTH="33%"
- ALIGN="right"
- VALIGN="top"
- >socket_accept</TD
- ></TR
- ></TABLE
- ></DIV
- ></BODY
- ></HTML
- >