14 lines
362 B
C++
14 lines
362 B
C++
#include "SocketAisoWrapper.h"
|
|
|
|
namespace Nng {
|
|
|
|
namespace Asio {
|
|
|
|
Socket::Socket(boost::asio::io_context &ioContext, Protocol protocol) : Nng::Socket(protocol) {
|
|
int fd;
|
|
nng_socket_get_int(m_socket, NNG_OPT_RECVFD, &fd);
|
|
|
|
m_descriptor = std::make_unique<boost::asio::posix::stream_descriptor>(ioContext, fd);
|
|
}
|
|
} // namespace Asio
|
|
} // namespace Nng
|