#ifndef _udpSocket_h_
#define _udpSocket_h_

#include <netinet/in.h>

class udpSocket
	{
	public:
	 udpSocket(int port);
	 void setDestination(char *host,int port);
	 void setBlocking(int block);
	 void send(unsigned char *buffer,int size);
	 int receive(unsigned char *buffer,int size);
	 void reply(unsigned char *buffer,int size);
         inline int socketFD(void) const { return socket_; }
	private:
	 int port_;
	 struct sockaddr_in destAddr_;
	 struct sockaddr_in lastFromAddr_;
	 int socket_;
	};

#endif
