N Device Open - FujiNetWIFI/fujinet-firmware GitHub Wiki
Description
Opens an IOCB for network communication, and clears and resets the transmit and receive buffers for the given device. Up to eight (8) N devices can be allocated for up to 8 simultaneous client/server connections. All of the standard AUX1 values for specifying the channel direction are supported.
Parameters
Parameter | Description |
---|---|
AUX1 | 4 = READ, 8 = WRITE, 12 = UPDATE |
AUX2 | 0 = Client, 1 = Server. |
FILENAME | N: Devicespec |
Returns
The standard CIO error codes are returned.
Examples
BASIC
To open a connection to a TCP socket at address 192.168.1.8 port 2000:
OPEN #1,12,0,"N:TCP:192.168.1.8:2000"
To listen for connections to port 2000:
OPEN #1,12,1,"N:TCP:2000"