Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/marian-nmt/Simple-WebSocket-Server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authoreidheim <eidheim@gmail.com>2017-11-15 09:43:18 +0300
committereidheim <eidheim@gmail.com>2017-11-15 09:43:18 +0300
commit2535ce956dff61744684bcce1287763a80d69dba (patch)
treea24042d2809252ec1b8f124e5b3dde0099366305 /tests
parent3d18c3b1eb4c33549194af6f33d27d426fe16d3e (diff)
Added Connection::remote_endpoint tests to io_test
Diffstat (limited to 'tests')
-rw-r--r--tests/io_test.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/io_test.cpp b/tests/io_test.cpp
index 2e71f7e..1272bc2 100644
--- a/tests/io_test.cpp
+++ b/tests/io_test.cpp
@@ -32,8 +32,10 @@ int main() {
});
};
- echo.on_open = [&server_callback_count](shared_ptr<WsServer::Connection> /*connection*/) {
+ echo.on_open = [&server_callback_count](shared_ptr<WsServer::Connection> connection) {
++server_callback_count;
+ assert(!connection->remote_endpoint_address().empty());
+ assert(connection->remote_endpoint_port() > 0);
};
echo.on_close = [&server_callback_count](shared_ptr<WsServer::Connection> /*connection*/, int /*status*/, const string & /*reason*/) {