LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
Search this Thread
Old 09-01-2003, 07:10 AM   #1
strikernzl
LQ Newbie
 
Registered: Sep 2003
Distribution: Slackware
Posts: 4

Rep: Reputation: 0
Question 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
 
Old 09-01-2003, 09:29 AM   #2
Steave
Member
 
Registered: Jul 2001
Location: Braunschweig, Germany
Distribution: Suse 7.2
Posts: 184

Rep: Reputation: 30
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
 
Old 09-01-2003, 09:34 AM   #3
loic1
LQ Newbie
 
Registered: Jul 2003
Location: Paris
Posts: 9

Rep: Reputation: 0
It would help if you could show the relevant code snippet.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Socket programming problems marri Programming 5 10-06-2005 05:11 PM
Unable to connect to UNIX socket /tmp/.esd/socket error while using grip dr_zayus69 Linux - Software 4 08-23-2005 08:28 PM
Select() did not select my socket thvo Programming 1 05-08-2005 01:20 AM
C: Socket weirdness: select() -> fork() -> accept() maxfacta Programming 1 03-01-2005 02:33 PM
IPC in socket using select system call Gomathy Linux - Networking 0 01-28-2005 07:37 AM


All times are GMT -5. The time now is 12:56 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration