Skip to content

Commit

Permalink
use ip_set_option for bit setting
Browse files Browse the repository at this point in the history
  • Loading branch information
MisterHW committed Nov 9, 2021
1 parent 81ce32e commit 984174f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions examples/test-LwIP-netconn/scpi_server.c
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ static int processIoListen(user_data_t * user_data) {
} else {
/* connection established */
iprintf("***Connection established %s\r\n", inet_ntoa(newconn->pcb.ip->remote_ip));
newconn->pcb.tcp->so_options |= SOF_KEEPALIVE;
ip_set_option(newconn->pcb.tcp, SOF_KEEPALIVE);
newconn->pcb.tcp->keep_idle = SCPI_KEEP_IDLE; // Override TCP_KEEPIDLE_DEFAULT for this connection.
newconn->pcb.tcp->keep_intvl = SCPI_KEEP_INTVL; // Override TCP_KEEPINTVL_DEFAULT for this connection.
newconn->pcb.tcp->keep_cnt = SCPI_KEEP_CNT; // Override TCP_KEEPCNT_DEFAULT for this connection.
Expand All @@ -274,7 +274,7 @@ static int processSrqIoListen(user_data_t * user_data) {
} else {
/* control connection established */
iprintf("***Control Connection established %s\r\n", inet_ntoa(newconn->pcb.ip->remote_ip));
newconn->pcb.tcp->so_options |= SOF_KEEPALIVE;
ip_set_option(newconn->pcb.tcp, SOF_KEEPALIVE);
newconn->pcb.tcp->keep_idle = SCPI_KEEP_IDLE; // Override TCP_KEEPIDLE_DEFAULT for this connection.
newconn->pcb.tcp->keep_intvl = SCPI_KEEP_INTVL; // Override TCP_KEEPINTVL_DEFAULT for this connection.
newconn->pcb.tcp->keep_cnt = SCPI_KEEP_CNT; // Override TCP_KEEPCNT_DEFAULT for this connection.
Expand Down

0 comments on commit 984174f

Please sign in to comment.