Exemplo n.º 1
0
        /// <summary>
        /// Called when packet data is received. Override to implement handling for specific packets.
        /// </summary>
        /// <param name="buffer">The packet data.</param>
        protected override void HandlePacket(byte[] buffer) {
            if (buffer == null) {
                throw new ArgumentNullException("buffer");
            }

            if (buffer.Length == OutSimPack.MinSize || buffer.Length == OutSimPack.MaxSize) {
                OutSimPack packet = new OutSimPack(buffer);
                OnPacketReceived(new OutSimEventArgs(packet));
            }
        }
Exemplo n.º 2
0
        /// <summary>
        /// Called when packet data is received. Override to implement handling for specific packets.
        /// </summary>
        /// <param name="buffer">The packet data.</param>
        protected override void HandlePacket(byte[] buffer)
        {
            if (buffer == null)
            {
                throw new ArgumentNullException("buffer");
            }

            if (buffer.Length == OutSimPack.MinSize || buffer.Length == OutSimPack.MaxSize)
            {
                OutSimPack packet = new OutSimPack(buffer);
                OnPacketReceived(new OutSimEventArgs(packet));
            }
        }
Exemplo n.º 3
0
 /// <summary>
 /// Creates a new OutSimEventArgs object.
 /// </summary>
 /// <param name="packet">The OutSim packet.</param>
 public OutSimEventArgs(OutSimPack packet) {
     Packet = packet;
 }
Exemplo n.º 4
0
 /// <summary>
 /// Creates a new OutSimEventArgs object.
 /// </summary>
 /// <param name="packet">The OutSim packet.</param>
 public OutSimEventArgs(OutSimPack packet)
 {
     Packet = packet;
 }