asio async call timeout when peer goes down

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • iwr
    New Member
    • Mar 2008
    • 1

    asio async call timeout when peer goes down

    Hello,

    I'm moving parts of some windows socket-based code to boost.asio.
    My async socket is connected to a server, and I noticed, that when the server goes down in a "non-graceful" way (eg., unplugged from the net), it takes some time until the completion handler is called with error.
    In my old code that uses select with non-blocking windows sockets, the select "fires" much faster in the above situation.
    Is there a way to set explicit timeout in asio? Perhaps, it's possible to access the "lower level" and set the timeout for the underlying async socket?

    Thanks in advance!
Working...