Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use expamle‘s filetransfer can not transfer file by tightVNC viewer #467

Closed
229024527 opened this issue Apr 26, 2021 · 6 comments
Closed

Comments

@229024527
Copy link

If you'd like to put out an incentive for fixing this bug, you can do so at https://issuehunt.io/r/LibVNC/libvncserver

When i use expamle's directory filetransfer but can not transfer file,is this a bug?

  1. mkdir build
  2. cd build
  3. cmake ..
  4. cmake --build .
  5. cd example
  6. ./filetransfer
  7. use other pc in same network segment open TightVNC viewer to connecting host

when connection established but transfer file button is gray

@229024527 229024527 added the bug label Apr 26, 2021
@bk138
Copy link
Member

bk138 commented Apr 26, 2021

Hi, which viewer version on which OS are you using? (2.x uses another file transfer protocol...)

@229024527
Copy link
Author

Hi, which viewer version on which OS are you using? (2.x uses another file transfer protocol...)

Thank you for you reply,My TightVNC viewer is 2.8.27

@229024527
Copy link
Author

Hi, which viewer version on which OS are you using? (2.x uses another file transfer protocol...)

I try to use tightvnc-1.3.10,It works,which protocol use in 2.x

@bk138
Copy link
Member

bk138 commented Apr 26, 2021

You can read more in https://www.tightvnc.com/release-2.0.php

@zzxyb
Copy link

zzxyb commented Apr 8, 2023

I register the TightVNCFileTransfer extension on the client and server, and then test in the client to let the server create a folder。HandleRFBServerMessage often returns false, and then the client disconnect。
The same is true for my test transfer file. I wrote the code in Arch Linux. libvncserver-LibVNCServer-0.9.14 library is used.The remote image and remote control are all normal, only the file transfer will have problems.

rfbRegisterTightVNCFileTransferExtension();

void FileTransfer::createRemoteDirectory(const QString &dir)
{
    rfbFileTransferMsg ft;
    ft.type = rfbFileTransfer;
    ft.contentType = rfbCommand;
    ft.contentParam = rfbCDirCreate;
    ft.size = 0;
    ft.length = Swap32IfLE(dir.length());

    WriteToRFBServer(m_client->getClient(), (char *)&ft, sz_rfbFileTransferMsg);
    WriteToRFBServer(m_client->getClient(), (char *)dir.toLocal8Bit().data(), dir.length());
}

may I ask if there is an example of using TightVNCFileTransfer in libvncserverclient?

@bk138
Copy link
Member

bk138 commented Apr 8, 2023

@zzxyb please see https://github.com/LibVNC/libvncserver/blob/master/examples/server/filetransfer.c and especially note the leading comment. No client example AFAIK.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants