2016-09-28 12 views
0

どのようにしてip boost :: asio :: ssl :: stream型のソケットのリモートエンドポイントのアドレス。私はthis-のようなピアIPを印刷したいが、それは、私はそれが のstd :: coutを< < "ピアIP:" である必要があり をそれを考え出しboost :: asio :: ssl :: stream <boost :: asio :: ip :: tcp :: socket>タイプのソケットのリモートエンドポイントのIPアドレスを取得するには

std::cout << "Peer IP: " << socket_.remote_endpoint().address().to_string() 

答えて

0

仕事をdoesnt。< < socket_.lowest_layer()remote_endpointを( ).address()。to_string()< < std :: endl;

関連する問題