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
e78a41c6
Commit
e78a41c6
authored
Jan 03, 2005
by
dscho
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add hook to allow for custom client messages
parent
4b89306d
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
0 deletions
+14
-0
main.c
libvncserver/main.c
+6
-0
rfbserver.c
libvncserver/rfbserver.c
+3
-0
rfb.h
rfb/rfb.h
+5
-0
No files found.
libvncserver/main.c
View file @
e78a41c6
...
...
@@ -498,6 +498,11 @@ enum rfbNewClientAction rfbDefaultNewClientHook(rfbClientPtr cl)
return
RFB_CLIENT_ACCEPT
;
}
rfbBool
rfbDefaultProcessCustomClientMessage
(
rfbClientPtr
cl
,
uint8_t
type
)
{
return
FALSE
;
}
/*
* Update server's pixel format in screenInfo structure. This
* function is called from rfbGetScreen() and rfbNewFramebuffer().
...
...
@@ -641,6 +646,7 @@ rfbScreenInfoPtr rfbGetScreen(int* argc,char** argv,
screen
->
setTranslateFunction
=
rfbSetTranslateFunction
;
screen
->
newClientHook
=
rfbDefaultNewClientHook
;
screen
->
displayHook
=
0
;
screen
->
processCustomClientMessage
=
rfbDefaultProcessCustomClientMessage
;
/* initialize client list and iterator mutex */
rfbClientListInit
(
screen
);
...
...
libvncserver/rfbserver.c
View file @
e78a41c6
...
...
@@ -1039,6 +1039,9 @@ rfbProcessClientNormalMessage(cl)
default
:
if
(
cl
->
screen
->
processCustomClientMessage
(
cl
,
msg
.
type
))
return
;
rfbLog
(
"rfbProcessClientNormalMessage: unknown message type %d
\n
"
,
msg
.
type
);
rfbLog
(
" ... closing connection
\n
"
);
...
...
rfb/rfb.h
View file @
e78a41c6
...
...
@@ -125,6 +125,7 @@ typedef rfbBool (*rfbSetTranslateFunctionProcPtr)(struct _rfbClientRec* cl);
typedef
rfbBool
(
*
rfbPasswordCheckProcPtr
)(
struct
_rfbClientRec
*
cl
,
const
char
*
encryptedPassWord
,
int
len
);
typedef
enum
rfbNewClientAction
(
*
rfbNewClientHookPtr
)(
struct
_rfbClientRec
*
cl
);
typedef
void
(
*
rfbDisplayHookPtr
)(
struct
_rfbClientRec
*
cl
);
typedef
rfbBool
(
*
rfbProcessCustomClientMessageProcPtr
)(
struct
_rfbClientRec
*
cl
,
uint8_t
type
);
typedef
struct
{
uint32_t
count
;
...
...
@@ -291,6 +292,10 @@ typedef struct _rfbScreenInfo
* an update should be sent. This should make working on a slow
* link more interactive. */
int
progressiveSliceHeight
;
/* if LibVNCServer doesn't know the normal message, it calls this
* hook. If the hook handles the message, it returns TRUE. */
rfbProcessCustomClientMessageProcPtr
processCustomClientMessage
;
}
rfbScreenInfo
,
*
rfbScreenInfoPtr
;
...
...
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