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
2cd3c824
Commit
2cd3c824
authored
Jan 14, 2005
by
dscho
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
return value of rfbProcessEvents tells if an update was pending
parent
b9a8f19b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
4 deletions
+11
-4
main.c
libvncserver/main.c
+8
-2
rfb.h
rfb/rfb.h
+3
-2
No files found.
libvncserver/main.c
View file @
2cd3c824
...
@@ -791,12 +791,13 @@ void gettimeofday(struct timeval* tv,char* dummy)
...
@@ -791,12 +791,13 @@ void gettimeofday(struct timeval* tv,char* dummy)
/* defined in rfbserver.c, but kind of "private" */
/* defined in rfbserver.c, but kind of "private" */
rfbClientPtr
rfbClientIteratorHead
(
rfbClientIteratorPtr
i
);
rfbClientPtr
rfbClientIteratorHead
(
rfbClientIteratorPtr
i
);
void
rfbBool
rfbProcessEvents
(
rfbScreenInfoPtr
screen
,
long
usec
)
rfbProcessEvents
(
rfbScreenInfoPtr
screen
,
long
usec
)
{
{
rfbClientIteratorPtr
i
;
rfbClientIteratorPtr
i
;
rfbClientPtr
cl
,
clPrev
;
rfbClientPtr
cl
,
clPrev
;
struct
timeval
tv
;
struct
timeval
tv
;
rfbBool
result
=
FALSE
;
if
(
usec
<
0
)
if
(
usec
<
0
)
usec
=
screen
->
deferUpdateTime
*
1000
;
usec
=
screen
->
deferUpdateTime
*
1000
;
...
@@ -812,6 +813,7 @@ rfbProcessEvents(rfbScreenInfoPtr screen,long usec)
...
@@ -812,6 +813,7 @@ rfbProcessEvents(rfbScreenInfoPtr screen,long usec)
while
(
cl
)
{
while
(
cl
)
{
if
(
cl
->
sock
>=
0
&&
!
cl
->
onHold
&&
FB_UPDATE_PENDING
(
cl
)
&&
if
(
cl
->
sock
>=
0
&&
!
cl
->
onHold
&&
FB_UPDATE_PENDING
(
cl
)
&&
!
sraRgnEmpty
(
cl
->
requestedRegion
))
{
!
sraRgnEmpty
(
cl
->
requestedRegion
))
{
result
=
TRUE
;
if
(
screen
->
deferUpdateTime
==
0
)
{
if
(
screen
->
deferUpdateTime
==
0
)
{
rfbSendFramebufferUpdate
(
cl
,
cl
->
modifiedRegion
);
rfbSendFramebufferUpdate
(
cl
,
cl
->
modifiedRegion
);
}
else
if
(
cl
->
startDeferring
.
tv_usec
==
0
)
{
}
else
if
(
cl
->
startDeferring
.
tv_usec
==
0
)
{
...
@@ -831,10 +833,14 @@ rfbProcessEvents(rfbScreenInfoPtr screen,long usec)
...
@@ -831,10 +833,14 @@ rfbProcessEvents(rfbScreenInfoPtr screen,long usec)
}
}
clPrev
=
cl
;
clPrev
=
cl
;
cl
=
rfbClientIteratorNext
(
i
);
cl
=
rfbClientIteratorNext
(
i
);
if
(
clPrev
->
sock
==-
1
)
if
(
clPrev
->
sock
==-
1
)
{
rfbClientConnectionGone
(
clPrev
);
rfbClientConnectionGone
(
clPrev
);
result
=
TRUE
;
}
}
}
rfbReleaseClientIterator
(
i
);
rfbReleaseClientIterator
(
i
);
return
result
;
}
}
void
rfbRunEventLoop
(
rfbScreenInfoPtr
screen
,
long
usec
,
rfbBool
runInBackground
)
void
rfbRunEventLoop
(
rfbScreenInfoPtr
screen
,
long
usec
,
rfbBool
runInBackground
)
...
...
rfb/rfb.h
View file @
2cd3c824
...
@@ -789,10 +789,11 @@ extern void rfbRefuseOnHoldClient(rfbClientPtr cl);
...
@@ -789,10 +789,11 @@ extern void rfbRefuseOnHoldClient(rfbClientPtr cl);
/* call one of these two functions to service the vnc clients.
/* call one of these two functions to service the vnc clients.
usec are the microseconds the select on the fds waits.
usec are the microseconds the select on the fds waits.
if you are using the event loop, set this to some value > 0, so the
if you are using the event loop, set this to some value > 0, so the
server doesn't get a high load just by listening. */
server doesn't get a high load just by listening.
rfbProcessEvents() returns TRUE if an update was pending. */
extern
void
rfbRunEventLoop
(
rfbScreenInfoPtr
screenInfo
,
long
usec
,
rfbBool
runInBackground
);
extern
void
rfbRunEventLoop
(
rfbScreenInfoPtr
screenInfo
,
long
usec
,
rfbBool
runInBackground
);
extern
void
rfbProcessEvents
(
rfbScreenInfoPtr
screenInfo
,
long
usec
);
extern
rfbBool
rfbProcessEvents
(
rfbScreenInfoPtr
screenInfo
,
long
usec
);
#endif
#endif
...
...
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