Skip to content

Commit 1e1ed92

Browse files
authored
fix: boost asio update (#9)
* fix: update asio not fixed yet * fix: update asio
1 parent e97feda commit 1e1ed92

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

source/IOStream/SockIOStream.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ ServerSockIOFactory::ServerSockIOFactory(const std::string& address, unsigned sh
1111

1212
using namespace boost::asio::ip;
1313

14-
tcp::endpoint endpoint(address::from_string(address), port);
14+
tcp::endpoint endpoint(make_address(address), port);
1515

1616
server_acceptor_.open(endpoint.protocol());
1717
server_acceptor_.set_option(tcp::acceptor::reuse_address(true));
@@ -37,7 +37,7 @@ std::shared_ptr<SockIOStream> ServerSockIOFactory::accept()
3737
// LogFunc;
3838

3939
boost::asio::ip::tcp::iostream ios;
40-
auto accept_future = std::async(std::launch::async, [&]() { server_acceptor_.accept(*ios.rdbuf()); });
40+
auto accept_future = std::async(std::launch::async, [&]() { server_acceptor_.accept(ios.rdbuf()->socket()); });
4141
if (accept_future.wait_for(std::chrono::seconds(2)) != std::future_status::ready) {
4242
LogError << "accept timeout";
4343
server_acceptor_.cancel();
@@ -53,7 +53,7 @@ std::shared_ptr<SockIOStream> ServerSockIOFactory::accept()
5353
}
5454

5555
ClientSockIOFactory::ClientSockIOFactory(const std::string& address, unsigned short port)
56-
: endpoint_(boost::asio::ip::address::from_string(address), port)
56+
: endpoint_(boost::asio::ip::make_address(address), port)
5757
{
5858
LogFunc << VAR(address) << VAR(port);
5959
}

0 commit comments

Comments
 (0)