Responsible for encoding and decoding packet information.
예제 #1
0
 internal RailServerPeer(
     IRailNetPeer netPeer,
     RailInterpreter interpreter)
     : base(netPeer, interpreter)
 {
     this.scope = new RailScope();
 }
예제 #2
0
 internal RailClientPeer(
     IRailNetPeer netPeer,
     RailInterpreter interpreter)
     : base(netPeer, interpreter)
 {
     this.localView   = new RailView();
     this.sortingList = new List <RailEntity>();
 }
예제 #3
0
        protected RailPeer(
            IRailNetPeer netPeer,
            RailInterpreter interpreter,
            RailPacket reusableIncoming,
            RailPacket reusableOutgoing)
        {
            this.netPeer     = netPeer;
            this.interpreter = interpreter;

            this.controlledEntities = new HashSet <RailEntity>();
            this.remoteClock        = new RailClock();

            this.outgoingEvents        = new Queue <RailEvent>();
            this.reusableIncoming      = reusableIncoming;
            this.reusableOutgoing      = reusableOutgoing;
            this.lastQueuedEventId     = SequenceId.START.Next;
            this.processedEventHistory = new SequenceWindow(SequenceId.START);

            this.netPeer.PayloadReceived += this.OnPayloadReceived;
        }
예제 #4
0
 protected RailConnection()
 {
   this.room = new RailRoom();
   this.interpreter = new RailInterpreter();
   this.hasStarted = false;
 }
예제 #5
0
 protected RailConnection()
 {
     this.room        = new RailRoom();
     this.interpreter = new RailInterpreter();
     this.hasStarted  = false;
 }