예제 #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));
            }
        }
예제 #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));
            }
        }
예제 #3
0
 /// <summary>
 /// Creates a new OutSimEventArgs object.
 /// </summary>
 /// <param name="packet">The OutSim packet.</param>
 public OutSimEventArgs(OutSimPack packet) {
     Packet = packet;
 }
예제 #4
0
 /// <summary>
 /// Creates a new OutSimEventArgs object.
 /// </summary>
 /// <param name="packet">The OutSim packet.</param>
 public OutSimEventArgs(OutSimPack packet)
 {
     Packet = packet;
 }