Skip to content

Commit

Permalink
[master] Merged PR60/trac5496 (boost 1.66.0)
Browse files Browse the repository at this point in the history
  • Loading branch information
fxdupont committed Jan 16, 2018
2 parents 7d4cd80 + e9a8f3c commit 17ed090
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/lib/asiolink/io_acceptor.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,11 @@ class IOAcceptor : public IOSocket {

/// @brief Returns file descriptor of the underlying socket.
virtual int getNative() const {
#if BOOST_VERSION < 106600
return (acceptor_->native());
#else
return (acceptor_->native_handle());
#endif
}

/// @brief Opens acceptor socket given the endpoint.
Expand Down
5 changes: 5 additions & 0 deletions src/lib/asiolink/io_service.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,12 @@

namespace boost {
namespace asio {
#if BOOST_VERSION < 106600
class io_service;
#else
class io_context;
typedef io_context io_service;
#endif
}
}

Expand Down
4 changes: 4 additions & 0 deletions src/lib/asiolink/tcp_socket.h
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,11 @@ class TCPSocket : public IOAsioSocket<C> {

/// \brief Return file descriptor of underlying socket
virtual int getNative() const {
#if BOOST_VERSION < 106600
return (socket_.native());
#else
return (socket_.native_handle());
#endif
}

/// \brief Return protocol of socket
Expand Down
4 changes: 4 additions & 0 deletions src/lib/asiolink/udp_socket.h
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,11 @@ class UDPSocket : public IOAsioSocket<C> {

/// \brief Return file descriptor of underlying socket
virtual int getNative() const {
#if BOOST_VERSION < 106600
return (socket_.native());
#else
return (socket_.native_handle());
#endif
}

/// \brief Return protocol of socket
Expand Down
4 changes: 4 additions & 0 deletions src/lib/asiolink/unix_domain_socket.cc
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,11 @@ UnixDomainSocket::UnixDomainSocket(IOService& io_service)

int
UnixDomainSocket::getNative() const {
#if BOOST_VERSION < 106600
return (impl_->socket_.native());
#else
return (impl_->socket_.native_handle());
#endif
}

int
Expand Down

0 comments on commit 17ed090

Please sign in to comment.