Boost logo

Boost Users :

Subject: Re: [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-19 04:06:36


But that means that I need to pass io_service to the class and I can't
initialize my io service in the class itself??

On 18 February 2010 18:02, Igor R <boost.lists_at_[hidden]> wrote:
>> I tied _socket(ioService), still no luck....
>
> You have to initialize _socket this way in your object constructor
> initialization list:
>
> class YourClass
> {
>  YourClass(io_service &io) : _socket(io)
>  {}
>
>  tcp::socket _socket;
> };
> _______________________________________________
> Boost-users mailing list
> Boost-users_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/boost-users
>


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