The constructor |
Declaration: |
native function TcpStream(number socket) |
Description: |
The TcpStream class is used for talking to remote TCP ports. It inherits from the standard Stream class, so methods such as println() work as expected. Do not create instances of this class directly- use Network.tcp_connect() to connect to a remote host and use Network.tcp_bind() to bind to a port, then call the accept() method to accept connections from remote hosts. |
Parameters: |
Parameter #1: number socket - The fd of the network socket |