Results 1 to 2 of 2

Thread: QTcpSocket connectionClosed not working correctly

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Feb 2009
    Posts
    23
    Thanks
    5
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default QTcpSocket connectionClosed not working correctly

    hello
    I've got a problem

    I created a TcpServer and a TcpClient with QTcpServer/Socket.

    When the server disconnects himself from the client with disconnectFromHost(), the client gets a connectionClosed signal .

    But when the client disconnects himself from the server, the server isn't getting the connectionClosed signal.
    I also see that the client tries to disconnect several times from the host, but after 6-7 tries it closes the connection with an abort().
    What's going on?

    the server and client are closing the connection in the exact same manner.
    With disconnectFromHost();

    The host is only sending data and not reading anything
    The client is only sending data and not sending anything
    Last edited by Denarius; 18th March 2009 at 15:40. Reason: spelling error

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: QTcpSocket connectionClosed not working correctly

    Could you prepare a compilable example reproducing the problem?
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


Similar Threads

  1. Drop not working correctly
    By rippa in forum Qt Programming
    Replies: 2
    Last Post: 11th November 2008, 16:13
  2. renderText is not working correctly
    By validator in forum Qt Programming
    Replies: 3
    Last Post: 27th May 2008, 17:55
  3. Strange QTcpSocket behavior (debugged with Ethereal)
    By mdecandia in forum Qt Programming
    Replies: 23
    Last Post: 28th May 2007, 21:44

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
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.