The Action of this property depends upon Server Property.
First, if Server Property is True, ActiveX control opens TCP port specified by LocalPortNumber Property and wait for connection from client. At this time, connection is not established -- when client connects server, it will have connected. Active Property becomes True when TCP port has been opened successfully, although connection has not established.
Besides this, if Server Property is False, ActiveX control attempts to connect to server specified by IPAddress Property and PortNumber Property. It is possible to use IP address or computer name (host name) for IPAddress Property. If server is running on the same computer, it is possible to specify IPAddress Property as "" (empty). TCP port number of your computer can be specified by LocalPortNumber Property, however it is possible to let server determine free TCP port number automatically. If TCP port number is fixed number, it may take very long time to establish connection, so auto numbering faculty is very useful. To use auto numbering, set LocalPortNumber Property 0. When connection has been successfully established, Active Property becomes True.
If you set this property False, then connection will be lost. Don’t worry to forget to disconnect established connection at termination of application. ActiveX control automatically delete all of the connection. When Active Property on server side is set to False, then all the connections between each client are disconnected.
Syntax
Return Value
Example
Remarks
If the other side of Active Property is set to False, connection will be disappeared (like spouse relationship). Please notice that Active Property will be set to False automatically at this time whatever it is client.
See Also
|