IBM SYSTEMG G RUNTIME & NATIVE STORE
0.5
IBM Native Graph Computing and Storage System based on IBM Parallel Programming Library
|
socket_server class More...
#include <socket_server.hpp>
Public Member Functions | |
socket_server_type (int p) | |
Declare a socket server with port P; the server is not running after, unless open() method is invoked. | |
socket_server_type () | |
Declare a socket server with default port; the server is not running, unless open() method is invoked. | |
void | set_port (int p) |
set/update the port of the socket before open a socket | |
void | open () |
Initialize the socket server. | |
void | close () |
Close the socket and release the resources. | |
void | recv (std::string &s) |
Receive a messages from the socket and store it into s. | |
void | send (const std::string &s) |
Send a message from s to the socket. | |
Protected Attributes | |
char * | msg |
int | port |
size_t | bufsz |
int | temp_sock_desc |
int | sock_desc |
struct sockaddr_in | client |
socklen_t | len |
socket_server class