Boost logo

Boost Users :

Subject: [Boost-users] error: no matching function for call to ‘boost::asio::basic_stream_socket<boost::asio::ip::tcp, boost::asio::stream_socket_service<boost::asio::ip::tcp> >::basic_stream_socket()’
From: David Kaplan (davkaplan_at_[hidden])
Date: 2010-02-18 10:15:54


Hi

Why doesn't this work:

_socket = tcp::socket(ioService);

_socket is a private member of type tcp::socket.
How can I store the socket as a class member (so I can access it when
using read/write from other class methods)?

Also, is there any way to define a timeout on a synchronous connect()?
If not, what's the workaround? Can I do an async connect and then
somehow return to synchronous mode of operation?

Thanks,
David


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