コード例 #1
0
 public void Dispose()
 {
     if (Id == 0)
     {
         OnPreClientDisposed?.Invoke(this);
     }
     else
     {
         OnClientDisposed?.Invoke(Id);
     }
     TcpClient.Dispose();
     NetworkStream.Close();
     _packetSerializer = null;
 }
コード例 #2
0
 private void SocketClientsManager_OnClientDisposed(ulong Id)
 {
     OnClientDisposed?.Invoke(Id);
     RemoveClient(Id);
 }