9 #ifndef CPPSERVER_NANOMSG_REQUEST_CLIENT_H 10 #define CPPSERVER_NANOMSG_REQUEST_CLIENT_H 52 explicit RequestClient(
const std::string& address,
bool threading =
false)
71 if (
Send(buffer, size) == size)
94 #endif // CPPSERVER_NANOMSG_REQUEST_CLIENT_H RequestClient(const std::string &address, bool threading=false)
Initialize client with a given endpoint address.
size_t Receive(Message &message)
Receive a message from the server.
Message Request(const void *buffer, size_t size)
Request data to the server.
size_t size() const noexcept
Get the message size.
Message Request(const std::string &text)
Request a text string to the server.
C++ Server project definitions.
size_t Send(const void *buffer, size_t size)
Send data to the server.
Message Request(const Message &message)
Request a message to the server.
virtual ~RequestClient()=default
uint8_t * buffer() noexcept
Get the message buffer.
Protocol
Nanomsg protocol.
Nanomsg client definition.
Standard full-blown socket.
RequestClient & operator=(const RequestClient &)=delete