c9d685897f9e7f0d5e27c00d4b03281d6049ccd1Timo Sirainen /* These are used to spread client-visible disconnects over longer
c9d685897f9e7f0d5e27c00d4b03281d6049ccd1Timo Sirainen periods of time to avoid reconnect spikes when a server dies.
c9d685897f9e7f0d5e27c00d4b03281d6049ccd1Timo Sirainen If num_disconnects_since_ts=0 when server disconnects us, it's
c9d685897f9e7f0d5e27c00d4b03281d6049ccd1Timo Sirainen increased and disconnect_timestamp is updated. Afterwards it's
c9d685897f9e7f0d5e27c00d4b03281d6049ccd1Timo Sirainen increased for each new disconnection. num_disconnects_since_ts gets
c9d685897f9e7f0d5e27c00d4b03281d6049ccd1Timo Sirainen reset back to zero whenever a) last_success gets updated or b)
c9d685897f9e7f0d5e27c00d4b03281d6049ccd1Timo Sirainen num_delayed_client_disconnects drops to 0. */
6a438f1cb934e221fc3af4e172d609d19c7aab30Timo Sirainen /* these are tracking connect()s, not necessarily logins: */
c9d685897f9e7f0d5e27c00d4b03281d6049ccd1Timo Sirainen /* number of connections we're proxying now (post-login) */
6303191abcb37164f435ccdc56e9dbddf1288851Timo Sirainenstruct login_proxy_state *login_proxy_state_init(const char *notify_path);
088cb24027234024aff2c1ce5b6870c5a308a44bTimo Sirainenvoid login_proxy_state_deinit(struct login_proxy_state **state);
088cb24027234024aff2c1ce5b6870c5a308a44bTimo Sirainenlogin_proxy_state_get(struct login_proxy_state *state,
6303191abcb37164f435ccdc56e9dbddf1288851Timo Sirainenvoid login_proxy_state_notify(struct login_proxy_state *state,
6303191abcb37164f435ccdc56e9dbddf1288851Timo Sirainen const char *user);