-
Notifications
You must be signed in to change notification settings - Fork 14
Expand file tree
/
Copy pathsocket-listen.xml
More file actions
77 lines (76 loc) · 2.92 KB
/
socket-listen.xml
File metadata and controls
77 lines (76 loc) · 2.92 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
<?xml version="1.0" encoding="UTF-8"?>
<!-- splitted from ./it/functions/sockets.xml, last change in rev 1.4 -->
<!-- last change to 'socket-listen' in en/ tree in rev 1.1 -->
<!-- EN-Revision: n/a Maintainer: darvina Status: ready -->
<!-- OLD-Revision: 1.34/EN.1.1 -->
<refentry xml:id="function.socket-listen" xmlns="http://docbook.org/ns/docbook">
<refnamediv>
<refname>socket_listen</refname>
<refpurpose>Attende una richiesta di connessione su un socket</refpurpose>
</refnamediv>
<refsect1>
<title>Descrizione</title>
<methodsynopsis>
<type>bool</type><methodname>socket_listen</methodname>
<methodparam><type>resource</type><parameter>socket</parameter></methodparam>
<methodparam choice="opt"><type>int</type><parameter>backlog</parameter></methodparam>
</methodsynopsis>
&warn.experimental.func;
<para>
Una volta creato il socket <parameter>socket</parameter> tramite
la funzione <function>socket_create</function>, ed eseguito il bind ad un nome
con <function>socket_bind</function>, lo si può mettere in ascolto di
eventuali richieste di connessione su <parameter>socket</parameter>.
</para>
<note>
<para>
Il numero massimo, passato con il parametro <parameter>backlog</parameter>
dipende fortemente dalla piattaforma sottostante. Su Linux questo
viene troncato, senza avvisare, a <constant>SOMAXCONN</constant>. Su Win32,
se viene passata la costante <constant>SOMAXCONN</constant>, il servizio
sottostante responsabile dei socket valorizza <parameter>backlog</parameter> al
massimo valore <emphasis>ragionevole</emphasis>. Non esiste un metodo standard per
determinare il reale valore massimo su questa piattaforma.
</para>
</note>
<para>
La funzione <function>socket_listen</function> è disponibile solo per i
socket di tipo <literal>SOCK_STREAM</literal> o
<literal>SOCK_SEQPACKET</literal>.
</para>
<para>
&return.success; Il codice di errore può essere recuperato con
<function>socket_last_error</function>. Questo codice può essere passato a
<function>socket_strerror</function> per ottenere una spiegazione
dell'errore.
</para>
<para>
Vedere anche
<function>socket_accept</function>,
<function>socket_bind</function>,
<function>socket_connect</function>,
<function>socket_create</function> e
<function>socket_strerror</function>.
</para>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->