Functions | |
| tcp_srv_open (port) | |
| Open a TCP/IP server. | |
| tcp_srv_close () | |
| Close TCP/IP server. | |
| tcp_srv_read () | |
| Get received data from the TCP/IP server buffer. | |
| tcp_srv_write (data) | |
| Write to the connected client. | |
| tcp_srv_hasclient () | |
| Verify if is a client connected to the TCP/IP server. | |
| tcp_srv_flush () | |
| Flush TCP/IP server receive buffer. | |
| tcp_srv_flush (char_no) | |
| Partially flush TCP/IP server receive buffer. | |
| tcp_open (addr, port) | |
| Open a TCP/IP client connection. | |
| tcp_close () | |
| Close TCP/IP client connection. | |
| tcp_read () | |
| Get received data from the TCP/IP client buffer. | |
| tcp_write (data) | |
| Send data to the server where client is connected. | |
| tcp_flush () | |
| Flush TCP/IP client receive buffer. | |
| tcp_flush (char_no) | |
| Partially flush TCP/IP client receive buffer. | |
| tcp_isconnected () | |
| Verify client connection state. | |
|
|
Close TCP/IP client connection. Closes current TCP/IP client connection. |
|
|
Partially flush TCP/IP client receive buffer.
Flushes only first char_no characters (bytes) of TCP/IP client input buffer.
|
|
|
Flush TCP/IP client receive buffer.
Flushes TCP/IP client input buffer.
|
|
|
Verify client connection state. Verify connection state, returns "1" if connected, "0" otherwise.
Example: |
|
||||||||||||
|
Open a TCP/IP client connection.
This function will try to open a TCP/IP client connection to the specified IP address and port, and is NOT BLOCKING, so the script resumes immediatly.
|
|
|
Get received data from the TCP/IP client buffer.
Get received data from the TCP/IP client buffer.
|
|
|
Close TCP/IP server. Closes current TCP/IP server, freeing port number. |
|
|
Partially flush TCP/IP server receive buffer.
Flushes only first char_no characters (bytes) of TCP/IP server input buffer.
|
|
|
Flush TCP/IP server receive buffer.
Flushes TCP/IP server input buffer.
|
|
|
Verify if is a client connected to the TCP/IP server. Verify if is a client conected, returns its address if there is, empty string otherwise.
Example: |
|
|
Open a TCP/IP server.
Opens a TCP/IP server listening on specified port.
|
|
|
Get received data from the TCP/IP server buffer.
Get received data from the TCP/IP server buffer.
|
|
|
Write to the connected client. Sends data to the connected client.
|
|
|
Send data to the server where client is connected. Sends data to the server where client is connected.
|