795
[TCP] Tag
Transmission Control Protocol
Format
OPEN (chan[,fileopt])"[TCP][server];socket[;tcp_opts]"
Where:
[TCP]
File tag that tells ProvideX the channel is being opened for a TCP/IP
connection.
chan
Channel or logical file number to open.
fileopt
File options. Supported options include:
BSZ=num Buffer size (in bytes, max. 32000).
Defaults: READ=1024, WRITE=32000.
ERR=stmtref Error transfer
TIM=num Time-out value
Example: OPEN(chan,TIM=3)"[TCP]IP;SOCKET"
arglist
One or more arguments (comma-separated if you include a list
arg,arg...) to pass to the subprogram. Optional.
server
Server address. Optional. If specified (to denote a client connection on
the channel), use either an IP address like 172.16.1.1 or a DNS
(Domain Name System) server, such as www.pvx.com. Omit it to
indicate a host connection.
socket
TCP/IP socket number. For a host connection, this is the socket number
where the host listens and the client connects. For a client connection, this
is the socket number where the host listens. The valid range for [TCP]
sockets is 1 to 65535. (For an invalid socket number, less than 0 or greater
than 65535, the OS dynamically assigns an unused valid number.)
tcp_opts
Options to override default TCP characteristics. When including a list,
use the semicolon as a separator. Supported options are as follows:
BINDTO= For server-side. Restricts service requests to a specified address.
By default ProvideX binds a server style socket that is open to
all IP addresses in a machine. This sets your program to only
monitor the socket number on a specific IP address, allowing
other software to use the same socket on different IP addresses.
KEEPALIVE For client-side. Forces the OS to send keepalive packets to
the host, thereby keeping TCP/IP pipes open forever on
TCP/IP connections which time out due to inactivity; e.g.,
OPEN(chan)"[tcp]ip;socket;KEEPALIVE
NODELAY Disables algorithm that delays transmission. Default: delay
up to 200ms., attempt to combine data into larger packets.
Allows server to monitor a port that may currently be in use.
REUSE
SECURE For client-side. Uses the certificate found by the host to
negotiate and carry out encrypted communication.
SECURE= For server-side. Sets path to public certificate used for encoding
and decoding communications between client and server.