Hello,

The library I am attempting to extend Python to contains a class which
inherits from boost::asio::ip::tcp::socket.

class tcp_client_socket : public boost::asio::ip::tcp::socket {
// class members and functions go here...
};

My question is whether or not it is a good idea to wrap this.  My naive
approach would be to something like:

BOOST_PYTHON_MODULE(tcp_client_socket_ext)
{
  using namespace boost::python;
  class_<tcp_client_socket, bases<boost::asio::ip::tcp::socket>
>("tcp_client_socket");
}

I did an initial compile and received many compiler errors.  If anyone has
done this before, what is the correct way to wrap such an object.

Any help is greatly appreciated.

Regards,

-Jeremy
_______________________________________________
Cplusplus-sig mailing list
Cplusplus-sig@python.org
http://mail.python.org/mailman/listinfo/cplusplus-sig

Reply via email to