예제 #1
0
        private void ProcessOnConnectMessage(ServerEventMessage e)
        {
            var msg = JsonServiceClient.ParseObject(e.Json);

            ConnectionInfo = new ServerEventConnect {
                HeartbeatIntervalMs = DefaultHeartbeatMs,
                IdleTimeoutMs       = DefaultIdleTimeoutMs,
            }.Populate(e, msg);

            ConnectionInfo.Id                  = msg.Get("id");
            ConnectionInfo.HeartbeatUrl        = msg.Get("heartbeatUrl");
            ConnectionInfo.HeartbeatIntervalMs = msg.Get <long>("heartbeatIntervalMs");
            ConnectionInfo.IdleTimeoutMs       = msg.Get <long>("idleTimeoutMs");
            ConnectionInfo.UnRegisterUrl       = msg.Get("unRegisterUrl");
            ConnectionInfo.UserId              = msg.Get("userId");
            ConnectionInfo.DisplayName         = msg.Get("displayName");
            ConnectionInfo.ProfileUrl          = msg.Get("profileUrl");

            OnConnectReceived();
        }
예제 #2
0
        private void ProcessOnUpdateMessage(ServerEventMessage e)
        {
            var msg = new ServerEventUpdate().Populate(e, JsonServiceClient.ParseObject(e.Json));

            OnCommandReceived(msg);
        }