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
1408866c
Commit
1408866c
authored
Aug 25, 2011
by
Gernot Tenchio
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
websockets: Initial HyBi support
parent
02651bac
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
395 additions
and
54 deletions
+395
-54
rfbserver.c
libvncserver/rfbserver.c
+0
-2
sockets.c
libvncserver/sockets.c
+3
-2
websockets.c
libvncserver/websockets.c
+389
-41
rfb.h
rfb/rfb.h
+3
-9
No files found.
libvncserver/rfbserver.c
View file @
1408866c
...
...
@@ -365,8 +365,6 @@ rfbNewTCPOrUDPClient(rfbScreenInfoPtr rfbScreen,
#ifdef LIBVNCSERVER_WITH_WEBSOCKETS
cl
->
webSockets
=
FALSE
;
cl
->
webSocketsBase64
=
FALSE
;
cl
->
dblen
=
0
;
cl
->
carrylen
=
0
;
#endif
#if defined(LIBVNCSERVER_HAVE_LIBZ) || defined(LIBVNCSERVER_HAVE_LIBPNG)
...
...
libvncserver/sockets.c
View file @
1408866c
...
...
@@ -647,11 +647,12 @@ rfbWriteExact(rfbClientPtr cl,
#ifdef LIBVNCSERVER_WITH_WEBSOCKETS
if
(
cl
->
webSockets
)
{
if
((
len
=
webSocketsEncode
(
cl
,
buf
,
len
))
<
0
)
{
char
*
tmp
=
NULL
;
if
((
len
=
webSocketsEncode
(
cl
,
buf
,
len
,
&
tmp
))
<
0
)
{
rfbErr
(
"WriteExact: WebSockets encode error
\n
"
);
return
-
1
;
}
buf
=
cl
->
encodeBuf
;
buf
=
tmp
;
}
#endif
...
...
libvncserver/websockets.c
View file @
1408866c
This diff is collapsed.
Click to expand it.
rfb/rfb.h
View file @
1408866c
...
...
@@ -419,6 +419,7 @@ typedef struct _rfbStatList {
}
rfbStatList
;
typedef
struct
_rfbSslCtx
rfbSslCtx
;
typedef
struct
_wsCtx
wsCtx
;
typedef
struct
_rfbClientRec
{
...
...
@@ -640,17 +641,10 @@ typedef struct _rfbClientRec {
#ifdef LIBVNCSERVER_WITH_WEBSOCKETS
rfbBool
webSockets
;
rfbBool
webSocketsSSL
;
rfbBool
webSocketsBase64
;
rfbSslCtx
*
sslctx
;
wsCtx
*
wsctx
;
char
*
wspath
;
/* Requests path component */
char
encodeBuf
[
UPDATE_BUF_SIZE
*
2
+
2
];
/* UTF-8 could double it + framing */
char
decodeBuf
[
8192
];
/* TODO: what makes sense? */
int
dblen
;
char
carryBuf
[
3
];
/* For base64 carry-over */
int
carrylen
;
#endif
}
rfbClientRec
,
*
rfbClientPtr
;
...
...
@@ -718,7 +712,7 @@ extern rfbBool rfbSetNonBlocking(int sock);
/* websockets.c */
extern
rfbBool
webSocketsCheck
(
rfbClientPtr
cl
);
extern
int
webSocketsEncode
(
rfbClientPtr
cl
,
const
char
*
src
,
int
len
);
extern
int
webSocketsEncode
(
rfbClientPtr
cl
,
const
char
*
src
,
int
len
,
char
**
dst
);
extern
int
webSocketsDecode
(
rfbClientPtr
cl
,
char
*
dst
,
int
len
);
#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