public void DispatchPacket(DeviceIO device, Packet inboundPacket) { if (inboundPacket.direction != Source.NewConnection && inboundPacket.direction != Source.Disconnect) { InjectPacket(device, inboundPacket); } }
public MainForm() { InitializeComponent(); try { dispatcher = new PacketDispatcher(); device = new DeviceIO(@"\\.\rmzdrv", cancel.Token, dispatcher); } catch (Exception exception) { MessageBox.Show(exception.Message, exception.Source, MessageBoxButtons.OK, MessageBoxIcon.Error); } }
public void InjectPacket(DeviceIO device, Packet outboundPacket) { device.Write(outboundPacket); }