LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 08-30-2015, 10:07 PM   #1
Thang
LQ Newbie
 
Registered: Aug 2015
Posts: 1

Rep: Reputation: Disabled
A system call to send the same tcp message to multiple destinations/hosts


I need to send/fan-out the same message to a list of hosts efficiently. The logic would require looping through each socket to write the message out. If this logic runs in the linux user mode, the underlying OS will call the system call as many times as the number of hosts. This is expensive since each system call requires a user-mode to kernel-mode context switch. It would be more efficient if the loop can be moved in a system call that takes a list of hosts (file descriptors). Does such system call exist in linux?
 
Old 09-01-2015, 10:34 AM   #2
cliffordw
Member
 
Registered: Jan 2012
Location: South Africa
Posts: 509

Rep: Reputation: 203Reputation: 203Reputation: 203
Hi,

Welcome to LQ.

There's no system call that caters for this as far as I know.

Depending on your application design, multicast might be the solution?

Regards,

Clifford
 
  


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
[SOLVED] Squid multiple ports multiple destinations pestka Linux - Server 1 02-15-2013 05:53 AM
[SOLVED] Postfix: Restricting what users can send mail to off-site destinations blaszta Linux - Newbie 7 02-12-2013 12:00 AM
Send/Receive multiple raw packets in one system call coreykasten Linux - Networking 1 08-29-2010 11:52 AM
[SOLVED] Restricting some users send mail to off-site destinations in sendmail mail4vijay Linux - Server 2 10-23-2009 03:20 AM
multiple send() and recv() in one TCP connection ramyasugu Linux - Networking 0 03-17-2009 06:44 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 07:48 PM.

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