Esempio n. 1
0
 public virtual void Disconnect(Action <string> disConnectCallback = null)
 {
     //string localIpEndPort = ConnectSocket.LocalEndPoint.ToString();
     if (ConnectSocket != null && Identity != null && ConnectSocket.Connected)
     {
         ConnectSocket.BeginDisconnect(false, ar =>
         {
             disConnectCallback?.Invoke(Identity);
             //LogMsg(localIpEndPort,remoteIpEndPort,$"disconnect socket remote {remoteIpEndPort} local {localIpEndPort}");
         }, null);
     }
 }