I've been working on a android vnc server (for my personal use/experimenting). I've taken some existing projects and have been able to port them over just fine. One feature I would like to play with implementing is the file transfer feature.
While shifting through the code and a few clients code. I have been having a hard time coming up with how the client/server tells the other "hey I support the FTProtocol".
I see bit like:
- Code: Select all
SendFTProtocolMsg()
{
rfbFileTransferMsg ft;
memset(&ft, 0, sizeof ft);
ft.type = rfbFileTransfer;
ft.contentType = rfbFileTransferProtocolVersion;
ft.contentParam = FT_PROTO_VERSION_3;
m_socket->SendExact((char *)&ft, sz_rfbFileTransferMsg, rfbFileTransfer);
}
When the server is reading the SetEncoding message I do see
- Code: Select all
if (Swap32IfLE(encoding) == rfbEncodingFTProtocolVersion)
Problem is when I look at the client's code. I cannot see this encoding being set and sent in the initial hand shake.
So I'm a little confused at the moment and any insight in how/when the server/client should be telling the other that it supports file transfer would be great.