[C++-sig] boost python class inherits boost::asio::ip::tcp::socket

Jeremy Kie jeremykie at gmail.com
Thu May 7 00:10:22 CEST 2009


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:

  using namespace boost::python;
  class_<tcp_client_socket, bases<boost::asio::ip::tcp::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.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/cplusplus-sig/attachments/20090506/42ececf5/attachment-0001.htm>

More information about the Cplusplus-sig mailing list