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

#include <server.h>

Public Member Functions

 Server (mesh::NodeIdent, int group_sz)
 
int start ()
 Start server on well know port. Accepts connection from all the clients. Store socket ids in recv_socks_ map.
 
int recv_buf (const std::string &src, void *buf, size_t len)
 Receives data from the source.
 
int shutdown ()
 close each connection connected to client on all the workers.
 

Constructor & Destructor Documentation

◆ Server()

mesh::Server::Server ( mesh::NodeIdent  ,
int  group_sz 
)

Member Function Documentation

◆ recv_buf()

int mesh::Server::recv_buf ( const std::string &  src,
void *  buf,
size_t  len 
)

Receives data from the source.

Parameters
srcSource worker to receive data from.
bufPointer to buffer to receive at.
lenSize of the buffer.
Returns
Return 0 if success, -1 if fails.

◆ shutdown()

int mesh::Server::shutdown ( )

close each connection connected to client on all the workers.

Returns
Return 0 on success, -1 otherwise

◆ start()

int mesh::Server::start ( )

Start server on well know port. Accepts connection from all the clients. Store socket ids in recv_socks_ map.

Returns
Return 0 on success, -1 otherwise.

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