Results 1 to 6 of 6

Thread: why can't i write some string to the socket

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jul 2008
    Posts
    47
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: why can't i write some string to the socket

    Quote Originally Posted by succulent_lily View Post
    qint64 bytes = buffer->write(this->readAll());
    what object is "this->"

  2. #2

    Default

    Quote Originally Posted by muellerp View Post
    what object is "this->"
    "this->" means the socket

    Quote Originally Posted by wysota View Post
    What do you mean you can't write? The application doesn't compile, it returns some error, nothing is sent from the socket or nothing is received on the other side of the connection?
    thanks for your help
    i wasn't explain the problem complicitly
    this is the server code,the server can receive the client's message which send by socket,and give the message to the client back.
    in my pc,it is run correctly.
    but when the server received the client's message ,i want to send something else string back,such as"xxxxxxx",it can't run.
    that is my problem
    Last edited by wysota; 3rd December 2008 at 09:24.

Similar Threads

  1. Reading from sockets in a multithreaded program
    By KoosKoets in forum Qt Programming
    Replies: 9
    Last Post: 4th April 2007, 20:43
  2. saving a c string of variable length in a shared memory?
    By nass in forum General Programming
    Replies: 4
    Last Post: 3rd January 2007, 14:40
  3. How to write on a socket in another thread?
    By Valheru in forum Qt Programming
    Replies: 7
    Last Post: 12th October 2006, 10:52

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.