Program Listing for File async_pair.h
↰ Return to documentation for file (src/o3ds/async_pair.h
)
#ifndef O3DS_ASYNC_PAIR
#define O3DS_ASYNC_PAIR
#include <nng/nng.h>
#include <nng/protocol/pair1/pair.h>
#include "nng_connector.h"
#include <string>
namespace O3DS
{
class AsyncPair : public AsyncNngConnector
{
public:
void callback_()
{
AsyncNngConnector::asyncReadMsg();
}
static void callback(void *ref)
{
((AsyncPair*)ref)->callback_();
}
void Callback_();
};
class AsyncPairClient : public AsyncPair
{
public:
bool start(const char* url) override;
};
class AsyncPairServer : public AsyncPair
{
public:
bool start(const char* url) override;
};
}
#endif