Solved

Max. datasize in (unix) sockets

Posted on 2000-03-11
1
213 Views
Last Modified: 2010-04-02
Hi,

Does anyone know if there's a maximum datasize that can be passed to one call to a sockets send() function?
There's seems to be some limit around 30-40Kb on Linux and less on FreeBSD...
Is there any docs mentioning this?

Thanks

Jan
0
Comment
Question by:janmagpet
1 Comment
 
LVL 3

Accepted Solution

by:
ufolk123 earned 50 total points
ID: 2609086
Hi janmqpet,

This value is protocol dependent.As for example in datagram sockets, if you pass the X bytes UDP datagram to send,It will have to fragment it to different IP packets for delivery.As
On the target machine defragmentation will be requitr to generate the orginal datagram of X size, The limit on size is generally bounded by the protocol to reduce the overhead of largely fragmented UDP data.
Generally the limit is only for UDP based communication.There is no standard limit of SOCK_STREAM sockets.In stream sockets (TCP) the size is limited by the Buffer size of Sending party.You can configure this using setsockopt( SND_BUFFSIZE option).

as MS help says :->
If the data is too long to pass atomically through the underlying protocol, the error WSAEMSGSIZE is returned, and no data is transmitted.
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

An Outlet in Cocoa is a persistent reference to a GUI control; it connects a property (a variable) to a control.  For example, it is common to create an Outlet for the text field GUI control and change the text that appears in this field via that Ou…
This is a short and sweet, but (hopefully) to the point article. There seems to be some fundamental misunderstanding about the function prototype for the "main" function in C and C++, more specifically what type this function should return. I see so…
The goal of this video is to provide viewers with basic examples to understand and use structures in the C programming language.
Video by: Grant
The goal of this video is to provide viewers with basic examples to understand and use for-loops in the C programming language.

706 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now