LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
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-10-2008, 07:15 AM   #1
prasad_ark
LQ Newbie
 
Registered: Jul 2008
Posts: 18
Blog Entries: 1

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


Hi,

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,
Ramakrishna
 
Old 09-10-2008, 09:29 AM   #2
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,691

Rep: Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894
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:
http://www.linuxquestions.org/questi...-fdset-668868/
 
  


Reply



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

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 06:01 AM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration