|
@@ -114,6 +114,14 @@ public:
|
|
|
reset();
|
|
|
};
|
|
|
|
|
|
+ /// @brief Returns pointer to the server's IO service.
|
|
|
+ ///
|
|
|
+ /// @return Pointer to the server's IO service or null pointer if the server
|
|
|
+ /// hasn't been created.
|
|
|
+ IOServicePtr getIOService() {
|
|
|
+ return (server_ ? server_->getIOService() : IOServicePtr());
|
|
|
+ }
|
|
|
+
|
|
|
void createUnixChannelServer() {
|
|
|
static_cast<void>(::remove(socket_path_.c_str()));
|
|
|
|
|
@@ -196,11 +204,13 @@ public:
|
|
|
// detect the control socket connect and call the accept handler
|
|
|
ASSERT_TRUE(client->connectToServer(socket_path_));
|
|
|
ASSERT_NO_THROW(server_->receivePacket(0));
|
|
|
+ ASSERT_NO_THROW(getIOService()->run_one());
|
|
|
|
|
|
// Send the command and then call server's receivePacket() so it can
|
|
|
// detect the inbound data and call the read handler
|
|
|
ASSERT_TRUE(client->sendCommand(command));
|
|
|
ASSERT_NO_THROW(server_->receivePacket(0));
|
|
|
+ ASSERT_NO_THROW(getIOService()->run_one());
|
|
|
|
|
|
// Read the response generated by the server. Note that getResponse
|
|
|
// only fails if there an IO error or no response data was present.
|
|
@@ -210,6 +220,8 @@ public:
|
|
|
// Now disconnect and process the close event
|
|
|
client->disconnectFromServer();
|
|
|
ASSERT_NO_THROW(server_->receivePacket(0));
|
|
|
+
|
|
|
+ ASSERT_NO_THROW(getIOService()->poll());
|
|
|
}
|
|
|
|
|
|
/// @brief Checks response for list-commands
|