MiniUDP.NetPeer.Close C# (CSharp) Метод

Close() публичный Метод

Closes the peer's network connection for a given reason byte.
public Close ( byte userReason = NetConfig.DEFAULT_USER_REASON ) : void
userReason byte
Результат void
        public void Close(
      byte userReason = NetConfig.DEFAULT_USER_REASON)
        {
            NetDebug.Assert(this.core != null);

              if (this.IsOpen)
              {
            this.ClosedByUser = true;
            this.Disconnected();
            if (userReason != NetConfig.DONT_NOTIFY_PEER)
              this.core.SendKick(this, userReason);
              }
        }