The Channel class / base.Channel methods |
Open a TCP client socket channel.
openClientSocket( host STRING, port INTEGER, mode STRING, timeout INTEGER )
Use the openClientSocket() method to establish a TCP connection to a server.
Pay attention to character set used by the network protocol you want to use by opening a channel with this method: The protocol must be based on ASCII, or must use the same character set as the application.
The host parameter defines the host name of the server.
The port parameter defines the TCP port to connect to.
If the opening mode is not one of the above letters, the method will raise error -8085.
When the timeout parameter is -1, the connection waits forever.
The method raises error -8084 if the channel cannot be opened.
CALL ch.openClientSocket( "localhost", 80, "u", 5 )