Esempio n. 1
0
        public RUDPSocket(RUDPCongestionControl congestionControl)
        {
            switch (congestionControl)
            {
            case RUDPCongestionControl.TCPTahoe:
                _controlWindow = new Helper.Net.RUDP.Tahoe.CongestionWindow(this);
                break;

            case RUDPCongestionControl.TCPReno:
                _controlWindow = new Helper.Net.RUDP.Reno.CongestionWindow(this);
                break;

            case RUDPCongestionControl.TCPBIC:
                _controlWindow = new Helper.Net.RUDP.BIC.CongestionWindow(this);
                break;

            case RUDPCongestionControl.TCPCUBIC:
                _controlWindow = new Helper.Net.RUDP.CUBIC.CongestionWindow(this);
                break;
            }

            //---- Reset
            Reset(RUDPSocketStatus.Closed);

            //---- Update handle
            _handle = LastHandle;
            LastHandle++;

            //---- Setup network information
            _networkInformation = new RUDPSocketNetworkInformation(this);
        }
Esempio n. 2
0
		public RUDPSocket(RUDPCongestionControl congestionControl)
		{
			switch (congestionControl)
			{
				case RUDPCongestionControl.TCPTahoe:
					_controlWindow = new Helper.Net.RUDP.Tahoe.CongestionWindow(this);
					break;
				case RUDPCongestionControl.TCPReno:
					_controlWindow = new Helper.Net.RUDP.Reno.CongestionWindow(this);
					break;
				case RUDPCongestionControl.TCPBIC:
					_controlWindow = new Helper.Net.RUDP.BIC.CongestionWindow(this);
					break;
				case RUDPCongestionControl.TCPCUBIC:
					_controlWindow = new Helper.Net.RUDP.CUBIC.CongestionWindow(this);
					break;
			}

			//---- Reset
			Reset(RUDPSocketStatus.Closed);

			//---- Update handle
			_handle = LastHandle;
			LastHandle++;

			//---- Setup network information
			_networkInformation = new RUDPSocketNetworkInformation(this);
		}