Jump to content

TCPSend() - Question about limits...


JScript
 Share

Recommended Posts

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)
    EndIf

João Carlos.

Edited by jscript

http://forum.autoitbrasil.com/ (AutoIt v3 Brazil!!!)

Somewhere Out ThereJames Ingram

somewh10.png

dropbo10.pngDownload Dropbox - Simplify your life!
Your virtual HD wherever you go, anywhere!

Link to comment
Share on other sites

doono if there is one, maby max string len in autoit, but when you hit 'Error allocating memory', then your close :graduated:

are you shure it send it all at once?

TCP server and client - Learning about TCP servers and clients connection
Au3 oIrrlicht - Irrlicht project
Au3impact - Another 3D DLL game engine for autoit. (3impact 3Drad related)



460px-Thief-4-temp-banner.jpg
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.

 
Link to comment
Share on other sites

doono if there is one, maby max string len in autoit, but when you hit 'Error allocating memory', then your close :graduated:

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 by jscript

http://forum.autoitbrasil.com/ (AutoIt v3 Brazil!!!)

Somewhere Out ThereJames Ingram

somewh10.png

dropbo10.pngDownload Dropbox - Simplify your life!
Your virtual HD wherever you go, anywhere!

Link to comment
Share on other sites

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 by bogQ

TCP server and client - Learning about TCP servers and clients connection
Au3 oIrrlicht - Irrlicht project
Au3impact - Another 3D DLL game engine for autoit. (3impact 3Drad related)



460px-Thief-4-temp-banner.jpg
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.

 
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...