- if (gearman_success(gearman_client_add_server(client, hostname().c_str(), port())))
- {
- gearman_return_t rc= gearman_client_echo(client, test_literal_param("This is my echo test"));
-
- if (gearman_success(rc))
- {
- gearman_client_free(client);
- return true;
- }
- Error << hostname().c_str() << ":" << port() << " was " << gearman_strerror(rc) << " extended: " << gearman_client_error(client);
- }
- else
+ SimpleClient client(_hostname, _port);
+
+ std::string response;
+ bool ret= client.send_message("version", response);
+
+ if (client.is_error())