473,399 Members | 3,603 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,399 software developers and data experts.

Will The OS send more then one message in a datagram, if it has the room, for efficiency.

I know in TCP if you send a message down the wire, the OS may lump
subsequent messages into a buffer before sending it across the wire,
for efficiency. But, will the OS do the same thing with UDP?

I'm just concerned that I may be getting multiple messages in a single
datagram. I'm using a connectionless multicast paradigm where there
are multiple receivers listening asynchronously, and a single sender
sending synchronously.

Jun 14 '06 #1
2 1401
DaTurk wrote:
I know in TCP if you send a message down the wire, the OS may lump
subsequent messages into a buffer before sending it across the wire,
for efficiency. But, will the OS do the same thing with UDP?


Have a look at the MSDN help for the Socket.ReceiveFrom method. It
always returns the next available datagram or blocks until something is
available.

You have to take care on the other side.. on TCP you can specify a
buffer that's smaller than the number of bytes available. If you do this
on UDP you'll get a SocketException and lose every datagram that's too
big to fit into your buffer.

hth,
Max
Jun 14 '06 #2
"DaTurk" <mm******@hotmail.com> wrote in message
news:11*********************@h76g2000cwa.googlegro ups.com...
I know in TCP if you send a message down the wire, the OS may lump
subsequent messages into a buffer before sending it across the wire,
for efficiency. But, will the OS do the same thing with UDP?
No. Datagram sockets preserve message boundaries. Of course if the sending
application coalesces multiple payloads into one sendto() call, then Windows
considers that just one message.

I'm just concerned that I may be getting multiple messages in a single
datagram. I'm using a connectionless multicast paradigm where there
are multiple receivers listening asynchronously, and a single sender
sending synchronously.

Jun 14 '06 #3

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

Similar topics

4
by: Nomen Nescio | last post by:
can anyone be so kind as to look at http://www.mysolution.ws/HYPOCRITE.php and let me know why it isn't passing the form data to http://www.mysolution.ws/insertHYPOCRITES.php for the most...
4
by: Gregory Hassett | last post by:
Hello, Does anyone know how to get the maximum size of a datagram for a UDP Socket created via .NET's System.Net.Sockets.Socket class? Thanks!
3
by: Greg Chu | last post by:
Hi, any way to send a string directly to a file on the hard drive? Thanks! Greg
6
by: Iain King | last post by:
Hi. I've been looking everywhere for this and can't find it, apologies if I'm being obtuse: How do I set the max datagram packet size? I'm using the socket module. It seem like it's hardcoded...
5
by: Tiger | last post by:
Hi, I try to send a packet with raw socket but I have an error with ethereal sniffer on windows xp. I can't find any solution on the net. :( Could anybody help with that problem? my code :...
0
by: U S Contractors Offering Service A Non-profit | last post by:
This Sunday the 26th 2006 there will be Music @ Tue Nov Inbox Reply Craig Somerford to me show details 9:54 pm (26 minutes ago) #1St "CLICK" HeAt frOm A blanket...
2
by: dmot | last post by:
I need to save the information from hotel rooms to an array. This array then needs to be saved to a file and then accessed again. Could anyone give me any tips on how to do this? ...
1
by: sfncook | last post by:
Hi, As far as I can tell you can't call the accept function on a datagram socket. So why did this guy publish this sample code? http://www.codersource.net/winsock_tutorial_server_select_model.html...
8
by: babakandme | last post by:
How can I read IP Datagram? Should I write some Driver for that? Is there any special book about it? Thank you.
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: 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
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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,...
0
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...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.