Boost logo

Boost Users :

From: Andrea Bartoli (bartols2000_at_[hidden])
Date: 2007-12-04 04:19:36


Use an asio::deadline_timer Example: asio::io_service m_ioService; asio::deadline_timer * m_timer; m_timer = new asio::deadline_timer(m_ioService); m_timer->expires_from_now( boost::posix_time::seconds(t) ); m_timer->async_wait( boost::bind(&Foo:handle_timeout, this, asio::placeholders::error) ); asio::async_read( *m_socket, asio::buffer( m_msg.header(), m_msg.header_length() ), boost::bind(&Foo::handle_read_header, this, asio::placeholders::error) ); This is a cut and paste from my code, if it isn't so clear I'll explain deeply. Tks ----- Messaggio originale ----- Da: Arkadiy Vertleyb <vertleyb_at_[hidden]> A: boost-users_at_[hidden] Inviato: Lunedì 3 dicembre 2007, 20:05:15 Oggetto: [Boost-users] [asio] how to specify a timeout? Hi all, Is it possible in asio to supply a timeout for a read/write operation? Thanks, Arkadiy _________________________________________________________________ You keep typing, we keep giving. Download Messenger and join the i’m Initiative now. http://im.live.com/messenger/im/home/?source=TAGLM _______________________________________________ Boost-users mailing list Boost-users_at_[hidden] http://lists.boost.org/mailman/listinfo.cgi/boost-users ___________________________________ L'email della prossima generazione? Puoi averla con la nuova Yahoo! Mail: http://it.docs.yahoo.com/nowyoucan.html


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net