OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [trunk/] [ecos-2.0/] [packages/] [net/] [tcpip/] [v2_0/] [doc/] [listen.html] - Blame information for rev 1765

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 1254 phoenix
<html>
2
<body>
3
<pre>
4
NAME
5
       listen - listen for connections on a socket
6
 
7
SYNOPSIS
8
       #include &lt;network.h&gt;
9
 
10
       int listen(int s, int backlog);
11
 
12
DESCRIPTION
13
       To  accept  connections,  a  socket  is first created with
14
       socket(2), a willingness to  accept  incoming  connections
15
       and  a  queue limit for incoming connections are specified
16
       with listen, and then the connections  are  accepted  with
17
       accept(2).   The  listen  call  applies only to sockets of
18
       type SOCK_STREAM or SOCK_SEQPACKET.
19
 
20
       The backlog parameter defines the maximum length the queue
21
       of  pending  connections  may  grow  to.   If a connection
22
       request arrives with the queue full the client may receive
23
       an  error  with  an  indication of ECONNREFUSED or, if the
24
       underlying protocol supports retransmission,  the  request
25
       may be ignored so that retries may succeed.
26
 
27
RETURN VALUE
28
       On success, zero is returned.  On error, -1  is  returned,
29
       and errno is set appropriately.
30
 
31
ERRORS
32
       EBADF   The argument s is not a valid descriptor.
33
 
34
       ENOTSOCK
35
               The argument s is not a socket.
36
 
37
       EOPNOTSUPP
38
               The socket is not of a type that supports the lis-
39
               ten operation.
40
</pre>
41
</body>
42
</html>

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.