LinuxQuestions.org
Visit Jeremy's Blog.
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 12-20-2004, 01:44 AM   #1
abdobl
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.
abdobl.
 
Old 12-20-2004, 05:04 AM   #2
rjlee
Senior Member
 
Registered: Jul 2004
Distribution: Ubuntu 7.04
Posts: 1,994

Rep: Reputation: 76
http://www.rjlee.dyndns.org/projects/programs/telnet/
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.
 
  


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
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

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

All times are GMT -5. The time now is 11:11 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