[Libreoffice-commits] online.git: Branch 'private/Ashod/nonblocking' - net/loolnb.cpp
Ashod Nakashian
ashod.nakashian at collabora.co.uk
Sat Feb 18 00:42:57 UTC 2017
net/loolnb.cpp | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
New commits:
commit db352c5a0bf56c2bd14e8034bca1dc3415d43462
Author: Ashod Nakashian <ashod.nakashian at collabora.co.uk>
Date: Fri Feb 17 18:13:52 2017 -0500
nb: support http and https in parallel
Change-Id: I35f55abc853e8797625bef1b0f60eeda127681b4
Reviewed-on: https://gerrit.libreoffice.org/34391
Reviewed-by: Ashod Nakashian <ashnakash at gmail.com>
Tested-by: Ashod Nakashian <ashnakash at gmail.com>
diff --git a/net/loolnb.cpp b/net/loolnb.cpp
index a235ba7..d819a1c 100644
--- a/net/loolnb.cpp
+++ b/net/loolnb.cpp
@@ -31,7 +31,8 @@ using Poco::StringTokenizer;
#include "ssl.hpp"
#include "socket.hpp"
-constexpr int PortNumber = 9191;
+constexpr int HttpPortNumber = 9191;
+constexpr int SslPortNumber = 9193;
static std::string computeAccept(const std::string &key);
@@ -275,7 +276,8 @@ private:
std::thread _thread;
};
-Poco::Net::SocketAddress addr("127.0.0.1", PortNumber);
+Poco::Net::SocketAddress addrHttp("127.0.0.1", HttpPortNumber);
+Poco::Net::SocketAddress addrSsl("127.0.0.1", SslPortNumber);
/// A non-blocking, streaming socket.
class ServerSocket : public Socket
@@ -345,7 +347,7 @@ public:
}
};
-void server(SocketPoll& clientPoller)
+void server(const Poco::Net::SocketAddress& addr, SocketPoll& clientPoller)
{
// Start server.
auto server = std::make_shared<ServerSocket>(clientPoller);
@@ -392,7 +394,7 @@ int main(int, const char**)
});
// Start the server.
- server(poller);
+ server(addrHttp, poller);
std::cout << "Shutting down server." << std::endl;
More information about the Libreoffice-commits
mailing list