Qt World Summit: Register Today!

[SOLVED]Socket peer to peer communication for remote control

  • Hi, I'm trying to develope a program similar to PortFusion to connect to a vnc service on a remote computer without using port forwarding. I use a server and two client for this.

    1. I've wrote a class which creates a server listening on port 4201 when someone connects, i start a thread. in that thread i start another server listening on port 2116.

    2. Viceversa the remote computer makes a connection to server and waits.

    3. Then i start my vnc viewer (like TightVnc) that connects to the server at port 2116 with. On the server side when i get the connection from tightvnc the socket sends an ACK to the remote computer. The computer client make connection to the vnc service.

    4. Then, all data arriving from my vnc viewer i send to the remote computer and viceversa for the remote vnc service

    These are my two projects:
    Client project
    Server project

    The connection to the remote computer works but sometimes (randomly) on the client i get a segmentation fault with message "error: double free or corruption(out)" or sometimes on the tightvnc viewer i get "pseudo encoding not supported"

    What am i doing wrong?

    thanks in advance

  • SOLVED updating the client to Qt 5.5.0

Log in to reply