help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Help on Listen


From: Martin Helm
Subject: Re: Help on Listen
Date: Sat, 11 Dec 2010 18:08:12 +0100
User-agent: KMail/1.13.5 (Linux/2.6.34.7-0.5-desktop; KDE/4.5.4; x86_64; ; )

Am Samstag, 11. Dezember 2010, 12:17:42 schrieb Parag Choudhary:
> Can somebody please point me to help on listen command
> 
> 
> 
> I get an error
> 
> 
> 
> octave:3> listen(3132)
> 
> error: listen: you must specify 2 parameters
> 
> octave:3>
> 
> 
> 
> What is the second param???
> 
> 
> 
> Thanks in advanceā€¦

If you mean the listen function from the sockets package (it is not an octave 
core function but a function defined in an octave forge package) you should 
have a look at the man page of the listen command. The octave function is just 
a wrapper for the system c function.

       int listen(int sockfd, int backlog);

DESCRIPTION
       listen()  marks  the  socket  referred to by sockfd as a passive 
socket, that is, as a socket that will be used to accept incoming
       connection requests using accept(2).

       The sockfd argument is a file descriptor that refers to a socket of type 
SOCK_STREAM or SOCK_SEQPACKET.

       The backlog argument defines the maximum length to which the queue of 
pending connections for sockfd may grow.   If  a  connection
       request  arrives  when the queue is full, the client may receive an 
error with an indication of ECONNREFUSED or, if the underlying
       protocol supports retransmission, the request may be ignored so that a 
later reattempt at connection succeeds.

RETURN VALUE
       On success, zero is returned.  On error, -1 is returned, and errno is 
set appropriately.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]