Register a domain and help support LQ
Go Back > Forums > Non-*NIX Forums > Programming
User Name
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.


  Search this Thread
Old 09-10-2008, 07:15 AM   #1
LQ Newbie
Registered: Jul 2008
Posts: 18
Blog Entries: 1

Rep: Reputation: 0
How to create multiple clients and use select?


This is a broad extension to my earlier postI have a server code to handle multiple clients.The server is launching a thread after an accept() .I am creating client connections in a for loop.My aim is to test how many client connections a server can handle.I am storing all the socket fds of client in an array.Finally I am launching only one client reader thread to read server messages.I am trying to use a select() here to check if any client socket received message from the server.But I am unable to assign ALL the socket descriptors to fd-set so that I can do a select.Only the first one is getting assigned.I am stuck here.Is there any link/tested code to do similar task.The purpose is to write a client program to simulate multiple clients using 'C' langauge.

Sorry for lack of clarity.My expression of technical problem is very poor.

Give a generous feedback.

Thansk & regards,
Old 09-10-2008, 09:29 AM   #2
Registered: Aug 2002
Posts: 14,764

Rep: Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484
Do not create multiple threads on the same topic. If you feel like you have posted a thread in the wrong forum you can ask a mod to move it.

continue here:


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
Ctrl-click not working to select multiple files; selects a few then resets selection sandaili Linux - Newbie 3 08-04-2008 06:54 PM
multiple-select form validation with javascript baikonur Programming 7 10-12-2007 07:28 AM
Select problem with multiple listeners Fruitbat Programming 3 04-29-2005 12:24 PM
select multiple with pthreads jwstric2 Programming 5 02-24-2005 03:10 PM
Multiple Clients One Authentication jpbarto Linux - Networking 4 10-02-2003 01:50 PM

All times are GMT -5. The time now is 05:44 AM.

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