Results 1 to 7 of 7

Thread: Cannot send data with QTcpSocket

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Nov 2007
    Posts
    24
    Thanks
    5
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Cannot send data with QTcpSocket

    Hi,

    With Qt 4.8 under win32, I'm trying to send data to a tcp server

    Qt Code:
    1.  
    2. sck.connectToHost(myip, 7800);
    3.  
    4. if (sck.waitForConnected(8000)==false)
    5. return -1;
    To copy to clipboard, switch view to plain text mode 

    Connection works pretty well (I see it on the server)
    But now

    Qt Code:
    1. ret = sck.write("test data sending");
    To copy to clipboard, switch view to plain text mode 

    ret returned 17, cool...

    But on server side, I received... nothing !?

    (If I do the same thing in "pure" C socket, it works !?)

    What am I doing wrong ?

    Thanks for you help...
    Last edited by stef13013; 1st September 2012 at 11:23.

Similar Threads

  1. how to use qtcpsocket send qimage data
    By tsuibin in forum Qt Programming
    Replies: 2
    Last Post: 18th April 2012, 14:51
  2. how to send data using QTcpSocket and QTcpServer
    By gauravg in forum Qt Programming
    Replies: 1
    Last Post: 31st March 2012, 12:29
  3. QTcpSocket - try to send bunch of requests
    By nickla in forum Qt Programming
    Replies: 1
    Last Post: 15th March 2012, 20:57
  4. QTcpSocket does not send data immediately
    By igorosberg in forum Qt Programming
    Replies: 11
    Last Post: 15th July 2011, 15:51
  5. How to send Pixmap through QTcpSocket?
    By live_07 in forum Qt Programming
    Replies: 1
    Last Post: 10th September 2008, 16:35

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.