Ejemplo 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));
        }
Ejemplo n.º 2
0
 public void Send(NetworkMessage message)
 {
     Send(NetworkProtocol.GetCurrentProtocol().OnSerializeMessage(message));
 }
Ejemplo n.º 3
0
 internal TcpConnectionEntity(Socket socket, uint id) : base(id)
 {
     _socket = socket;
     _buffer = new byte[NetworkProtocol.GetCurrentProtocol().NetworkBufferLength];
     _reader = new BasicReader();
 }
Ejemplo n.º 4
0
 protected TcpClientEntity(string ip, int port) : base(ip, port)
 {
     _buffer = new byte[NetworkProtocol.GetCurrentProtocol().NetworkBufferLength];
     _reader = new BasicReader();
 }