Add changes to make compile succeed with the latest IDF

This commit is contained in:
me-no-dev
2018-09-06 23:42:16 +02:00
parent 5453ec2e3f
commit 6fab7724ab
2 changed files with 70 additions and 31 deletions
+5 -5
View File
@@ -43,7 +43,7 @@ typedef std::function<void(void*, AsyncClient*, struct pbuf *pb)> AcPacketHandle
typedef std::function<void(void*, AsyncClient*, uint32_t time)> AcTimeoutHandler;
struct tcp_pcb;
struct _ip_addr;
struct ip_addr;
class AsyncClient {
protected:
@@ -81,7 +81,7 @@ class AsyncClient {
void _error(int8_t err);
int8_t _poll(tcp_pcb* pcb);
int8_t _sent(tcp_pcb* pcb, uint16_t len);
void _dns_found(struct _ip_addr *ipaddr);
void _dns_found(struct ip_addr *ipaddr);
public:
@@ -108,13 +108,13 @@ class AsyncClient {
bool canSend();//ack is not pending
size_t space();
size_t add(const char* data, size_t size, uint8_t apiflags=0);//add for sending
size_t add(const char* data, size_t size, uint8_t apiflags=ASYNC_WRITE_FLAG_COPY);//add for sending
bool send();//send all data added with the method above
size_t ack(size_t len); //ack data that you have not acked using the method below
void ackLater(){ _ack_pcb = false; } //will not ack the current packet. Call from onData
size_t write(const char* data);
size_t write(const char* data, size_t size, uint8_t apiflags=0); //only when canSend() == true
size_t write(const char* data, size_t size, uint8_t apiflags=ASYNC_WRITE_FLAG_COPY); //only when canSend() == true
uint8_t state();
bool connecting();
@@ -161,7 +161,7 @@ class AsyncClient {
static void _s_error(void *arg, int8_t err);
static int8_t _s_sent(void *arg, struct tcp_pcb *tpcb, uint16_t len);
static int8_t _s_connected(void* arg, void* tpcb, int8_t err);
static void _s_dns_found(const char *name, struct _ip_addr *ipaddr, void *arg);
static void _s_dns_found(const char *name, struct ip_addr *ipaddr, void *arg);
bool _in_lwip_thread;
};