Expiring Today—Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Max. datasize in (unix) sockets

Posted on 2000-03-11
1
Medium Priority
?
259 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 150 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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

Preface I don't like visual development tools that are supposed to write a program for me. Even if it is Xcode and I can use Interface Builder. Yes, it is a perfect tool and has helped me a lot, mainly, in the beginning, when my programs were small…
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…
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.
The goal of this video is to provide viewers with basic examples to understand and use switch statements in the C programming language.

719 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