LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   Socket and Select() problems (https://www.linuxquestions.org/questions/programming-9/socket-and-select-problems-87908/)

strikernzl 09-01-2003 06:10 AM

Socket and Select() problems
 
Hi,
Well this is the situation i am having with the select() command
At the moment i have written a daemon and it seems to accept the first connection and then from that point on it refuses to proccess any more.

I have used netstat and it says the connection is established,
I have placed a printf line after the accept command in the code
and nothing is showing..

I have a feeling it has something to do with the socket id its been given, and that is 0.

THis problem is driving me nuts i have used the same code in the other server applications without fault..

any pointers as to what i may of done or could be going wrong.
thanks
Dennis

Steave 09-01-2003 08:29 AM

You definitely need to give the accept() call the right socket fd. otherwise nothing will happen. Without a sniplet of your code your trying to get to work, its difficult to give you a hint on what to do.
Anyway, you'll find a great tutorial for IPv4 socket programming here: http://www.ecst.csuchico.edu/~beej/guide/net/html/

Cheers, Steave

loic1 09-01-2003 08:34 AM

It would help if you could show the relevant code snippet.


All times are GMT -5. The time now is 03:02 PM.