Download your favorite Linux distribution at LQ ISO.
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 12-20-2004, 01:44 AM   #1
LQ Newbie
Registered: Sep 2004
Location: Tripoli
Posts: 22

Rep: Reputation: 15
tcpserver programe using sockets by C language

Hi all......

I have a tcpserver that can handle one client programe,but what I need is tcpserver that can handle two clients.
any help will be very appresiated.
Old 12-20-2004, 05:04 AM   #2
Senior Member
Registered: Jul 2004
Distribution: Ubuntu 7.04
Posts: 1,991

Rep: Reputation: 76
This isn't a ready-rolled solution, but it demonstrates one way to do a multi-client network server using non-blocking streams. The code's in C++ but the network stuff all uses the C library, so it should still be readable.

The other way, which is probably better in most cases, is to use xinetd to spawn one copy of the program you've already written for each connection.


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
Any one know CPU monitor programe....Plz help me.... rajsun Programming 5 03-24-2005 04:13 AM
programe Ammad Programming 4 12-10-2004 02:33 PM
tcpserver wont intalled / installing Qmail lsimon4180 Linux - Software 0 10-03-2004 04:18 PM
Can't get my tcpserver up Red evil Linux - Newbie 0 11-24-2003 03:25 AM
launching a programe in startup as service /daemon prpsarathy435 Linux - Software 6 07-07-2002 10:43 PM > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 05:28 PM.

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