Sponsored Content
Top Forums Programming How can I solve this problem? Post 45725 by fpmurphy on Tuesday 30th of December 2003 10:24:23 AM
Old 12-30-2003
Correct. But be sure to use POSIX threads (Pthreads)

There are plenty of examples available on the Web
showing how to use POSIX pthreads to listen for
and handle incoming connections.

- Finnbarr
 

9 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

can't solve that problem [PLEASE HELP]

well, my internet brakes down every day because of my server, i don't have troubles with RAM or anything i think... that problem started since i am running an unrealircd server... well, my internet brakes down and when i try to access the inside ip from the server on http port 80, it says that:... (2 Replies)
Discussion started by: AiRkO
2 Replies

2. Programming

Can any one solve this Problem...!!!

Try to solve this.....It's a nice program..... #include<stdio.h> void change() { /*Write something in this function so that the output of printf in main function should give 5 . Do not change the main function */ } void main() { int i=5; change(); (9 Replies)
Discussion started by: Baba B. Saheb
9 Replies

3. UNIX for Advanced & Expert Users

use two unix commands to solve the following problem

Hi, all, The following commands could compute the 10 most frequent bigrams from a input sequence which is in a file infile. I would like to know whether there is somebody who can use only two unix commands to do the same work. -------------------- tr " " "\012*" <infile >out1 tail +2... (3 Replies)
Discussion started by: vicky20000
3 Replies

4. UNIX for Advanced & Expert Users

How to solve restarting problem

Hi! My unix os version is OSF1 CP1 V4.0 878 alpha. It startup normally but it restarts within 5 sec. I would like to know how to solve . Please reply to me. Thanks . akzin (2 Replies)
Discussion started by: akzin
2 Replies

5. IP Networking

Need to solve complex network problem

I have a Red Hat linux server X on a x.x.0.0 network. This machine also has to communicate with another server Y on a network called y.y.0.0 Server X has two network interfaces. eth0 is configured on the x.x.0.0 network and has a default gateway on the x.x.0.0 network. In order to... (4 Replies)
Discussion started by: soliberus
4 Replies

6. UNIX for Advanced & Expert Users

how would you solve this problem?

I have a file process.txt I wanted to just grab data in "process" column. Name process process_id status Adminserver adminserver 22669 Running Browser Engine browserengine ... (7 Replies)
Discussion started by: soemac
7 Replies

7. Shell Programming and Scripting

Unknown Problem. I really want your help to solve this!

Take a look on this code: #!/bin/sh currentpath=`pwd` if ; then #Normal user if ; then "$currentpath"/.cleaner else ./runit fi else #Root user if ; then rm -r /some fi mkdir /some cd /home/ echo "`ls --group-directories-first -1`" > /some/allusers cat /some/allusers | sed 's/... (17 Replies)
Discussion started by: hakermania
17 Replies

8. Shell Programming and Scripting

How to solve the problem of overwriting an array?

Hi all, I have a file..... I want to print 2nd column arranged according to order of first column, present in second file..... So, the output should be: I am using following code: awk 'NR==FNR{a=$2;next}{print a?a:"ABSENT\t"}' file1 file2 But, it seems that the... (3 Replies)
Discussion started by: CAch
3 Replies

9. Shell Programming and Scripting

Help me solve this scripting problem please

Hello, I would really appreciate some help into approaching this problem: - i have a random txt file with x lines and y rows following this pattern: ex: ip1 | user1 | command ip2 | user2 | command ip3 | user3 | command - i need to telnet/ssh into these ip's, login with... (7 Replies)
Discussion started by: catalinstk
7 Replies
listen(3XNET)					   X/Open Networking Services Library Functions 				     listen(3XNET)

NAME
listen - listen for socket connections and limit the queue of incoming connections SYNOPSIS
cc [ flag ... ] file ... -lxnet [ library ... ] #include <sys/socket.h> int listen(int socket, int backlog); DESCRIPTION
The listen() function marks a connection-mode socket, specified by the socket argument, as accepting connections, and limits the number of outstanding connections in the socket's listen queue to the value specified by the backlog argument. If listen() is called with a backlog argument value that is less than 0, the function sets the length of the socket's listen queue to 0. The implementation may include incomplete connections in the queue subject to the queue limit. The implementation may also increase the specified queue limit internally if it includes such incomplete connections in the queue subject to this limit. Implementations may limit the length of the socket's listen queue. If backlog exceeds the implementation-dependent maximum queue length, the length of the socket's listen queue will be set to the maximum supported value. The socket in use may require the process to have appropriate privileges to use the listen() function. RETURN VALUES
Upon successful completions, listen() returns 0. Otherwise, -1 is returned and errno is set to indicate the error. ERRORS
The listen() function will fail if: EBADF The socket argument is not a valid file descriptor. EDESTADDRREQ The socket is not bound to a local address, and the protocol does not support listening on an unbound socket. EINVAL The socket is already connected. ENOTSOCK The socket argument does not refer to a socket. EOPNOTSUPP The socket protocol does not support listen(). The listen() function may fail if: EACCES The calling process does not have the appropriate privileges. EINVAL The socket has been shut down. ENOBUFS Insufficient resources are available in the system to complete the call. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Interface Stability |Standard | +-----------------------------+-----------------------------+ |MT-Level |MT-Safe | +-----------------------------+-----------------------------+ SEE ALSO
accept(3XNET), connect(3XNET), socket(3XNET), attributes(5), standards(5) SunOS 5.11 10 Jun 2002 listen(3XNET)
All times are GMT -4. The time now is 05:39 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy