SIMPOL Documentation

The tcpsocket Type

SIMPOL's tcpsocket type provides the necessary functionality to create powerful TCP/IP-based programs. The properties of the object are not terribly important for client programs. They are destination and port; both are read-only and contain the destination IP address and port number and the local port number used. More interesting for client programs is the methods: new(), sendblob(), sendstring(), receiveblob(), and receivestring(). The new() method of the tcpsocket type is used to create an object of this type as the result of making a TCP/IP connection to a server using the destination parameter provided to the new() method. The two receive methods are for receiving data and the two send methods for sending data. Either can be used, but the blob versions will normally be more efficient since most protocols over TCP/IP tend to use byte-oriented data and not Unicode.