Skip to content
Base_Receiver.h 530 B
Newer Older
Valerio Pastore's avatar
Valerio Pastore committed
/*
 *
 *  Created on: Mar 1, 2021
 *      Author: astrisw
 *
 */

#pragma once
Valerio Pastore's avatar
Valerio Pastore committed

#include <netinet/in.h>
Valerio Pastore's avatar
Valerio Pastore committed
#include <Base_Packet.h>
Valerio Pastore's avatar
Valerio Pastore committed

namespace inaf::oasbo::Receivers{
Valerio Pastore's avatar
Valerio Pastore committed

class BaseReceiver{
Valerio Pastore's avatar
Valerio Pastore committed
protected:
	std::string host;
public:

	virtual std::string getHost() = 0;
	virtual void setHost(std::string host) = 0;
Valerio Pastore's avatar
Valerio Pastore committed

Valerio Pastore's avatar
Valerio Pastore committed
	virtual int connectToClient()=0;
	virtual int closeConnectionToClient()=0;
	virtual bool isConnectedToClient() const =0;
	virtual int receiveFromClient(PacketLib::BasePacket &) = 0;
	virtual ~BaseReceiver() = default;
Valerio Pastore's avatar
Valerio Pastore committed
};