Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » U++ MT-multithreading and servers » How to send broadcast
How to send broadcast [message #13858] Wed, 30 January 2008 11:08 Go to next message
malya is currently offline  malya
Messages: 27
Registered: June 2007
Promising Member

Hello!
How to send broadcast message for all computers of local network?

Example:
Work good
String host = "192.168.0.11";
ClientSocket(sock, host, _port, true, NULL, 5, false));

but
String host = "255.255.255.255";
ClientSocket(sock, host, _port, true, NULL, 5, false));

broadcast not work.

Thanks!
Re: How to send broadcast [message #13913 is a reply to message #13858] Fri, 01 February 2008 16:33 Go to previous messageGo to next message
waxblood is currently offline  waxblood
Messages: 95
Registered: January 2007
Member
I'm no network guru, so I'm just replying because nodoby else already did.

If your subnet mask is 255.255.255.0, have you tried to use 192.168.0.255 as broadcast address?


David
Re: How to send broadcast [message #13956 is a reply to message #13913] Sun, 03 February 2008 13:44 Go to previous messageGo to next message
captainc is currently offline  captainc
Messages: 278
Registered: December 2006
Location: New Jersey, USA
Experienced Member
And do broadcasts have to be UDP? ...
Re: How to send broadcast [message #14062 is a reply to message #13956] Fri, 08 February 2008 08:45 Go to previous messageGo to next message
malya is currently offline  malya
Messages: 27
Registered: June 2007
Promising Member

Quote:


And do broadcasts have to be UDP? ...



Thanks for reply, but how it`s made?
Re: How to send broadcast [message #15514 is a reply to message #13956] Sun, 27 April 2008 19:39 Go to previous messageGo to next message
tvanriper is currently offline  tvanriper
Messages: 85
Registered: September 2007
Location: Germantown, MD, USA
Member
captainc wrote on Sun, 03 February 2008 07:44

And do broadcasts have to be UDP? ...

I think so.

TCP/IP requires an established connection... which is more-or-less impossible through broadcast. I don't think you can have a one-to-many relationship with TCP/IP.

UDP is sort of a fire-and-forget way of sending information through a network, so you can easily set up one-to-many communications with it (since via UDP, you do not necessarily care about responses).

I wish I could help you, malya, but I don't know enough about network broadcasting yet.
Re: How to send broadcast [message #15515 is a reply to message #13858] Sun, 27 April 2008 19:47 Go to previous message
tvanriper is currently offline  tvanriper
Messages: 85
Registered: September 2007
Location: Germantown, MD, USA
Member
I took a peek here for a little more information about broadcasting on a network.

It looks to me like 255.255.255.255 should work, if you only intend to broadcast locally, unless there's something else funky going on. I'm guessing there's a setting not quite right.
Previous Topic: MT on Linux?
Next Topic: MT/Locking Questions
Goto Forum:
  


Current Time: Tue Aug 20 03:23:33 CEST 2019

Total time taken to generate the page: 0.00931 seconds