LabVIEW Idea Exchange

cancel
Showing results for 
Search instead for 
Did you mean: 
nodnarb90

Allow creation of TCP sockets without actually connecting them

Status: New

It would be nice if the LabVIEW primitives for TCP allowed for the creation of a socket without actually connecting it to an endpoint.  My thoughts are that there would be two new commands added to the TCP palette:

 

TCP Create Connection (Advanced)

TCP Open Connection (Advanced)

 

TCP Create Connection (Advanced) would create the socket but not perform the connect() method on that socket.  I would imagine that it would otherwise look and feel quite like the current TCP Open Connection, except that the user would need to manually run TCP Open Connection (Advanced) afterwards that would perform the connect() method on that socket.

 

I have a need to access the raw socket object before it is connected, using the TCP Get Raw Net Object.vi in the vi.lib\Utility\tcp.llb library.  This VI works to get the handle that can be used by winsock and other Windows DLLs, however, it only allows for setting properties for a socket that is already connected.

 

Specifically I have a need to enable Windows FastPath for TCP to optimize the rate at which I can stream data between two applications.  Per the specification, this option must be enabled BEFORE the socket is connected.  Right now I can set this for the listener on the server side (TCP Create Listener creates a socket but does not connect), but I cannot set it for the TCP connection on the client side as the first method it calls is TCP Open Connection which returns a socket that is already connected.

1 Comment
rolfk
Knight of NI

If you are at that, add an extra paramater "local address" to it that defines the local network adapter address to bind the socket to. Default it would be empty and work just as now where it binds to IP_ANY, so that the packet routing is only defined by the target address.

Rolf Kalbermatter
My Blog