view src/login-common/login-proxy.h @ 4538:9d9e72374164 HEAD

Fixes to login process handling, especially with login_process_per_connection=no. Removed login_max_logging_users setting since it was somewhat weird in how it worked. Added login_max_connections to replace it with login_process_per_connection=no, and with =yes its functionality is now within login_max_processes_count.
author Timo Sirainen <tss@iki.fi>
date Sun, 06 Aug 2006 23:05:32 +0300
parents e624a9ad6a30
children 204d7edc7cdc
line wrap: on
line source

#ifndef __LOGIN_PROXY_H
#define __LOGIN_PROXY_H

struct login_proxy;

/* Called when new input comes from proxy. */
typedef void proxy_callback_t(struct istream *input, struct ostream *output,
			      void *context);

/* Create a proxy to given host. Returns NULL if failed. Given callback is
   called when new input is available from proxy. */
struct login_proxy *
login_proxy_new(struct client *client, const char *host, unsigned int port,
		proxy_callback_t *callback, void *context);
/* Free the proxy. This should be called if authentication fails. */
void login_proxy_free(struct login_proxy *proxy);

/* Detach proxy from client. This is done after the authentication is
   successful and all that is left is the dummy proxying. */
void login_proxy_detach(struct login_proxy *proxy, struct istream *client_input,
			struct ostream *client_output);

/* Return number of active detached login proxies */
unsigned int login_proxy_get_count(void);

void login_proxy_deinit(void);

#endif