NetClose Example for C#

//LEADDICOMNet1 is a predefined LEADDicomNet object
private void LEADDICOMNet1_NetClose(int hNet, int nStatus, int hPeer)
{
   string Out = null;
   //a connection is being closed
   //display some information about the connection:
   Out = "Host: " + LEADDICOMNet1.GetHostAddress(hNet);
   Out = Out + " Port: " + System.Convert.ToString(LEADDICOMNet1.GetHostPort(hNet));
   Out = Out + "\r";
   Out = Out + "Peer: " + LEADDICOMNet1.GetPeerAddress(hNet);
   Out = Out + " Port: " + System.Convert.ToString(LEADDICOMNet1.GetPeerPort(hNet));
   MessageBox.Show(Out, "Connection Closed");
}