Boost logo

Boost Users :

Subject: Re: [Boost-users] boost::asio socket as class member
From: Brian Budge (brian.budge_at_[hidden])
Date: 2010-11-17 20:19:16


You need to construct s with your io_service... you need to do that in
myClass().

  Brian

On Wed, Nov 17, 2010 at 2:37 PM, Claude <clros_at_[hidden]> wrote:
>
> Hi!
>
> I want to put a boost::asio::ip::tcp::socket as a private member of my class
> and then create the object in one of the class methods.
>
> I actually use this code:
>
> class myClass{
>
>  private:
>  boost::asio::io_service io_service;
>  boost::asio::ip::tcp::socket s;
> };
>
>
>
> But this code don't work (don't compile). Why?
> --
> View this message in context: http://boost.2283326.n4.nabble.com/boost-asio-socket-as-class-member-tp3047793p3047793.html
> Sent from the Boost - Users mailing list archive at Nabble.com.
> _______________________________________________
> 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