|
TorchCraftAI
A bot for machine learning research on StarCraft: Brood War
|
Publisher for ZeroMQ PUB-SUB pattern. More...
#include <blobpubsub.h>
Public Types | |
| enum | DataFlags { None = 0, HasData = 1 << 0, NewData = 1 << 1 } |
Public Member Functions | |
| BlobPublisher (std::string endpoint=std::string(), std::shared_ptr< zmq::context_t > context=nullptr) | |
| ~BlobPublisher () | |
| std::string | endpoint () const |
| void | publish (void const *data, size_t len, int64_t tag) |
| void | publish (std::vector< char > &&data, int64_t tag) |
Publisher for ZeroMQ PUB-SUB pattern.
This server will publish binary blobs at endpoint(). The last published blob will be cached and re-published if new subscribers are joining.
Published data consists of both a tag and binary data. The tag can be used to disambiguiate blobs on the subscriber side but does not affect transport.
| cpid::BlobPublisher::BlobPublisher | ( | std::string | endpoint = std::string(), |
| std::shared_ptr< zmq::context_t > | context = nullptr |
||
| ) |
| cpid::BlobPublisher::~BlobPublisher | ( | ) |
| std::string cpid::BlobPublisher::endpoint | ( | ) | const |
| void cpid::BlobPublisher::publish | ( | void const * | data, |
| size_t | len, | ||
| int64_t | tag | ||
| ) |
| void cpid::BlobPublisher::publish | ( | std::vector< char > && | data, |
| int64_t | tag | ||
| ) |
1.8.11