view src/auth/auth-master-connection.h @ 2736:0f31778d3c34 HEAD

Changed dovecot-auth protocol to ASCII based. Should be easier now to write replacement server if needed by someone. Also cleaned up/made more consistent auth code. The new code could still use some cleaning though..
author Timo Sirainen <tss@iki.fi>
date Wed, 13 Oct 2004 19:38:32 +0300
parents 43b82a35888d
children 150f8151c971
line wrap: on
line source

#ifndef __AUTH_MASTER_CONNECTION_H
#define __AUTH_MASTER_CONNECTION_H

struct auth_master_connection {
	unsigned int pid;
	int refcount;

	int fd;
	struct istream *input;
	struct ostream *output;
	struct io *io;
	buffer_t *listeners_buf;

	struct auth_client_connection *clients;
	struct timeout *to_clients;

	unsigned int destroyed:1;
};

#define AUTH_MASTER_IS_DUMMY(master) (master->fd == -1)

struct auth_master_connection *
auth_master_connection_create(int fd, unsigned int pid);
void auth_master_connection_send_handshake(struct auth_master_connection *conn);
void auth_master_connection_destroy(struct auth_master_connection *conn);

void auth_master_connection_add_listener(struct auth_master_connection *conn,
					 int fd, const char *path, int client);

#endif