source: www/manuals/PHP_manual/ref.sockets.html@ 1

Last change on this file since 1 was 1, checked in by george, 17 years ago

Prvotní import všeho

File size: 20.3 KB
Line 
1<HTML
2><HEAD
3><TITLE
4>Socket functions</TITLE
5><META
6NAME="GENERATOR"
7CONTENT="Modular DocBook HTML Stylesheet Version 1.7"><LINK
8REL="HOME"
9TITLE="Manuál PHP"
10HREF="index.html"><LINK
11REL="UP"
12TITLE="Reference funkcí"
13HREF="funcref.html"><LINK
14REL="PREVIOUS"
15TITLE="snmpwalkoid"
16HREF="function.snmpwalkoid.html"><LINK
17REL="NEXT"
18TITLE="socket_accept"
19HREF="function.socket-accept.html"><META
20HTTP-EQUIV="Content-type"
21CONTENT="text/html; charset=ISO-8859-2"></HEAD
22><BODY
23CLASS="reference"
24BGCOLOR="#FFFFFF"
25TEXT="#000000"
26LINK="#0000FF"
27VLINK="#840084"
28ALINK="#0000FF"
29><DIV
30CLASS="NAVHEADER"
31><TABLE
32SUMMARY="Header navigation table"
33WIDTH="100%"
34BORDER="0"
35CELLPADDING="0"
36CELLSPACING="0"
37><TR
38><TH
39COLSPAN="3"
40ALIGN="center"
41>Manuál PHP</TH
42></TR
43><TR
44><TD
45WIDTH="10%"
46ALIGN="left"
47VALIGN="bottom"
48><A
49HREF="function.snmpwalkoid.html"
50ACCESSKEY="P"
51>Pøedcházející</A
52></TD
53><TD
54WIDTH="80%"
55ALIGN="center"
56VALIGN="bottom"
57></TD
58><TD
59WIDTH="10%"
60ALIGN="right"
61VALIGN="bottom"
62><A
63HREF="function.socket-accept.html"
64ACCESSKEY="N"
65>Dal¹í</A
66></TD
67></TR
68></TABLE
69><HR
70ALIGN="LEFT"
71WIDTH="100%"></DIV
72><DIV
73CLASS="reference"
74><A
75NAME="ref.sockets"
76></A
77><DIV
78CLASS="TITLEPAGE"
79><H1
80CLASS="title"
81>XCVII. Socket functions</H1
82><DIV
83CLASS="PARTINTRO"
84><A
85NAME="AEN80123"
86></A
87><DIV
88CLASS="section"
89><H1
90CLASS="section"
91><A
92NAME="sockets.intro"
93></A
94>Úvod</H1
95><P
96>&#13; The socket extension implements a low-level interface to the socket
97 communication functions based on the popular BSD sockets, providing the
98 possibility to act as a socket server as well as a client.
99 </P
100><P
101>&#13; For a more generic client-side socket interface, see
102 <A
103HREF="function.fsockopen.html"
104><B
105CLASS="function"
106>fsockopen()</B
107></A
108> and
109 <A
110HREF="function.pfsockopen.html"
111><B
112CLASS="function"
113>pfsockopen()</B
114></A
115>.
116 </P
117><P
118>&#13; When using these functions, it is important to remember that while
119 many of them have identical names to their C counterparts, they
120 often have different declarations. Please be sure to read the
121 descriptions to avoid confusion.
122 </P
123><P
124>&#13; Those unfamiliar with socket programming can find a lot
125 of useful material in the appropriate Unix man pages, and there is a great
126 deal of tutorial information on socket programming in C on the web, much
127 of which can be applied, with slight modifications, to socket programming
128 in PHP. The <A
129HREF="http://www.developerweb.net/sock-faq/"
130TARGET="_top"
131>UNIX Socket
132 FAQ</A
133> might be a good start.
134 </P
135><DIV
136CLASS="warning"
137><P
138></P
139><TABLE
140CLASS="warning"
141BORDER="1"
142WIDTH="100%"
143><TR
144><TD
145ALIGN="CENTER"
146><B
147>Varování</B
148></TD
149></TR
150><TR
151><TD
152ALIGN="LEFT"
153><P
154>Toto roz¹íøení je
155<SPAN
156CLASS="emphasis"
157><I
158CLASS="emphasis"
159>EXPERIMENTÁLNÍ</I
160></SPAN
161>. Chování tohoto roz¹íøení,
162názvy funkcí a v¹echno ostatní, co je zde zdokumentováno, se v budoucích
163verzích PHP mù¾e bez ohlá¹ení zmìnit. Berte to v úvahu a pou¾ívejte tento modul
164na vlastní nebezpeèí.</P
165></TD
166></TR
167></TABLE
168></DIV
169></DIV
170><DIV
171CLASS="section"
172><H1
173CLASS="section"
174><A
175NAME="sockets.requirements"
176></A
177>Po¾adavky</H1
178><P
179>Tyto funkce jsou k dispozici jako souèást
180standardního modulu, který je v¾dy dostupný.</P
181></DIV
182><DIV
183CLASS="section"
184><H1
185CLASS="section"
186><A
187NAME="sockets.installation"
188></A
189>Instalace</H1
190><P
191>&#13; The socket functions described here are part of an extension to
192 PHP which must be enabled at compile time by giving the <TT
193CLASS="option"
194>--enable-sockets</TT
195> option to
196 <B
197CLASS="command"
198>configure</B
199>.
200 </P
201></DIV
202><DIV
203CLASS="section"
204><H1
205CLASS="section"
206><A
207NAME="sockets.configuration"
208></A
209>Konfigurace bìhu</H1
210><P
211>Toto roz¹íøení nemá definováno ¾ádné konfiguraèní
212direktivy.</P
213></DIV
214><DIV
215CLASS="section"
216><H1
217CLASS="section"
218><A
219NAME="sockets.resources"
220></A
221>Typy prostøedkù</H1
222><P
223>Toto roz¹íøení nemá definován ¾ádný typ prostøedku
224(resource).</P
225></DIV
226><DIV
227CLASS="section"
228><H1
229CLASS="section"
230><A
231NAME="sockets.constants"
232></A
233>Pøeddefinované konstanty</H1
234><P
235>&#13;Tyto konstanty jsou definovány tímto roz¹íøením a budou k dispozici pouze
236tehdy, bylo-li roz¹íøení zkompilováno spoleènì s PHP nebo dynamicky zavedeno
237za bìhu.
238</P
239><P
240></P
241><DIV
242CLASS="variablelist"
243><DL
244><DT
245><TT
246CLASS="constant"
247><B
248>AF_UNIX</B
249></TT
250>
251 (<A
252HREF="language.types.integer.html"
253>integer</A
254>)</DT
255><DD
256><P
257>&#13;
258 </P
259></DD
260><DT
261><TT
262CLASS="constant"
263><B
264>AF_INET</B
265></TT
266>
267 (<A
268HREF="language.types.integer.html"
269>integer</A
270>)</DT
271><DD
272><P
273>&#13;
274 </P
275></DD
276><DT
277><TT
278CLASS="constant"
279><B
280>SOCK_STREAM</B
281></TT
282>
283 (<A
284HREF="language.types.integer.html"
285>integer</A
286>)</DT
287><DD
288><P
289>&#13;
290 </P
291></DD
292><DT
293><TT
294CLASS="constant"
295><B
296>SOCK_DGRAM</B
297></TT
298>
299 (<A
300HREF="language.types.integer.html"
301>integer</A
302>)</DT
303><DD
304><P
305>&#13;
306 </P
307></DD
308><DT
309><TT
310CLASS="constant"
311><B
312>SOCK_RAW</B
313></TT
314>
315 (<A
316HREF="language.types.integer.html"
317>integer</A
318>)</DT
319><DD
320><P
321>&#13;
322 </P
323></DD
324><DT
325><TT
326CLASS="constant"
327><B
328>SOCK_SEQPACKET</B
329></TT
330>
331 (<A
332HREF="language.types.integer.html"
333>integer</A
334>)</DT
335><DD
336><P
337>&#13;
338 </P
339></DD
340><DT
341><TT
342CLASS="constant"
343><B
344>SOCK_RDM</B
345></TT
346>
347 (<A
348HREF="language.types.integer.html"
349>integer</A
350>)</DT
351><DD
352><P
353>&#13;
354 </P
355></DD
356><DT
357><TT
358CLASS="constant"
359><B
360>MSG_OOB</B
361></TT
362>
363 (<A
364HREF="language.types.integer.html"
365>integer</A
366>)</DT
367><DD
368><P
369>&#13;
370 </P
371></DD
372><DT
373><TT
374CLASS="constant"
375><B
376>MSG_WAITALL</B
377></TT
378>
379 (<A
380HREF="language.types.integer.html"
381>integer</A
382>)</DT
383><DD
384><P
385>&#13;
386 </P
387></DD
388><DT
389><TT
390CLASS="constant"
391><B
392>MSG_PEEK</B
393></TT
394>
395 (<A
396HREF="language.types.integer.html"
397>integer</A
398>)</DT
399><DD
400><P
401>&#13;
402 </P
403></DD
404><DT
405><TT
406CLASS="constant"
407><B
408>MSG_DONTROUTE</B
409></TT
410>
411 (<A
412HREF="language.types.integer.html"
413>integer</A
414>)</DT
415><DD
416><P
417>&#13;
418 </P
419></DD
420><DT
421><TT
422CLASS="constant"
423><B
424>SO_DEBUG</B
425></TT
426>
427 (<A
428HREF="language.types.integer.html"
429>integer</A
430>)</DT
431><DD
432><P
433>&#13;
434 </P
435></DD
436><DT
437><TT
438CLASS="constant"
439><B
440>SO_REUSEADDR</B
441></TT
442>
443 (<A
444HREF="language.types.integer.html"
445>integer</A
446>)</DT
447><DD
448><P
449>&#13;
450 </P
451></DD
452><DT
453><TT
454CLASS="constant"
455><B
456>SO_KEEPALIVE</B
457></TT
458>
459 (<A
460HREF="language.types.integer.html"
461>integer</A
462>)</DT
463><DD
464><P
465>&#13;
466 </P
467></DD
468><DT
469><TT
470CLASS="constant"
471><B
472>SO_DONTROUTE</B
473></TT
474>
475 (<A
476HREF="language.types.integer.html"
477>integer</A
478>)</DT
479><DD
480><P
481>&#13;
482 </P
483></DD
484><DT
485><TT
486CLASS="constant"
487><B
488>SO_LINGER</B
489></TT
490>
491 (<A
492HREF="language.types.integer.html"
493>integer</A
494>)</DT
495><DD
496><P
497>&#13;
498 </P
499></DD
500><DT
501><TT
502CLASS="constant"
503><B
504>SO_BROADCAST</B
505></TT
506>
507 (<A
508HREF="language.types.integer.html"
509>integer</A
510>)</DT
511><DD
512><P
513>&#13;
514 </P
515></DD
516><DT
517><TT
518CLASS="constant"
519><B
520>SO_OOBINLINE</B
521></TT
522>
523 (<A
524HREF="language.types.integer.html"
525>integer</A
526>)</DT
527><DD
528><P
529>&#13;
530 </P
531></DD
532><DT
533><TT
534CLASS="constant"
535><B
536>SO_SNDBUF</B
537></TT
538>
539 (<A
540HREF="language.types.integer.html"
541>integer</A
542>)</DT
543><DD
544><P
545>&#13;
546 </P
547></DD
548><DT
549><TT
550CLASS="constant"
551><B
552>SO_RCVBUF</B
553></TT
554>
555 (<A
556HREF="language.types.integer.html"
557>integer</A
558>)</DT
559><DD
560><P
561>&#13;
562 </P
563></DD
564><DT
565><TT
566CLASS="constant"
567><B
568>SO_SNDLOWAT</B
569></TT
570>
571 (<A
572HREF="language.types.integer.html"
573>integer</A
574>)</DT
575><DD
576><P
577>&#13;
578 </P
579></DD
580><DT
581><TT
582CLASS="constant"
583><B
584>SO_RCVLOWAT</B
585></TT
586>
587 (<A
588HREF="language.types.integer.html"
589>integer</A
590>)</DT
591><DD
592><P
593>&#13;
594 </P
595></DD
596><DT
597><TT
598CLASS="constant"
599><B
600>SO_SNDTIMEO</B
601></TT
602>
603 (<A
604HREF="language.types.integer.html"
605>integer</A
606>)</DT
607><DD
608><P
609>&#13;
610 </P
611></DD
612><DT
613><TT
614CLASS="constant"
615><B
616>SO_RCVTIMEO</B
617></TT
618>
619 (<A
620HREF="language.types.integer.html"
621>integer</A
622>)</DT
623><DD
624><P
625>&#13;
626 </P
627></DD
628><DT
629><TT
630CLASS="constant"
631><B
632>SO_TYPE</B
633></TT
634>
635 (<A
636HREF="language.types.integer.html"
637>integer</A
638>)</DT
639><DD
640><P
641>&#13;
642 </P
643></DD
644><DT
645><TT
646CLASS="constant"
647><B
648>SO_ERROR</B
649></TT
650>
651 (<A
652HREF="language.types.integer.html"
653>integer</A
654>)</DT
655><DD
656><P
657>&#13;
658 </P
659></DD
660><DT
661><TT
662CLASS="constant"
663><B
664>SOL_SOCKET</B
665></TT
666>
667 (<A
668HREF="language.types.integer.html"
669>integer</A
670>)</DT
671><DD
672><P
673>&#13;
674 </P
675></DD
676><DT
677><TT
678CLASS="constant"
679><B
680>PHP_NORMAL_READ</B
681></TT
682>
683 (<A
684HREF="language.types.integer.html"
685>integer</A
686>)</DT
687><DD
688><P
689>&#13;
690 </P
691></DD
692><DT
693><TT
694CLASS="constant"
695><B
696>PHP_BINARY_READ</B
697></TT
698>
699 (<A
700HREF="language.types.integer.html"
701>integer</A
702>)</DT
703><DD
704><P
705>&#13;
706 </P
707></DD
708><DT
709><TT
710CLASS="constant"
711><B
712>SOL_TCP</B
713></TT
714>
715 (<A
716HREF="language.types.integer.html"
717>integer</A
718>)</DT
719><DD
720><P
721>&#13;
722 </P
723></DD
724><DT
725><TT
726CLASS="constant"
727><B
728>SOL_UDP</B
729></TT
730>
731 (<A
732HREF="language.types.integer.html"
733>integer</A
734>)</DT
735><DD
736><P
737>&#13;
738 </P
739></DD
740></DL
741></DIV
742></DIV
743><DIV
744CLASS="section"
745><H1
746CLASS="section"
747><A
748NAME="sockets.errors"
749></A
750>Socket Errors</H1
751><P
752>&#13; The socket extension was written to provide a useable interface to the
753 powerful BSD sockets. Care has been taken that the functions work equally
754 well on Win32 and Unix implementations. Almost all of the sockets
755 functions may fail under certain conditions and therefore emit an
756 <TT
757CLASS="constant"
758><B
759>E_WARNING</B
760></TT
761> message describing the error. Sometimes this
762 doesn't happen to the desire of the developer. For example the function
763 <A
764HREF="function.socket-read.html"
765><B
766CLASS="function"
767>socket_read()</B
768></A
769> may suddenly emit an
770 <TT
771CLASS="constant"
772><B
773>E_WARNING</B
774></TT
775> message because the connection broke
776 unexpectedly. It's common to suppress the warning with the
777 <TT
778CLASS="literal"
779>@</TT
780>-operator and catch the error code within the
781 application with the <A
782HREF="function.socket-last-error.html"
783><B
784CLASS="function"
785>socket_last_error()</B
786></A
787> function. You
788 may call the <A
789HREF="function.socket-strerror.html"
790><B
791CLASS="function"
792>socket_strerror()</B
793></A
794> function with this error
795 code to retrieve a string describing the error. See their description for
796 more information.
797 </P
798><DIV
799CLASS="note"
800><BLOCKQUOTE
801CLASS="note"
802><P
803><B
804>Poznámka: </B
805>
806 The <TT
807CLASS="constant"
808><B
809>E_WARNING</B
810></TT
811> messages generated by the socket
812 extension are in english though the retrieved error message will appear
813 depending on the current locale (<TT
814CLASS="constant"
815><B
816>LC_MESSAGES</B
817></TT
818>):
819 <TABLE
820BORDER="0"
821BGCOLOR="#E0E0E0"
822CELLPADDING="5"
823><TR
824><TD
825><PRE
826CLASS="php"
827>Warning - socket_bind() unable to bind address [98]: Die Adresse wird bereits verwendet</PRE
828></TD
829></TR
830></TABLE
831>
832 </P
833></BLOCKQUOTE
834></DIV
835></DIV
836><DIV
837CLASS="section"
838><H1
839CLASS="section"
840><A
841NAME="sockets.examples"
842></A
843>Pøíklady</H1
844><P
845>&#13; <TABLE
846WIDTH="100%"
847BORDER="0"
848CELLPADDING="0"
849CELLSPACING="0"
850CLASS="EXAMPLE"
851><TR
852><TD
853><DIV
854CLASS="example"
855><A
856NAME="AEN80357"
857></A
858><P
859><B
860>Pøíklad 1. Socket example: Simple TCP/IP server</B
861></P
862><P
863>&#13; This example shows a simple talkback server. Change the
864 <TT
865CLASS="varname"
866>address</TT
867> and <TT
868CLASS="varname"
869>port</TT
870> variables
871 to suit your setup and execute. You may then connect to the
872 server with a command similar to: <B
873CLASS="command"
874>telnet 192.168.1.53
875 10000</B
876> (where the address and port match your
877 setup). Anything you type will then be output on the server
878 side, and echoed back to you. To disconnect, enter 'quit'.
879 </P
880><TABLE
881BORDER="0"
882BGCOLOR="#E0E0E0"
883CELLPADDING="5"
884><TR
885><TD
886><PRE
887CLASS="php"
888>#!/usr/local/bin/php -q
889&#60;?php
890error_reporting (E_ALL);
891
892/* Allow the script to hang around waiting for connections. */
893set_time_limit (0);
894
895/* Turn on implicit output flushing so we see what we're getting
896 * as it comes in. */
897ob_implicit_flush ();
898
899$address = '192.168.1.53';
900$port = 10000;
901
902if (($sock = socket_create (AF_INET, SOCK_STREAM, 0)) &#60; 0) {
903 echo "socket_create() failed: reason: " . socket_strerror ($sock) . "\n";
904}
905
906if (($ret = socket_bind ($sock, $address, $port)) &#60; 0) {
907 echo "socket_bind() failed: reason: " . socket_strerror ($ret) . "\n";
908}
909
910if (($ret = socket_listen ($sock, 5)) &#60; 0) {
911 echo "socket_listen() failed: reason: " . socket_strerror ($ret) . "\n";
912}
913
914do {
915 if (($msgsock = socket_accept($sock)) &#60; 0) {
916 echo "socket_accept() failed: reason: " . socket_strerror ($msgsock) . "\n";
917 break;
918 }
919 /* Send instructions. */
920 $msg = "\nWelcome to the PHP Test Server. \n" .
921 "To quit, type 'quit'. To shut down the server type 'shutdown'.\n";
922 socket_write($msgsock, $msg, strlen($msg));
923
924 do {
925 if (FALSE === ($buf = socket_read ($msgsock, 2048))) {
926 echo "socket_read() failed: reason: " . socket_strerror ($ret) . "\n";
927 break 2;
928 }
929 if (!$buf = trim ($buf)) {
930 continue;
931 }
932 if ($buf == 'quit') {
933 break;
934 }
935 if ($buf == 'shutdown') {
936 socket_close ($msgsock);
937 break 2;
938 }
939 $talkback = "PHP: You said '$buf'.\n";
940 socket_write ($msgsock, $talkback, strlen ($talkback));
941 echo "$buf\n";
942 } while (true);
943 socket_close ($msgsock);
944} while (true);
945
946socket_close ($sock);
947?&#62;</PRE
948></TD
949></TR
950></TABLE
951></DIV
952></TD
953></TR
954></TABLE
955>
956 </P
957><P
958>&#13; <TABLE
959WIDTH="100%"
960BORDER="0"
961CELLPADDING="0"
962CELLSPACING="0"
963CLASS="EXAMPLE"
964><TR
965><TD
966><DIV
967CLASS="example"
968><A
969NAME="AEN80365"
970></A
971><P
972><B
973>Pøíklad 2. Socket example: Simple TCP/IP client</B
974></P
975><P
976>&#13; This example shows a simple, one-shot HTTP client. It simply
977 connects to a page, submits a HEAD request, echoes the reply,
978 and exits.
979 </P
980><TABLE
981BORDER="0"
982BGCOLOR="#E0E0E0"
983CELLPADDING="5"
984><TR
985><TD
986><PRE
987CLASS="programlisting"
988>&#60;?php
989error_reporting (E_ALL);
990
991echo "&#60;h2&#62;TCP/IP Connection&#60;/h2&#62;\n";
992
993/* Get the port for the WWW service. */
994$service_port = getservbyname ('www', 'tcp');
995
996/* Get the IP address for the target host. */
997$address = gethostbyname ('www.example.com');
998
999/* Create a TCP/IP socket. */
1000$socket = socket_create (AF_INET, SOCK_STREAM, 0);
1001if ($socket &#60; 0) {
1002 echo "socket_create() failed: reason: " . socket_strerror ($socket) . "\n";
1003} else {
1004 echo "OK.\n";
1005}
1006
1007echo "Attempting to connect to '$address' on port '$service_port'...";
1008$result = socket_connect ($socket, $address, $service_port);
1009if ($result &#60; 0) {
1010 echo "socket_connect() failed.\nReason: ($result) " . socket_strerror($result) . "\n";
1011} else {
1012 echo "OK.\n";
1013}
1014
1015$in = "HEAD / HTTP/1.0\r\n\r\n";
1016$out = '';
1017
1018echo "Sending HTTP HEAD request...";
1019socket_write ($socket, $in, strlen ($in));
1020echo "OK.\n";
1021
1022echo "Reading response:\n\n";
1023while ($out = socket_read ($socket, 2048)) {
1024 echo $out;
1025}
1026
1027echo "Closing socket...";
1028socket_close ($socket);
1029echo "OK.\n\n";
1030?&#62;</PRE
1031></TD
1032></TR
1033></TABLE
1034></DIV
1035></TD
1036></TR
1037></TABLE
1038>
1039 </P
1040></DIV
1041></DIV
1042><DIV
1043CLASS="TOC"
1044><DL
1045><DT
1046><B
1047>Obsah</B
1048></DT
1049><DT
1050><A
1051HREF="function.socket-accept.html"
1052>socket_accept</A
1053>&nbsp;--&nbsp;Accepts a connection on a socket</DT
1054><DT
1055><A
1056HREF="function.socket-bind.html"
1057>socket_bind</A
1058>&nbsp;--&nbsp;Binds a name to a socket</DT
1059><DT
1060><A
1061HREF="function.socket-clear-error.html"
1062>socket_clear_error</A
1063>&nbsp;--&nbsp;Clears the error on the socket or the last error code</DT
1064><DT
1065><A
1066HREF="function.socket-close.html"
1067>socket_close</A
1068>&nbsp;--&nbsp;Closes a socket resource</DT
1069><DT
1070><A
1071HREF="function.socket-connect.html"
1072>socket_connect</A
1073>&nbsp;--&nbsp;Initiates a connection on a socket</DT
1074><DT
1075><A
1076HREF="function.socket-create-listen.html"
1077>socket_create_listen</A
1078>&nbsp;--&nbsp;Opens a socket on port to accept connections </DT
1079><DT
1080><A
1081HREF="function.socket-create-pair.html"
1082>socket_create_pair</A
1083>&nbsp;--&nbsp;Creates a pair of indistinguishable sockets and stores them in fds. </DT
1084><DT
1085><A
1086HREF="function.socket-create.html"
1087>socket_create</A
1088>&nbsp;--&nbsp;Create a socket (endpoint for communication)</DT
1089><DT
1090><A
1091HREF="function.socket-get-option.html"
1092>socket_get_option</A
1093>&nbsp;--&nbsp;Gets socket options for the socket </DT
1094><DT
1095><A
1096HREF="function.socket-getpeername.html"
1097>socket_getpeername</A
1098>&nbsp;--&nbsp;
1099 Queries the remote side of the given socket which may either result in host/port
1100 or in a UNIX filesystem path, dependent on its type.
1101 </DT
1102><DT
1103><A
1104HREF="function.socket-getsockname.html"
1105>socket_getsockname</A
1106>&nbsp;--&nbsp;
1107 Queries the local side of the given socket which may either result in host/port
1108 or in a UNIX filesystem path, dependent on its type.
1109 </DT
1110><DT
1111><A
1112HREF="function.socket-iovec-add.html"
1113>socket_iovec_add</A
1114>&nbsp;--&nbsp;Adds a new vector to the scatter/gather array </DT
1115><DT
1116><A
1117HREF="function.socket-iovec-alloc.html"
1118>socket_iovec_alloc</A
1119>&nbsp;--&nbsp;...]) Builds a 'struct iovec' for use with sendmsg, recvmsg, writev, and readv </DT
1120><DT
1121><A
1122HREF="function.socket-iovec-delete.html"
1123>socket_iovec_delete</A
1124>&nbsp;--&nbsp;Deletes a vector from an array of vectors </DT
1125><DT
1126><A
1127HREF="function.socket-iovec-fetch.html"
1128>socket_iovec_fetch</A
1129>&nbsp;--&nbsp;Returns the data held in the iovec specified by iovec_id[iovec_position] </DT
1130><DT
1131><A
1132HREF="function.socket-iovec-free.html"
1133>socket_iovec_free</A
1134>&nbsp;--&nbsp;Frees the iovec specified by iovec_id </DT
1135><DT
1136><A
1137HREF="function.socket-iovec-set.html"
1138>socket_iovec_set</A
1139>&nbsp;--&nbsp;Sets the data held in iovec_id[iovec_position] to new_val </DT
1140><DT
1141><A
1142HREF="function.socket-last-error.html"
1143>socket_last_error</A
1144>&nbsp;--&nbsp;Returns the last error on the socket </DT
1145><DT
1146><A
1147HREF="function.socket-listen.html"
1148>socket_listen</A
1149>&nbsp;--&nbsp;Listens for a connection on a socket</DT
1150><DT
1151><A
1152HREF="function.socket-read.html"
1153>socket_read</A
1154>&nbsp;--&nbsp;Reads a maximum of length bytes from a socket</DT
1155><DT
1156><A
1157HREF="function.socket-readv.html"
1158>socket_readv</A
1159>&nbsp;--&nbsp;Reads from an fd, using the scatter-gather array defined by iovec_id </DT
1160><DT
1161><A
1162HREF="function.socket-recv.html"
1163>socket_recv</A
1164>&nbsp;--&nbsp;Receives data from a connected socket </DT
1165><DT
1166><A
1167HREF="function.socket-recvfrom.html"
1168>socket_recvfrom</A
1169>&nbsp;--&nbsp;Receives data from a socket, connected or not </DT
1170><DT
1171><A
1172HREF="function.socket-recvmsg.html"
1173>socket_recvmsg</A
1174>&nbsp;--&nbsp;Used to receive messages on a socket, whether connection-oriented or not </DT
1175><DT
1176><A
1177HREF="function.socket-select.html"
1178>socket_select</A
1179>&nbsp;--&nbsp;Runs the select() system call on the given arrays of sockets with a timeout specified by tv_sec and tv_usec </DT
1180><DT
1181><A
1182HREF="function.socket-send.html"
1183>socket_send</A
1184>&nbsp;--&nbsp;Sends data to a connected socket </DT
1185><DT
1186><A
1187HREF="function.socket-sendmsg.html"
1188>socket_sendmsg</A
1189>&nbsp;--&nbsp;Sends a message to a socket, regardless of whether it is connection-oriented or not </DT
1190><DT
1191><A
1192HREF="function.socket-sendto.html"
1193>socket_sendto</A
1194>&nbsp;--&nbsp;Sends a message to a socket, whether it is connected or not </DT
1195><DT
1196><A
1197HREF="function.socket-set-nonblock.html"
1198>socket_set_nonblock</A
1199>&nbsp;--&nbsp;Sets nonblocking mode for file descriptor fd </DT
1200><DT
1201><A
1202HREF="function.socket-set-option.html"
1203>socket_set_option</A
1204>&nbsp;--&nbsp;Sets socket options for the socket</DT
1205><DT
1206><A
1207HREF="function.socket-shutdown.html"
1208>socket_shutdown</A
1209>&nbsp;--&nbsp;Shuts down a socket for receiving, sending, or both. </DT
1210><DT
1211><A
1212HREF="function.socket-strerror.html"
1213>socket_strerror</A
1214>&nbsp;--&nbsp;Return a string describing a socket error</DT
1215><DT
1216><A
1217HREF="function.socket-write.html"
1218>socket_write</A
1219>&nbsp;--&nbsp;Write to a socket</DT
1220><DT
1221><A
1222HREF="function.socket-writev.html"
1223>socket_writev</A
1224>&nbsp;--&nbsp;Writes to a file descriptor, fd, using the scatter-gather array defined by iovec_id </DT
1225></DL
1226></DIV
1227></DIV
1228></DIV
1229><DIV
1230CLASS="NAVFOOTER"
1231><HR
1232ALIGN="LEFT"
1233WIDTH="100%"><TABLE
1234SUMMARY="Footer navigation table"
1235WIDTH="100%"
1236BORDER="0"
1237CELLPADDING="0"
1238CELLSPACING="0"
1239><TR
1240><TD
1241WIDTH="33%"
1242ALIGN="left"
1243VALIGN="top"
1244><A
1245HREF="function.snmpwalkoid.html"
1246ACCESSKEY="P"
1247>Pøedcházející</A
1248></TD
1249><TD
1250WIDTH="34%"
1251ALIGN="center"
1252VALIGN="top"
1253><A
1254HREF="index.html"
1255ACCESSKEY="H"
1256>Domù</A
1257></TD
1258><TD
1259WIDTH="33%"
1260ALIGN="right"
1261VALIGN="top"
1262><A
1263HREF="function.socket-accept.html"
1264ACCESSKEY="N"
1265>Dal¹í</A
1266></TD
1267></TR
1268><TR
1269><TD
1270WIDTH="33%"
1271ALIGN="left"
1272VALIGN="top"
1273>snmpwalkoid</TD
1274><TD
1275WIDTH="34%"
1276ALIGN="center"
1277VALIGN="top"
1278><A
1279HREF="funcref.html"
1280ACCESSKEY="U"
1281>Nahoru</A
1282></TD
1283><TD
1284WIDTH="33%"
1285ALIGN="right"
1286VALIGN="top"
1287>socket_accept</TD
1288></TR
1289></TABLE
1290></DIV
1291></BODY
1292></HTML
1293>
Note: See TracBrowser for help on using the repository browser.