protected TcpTransportLayer(ITCPTransport transport, byte connectionId, byte remoteConnectionId) { this.Transport = transport; this._connectionId = connectionId; this._remoteConnectionId = remoteConnectionId; Socket = new BufferedTcpOverUdptSocket(this); }
protected TcpTransportLayer(ITCPTransport transport, byte connectionId, byte remoteConnectionId) { this.Transport = transport; this._connectionId = connectionId; this._remoteConnectionId = remoteConnectionId; Socket = new BufferedTcpOverUdptSocket(this); }
public TcpTransportLayerSlidingWindow(ITCPTransport transport, byte connectionId, byte remoteConnectionId, ushort firstLocalSequence, ushort firstRemoteSequence) : base(transport, connectionId, remoteConnectionId) { _sendWindow = new ITcpDataPacket[WindowSize]; _recvWindow = new ITcpDataPacket[WindowSize]; _sendBuffer = new CircularBuffer<byte>(BufferSize); Stats = new TcpSlidingWindowStats(); // setup our start seq numbers and window numbering _sendWindowNextFree = _recvWindowsNextFree = _oldestUnackedPacket = 0; _nextDataSeqOut = firstLocalSequence; _nextDataSeqIn = firstRemoteSequence; _highestDataSeqIn = ushort.MaxValue; _retryTimer = new System.Timers.Timer(_retryInterval) { AutoReset = false }; _retryTimer.Elapsed += delegate { RetryPacketSend(); }; dataSenderThread = new Thread(DataSender) { IsBackground = true, Name = "dataSender[" + connectionId + "-" + remoteConnectionId + "]" }; dataSenderThread.Start(); }
public TcpTransportLayerSlidingWindow(ITCPTransport transport, byte connectionId, byte remoteConnectionId, ushort firstLocalSequence, ushort firstRemoteSequence) : base(transport, connectionId, remoteConnectionId) { _sendWindow = new ITcpDataPacket[WindowSize]; _recvWindow = new ITcpDataPacket[WindowSize]; _sendBuffer = new CircularBuffer <byte>(BufferSize); Stats = new TcpSlidingWindowStats(); // setup our start seq numbers and window numbering _sendWindowNextFree = _recvWindowsNextFree = _oldestUnackedPacket = 0; _nextDataSeqOut = firstLocalSequence; _nextDataSeqIn = firstRemoteSequence; _highestDataSeqIn = ushort.MaxValue; _retryTimer = new System.Timers.Timer(_retryInterval) { AutoReset = false }; _retryTimer.Elapsed += delegate { RetryPacketSend(); }; dataSenderThread = new Thread(DataSender) { IsBackground = true, Name = "dataSender[" + connectionId + "-" + remoteConnectionId + "]" }; dataSenderThread.Start(); }
private ushort _sequenceOut = ushort.MaxValue - 50; // sequence number we last sent out #endregion Fields #region Constructors public TcpTransportLayerOne4One(ITCPTransport transport, byte connectionId, byte remoteConnectionId, ushort firstLocalSequence, ushort firstRemoteSequence) : base(transport, connectionId, remoteConnectionId) { AckWaitInterval = 300; }
public TcpTransportLayerOne4One(ITCPTransport transport, byte connectionId, byte remoteConnectionId, ushort firstLocalSequence, ushort firstRemoteSequence) : base(transport, connectionId, remoteConnectionId) { AckWaitInterval = 300; }