#ifndef CLIENT_SERVER_H
#define CLIENT_SERVER_H
#include <windows.h>
#include <winsock.h>
#include "big.h"

class Client_Server
{
  
	
protected:
		WSADATA wsaData;//struct used for starting up ws2_32.dll
		struct sockaddr_in my_addr;//used to store info about connection.
		struct sockaddr_in their_addr; // connector's address information
		int sockfd; //This holds the int number of our network connection.
		int new_fd;
		int global_socket;
//This variable has the functionality that if it is a client I will put the value of
//sockfd in it. But if it is a server I will put the new socket number returned from connect
//in it. this is to enable call to send_data and recv_data with out additional parameters.

		bool is_server;//used for destructor.
		int len;//length of buffer char array.
		char *data_received;
	
public: 
		Client_Server();//Constructor for server
		virtual ~Client_Server();//Virtual Destructor
		virtual bool isServer();//true virtual used to determine the actions taken in the destructor.
		virtual bool send_data(char []);
		virtual bool recv_data();//Returns true if no error receiving data.
		virtual char * getRecvData();//returns the data received from the recv method.

};
#endif