#ifndef LOGIN_PROXY_STATE_H
#define LOGIN_PROXY_STATE_H
struct login_proxy_record {
/* These are used to spread client-visible disconnects over longer
periods of time to avoid reconnect spikes when a server dies.
If num_disconnects_since_ts=0 when server disconnects us, it's
increased and disconnect_timestamp is updated. Afterwards it's
increased for each new disconnection. num_disconnects_since_ts gets
reset back to zero whenever a) last_success gets updated or b)
num_delayed_client_disconnects drops to 0. */
unsigned int num_disconnects_since_ts;
unsigned int num_delayed_client_disconnects;
/* these are tracking connect()s, not necessarily logins: */
unsigned int num_waiting_connections;
/* number of connections we're proxying now (post-login) */
unsigned int num_proxying_connections;
};
struct login_proxy_record *
const char *user);
#endif