Sunday, July 6th 2008, 5:11pm UTC+1

You are not logged in.

  • Login
  • Register

Dear visitor, welcome to QtForum.org. If this is your first visit here, please read the Help. It explains how this page works. You must be registered before you can use all the page's features. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.

1

Saturday, May 3rd 2008, 4:53pm

How to abort a QAbstractSocket waitForConnected

Hello,

I need to know if it is possible to abort a QAbstractSocket::waitForConnected() call. For example, if I call it with 20000 ms but the user wants to exit the program, if I don't abort it, the user will have to wait 20 seconds.
I've tried abort() method but it won't work.

Thank you.
  • Go to the top of the page

2

Tuesday, May 6th 2008, 10:05pm

RE: How to abort a QAbstractSocket waitForConnected

did you try disconnectfromhost()?
  • Go to the top of the page

3

Wednesday, May 7th 2008, 1:53pm

RE: How to abort a QAbstractSocket waitForConnected

Yes but it didn't work.
  • Go to the top of the page

4

Wednesday, May 7th 2008, 1:58pm

RE: How to abort a QAbstractSocket waitForConnected

And I tried to transform it to asynchronous, but the command connectToHost() only changes the socket state to HostLookupState. I need to call waitForConnected() to change its state correctly.
  • Go to the top of the page

Rate this thread