Dice / Network / Sockets / server.hpp
server.hpp
Raw

#ifndef server_hpp
#define server_hpp
#include <iostream>
#include <vector>
#include <stdio.h>
#include <unistd.h>
#include <stdlib.h>
#include <cstring>
#include <winsock.h>
#include <Ws2tcpip.h>

namespace HDE
{
class server
{
private:
int sock;
int connection;
struct sockaddr_in address;// address of the server

public:
 server(int domain, int service, int protocol, u_long IP);

  virtual int establish_net_link(int sock, struct sockaddr_in address) = 0; 
    void test_connection (int);
    struct sockaddr_in get_address();
    int get_sock();
    int get_connection();
    void set_connection (int);
};
   
}


#endif