TCP/IP Protocol
The TCP/IP protocol supports communications via TCP/IP sockets.
Syntax
tcpip://hostname:port?option=value,... % Use TCP/IP communications with host "hostname" on port "port"
Description
The TCP/IP communications protocol supports communications over Ethernet. It is identified by using tcpip as the protocol name in a URI.
The hostname in the URI is used when connecting to a remote host. It is ignored when establishing a listening connection. The hostname may be a standard TCP/IP hostname that is resolved via the normal name resolution mechanisms (DNS, hosts file, etc.) or it may be an IP address in dot notation (eg. 192.168.0.10).
The port in the URI determines the TCP/IP port used for communications. For example,
the URI tcpip://quanser-dev:18000 refers to a machine called
quanser-dev
listening on port 18000. The default port number is 18000.
For listening streams, the port should not be used by other components in the system.
For low-latency applications, disable the Nagle algorithm using the nagle option. Otherwise the data may appear quantized or will arrive later than expected. However, for high bandwidth applications, the Nagle algorithm should be left enabled (the default). |
Limitations
Polling restrictions
The TCP/IP protocol cannot distinguish between the completion of the connection
and the connection being ready to flush more data over the communication channel
when polling a non-blocking stream. Hence do not attempt to poll on these two events
at the same time. Poll for completion of the connection first.
Listening streams can only poll for client connections ready to be accepted, because listening streams cannot send or receive data. Likewise, streams created with the CL Stream Connect or CL Stream Accept VIs cannot poll for pending client connections because such streams are not listening streams.
Send and receive buffer sizes
The target operating system may limit the TCP/IP send and receive buffers to a specific
range of values.
Also, setting the send and/or receive buffer sizes to a value less
than the system default has been known to cause severe performance degradation
on some systems.
Options
backlog
nagle
bufsize
sndsize
rcvsize
close_timeout
connect_timeout
Driver
The driver supporting TCP/IP communications is called qrt_tcpip
.
Targets
Target |
Supported |
Comments |
---|---|---|
Yes |
Fully supported. |
See Also
Copyright © Quanser Inc. This page was generated 2021-09-24. Submit feedback to Quanser about this page.
Link to this page.