NetClose Example for Delphi
procedure TForm1.LEADDicomNet1NetClose(ASender: TObject; hNet, nStatus,
hPeer: Integer);
var
strOut: String;
begin
//a connection is being closed
//display some information about the connection:
strOut:= 'Host: ' + LEADDICOMNet1.GetHostAddress (hNet);
strOut:= strOut + ' Port: ' + IntToStr(LEADDICOMNet1.GetHostPort (hNet));
strOut:= strOut + Chr(13);
strOut:= strOut + 'Peer: ' + LEADDICOMNet1.GetPeerAddress (hNet);
strOut:= strOut + ' Port: ' + IntToStr(LEADDICOMNet1.GetPeerPort(hNet));
Application.MessageBox(PChar(strOut), 'Connection Closed', MB_OK);
end;