예제 #1
0
 public float GetLatency(ConnectionId connectionId)
 {
     return(0f);
 }
 public void Disconnect(ConnectionId connectionId)
 {
     _transporter.Disconnect(connectionId);
 }
 public MessageMetadata(ConnectionId connectionId, float latency)
 {
     ConnectionId = connectionId;
     Latency      = latency;
 }
 private void AddConnectionAttempt(ConnectionId connectionId, ConnectionRegistration registration)
 {
     registration.ConnectionId = connectionId;
     _connectionAttempts.Add(connectionId, registration);
     _connectionAttemptRegistrations.Add(registration);
 }
        public ReplicatedObject AddReplicatedInstance(ObjectType type, ObjectRole role, ObjectId objectId, ConnectionId connectionId)
        {
            var objectPool       = _objectPools[type];
            var replicatedObject = objectPool.Take();

            AddReplicatedInstance(replicatedObject, type, role, objectId, connectionId);
            return(replicatedObject.Instance);
        }
 private void CancelConnectionAttempt(ConnectionId connectionId)
 {
     RemoveConnectionAttempt(connectionId);
     _connectionIdPool.Put(connectionId);
     _cancelledAttempts[connectionId.Value] = ConnectionId.NoConnection;
 }
 public void CancelPending(ConnectionId connectionId)
 {
     _cancelledAttempts[connectionId.Value] = connectionId;
 }
예제 #8
0
 private void RemoveRegistration(ConnectionId connectionId)
 {
     _connections.Remove(connectionId);
     _connectionIdPool.Put(connectionId);
 }