#ifndef SOCKET_H
#define SOCKET_H
#define SOCKMAXSOCKETNAMELEN 255
#define SOCKMAXLINELENGTH 255
extern "C"
{
#include <sys/socket.h>
#include <sys/types.h>
#include <netinet/in.h>
#include <netdb.h>
#include <unistd.h>
#include <string.h>
#include <stdio.h>
}
#include <iostream>
#include <string>
class tSocket{
private:
std::string sHostName;
int iPort;
int iConnected;
int iSockHandle;
sockaddr_in aHostAddr;
public:
tSocket(std::string aInHost, int aPort);
~tSocket();
void closeConnection();
int createSocket();
int connectSocket();
int isConnected();
char readChar();
void writeLine(char* astr);
};
#endif //SOCKET_H