In  addition  to François answer, the max packet size is something you
may change in tcp settings at system level.

Usually the packet size (called "MTU") has a 1500 byte default size.

If  you  try to send a 2500 byte packet then this packet will probably
be fragmented into 2 packets as you wireshark dump showed.

I recommend you to use TCPOptimizer from http://www.speedguide.net/downloads.php

This tool will show your actual System level TCP settings and MTU size
and  eventually change it. Default should be 1500 but you may increase
this size but think that this may have some side effects especially if
the   machine  also  need  to  communicate  over  Internet  as  packet
fragmentation  may  not  be managed very well (web page don't show up,
POP3 may not receive full mail...).

TCP Optimizer also have a function to test largest packet you can send
to destination ("MTU/Latency" tab and then "Largest MTU" button).

You  may  also  manually  do this test by sending non-fragmented pings
with forced size to detect if your destination can fully receive "big"

example : ping -4 -f -l 1472

This will do a ping to IP with 1472 packet size (1500 - 16
of  ethernet  encapsulation)  and  "-f"  say  "no packet fragmentation
allowed". This basic test should work but you may set bigger packet
(try the packet size you need +16).


FS> Thanks François for your help !

FS> I  will try this tomorrow... Just to be sure I'm not asking in the
FS> wrong  direction,  this already worked with my program a few weeks
FS> ago...  And  now without changing anything (or nothing consciously
FS> at least !) it doesn't work anymore.

FS> Attached  just 2 wireshark captures (at the time it worked !), you
FS> can  see the length of the data is 2114 in one capture and 2348 in
FS> the other one. Today I cannot go over 1500 (the rest comes then in
FS> another  chunk) The problem is that the hardware at the other end,
FS> takes this as several answers. Of course this is also a problem on
FS> this  hardware  but  I  cannot change it, and again it has already
FS> worked...

FS> Can   the  network  topology  (different  switches  or  hub)  give
FS> different results about this ?

FS> Thanks

FS> Best regards


FS> * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
FS> cab technologies
FS> za Nord du val de Moder
FS> 67350 Niedermodern
FS> Tél: + 33 3 88 72 25 01 / Fax: +33 3 88 72 25 02
FS> Notre site en Français: www.cab-technologies.fr
FS> Adresse support: supp...@cab-technologies.fr
FS> * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *

FS> -----Message d'origine-----
FS> De : twsocket-boun...@elists.org [mailto:twsocket-boun...@elists.org] De la 
part de François Piette
FS> Envoyé : mercredi 20 février 2013 17:54
FS> À : 'ICS support mailing'
FS> Objet : Re: [twsocket] TWSocket and data packet length

>>I need to send a data packet in one chunck.
>>Today the datas are splitted in two chunks, one of 1500 (the MTU limit) 
FS> another one for the rest.
>> I'm not able to go over this 1500 limit. I know it's possible because 
>> I
FS> have another program how does it like this

FS> What you ask is to use Jumbo Frames which is available on some gigabit 
ethernet systems. Jumbo frames are handled by the OS, not Winsock API (TWSocket 
make use of Winsock API of course).

FS> Altough not tested, you should probably do the following:
FS> - Set SocketSndBufSize to some large value
FS> - Set BufSize to at least the same large value
FS> - Send your data as usual.

FS> --
FS> francois.pie...@overbyte.be
FS> Embarcadero MVP
FS> http://www.overbyte.be
FS> http://francois-piette.blogspot.com

FS> --
FS> To unsubscribe or change your settings for TWSocket mailing list
FS> please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
FS> Visit our website at http://www.overbyte.be

To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be

Reply via email to