mirror of
https://github.com/binary-kitchen/doorlockd
synced 2024-12-22 18:34:25 +01:00
Only listening on localhost
This commit is contained in:
parent
f99ed93f29
commit
8b2a0ea4ca
@ -69,7 +69,7 @@ class server
|
|||||||
public:
|
public:
|
||||||
|
|
||||||
server(boost::asio::io_service& io_service, short port)
|
server(boost::asio::io_service& io_service, short port)
|
||||||
: _acceptor(io_service, tcp::endpoint(tcp::v4(), port)),
|
: _acceptor(io_service, tcp::endpoint(boost::asio::ip::address::from_string("127.0.0.1"), port)),
|
||||||
_socket(io_service)
|
_socket(io_service)
|
||||||
{
|
{
|
||||||
do_accept();
|
do_accept();
|
||||||
@ -79,7 +79,6 @@ private:
|
|||||||
|
|
||||||
void do_accept()
|
void do_accept()
|
||||||
{
|
{
|
||||||
|
|
||||||
_acceptor.async_accept(_socket,
|
_acceptor.async_accept(_socket,
|
||||||
[this](boost::system::error_code ec)
|
[this](boost::system::error_code ec)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user