mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-06 07:49:52 +03:00
Merge branch 'dev' of https://github.com/emsesp/EMS-ESP32 into dev2
This commit is contained in:
@@ -85,7 +85,7 @@ typedef struct {
|
||||
} lwip_event_packet_t;
|
||||
|
||||
static QueueHandle_t _async_queue;
|
||||
static TaskHandle_t _async_service_task_handle = NULL;
|
||||
static TaskHandle_t _async_service_task_handle = NULL;
|
||||
|
||||
|
||||
SemaphoreHandle_t _slots_lock;
|
||||
@@ -1084,13 +1084,13 @@ bool AsyncClient::getNoDelay() {
|
||||
return tcp_nagle_disabled(_pcb);
|
||||
}
|
||||
|
||||
void AsyncClient::setKeepAlive(uint32_t ms, uint8_t cnt){
|
||||
if(ms!=0) {
|
||||
void AsyncClient::setKeepAlive(uint32_t ms, uint8_t cnt) {
|
||||
if (ms != 0) {
|
||||
_pcb->so_options |= SOF_KEEPALIVE; //Turn on TCP Keepalive for the given pcb
|
||||
// Set the time between keepalive messages in milli-seconds
|
||||
_pcb->keep_idle = ms;
|
||||
_pcb->keep_idle = ms;
|
||||
_pcb->keep_intvl = ms;
|
||||
_pcb->keep_cnt = cnt; //The number of unanswered probes required to force closure of the socket
|
||||
_pcb->keep_cnt = cnt; //The number of unanswered probes required to force closure of the socket
|
||||
} else {
|
||||
_pcb->so_options &= ~SOF_KEEPALIVE; //Turn off TCP Keepalive for the given pcb
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user