Пример #1
0
 public void Close()
 {
     Debug.LogWarning("关闭服务器");
     host.Dispose();
     host = null;
     if (syncIpConnection != null)
     {
         syncIpConnection.Dispose();
     }
 }
Пример #2
0
 protected virtual void Dispose(bool disposing)
 {
     if (!_disposed)
     {
         _disposed = true; //prevent second call to Dispose
         if (disposing)
         {
             _tcpHost.Dispose(); //will dispose of singleton instance _serviceHost
         }
     }
 }