open();
The open method of the Connection class establishes a connection to a remote application or device and returns when the connection is established. The open method can be called only when the state is Disconnected (0).
Each subclass of the Connection class must provide any properties that are required to define the connection; for example, name, socket, and so on. The value of the state property changes to Connected (2) when the connection is open.
The code fragment in the following example shows the use of the open method.
if bOpen.value = true then self.connection.open; elseif bListen.value = true then statusLine1.caption := "Listening"; self.connection.listen; else self.connection.close; endif;