public void DenyFile(string fileName, uint transferId) { StreamReliable.WriteUShort((ushort)ENetCommand.NetFile); StreamReliable.WriteUInt(transferId); StreamReliable.WriteString(fileName); StreamReliable.WriteByte(0); }
public void Shutdown(string reason = null) { if (_socket == null) { return; } Clear(); if (reason != null) { StreamUnreliable.WriteUShort((ushort)ENetCommand.NetDisconnect); StreamUnreliable.WriteString(reason); Transmit(); } _socket = null; _remoteAddress = null; if (_messageHandler != null) { _messageHandler.ConnectionClosing(reason); _messageHandler = null; } _netMesages.Clear(); Networking.RemoveChannel(this); }