FOPEN program instruction 128 characters. In order to create an attribute list longer than 128 characters you must concatenate multiple strings. The attribute list can consist of one or more components separated by commas. Each component can be expressed in any of the following ways: 1. A string constant, variable, or expression. 2. A real-valued constant, variable, or expression, which is evaluated to determine a value to be used in the control string. 3. A format-control specifier, which determines the format of information in the control string. Details Using FOPEN With TCP A TCP/IP connection can be opened in either server mode or client mode .
In server mode, one or more clients (depending on the value assigned to /CLIENTS) are allowed to connect to the server for subsequent communication. To establish a client-server connection, the client must know the port number for the server. For this reason, when using the FOPEN instruction for opening a server connection, the port is explicitly defined using the /LOCAL_PORT attribute. Note that the server does not need to know the port number used by the client. Port numbers 0 through 255 are used by standard TCP application packages. For example, FTP uses ports 20 and 21. By convention, if you are writing your own custom protocol, use a port number greater than 255.
The following table shows valid TCP attributes for the FOPEN instruction. FOPEN TCP Attributes eV+Language Reference Guide, v2.x, 18319-000 Rev A Page 245 Attribute: /CLIENTS Explanation: Defines the number of client connections allowable on a server. If omitted, a single client connection is assumed. The maximum number of client connections is 31. Attribute: /LOCAL PORT _ Explanation: Defines the local port number for the connection. If omitted, a local port number is automatically