473,788 Members | 2,919 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Receive UDP packets from multiple devices

1 New Member
Hi all,

I'm new to developing applications using networking protocols and need to figure out how to send/receive data between a server and 8 different devices. I don't have much code as I am still in the planning stages, but I'm confused about the best way to send / receive data.

On program startup I plan on sending a broadcast ping and then listening for the 8 device's responses. What is the best way to receive the data? I've done some digging around and it looks like I will need a thread that constantly calls a udp receive. Is that correct?

Also, after the program has started up I will have to poll the devices every so often for data. As far as I can tell I will have to send 8 different send requests for each poll and then use the receive thread to get the data back from the devices. This seems kind of inefficient but I think it will work. Can anyone offer any insight?

Thanks for any help,

Chris
Sep 10 '09 #1
0 1841

Sign in to post your reply or Sign up for a free account.

Similar topics

4
16050
by: Morten Overgaard | last post by:
Hi I'm listening on the SysLog port (514) through UDP. The problem is that I am not receiving anything nut I know that i get messages on the port. When I use KIWI to listen on the same port via UDP tons of messages arrive.. What am I'm doing wrong My code looks like the following... private UdpClient udpClient;
1
4903
by: | last post by:
I cannot handle this.I can receive incoming but I cannot detect outgoing packets. I am using Windows XP no SP present. Thanks a lot for answers.
1
2054
by: Naveen Mukkelli | last post by:
Hi, I am working with a client/server application that sends and receives structures of size 2000 bytes through TCP/IP Sockets. As MSS(Maximum Segment Size) is 1500 bytes, TCP/IP protocol on the sending side would chop the packet into smaller packets, lets say 1400, 600 and sends on to the network. Does the TCP/IP protocol on receiving side automatically merges those
0
1356
by: Nuno Magalhaes | last post by:
I've build an application that sends UDP packets to a multicast address 224.1.2.3 but in my other application I can't receive that packets using the code below. It blocks on receive. Any suggestions? (I can see the packets arriving at 224.1.2.3:554 on the client machine since I'm running the server and the client on the same machine) UdpClient uc=new UdpClient(8899); uc.JoinMulticastGroup(IPAddress.Parse("224.1.2.3")); IPEndPoint ep=new...
6
2080
by: Orgun | last post by:
Hi, I sent this message to the moderated c++ group too but it is waiting for moderator approval and I wanted to send here too. I am new to Design Patterns. I want to write a simple DeviceManager which is only interested in CD/DVD devices. I want to get the list of CD/DVD devices and "be informed when a disc inserted into a device". I am developing this on Linux. So, I used HAL API and read some system (actually /proc) files to gather...
5
7421
by: Mahesh | last post by:
Hi am trying to receives UDP pockets , but it is blocking in the "Socket.Receive" can any one help me to find the problem...? byte buffer = new byte; Socket socket = new Socket(AddressFamily.InterNetwork, SocketType.Dgram,ProtocolType.Udp); socket.Bind(new IPEndPoint(IPAddress.Any, 5703)); int byterx = socket.Receive(buffer, 0, 1, SocketFlags.None); Console.WriteLine(byterx.ToString());
0
1654
by: Johan | last post by:
Suppose: There are two devices on my network that both broadcast UDP datagrams (and they both use the same portnumber 1234). I want to create two executables that use UdpClient internally. Each executable should only receive the datagrams from one device. Is this possible? Lets say the devices are 10.0.0.1 and 10.0.0.2. I have already tried something like this: UdpClient udpClient = new UdpClient(1234);
3
3617
by: Joe Blauth | last post by:
Hi all, I am currently working on a small application that sends messages from a client to a server and receives messages in return. Basically the functionality is made with sockets which is working just fine except of one little thing. whenever the client tries to receive a message the server has sent it goes into a hang. unfortunately without an error or exception at all. the communication itself (sending message from client to...
0
1514
by: =?Utf-8?B?VG9tbXkgTG9uZw==?= | last post by:
Ok, I'm not all that great with VB.Net, I admit that early on. Used to get on well with VB6 but we can't all live in the past I'm told. :) Basically, the following is a sample procedure, which is run by a background worker (multi-threading is new to me...). The procedure is supposed to get my worker thread to start listening on the specified port. Slightly after the worker thread begins listening, the main thread attempts to send a...
0
9656
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9498
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10370
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10177
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9969
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6750
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5402
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5538
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
2896
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.