protected RailConnection(RailRegistry registry) { Resource = new RailResource(registry); Interpreter = new RailInterpreter(); Room = null; hasStarted = false; }
public RailServerPeer( RailResource resource, IRailNetPeer netPeer, RailInterpreter interpreter) : base( resource, netPeer, ExternalEntityVisibility.Scoped, RailConfig.CLIENT_SEND_RATE, interpreter) { }
public RailClientPeer( RailResource resource, IRailNetPeer netPeer, RailInterpreter interpreter) : base( resource, netPeer, ExternalEntityVisibility.All, RailConfig.SERVER_SEND_RATE, interpreter) { localView = new RailView(); }
protected RailPeer( RailResource resource, IRailNetPeer netPeer, ExternalEntityVisibility visibility, uint remoteSendRate, RailInterpreter interpreter, RailPacketIncoming reusableIncoming, RailPacketOutgoing reusableOutgoing) : base(resource, visibility, netPeer) { Resource = resource; RemoteClock = new RailClock(remoteSendRate); this.interpreter = interpreter; outgoingEvents = new Queue <RailEvent>(); this.reusableIncoming = reusableIncoming; this.reusableOutgoing = reusableOutgoing; lastQueuedEventId = SequenceId.Start.Next; eventHistory = new RailHistory(RailConfig.HISTORY_CHUNKS); LocalTick = Tick.START; netPeer.PayloadReceived += OnPayloadReceived; }