TCPConnected Method
      
 

Description

Called when TCP handler connects to remote peer, or to mediator.

Return Type

None  

Syntax

object.TCPConnected Owner, RemoteID

The TCPConnected Method syntax has these parts:

PartDescription
objectAn expression evaluating to an object of type IwodVPNNotify.
Owner A wodVPNCom object. Reference to the wodVPNCom instance that called this notification method.
RemoteID A String value. Holds ID of remote peer.

Remarks

This method is called only if you have implemented the IwodVPNNotify interface in your application and the wodVPN1.Notification property has received a reference to an instance of your implementation.

TCPConnected notification method is called as result of Listen or Connect methods. When connection is successfully established with remote peer, this notification method is called, and RemoteID argument holds ID of the peer. If RemoteID is empty, it means you have successfully connected to TCP Relay, but relay did not yet establish communication with remote peer. It is possible for this notification method to be called twice - first with RemoteID empty (connected to TCP Relay), and second time with RemoteID set to peer's ID.

 
Once connection is established, TCPHandler will stop listening for additional connections. Only one connection can be made at a time between you and remote peer.
 
When connection is closed, TCPDisconnected notification method is called.