×

Discussion Board

Results 1 to 6 of 6
  1. #1
    Registered User
    Join Date
    Jan 2011
    Posts
    192

    Question QTcpSocket problem

    Hi,
    I am facing a little problem concerning reconnecting the socket to the host.
    My problem is that when the connection is closed on my device, the socket is lost and i cannot control it, neither create a new one and connect it again to the host.

    i am trying to close the socket and reconnect it ( while my device is still connected to the host ) : it works well.
    But when the connection between my device and the host is lost, i am unable to reconnect the socket again, neither creating a new one....

    Any idea about my issue.

    Thanks,
    Best Regards

  2. #2
    Registered User
    Join Date
    Jan 2011
    Posts
    192

    Re: QTcpSocket problem

    when the connection is closed, the following socket error occured :
    "Bad file descriptor"

    And after that, i tried to close the socket and connect it again,
    socket->close();
    socket->disconnect();
    connecttosocket();
    and the error was:
    "Unable to initialize non-blocking socket"

    Any idea ???

  3. #3
    Registered User
    Join Date
    Jan 2011
    Posts
    192

    Re: QTcpSocket problem

    i discovered that the problem occurs only on devices like N8, E7 , E72...
    And everything is working well on the simulator....

    Any Help...

    Thanks,
    Best Regards.

  4. #4
    Registered User
    Join Date
    Jan 2011
    Posts
    192

    Re: QTcpSocket problem

    Any Ideas???

  5. #5
    Regular Contributor
    Join Date
    Dec 2010
    Posts
    228

    Re: QTcpSocket problem

    Quote Originally Posted by lipos123 View Post
    Any Ideas???
    yesterday when i saw your post, i realise that i have the same problem :S
    i thought that my last project was done :S
    anyway, i'll search about it, and if i found something useful i'll tell you.
    and if someone have some ideas about disconnecting the socket when the connection is lost, please provide us with the solution. and thank you

  6. #6
    Regular Contributor
    Join Date
    Dec 2010
    Posts
    228

    Re: QTcpSocket problem

    i think this is a bug,
    check this URL
    http://bugreports.qt.nokia.com/browse/QTBUG-18082

    the socket is keeped in a connecting state, wihtout beeing connected.

Similar Threads

  1. QTcpSocket response truncated
    By jccorral in forum Qt
    Replies: 10
    Last Post: 2010-07-21, 23:23

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×