コード例 #1
0
ファイル: NatPunchModule.cs プロジェクト: achooley/LiteNetLib
 internal NatPunchModule(NetBase netBase, NetSocket socket)
 {
     _netBase       = netBase;
     _socket        = socket;
     _requestEvents = new Queue <RequestEventData>();
     _successEvents = new Queue <SuccessEventData>();
 }
コード例 #2
0
ファイル: NetPeer.cs プロジェクト: DukeChiang/LiteNetLib
        internal NetPeer(NetBase peerListener, NetEndPoint remoteEndPoint)
        {
            _peerListener   = peerListener;
            _id             = remoteEndPoint.GetId();
            _remoteEndPoint = remoteEndPoint;

            _avgRtt        = 0;
            _rtt           = 0;
            _pingSendTimer = 0;

            _reliableOrderedChannel   = new ReliableChannel(this, true, _windowSize);
            _reliableUnorderedChannel = new ReliableChannel(this, false, _windowSize);
            _sequencedChannel         = new SequencedChannel(this);
            _simpleChannel            = new SimpleChannel(this);

            _packetPool      = new Stack <NetPacket>();
            _holdedFragments = new Dictionary <ushort, IncomingFragments>();
        }
コード例 #3
0
 internal NatPunchModule(NetBase netBase, NetSocket socket)
 {
     _netBase = netBase;
     _requestEvents = new Queue<RequestEventData>();
     _successEvents = new Queue<SuccessEventData>();
 }
コード例 #4
0
ファイル: NetPeer.cs プロジェクト: RevenantX/LiteNetLib
        internal NetPeer(NetBase peerListener, NetEndPoint remoteEndPoint)
        {
            _peerListener = peerListener;
            _id = remoteEndPoint.GetId();
            _remoteEndPoint = remoteEndPoint;

            _avgRtt = 0;
            _rtt = 0;
            _pingSendTimer = 0;

            _reliableOrderedChannel = new ReliableChannel(this, true, _windowSize);
            _reliableUnorderedChannel = new ReliableChannel(this, false, _windowSize);
            _sequencedChannel = new SequencedChannel(this);
            _simpleChannel = new SimpleChannel(this);

            _packetPool = new Stack<NetPacket>();
            _holdedFragments = new Dictionary<ushort, IncomingFragments>();

            _mergeData.Init(PacketProperty.Merged, NetConstants.PossibleMtu[NetConstants.PossibleMtu.Length - 1]);
        }
コード例 #5
0
ファイル: NetSocket.cs プロジェクト: RevenantX/LiteNetLib
 public NetSocket(NetBase.OnMessageReceived onMessageReceived)
 {
     _onMessageReceived = onMessageReceived;
     _buffer = _byteBuffer.AsBuffer();
 }
コード例 #6
0
ファイル: NetSocket.cs プロジェクト: RevenantX/LiteNetLib
 public NetSocket(NetBase.OnMessageReceived onMessageReceived)
 {
     _onMessageReceived = onMessageReceived;
 }