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
7218843a
Commit
7218843a
authored
May 15, 2006
by
steven_carr
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Support sending TextChat messages back to the client
parent
1c3af685
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
43 additions
and
0 deletions
+43
-0
rfbserver.c
libvncserver/rfbserver.c
+41
-0
rfb.h
rfb/rfb.h
+2
-0
No files found.
libvncserver/rfbserver.c
View file @
7218843a
...
@@ -1015,6 +1015,47 @@ rfbSendServerIdentity(rfbClientPtr cl)
...
@@ -1015,6 +1015,47 @@ rfbSendServerIdentity(rfbClientPtr cl)
return
TRUE
;
return
TRUE
;
}
}
rfbBool
rfbSendTextChatMessage
(
rfbClientPtr
cl
,
uint32_t
length
,
char
*
buffer
)
{
rfbTextChatMsg
tc
;
int
bytesToSend
=
0
;
memset
((
char
*
)
&
tc
,
0
,
sizeof
(
tc
));
tc
.
type
=
rfbTextChat
;
tc
.
length
=
Swap32IfLE
(
length
);
switch
(
length
)
{
case
rfbTextChatOpen
:
case
rfbTextChatClose
:
case
rfbTextChatFinished
:
bytesToSend
=
0
;
break
;
default:
bytesToSend
=
length
;
if
(
bytesToSend
>
rfbTextMaxSize
)
bytesToSend
=
rfbTextMaxSize
;
}
if
(
cl
->
ublen
+
sz_rfbTextChatMsg
+
bytesToSend
>
UPDATE_BUF_SIZE
)
{
if
(
!
rfbSendUpdateBuf
(
cl
))
return
FALSE
;
}
memcpy
(
&
cl
->
updateBuf
[
cl
->
ublen
],
(
char
*
)
&
tc
,
sz_rfbTextChatMsg
);
cl
->
ublen
+=
sz_rfbTextChatMsg
;
if
(
bytesToSend
>
0
)
{
memcpy
(
&
cl
->
updateBuf
[
cl
->
ublen
],
buffer
,
bytesToSend
);
cl
->
ublen
+=
bytesToSend
;
}
rfbStatRecordMessageSent
(
cl
,
rfbTextChat
,
sz_rfbTextChatMsg
+
bytesToSend
,
sz_rfbTextChatMsg
+
bytesToSend
);
if
(
!
rfbSendUpdateBuf
(
cl
))
return
FALSE
;
return
TRUE
;
}
rfbBool
rfbSendFileTransferMessage
(
rfbClientPtr
cl
,
uint8_t
contentType
,
uint8_t
contentParam
,
uint32_t
size
,
uint32_t
length
,
char
*
buffer
)
rfbBool
rfbSendFileTransferMessage
(
rfbClientPtr
cl
,
uint8_t
contentType
,
uint8_t
contentParam
,
uint32_t
size
,
uint32_t
length
,
char
*
buffer
)
{
{
rfbFileTransferMsg
ft
;
rfbFileTransferMsg
ft
;
...
...
rfb/rfb.h
View file @
7218843a
...
@@ -959,6 +959,8 @@ extern int rfbStatGetEncodingCountRcvd(rfbClientPtr cl, uint32_t type);
...
@@ -959,6 +959,8 @@ extern int rfbStatGetEncodingCountRcvd(rfbClientPtr cl, uint32_t type);
/* Set which version you want to advertise 3.3, 3.6, 3.7 and 3.8 are currently supported*/
/* Set which version you want to advertise 3.3, 3.6, 3.7 and 3.8 are currently supported*/
extern
void
rfbSetProtocolVersion
(
rfbScreenInfoPtr
rfbScreen
,
int
major_
,
int
minor_
);
extern
void
rfbSetProtocolVersion
(
rfbScreenInfoPtr
rfbScreen
,
int
major_
,
int
minor_
);
/* send a TextChat message to a client */
extern
rfbBool
rfbSendTextChatMessage
(
rfbClientPtr
cl
,
uint32_t
length
,
char
*
buffer
);
...
...
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