473,387 Members | 2,436 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

udp broadcast example, please

Moi,

sorry, but I've searched and searched to find exact information on how
to do a simple udp broadcast client/server, but can find it:

I want to have a thread pinging (very small message) and possibly the
same thread receiving maybe with a 1 second timeout. And the same code
should be able to run as multiple instances on the same machine.

Could someone with experience please post the 10 lines to make this
happen. Please no general comments or things that "should" work. I've
tried for hours with various socket options and addresses, so I would
very much appreciate working code.

Thanks
Torsten
Jul 18 '05 #1
2 4293
Torsten Rueger wrote:
sorry, but I've searched and searched to find exact information on how
to do a simple udp broadcast client/server, but can find it:


Have you searched on your hard drive?
It's right there: Demo/sockets/udpecho.py
in the python source tree.

--Irmen

Jul 18 '05 #2
On Wed, 17 Dec 2003 13:22:25 +0200, Torsten Rueger
<to************@hiit.fi> wrote:
sorry, but I've searched and searched to find exact information on how
to do a simple udp broadcast client/server, but can find it:

I want to have a thread pinging (very small message) and possibly the
same thread receiving maybe with a 1 second timeout. And the same code
should be able to run as multiple instances on the same machine.


http://aspn.activestate.com/ASPN/Coo...n/Recipe/52302

There's an example how to send and receive UDP packets.

- Matthias -

Jul 18 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: Frank Esser | last post by:
Hello! I have got machines that answer a certain UDP broadcast request with certain information about them. Some years ago I wrote a VB6 application that just sent out this UDP broadcast...
2
by: gregory_may | last post by:
First the research links: IPv6 spec (look for 'jumbo payload'): http://www.cs-ipv6.lancs.ac.uk/ipv6/documents/rfcs/archive/rfc1883.txt IPv6 Sample C# Client/Server...
2
by: Shawn G. | last post by:
I'm going around in circles here and need some help. Scenario: I am using (have used) either the UDPClient class or Sockets class to broadcast some bytes to 255.255.255.255 (udp protocol). Upon...
2
by: Dave | last post by:
Does anyone have an example of how to receive a connectionless(udp) broadcast in c#. I have tried everything i can possibly think of and it won't recieve the message. I know that the message is...
2
by: Gunnar_Frenzel | last post by:
Hello, this might be an easy question, but I don't have any handy solution at hand. I have an application that is supposed to send UDP broadcast. So far so easy, I did: Socket sockSendBroadcast...
0
by: salman | last post by:
Hello I have local network with ip(s) 192.168.1.x, and i am creating VPN through RAS- Remote Access Service (window server 2003) of ip range from 10.0.0.10 - 10.0.0.255. client are connecting to...
0
by: salman | last post by:
Hello i have to broadcast over vpn. I have local network and vpn, LAN ips are 192.168.1.x and vpn ips are 10.0.0.x. i am creating vpn thru windows server 2003 RAS. i have to broadcast msgs over...
2
by: Mali Findik | last post by:
Hi @ll, i've got problems with sending an UDP broadcast datagramm over two network interfaces. The code is like this: <Code> UdpClient client = new UdpClient(); IPEndPoint remoteEndPoint =...
1
by: raviskar | last post by:
Hi, I have a problem in receiving UDP broadcast data. We have a simple application which listens for the UDP broadcast data from the external servers. We can receive the UDP broadcast data from...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.