Lines 1-5
Link Here
|
1 |
/* Copyright (C) 2002-2005 RealVNC Ltd. All Rights Reserved. |
1 |
/* Copyright (C) 2002-2005 RealVNC Ltd. All Rights Reserved. |
2 |
* Copyright 2009-2018 Pierre Ossman for Cendio AB |
2 |
* Copyright 2009-2018 Pierre Ossman for Cendio AB |
|
|
3 |
* Copyright 2018 Peter Astrand for Cendio AB |
3 |
* |
4 |
* |
4 |
* This is free software; you can redistribute it and/or modify |
5 |
* This is free software; you can redistribute it and/or modify |
5 |
* it under the terms of the GNU General Public License as published by |
6 |
* it under the terms of the GNU General Public License as published by |
Lines 36-41
Link Here
|
36 |
#define XK_XKB_KEYS |
37 |
#define XK_XKB_KEYS |
37 |
#include <rfb/keysymdef.h> |
38 |
#include <rfb/keysymdef.h> |
38 |
|
39 |
|
|
|
40 |
#define ALR_TIMEOUT 59 // Slightly longer than 20 fps |
41 |
|
39 |
using namespace rfb; |
42 |
using namespace rfb; |
40 |
|
43 |
|
41 |
static LogWriter vlog("VNCSConnST"); |
44 |
static LogWriter vlog("VNCSConnST"); |
Lines 47-53
VNCSConnectionST::VNCSConnectionST(VNCServerST* server_, network::Socket *s,
Link Here
|
47 |
: sock(s), reverseConnection(reverse), |
50 |
: sock(s), reverseConnection(reverse), |
48 |
inProcessMessages(false), |
51 |
inProcessMessages(false), |
49 |
pendingSyncFence(false), syncFence(false), fenceFlags(0), |
52 |
pendingSyncFence(false), syncFence(false), fenceFlags(0), |
50 |
fenceDataLen(0), fenceData(NULL), congestionTimer(this), |
53 |
fenceDataLen(0), fenceData(NULL), congestionTimer(this), alrTimer(this), |
51 |
server(server_), updates(false), |
54 |
server(server_), updates(false), |
52 |
updateRenderedCursor(false), removeRenderedCursor(false), |
55 |
updateRenderedCursor(false), removeRenderedCursor(false), |
53 |
continuousUpdates(false), encodeManager(this), pointerEventTime(0), |
56 |
continuousUpdates(false), encodeManager(this), pointerEventTime(0), |
Lines 58-63
VNCSConnectionST::VNCSConnectionST(VNCServerST* server_, network::Socket *s,
Link Here
|
58 |
peerEndpoint.buf = sock->getPeerEndpoint(); |
61 |
peerEndpoint.buf = sock->getPeerEndpoint(); |
59 |
VNCServerST::connectionsLog.write(1,"accepted: %s", peerEndpoint.buf); |
62 |
VNCServerST::connectionsLog.write(1,"accepted: %s", peerEndpoint.buf); |
60 |
|
63 |
|
|
|
64 |
alrTimer.start(ALR_TIMEOUT); |
65 |
|
61 |
// Configure the socket |
66 |
// Configure the socket |
62 |
setSocketTimeouts(); |
67 |
setSocketTimeouts(); |
63 |
lastEventTime = time(0); |
68 |
lastEventTime = time(0); |
Lines 841-846
bool VNCSConnectionST::handleTimeout(Timer* t)
Link Here
|
841 |
try { |
846 |
try { |
842 |
if (t == &congestionTimer) |
847 |
if (t == &congestionTimer) |
843 |
writeFramebufferUpdate(); |
848 |
writeFramebufferUpdate(); |
|
|
849 |
|
850 |
if (t == &alrTimer) { |
851 |
alrTimer.start(ALR_TIMEOUT); |
852 |
encodeManager.updateLosslessRefresh(); |
853 |
writeFramebufferUpdate(); |
854 |
} |
855 |
|
844 |
} catch (rdr::Exception& e) { |
856 |
} catch (rdr::Exception& e) { |
845 |
close(e.str()); |
857 |
close(e.str()); |
846 |
} |
858 |
} |