Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

set keep-alive defaults for new connections #128

Merged
merged 3 commits into from
Nov 9, 2021

Commits on Nov 6, 2021

  1. set keep-alive defaults for new connections

    Configure scpi-specific keep-alive settings for new connections. Without these, a connection lost on the client side blocks the server baiscally indefinitely, requiring a reset or some means to recover via another port or interface.
    
    scpi server connection timeout is chosen such that when idle, zero window probes are sent periodically, and the connection is closed when they fail SCPI_KEEP_CNT times.
    
    also requires (lwipopts.h):
    set #define LWIP_TCP_KEEPALIVE 1
    
    main.c:
    add #include "tcp_priv.h"
    call tcp_tmr(); every 250 ms (e.g. via xTimerCreate(), xTimerStart() in callback).
    
    To change the defaults for all connections, add these values (lwipopts.h):
    
    #define  TCP_KEEPIDLE_DEFAULT   15000UL /* Default KEEPALIVE timer in milliseconds */
    #define  TCP_KEEPINTVL_DEFAULT   5000UL /* Default Time between KEEPALIVE probes in milliseconds */
    #define  TCP_KEEPCNT_DEFAULT        3U  /* Default Counter for KEEPALIVE probes */
    MisterHW committed Nov 6, 2021
    Configuration menu
    Copy the full SHA
    81ce32e View commit details
    Browse the repository at this point in the history

Commits on Nov 9, 2021

  1. Configuration menu
    Copy the full SHA
    984174f View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    42841c3 View commit details
    Browse the repository at this point in the history