Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
L
libvncserver
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
rasky
libvncserver
Commits
2c4869fc
Commit
2c4869fc
authored
Oct 16, 2001
by
dscho
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
deferUpdate
parent
47f18e57
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
30 additions
and
8 deletions
+30
-8
CHANGES
CHANGES
+2
-0
TODO
TODO
+1
-1
main.c
main.c
+20
-4
rfb.h
rfb.h
+6
-2
rfbserver.c
rfbserver.c
+1
-1
No files found.
CHANGES
View file @
2c4869fc
0.2
0.2
inserted a deferUpdate mechanism (X11 independent).
removed deletion of requestedRegion
added rfbLoadConsoleFont
added rfbLoadConsoleFont
fixed font colour handling.
fixed font colour handling.
added rfbSelectBox
added rfbSelectBox
...
...
TODO
View file @
2c4869fc
immediate:
immediate:
----------
----------
DeferUpdateTime (timing problems!)
cursor drawing: set optional grain to mark bigger rectangles as drawn (else
cursor drawing: set optional grain to mark bigger rectangles as drawn (else
you end up with thousands of one-pixel-rectangles to encode).
you end up with thousands of one-pixel-rectangles to encode).
selectbox: scroll bars
selectbox: scroll bars
...
@@ -26,6 +25,7 @@ internal HTTP tunnelling feature (needs a special GET target and a few
...
@@ -26,6 +25,7 @@ internal HTTP tunnelling feature (needs a special GET target and a few
done:
done:
-----
-----
.DeferUpdateTime (timing problems!)
.empty cursor sending doesn't work.
.empty cursor sending doesn't work.
.udp (need an rfbClientPtr udpClient in rfbScreen)
.udp (need an rfbClientPtr udpClient in rfbScreen)
input only; nearly untested (don't have the clients).
input only; nearly untested (don't have the clients).
...
...
main.c
View file @
2c4869fc
...
@@ -471,6 +471,7 @@ rfbScreenInfoPtr rfbGetScreen(int argc,char** argv,
...
@@ -471,6 +471,7 @@ rfbScreenInfoPtr rfbGetScreen(int argc,char** argv,
rfbScreen
->
rfbAlwaysShared
=
FALSE
;
rfbScreen
->
rfbAlwaysShared
=
FALSE
;
rfbScreen
->
rfbNeverShared
=
FALSE
;
rfbScreen
->
rfbNeverShared
=
FALSE
;
rfbScreen
->
rfbDontDisconnect
=
FALSE
;
rfbScreen
->
rfbDontDisconnect
=
FALSE
;
rfbScreen
->
rfbAuthPasswdData
=
0
;
processArguments
(
rfbScreen
,
argc
,
argv
);
processArguments
(
rfbScreen
,
argc
,
argv
);
...
@@ -580,6 +581,7 @@ rfbProcessEvents(rfbScreenInfoPtr rfbScreen,long usec)
...
@@ -580,6 +581,7 @@ rfbProcessEvents(rfbScreenInfoPtr rfbScreen,long usec)
{
{
rfbClientIteratorPtr
i
;
rfbClientIteratorPtr
i
;
rfbClientPtr
cl
,
clPrev
;
rfbClientPtr
cl
,
clPrev
;
struct
timeval
tv
;
rfbCheckFds
(
rfbScreen
,
usec
);
rfbCheckFds
(
rfbScreen
,
usec
);
httpCheckFds
(
rfbScreen
);
httpCheckFds
(
rfbScreen
);
...
@@ -590,10 +592,24 @@ rfbProcessEvents(rfbScreenInfoPtr rfbScreen,long usec)
...
@@ -590,10 +592,24 @@ rfbProcessEvents(rfbScreenInfoPtr rfbScreen,long usec)
i
=
rfbGetClientIterator
(
rfbScreen
);
i
=
rfbGetClientIterator
(
rfbScreen
);
cl
=
rfbClientIteratorNext
(
i
);
cl
=
rfbClientIteratorNext
(
i
);
while
(
cl
)
{
while
(
cl
)
{
if
(
cl
->
sock
>=
0
&&
FB_UPDATE_PENDING
(
cl
))
if
(
cl
->
sock
>=
0
&&
FB_UPDATE_PENDING
(
cl
))
{
rfbSendFramebufferUpdate
(
cl
,
cl
->
modifiedRegion
);
if
(
cl
->
startDeferring
.
tv_usec
==
0
)
{
clPrev
=
cl
;
gettimeofday
(
&
cl
->
startDeferring
,
NULL
);
cl
=
rfbClientIteratorNext
(
i
);
if
(
cl
->
startDeferring
.
tv_usec
==
0
)
cl
->
startDeferring
.
tv_usec
++
;
}
else
{
gettimeofday
(
&
tv
,
NULL
);
if
(
tv
.
tv_sec
<
cl
->
startDeferring
.
tv_sec
/* at midnight */
||
((
tv
.
tv_sec
-
cl
->
startDeferring
.
tv_sec
)
*
1000
+
(
tv
.
tv_usec
-
cl
->
startDeferring
.
tv_usec
)
/
1000
)
>
cl
->
screen
->
rfbDeferUpdateTime
)
{
cl
->
startDeferring
.
tv_usec
=
0
;
rfbSendFramebufferUpdate
(
cl
,
cl
->
modifiedRegion
);
}
}
}
clPrev
=
cl
;
cl
=
rfbClientIteratorNext
(
i
);
if
(
clPrev
->
sock
==-
1
)
if
(
clPrev
->
sock
==-
1
)
rfbClientConnectionGone
(
clPrev
);
rfbClientConnectionGone
(
clPrev
);
}
}
...
...
rfb.h
View file @
2c4869fc
...
@@ -26,6 +26,7 @@
...
@@ -26,6 +26,7 @@
#include <stdio.h>
#include <stdio.h>
#include <stdlib.h>
#include <stdlib.h>
#include <string.h>
#include <string.h>
#include <sys/time.h>
#include <zlib.h>
#include <zlib.h>
#include "keysym.h"
#include "keysym.h"
...
@@ -269,6 +270,8 @@ typedef struct
...
@@ -269,6 +270,8 @@ typedef struct
PasswordCheckProcPtr
passwordCheck
;
PasswordCheckProcPtr
passwordCheck
;
char
*
rfbAuthPasswdData
;
char
*
rfbAuthPasswdData
;
/* this is the amount of milliseconds to wait at least before sending
* an update. */
int
rfbDeferUpdateTime
;
int
rfbDeferUpdateTime
;
char
*
rfbScreen
;
char
*
rfbScreen
;
Bool
rfbAlwaysShared
;
Bool
rfbAlwaysShared
;
...
@@ -406,13 +409,14 @@ typedef struct rfbClientRec {
...
@@ -406,13 +409,14 @@ typedef struct rfbClientRec {
sraRegionPtr
requestedRegion
;
sraRegionPtr
requestedRegion
;
/* TODO: */
/* The following member represents the state of the "deferred update" timer
/* The following members represent the state of the "deferred update" timer
- when the framebuffer is modified and the client is ready, in most
- when the framebuffer is modified and the client is ready, in most
cases it is more efficient to defer sending the update by a few
cases it is more efficient to defer sending the update by a few
milliseconds so that several changes to the framebuffer can be combined
milliseconds so that several changes to the framebuffer can be combined
into a single update. */
into a single update. */
struct
timeval
startDeferring
;
/* translateFn points to the translation function which is used to copy
/* translateFn points to the translation function which is used to copy
and translate a rectangle from the framebuffer to an output buffer. */
and translate a rectangle from the framebuffer to an output buffer. */
...
...
rfbserver.c
View file @
2c4869fc
...
@@ -185,7 +185,7 @@ rfbNewTCPOrUDPClient(rfbScreen,sock,isUDP)
...
@@ -185,7 +185,7 @@ rfbNewTCPOrUDPClient(rfbScreen,sock,isUDP)
int
addrlen
=
sizeof
(
struct
sockaddr_in
);
int
addrlen
=
sizeof
(
struct
sockaddr_in
);
int
i
;
int
i
;
cl
=
(
rfbClientPtr
)
malloc
(
sizeof
(
rfbClientRec
)
);
cl
=
(
rfbClientPtr
)
calloc
(
sizeof
(
rfbClientRec
),
1
);
cl
->
screen
=
rfbScreen
;
cl
->
screen
=
rfbScreen
;
cl
->
sock
=
sock
;
cl
->
sock
=
sock
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment