code cleanup
This commit is contained in:
+3
-6
@@ -46,7 +46,7 @@ typedef struct {
|
||||
void *arg;
|
||||
union {
|
||||
struct {
|
||||
void * pcb;
|
||||
tcp_pcb * pcb;
|
||||
int8_t err;
|
||||
} connected;
|
||||
struct {
|
||||
@@ -895,13 +895,10 @@ void AsyncClient::_free_closed_slot(){
|
||||
* Private Callbacks
|
||||
* */
|
||||
|
||||
int8_t AsyncClient::_connected(void* pcb, int8_t err){
|
||||
int8_t AsyncClient::_connected(tcp_pcb* pcb, int8_t err){
|
||||
_pcb = reinterpret_cast<tcp_pcb*>(pcb);
|
||||
if(_pcb){
|
||||
_rx_last_packet = millis();
|
||||
// tcp_recv(_pcb, &_tcp_recv);
|
||||
// tcp_sent(_pcb, &_tcp_sent);
|
||||
// tcp_poll(_pcb, &_tcp_poll, 1);
|
||||
}
|
||||
if(_connect_cb) {
|
||||
_connect_cb(_connect_cb_arg, this);
|
||||
@@ -1353,7 +1350,7 @@ void AsyncClient::_s_error(void * arg, int8_t err) {
|
||||
reinterpret_cast<AsyncClient*>(arg)->_error(err);
|
||||
}
|
||||
|
||||
int8_t AsyncClient::_s_connected(void * arg, void * pcb, int8_t err){
|
||||
int8_t AsyncClient::_s_connected(void * arg, struct tcp_pcb * pcb, int8_t err){
|
||||
return reinterpret_cast<AsyncClient*>(arg)->_connected(pcb, err);
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -182,7 +182,7 @@ class AsyncClient {
|
||||
static int8_t _s_lwip_fin(void *arg, struct tcp_pcb *tpcb, int8_t err);
|
||||
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 int8_t _s_connected(void* arg, struct tcp_pcb *tpcb, int8_t err);
|
||||
static void _s_dns_found(const char *name, struct ip_addr *ipaddr, void *arg);
|
||||
|
||||
int8_t _recv(tcp_pcb* pcb, pbuf* pb, int8_t err);
|
||||
@@ -223,7 +223,7 @@ class AsyncClient {
|
||||
int8_t _close();
|
||||
void _free_closed_slot();
|
||||
void _allocate_closed_slot();
|
||||
int8_t _connected(void* pcb, int8_t err);
|
||||
int8_t _connected(tcp_pcb* pcb, int8_t err);
|
||||
void _error(int8_t err);
|
||||
int8_t _poll(tcp_pcb* pcb);
|
||||
int8_t _sent(tcp_pcb* pcb, uint16_t len);
|
||||
|
||||
Reference in New Issue
Block a user