Realm
A distributed, event-based tasking library
Loading...
Searching...
No Matches
mesh::Client Class Reference

#include <client.h>

Public Member Functions

 Client (const mesh::NodeIdent &self, const std::unordered_map< std::string, mesh::NodeIdent > &servers)
 
int start ()
 Connects to all the servers on all the workers and saves the Socket ids in send_socks_ map.
 
int send_buf (const std::string &dst, void *buf, size_t len)
 sends data to the destination.
 
int shutdown ()
 close connections to all servers on all the workers.
 

Constructor & Destructor Documentation

◆ Client()

mesh::Client::Client ( const mesh::NodeIdent self,
const std::unordered_map< std::string, mesh::NodeIdent > &  servers 
)

Member Function Documentation

◆ send_buf()

int mesh::Client::send_buf ( const std::string &  dst,
void *  buf,
size_t  len 
)

sends data to the destination.

Parameters
dstDestination worker to send data to.
bufPointer to buffer to send data from.
lenSize of the buffer.
Returns
Return 0 on success, -1 otherwise.

◆ shutdown()

int mesh::Client::shutdown ( )

close connections to all servers on all the workers.

Returns
Return 0 on success, -1 otherwise

◆ start()

int mesh::Client::start ( )

Connects to all the servers on all the workers and saves the Socket ids in send_socks_ map.

Returns
Return 0 on success, -1 otherwise.

The documentation for this class was generated from the following file: