diff --git a/doorlockd/main.cpp b/doorlockd/main.cpp index 34f19ca..9917aff 100644 --- a/doorlockd/main.cpp +++ b/doorlockd/main.cpp @@ -38,10 +38,12 @@ static void signal_handler(int signum) static void session(tcp::socket &&sock) { boost::system::error_code error; - + const auto remoteIP = sock.remote_endpoint().address(); std::vector data; data.resize(SOCKET_BUFFERLENGTH); + l("Incoming TCP connection from " + remoteIP.to_string(), LogLevel::notice); + try { size_t length = sock.read_some(boost::asio::buffer(data), error);