Hi,

Because synapse uses blocking socket it's not possible
to set timeout for Connect call. It's very bad in some cases...

But I found intersting article with some trick to make timeout
available for Connect call:

http://www.shafiev.com/en/2007/06/14/connect-with-timeout-for-blocking-sockets

The short description is:
----
You can temporarily change the mode of the socket from blocking to
non-blocking. Then connect to the target host using connect() function. If
the return value is WSAEWOULDBLOCK, then just wait for the specified time
using select() or poll function checking the socket for writability. After 
establishing
connection socket must be switched back to blocking mode.
----

Anybody try to use this technique ?

It's possible to use it with synapse ?

---
With best regards, Max Terentiev.
Business Software Products.
AMS Development Team.
supp...@bspdev.com 


------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
synalist-public mailing list
synalist-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/synalist-public

Reply via email to