Library driver for the u-blox SARA-N200 NB-IoT modem

Dependents:   sara-n200-hello-mqtt-sn

udp_interface.h

Committer:
KeystoneElectronic
Date:
2018-08-22
Revision:
2:9b9276791c59
Parent:
1:34946e5c54a2

File content as of revision 2:9b9276791c59:

/*
 * udp_interface.h
 *
 *  Created on: Aug 15, 2018
 *      Author: janus
 */

#ifndef SRC_UDP_INTERFACE_H_
#define SRC_UDP_INTERFACE_H_
#include <stdint.h>

class UDPinterface
{
public:
	UDPinterface(){};
	virtual ~UDPinterface(){};

	virtual int connect(char *hostname, int port) = 0;
	virtual bool disconnect(int id) = 0;

	virtual int read(int sock_id, char *host, int *port, uint8_t *buff, int len, int timeout) = 0;
	virtual int write(int sock_id, char *host, int port, uint8_t *buff, int len, int timeout) = 0;
};



#endif /* SRC_UDP_INTERFACE_H_ */