/// <summary> /// Initializes a new instance of the <see cref="NetworkDevicePacketBuffer"/> class. /// </summary> /// <param name="networkDevice">The network device.</param> public NetworkDevicePacketBuffer(INetworkDevice networkDevice) { this.networkDevice = networkDevice; maxTransmitQueue = 100; // TODO: Lookup system default maxReceiveQueue = 100; // TODO: Lookup system default transmitLock = new SpinLock(); receiveLock = new SpinLock(); countTransmitPackets = 0; countReceivePackets = 0; discardedTransmitPackets = 0; discardedReceivePackets = 0; }
/// <summary> /// Initializes a new instance of the <see cref="NetworkDevicePacketBuffer"/> class. /// </summary> /// <param name="networkDevice">The network device.</param> /// <param name="maxTransmitQueue">The max transmit queue.</param> /// <param name="maxReceiveQueue">The max receive queue.</param> public NetworkDevicePacketBuffer(INetworkDevice networkDevice, uint maxTransmitQueue, uint maxReceiveQueue) { this.networkDevice = networkDevice; this.maxReceiveQueue = maxReceiveQueue; this.maxTransmitQueue = maxTransmitQueue; transmitLock = new SpinLock(); receiveLock = new SpinLock(); countTransmitPackets = 0; countReceivePackets = 0; discardedTransmitPackets = 0; discardedReceivePackets = 0; }