
Disconnect method
Disconnects from remote devP2P peer.
Syntax
- C#
- C++
- VB.NET
void devP2P.Disconnect(IntPtr Handle);
The Disconnect(Handle) syntax has these parts:
The Disconnect(Handle) syntax has these parts:
Handle | Reference to the devP2P instance. |
void Disconnect(void);
Sub P2P_Disconnect(ByVal Handle As IntPtr)
The Disconnect(Handle) syntax has these parts:
The Disconnect(Handle) syntax has these parts:
Handle | Reference to the devP2P instance. |
Remarks
Disconnect method will stop sending/receiving TCP/UDP traffic between local and remote devP2P, thus "closing the socket" and breaking the connection and all ongoing transfers. All channels will be closed, and no new channels will be accepted until connection is established again.When Disconnect is called, component will not be idle. It will still be in Listening state accepting remote connections (since any devP2P side can actually initiate it). If you want to shut down devP2P completely, you should use the Stop method.
If possible, remote side will receive disconnect packet so it can close its connection as well. This actually depends if network stack was fast enough to send out disconnect packet before socket is closed (applies to UDP transport).
Platforms
WindowsMac OSX
Linux
BSD