Solved

Max. datasize in (unix) sockets

Posted on 2000-03-11
1
253 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

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…
Windows programmers of the C/C++ variety, how many of you realise that since Window 9x Microsoft has been lying to you about what constitutes Unicode (http://en.wikipedia.org/wiki/Unicode)? They will have you believe that Unicode requires you to use…
The goal of this video is to provide viewers with basic examples to understand and use pointers in the C programming language.
Video by: Grant
The goal of this video is to provide viewers with basic examples to understand and use nested-loops in the C programming language.

739 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