LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 02-07-2013, 11:30 AM   #1
webquinty
Member
 
Registered: Apr 2008
Location: Espaņa
Distribution: Suse
Posts: 227

Rep: Reputation: 32
Handle multiple sockets .... doubts!!!!


Hello,

I have a doubt about this topic.
I have search in google the way to handle several sockets at the same time but as far I known a socket only could handle one port.

Then If I want to connect for example 10 computers at the same port, it is impossible, right.

The example that I found in the net, use commands like select(), FD_SET, etc etc, but it does not work because only one computer could connect in a socket (TCP).

So, what is the way to handle several connections in TCP. it is impossible to make it at the same port number.

Any advice?
Best regards.
 
Old 02-07-2013, 12:15 PM   #2
NevemTeve
Senior Member
 
Registered: Oct 2011
Location: Budapest
Distribution: Debian/GNU/Linux, AIX
Posts: 4,856
Blog Entries: 1

Rep: Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869
Read some basic documentation (eg). For now, here is some good news:

1. you can connect to multiple partners from one program
2. you can accept multiple connections in one program
3. these two is possible in the same program
 
  


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
Doubts abous how to handle timers in linux. webquinty Linux - Software 2 10-19-2009 11:15 AM
How does the kernel handle multiple cpus/cores? riddler313 Linux - General 4 06-18-2009 08:35 AM
Creating multiple UDP sockets in a 'C' program saikrishnan7 Programming 20 05-01-2009 04:08 AM
Multiple Perl Sockets + Child Processes (fork) Reion Programming 3 10-13-2008 06:17 PM
how does the OS handle multiple processors? mkrems Linux - General 3 05-01-2008 09:20 PM

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

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