LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices

Reply
 
LinkBack Search this Thread
Old 08-09-2010, 11:45 PM   #1
trinadh.cool
LQ Newbie
 
Registered: Aug 2010
Posts: 1

Rep: Reputation: 0
socket programming for server and multiple clients...


hii...
i want to know about the usage of select system call in sockets...
please help me in this..

thanks
trinadh...
 
Old 08-09-2010, 11:54 PM   #2
er.surendersharma
Member
 
Registered: May 2010
Posts: 47
Blog Entries: 2

Rep: Reputation: 15
Select () + Socket Programming

Quote:
Originally Posted by trinadh.cool View Post
hii...
i want to know about the usage of select system call in sockets...
please help me in this..

thanks
trinadh...

With select(), instead of having a process for each request, there is usually only one process that "multi-plexes" all requests, servicing each request as much as it can.

So one main advantage of using select() is that your server will only require a single process to handle all requests. Thus, your server will not need shared memory or synchronization primitives for different 'tasks' to communicate.

One major disadvantage of using select(), is that your server cannot act like there's only one client, like with a fork()'ing solution. For example, with a fork()'ing solution, after the server fork()s, the child process works with the client as if there was only one client in the universe -- the child does not have to worry about new incoming connections or the existence of other sockets. With select(), the programming isn't as transparent.



Thanks
Er.Surender Sharma
 
Old 08-09-2010, 11:56 PM   #3
er.surendersharma
Member
 
Registered: May 2010
Posts: 47
Blog Entries: 2

Rep: Reputation: 15
Quote:
Originally Posted by trinadh.cool View Post
hii...
i want to know about the usage of select system call in sockets...
please help me in this..

thanks
trinadh...
Hello Mr.

Use this link it will be more beneficial for u ..

http://www.lowtek.com/sockets/select.html

Thanks
Er.Surender Sharma
 
1 members found this post helpful.
  


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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Socket programming in C...print clients IP and queue number... niteshadw Programming 6 02-08-2010 03:07 PM
Linux Netwok programming server with multiple clients pavan_iiith Linux - Newbie 2 03-10-2008 09:13 PM
problem in connecting Multiple clients to socket server in linux M007 Linux - Server 1 10-31-2007 11:52 PM
About multiple timeout in Socket Programming lisa000 Linux - General 1 10-20-2007 05:07 PM
Multiple clients communicating to one socket dragondad Programming 3 09-10-2005 08:22 AM


All times are GMT -5. The time now is 11:57 PM.

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