27 lines
511 B
C++
27 lines
511 B
C++
|
|
#ifndef DISTRIB_H
|
|
#define DISTRIB_H DISTRIB_H
|
|
|
|
#include <string>
|
|
#include <vector>
|
|
|
|
class distrib
|
|
{
|
|
public:
|
|
int readHostFile(const char * filename);
|
|
int startServer();
|
|
int startClient(const char * server, int port);
|
|
|
|
protected:
|
|
int connect();
|
|
int connect(const std::string & host);
|
|
|
|
std::vector<std::string> m_hosts;
|
|
std::vector<int> m_children;
|
|
std::string m_servername;
|
|
int m_serverport;
|
|
int m_listen_socket;
|
|
};
|
|
|
|
#endif
|