Sign in to follow this  
Followers 0
JScript

TCPSend() - Question about limits...

5 posts in this topic

#1 ·  Posted (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)
    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!

Share this post


Link to post
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.

 

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

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!

Share this post


Link to post
Share on other sites

#4 ·  Posted (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 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.

 

Share this post


Link to post
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
Sign in to follow this  
Followers 0