SetNet Statement
Sets parameters for a TCP/IP port.
Syntax
(1) SetNet #portNumber, hostAddress[, TCP_IP_PortNum [, terminator [, SWFlow [, timeOut, [, protocol [, CloseNet timeout]]]]]]
(2) SetNet
Parameters
- portNumber
- Specify the port number of the TCP/IP port to set parameters. Valid values are 201 to 216.
- hostAddress
- Specify the host IP address.
- TCP_IP_PortNum
- Specify the TCP/IP port number.
- terminator
- Specify the line termination characters. Valid values are CR, LF, CRLF.
- SWFlow
- Specify the software control flow. Valid value is NONE.
- timeOut
- Specify the maximum time for transmit or receive in seconds. If this value is “0”, then there is no time out.
- protocol
- Specify the communication protocol.
- TCP: TCP communication
- UDP: UDP communication
- UDP_SEND: UDP send
- UDP_RECV: UDP send
- CloseNet timeOut
- Specify the time before closing the socket with CloseNet in seconds. (Integer from 0 to 5)
When 0 is set, closes the socket without waiting for a response to the shutdown request.
Description
An error occurs if the IP address/port number overlaps with another IP address/port number.
See Also
OpenNet Statement, CloseNet Statement, SetCom Statement
SetNet Statement Example
SetNet #201, "192.168.0.1", 2001, CRLF, NONE, 0