LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

tcp details please

Solved!
Go to solution

Well, I know that this is more of a general TCP question than a LabVIEW question but I will ask it anyway since there does not seem to be any good documentation on the Web about TCP under Windows, particularly whatever Windows layer LabVIEW calls to do TCP.

 

Can someone out there explain what happens behind the scenes when doing TCP Read/Write with LabVIEW?  Let's assume "immediate" or "standard" mode is used and there is no LabVIEW buffer set up for the data.  What actually triggers the data to travel over the network?  The Read or the Write?  Obviously there is some fixed size buffer allocated somewhere at a low level- is it used by the Read side or the Write side, or both?  What is the default size of the TCP buffer?  4kb?  When that buffer fills, I'm assuming that's when the "Write" timeout comes into play?

 

So in summary, I'm looking for a basic "tutorial" about how TCP data transfer is handled below the LabVIEW layer.



0 Kudos
Message 1 of 4
(3,272 Views)

Just pointing to links [These are really good]:

 

http://www.freeprogrammingresources.com/tcp.html

http://www.redbooks.ibm.com/redbooks/pdfs/gg243376.pdf

With regards,
JK
(Certified LabVIEW Developer)
Give Kudos for Good Answers, and Mark it a solution if your problem is solved.
0 Kudos
Message 2 of 4
(3,254 Views)
Thanks Jim!  Any idea what Windows DLL set is called by LabVIEW TCP?  i would like to research this a bit more specifically towards that layer, since most of the TCP info I've seen is very generic and does not cover the send/receive buffers and so forth, which is what I really want to know about.  I have a feeling they are specific to the application layer being used.


0 Kudos
Message 3 of 4
(3,227 Views)
Solution
Accepted by topic author Garvacious

On windows, LabVIEW uses the winsock2 API (WS2_32.dll).

 

http://msdn.microsoft.com/en-us/library/ms740673(VS.85).aspx

 

It would seem that on WindowsXP the default size of TCP buffers is 17,520 bytes.

 

By default LabVIEW leaves the send and recv buffer sizes alone (the OS defaults). If you want to fine tune them you can use the ini tokens

SocketSendBufferSize and

SocketRecvBufferSize

 

The values of these tokens will be applied to all sockets that LabVIEW uses.

 

<Disclaimer>

The OS defaults are almost always the best choice. It is really easy to destroy LabVIEW's network performance by fiddling with these values.

</Disclaimer>

Message 4 of 4
(3,217 Views)