Refactor the transport interface

- give transport Initialize() method with access to device config.
 - avoid using global context in the transport.
 - simplify shutdown procedure (no need for extra thread).
This commit is contained in:
Alexey Rybalchenko
2017-04-04 17:14:37 +02:00
committed by Mohammad Al-Turany
parent d7eb692951
commit 5aaf27bf02
25 changed files with 278 additions and 358 deletions

View File

@@ -52,6 +52,11 @@ int main(int argc, char** argv)
config.ParseAll(argc, argv);
std::unique_ptr<FairMQDevice> device(getDevice(config));
if (!device)
{
LOG(ERROR) << "getDevice(): no valid device provided. Exiting.";
return 1;
}
int result = runStateMachine(*device, config);
if (result > 0)