コード例 #1
0
        public Task SendScreenCapture(byte[] captureBytes, string rcBrowserHubConnectionID, int left, int top, int width, int height, DateTime captureTime)
        {
            if (AppConfig.RecordRemoteControlSessions)
            {
                RCSessionRecorder.SaveFrame(captureBytes, left, top, CurrentScreenSize.Width, CurrentScreenSize.Height, rcBrowserHubConnectionID, MachineName, StartTime);
            }

            return(RCBrowserHub.Clients.Client(rcBrowserHubConnectionID).SendAsync("ScreenCapture", captureBytes, left, top, width, height, captureTime));
        }
コード例 #2
0
ファイル: RCBrowserSocketHub.cs プロジェクト: lulzzz/Remotely
        public override async Task OnDisconnectedAsync(Exception exception)
        {
            if (Context.User.Identity.IsAuthenticated)
            {
                OrganizationConnectionList.Remove(Context.ConnectionId, out _);
            }
            await RCDeviceHub.Clients.Client(ScreenCasterID).SendAsync("ViewerDisconnected", Context.ConnectionId);

            if (AppConfig.RecordRemoteControlSessions)
            {
                RCSessionRecorder.StopProcessing(Context.ConnectionId);
            }
        }
コード例 #3
0
ファイル: RCBrowserHub.cs プロジェクト: exprezoe/Remotely
        public override Task OnDisconnectedAsync(Exception exception)
        {
            if (ScreenCasterID != null)
            {
                RCDeviceHubContext.Clients.Client(ScreenCasterID).SendAsync("ViewerDisconnected", Context.ConnectionId);
            }

            if (AppConfig.RecordRemoteControlSessions)
            {
                RCSessionRecorder.StopProcessing(Context.ConnectionId);
            }

            return(base.OnDisconnectedAsync(exception));
        }
コード例 #4
0
        public override async Task OnDisconnectedAsync(Exception exception)
        {
            if (Context.User.Identity.IsAuthenticated)
            {
                while (!OrganizationConnectionList.TryRemove(Context.ConnectionId, out var user))
                {
                    await Task.Delay(1000);
                }
            }
            await RCDeviceHub.Clients.Client(ScreenCasterID).SendAsync("ViewerDisconnected", Context.ConnectionId);

            if (AppConfig.RecordRemoteControlSessions)
            {
                RCSessionRecorder.EncodeFrames(Context.ConnectionId);
            }
        }