Esempio n. 1
0
        public void SendTo(UdpConnectionEntity connection, NetworkMessage message)
        {
            if (connection.IsDisposed)
            {
                throw new ObjectDisposedException(nameof(UdpConnectionEntity));
            }

            SendTo(connection.EndPoint, NetworkProtocol.GetCurrentProtocol().OnSerializeMessage(message));
        }
Esempio n. 2
0
 public void Send(NetworkMessage message)
 {
     Send(NetworkProtocol.GetCurrentProtocol().OnSerializeMessage(message));
 }
Esempio n. 3
0
 internal TcpConnectionEntity(Socket socket, uint id) : base(id)
 {
     _socket = socket;
     _buffer = new byte[NetworkProtocol.GetCurrentProtocol().NetworkBufferLength];
     _reader = new BasicReader();
 }
Esempio n. 4
0
 protected TcpClientEntity(string ip, int port) : base(ip, port)
 {
     _buffer = new byte[NetworkProtocol.GetCurrentProtocol().NetworkBufferLength];
     _reader = new BasicReader();
 }