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