JScript 71 Posted September 15, 2011 (edited) Hi,Does anyone know say how many bytes TCPSend() can send at once?I'll rephrase the question: How many packets are sent at one time?$Socket = _TCPConnect($sCmpName, $iPort, 1000) If Not @error Then While $iSize $iSize = TCPSend($Socket, $vData) If @error Then ExitLoop $vData = BinaryMid($vData, $iSize + 1, $iSize) WEnd TCPCloseSocket($Socket) EndIfJoão Carlos. Edited September 15, 2011 by jscript http://forum.autoitbrasil.com/ (AutoIt v3 Brazil!!!)Somewhere Out ThereJames IngramDownload Dropbox - Simplify your life!Your virtual HD wherever you go, anywhere! Share this post Link to post Share on other sites
bogQ 91 Posted September 15, 2011 doono if there is one, maby max string len in autoit, but when you hit 'Error allocating memory', then your close are you shure it send it all at once? TCP server and client - Learning about TCP servers and clients connectionAu3 oIrrlicht - Irrlicht projectAu3impact - Another 3D DLL game engine for autoit. (3impact 3Drad related)There are those that believe that the perfect heist lies in the preparation.Some say that it’s all in the timing, seizing the right opportunity. Others even say it’s the ability to leave no trace behind, be a ghost. Share this post Link to post Share on other sites
JScript 71 Posted September 15, 2011 (edited) doono if there is one, maby max string len in autoit, but when you hit 'Error allocating memory', then your close are you shure it send it all at once? I'll rephrase the question: How many packets are sent at one time?$Socket = _TCPConnect($sCmpName, $iPort, 1000) If Not @error Then While $iSize $iSize = TCPSend($Socket, $vData) If @error Then ExitLoop $vData = BinaryMid($vData, $iSize + 1, $iSize) WEnd TCPCloseSocket($Socket) EndIf João Carlos. Edited September 15, 2011 by jscript http://forum.autoitbrasil.com/ (AutoIt v3 Brazil!!!)Somewhere Out ThereJames IngramDownload Dropbox - Simplify your life!Your virtual HD wherever you go, anywhere! Share this post Link to post Share on other sites
bogQ 91 Posted September 15, 2011 (edited) i dont think its up to autoit, its up to network and adapter, basicly (if im not wrong) it shud send one packet at the time and your speed and device is your limitation as for its max size, look at my edit: http://en.wikipedia.org/wiki/Maximum_transmission_unit Edit:and from that page... Large packets can occupy a slow link for some time, causing greater delays to following packets and increasing lag and minimum latency. For example, a 1500-byte packet, the largest allowed by Ethernet at the network layer (and hence over most of the Internet), ties up a 14.4k modem for about one second. Edited September 15, 2011 by bogQ TCP server and client - Learning about TCP servers and clients connectionAu3 oIrrlicht - Irrlicht projectAu3impact - Another 3D DLL game engine for autoit. (3impact 3Drad related)There are those that believe that the perfect heist lies in the preparation.Some say that it’s all in the timing, seizing the right opportunity. Others even say it’s the ability to leave no trace behind, be a ghost. Share this post Link to post Share on other sites
JScript 71 Posted September 15, 2011 @bogQ Thank you very much! João Carlos. http://forum.autoitbrasil.com/ (AutoIt v3 Brazil!!!)Somewhere Out ThereJames IngramDownload Dropbox - Simplify your life!Your virtual HD wherever you go, anywhere! Share this post Link to post Share on other sites