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

Subversion Repositories or1k

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

Go to most recent revision | Details | Compare with Previous | View Log

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

powered by: WebSVN 2.1.0

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