
#ifndef _UDP_CLIENT_CLASS_
#define _UDP_CLIENT_CLASS_

#define MAX_BUF 1024

#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <netdb.h>
#include <iostream>

class udpClientClass{

  public:

  udpClientClass(char* server_name, int port_number);

  void sendString(char* string);
  // send a string to the server

  int recvString(char* string);
  // recv a string from the server

  void closeSocket();

 private:

  int sockd;
  int lbajt;
  struct sockaddr_in my_name, serv_name;
  struct hostent *he;  //added to support get host by name
  //char buf[MAX_BUF];
  int status;
  socklen_t addrlen;

};


#endif

