/*++ /* NAME /* auto_clnt 3 /* SUMMARY /* client endpoint maintenance /* SYNOPSIS /* #include <auto_clnt.h> /* /* typedef void (*AUTO_CLNT_HANDSHAKE_FN)(VSTREAM *); /* /* AUTO_CLNT *auto_clnt_create(service, timeout, max_idle, max_ttl) /* const char *service; /* int timeout; /* int max_idle; /* int max_ttl; /* /* VSTREAM *auto_clnt_access(auto_clnt) /* AUTO_CLNT *auto_clnt; /* /* void auto_clnt_recover(auto_clnt) /* AUTO_CLNT *auto_clnt; /* /* const char *auto_clnt_name(auto_clnt) /* AUTO_CLNT *auto_clnt; /* /* void auto_clnt_free(auto_clnt) /* AUTO_CLNT *auto_clnt; /* /* void auto_clnt_control(auto_clnt, name, value, ... AUTO_CLNT_CTL_END) /* AUTO_CLNT *auto_clnt; /* int name; /* DESCRIPTION /* This module maintains IPC client endpoints that automatically /* disconnect after a being idle for a configurable amount of time, /* that disconnect after a configurable time to live, /* and that transparently handle most server-initiated disconnects. /* /* This module tries each operation only a limited number of /* times and then reports an error. This is unlike the /* clnt_stream(3) module which will retry forever, so that /* the application never experiences an error. /* /* auto_clnt_create() instantiates a client endpoint. /* /* auto_clnt_access() returns an open stream to the service specified /* to auto_clnt_create(). The stream instance may change between calls. /* The result is a null pointer in case of failure. /* /* auto_clnt_recover() recovers from a server-initiated disconnect /* that happened in the middle of an I/O operation. /* /* auto_clnt_name() returns the name of the specified client endpoint. /* /* auto_clnt_free() destroys of the specified client endpoint. /* /* auto_clnt_control() allows the user to fine tune the behavior of /* the specified client. The arguments are a list of (name, value) /* terminated with AUTO_CLNT_CTL_END. /* The following lists the names and the types of the corresponding /* value arguments. /* .IP "AUTO_CLNT_CTL_HANDSHAKE(VSTREAM *)" /* A pointer to function that will be called at the start of a /* new connection, and that returns 0 in case of success. /* .PP /* Arguments: /* .IP service /* The service argument specifies "transport:servername" where /* transport is currently limited to one of the following: /* .RS /* .IP inet /* servername has the form "inet:host:port". /* .IP local /* servername has the form "local:private/servicename" or /* "local:public/servicename". This is the preferred way to /* specify Postfix daemons that are configured as "unix" in /* master.cf. /* .IP unix /* servername has the form "unix:private/servicename" or /* "unix:public/servicename". This does not work on Solaris, /* where Postfix uses STREAMS instead of UNIX-domain sockets. /* .RE /* .IP timeout /* The time limit for sending, receiving, or for connecting /* to a server. Specify a value <=0 to disable the time limit. /* .IP max_idle /* Idle time after which the client disconnects. Specify 0 to /* disable the limit. /* .IP max_ttl /* Upper bound on the time that a connection is allowed to persist. /* Specify 0 to disable the limit. /* .IP open_action /* Application call-back routine that opens a stream or returns a /* null pointer upon failure. In case of success, the call-back routine /* is expected to set the stream pathname to the server endpoint name. /* .IP context /* Application context that is passed to the open_action routine. /* .IP handshake /* A null pointer, or a pointer to function that will be called /* at the start of a new connection and that returns 0 in case /* of success. /* DIAGNOSTICS /* Warnings: communication failure. Fatal error: out of memory. /* LICENSE /* .ad /* .fi /* The Secure Mailer license must be distributed with this software. /* AUTHOR(S) /* Wietse Venema /* IBM T.J. Watson Research /* P.O. Box 704 /* Yorktown Heights, NY 10598, USA /* /* Wietse Venema /* Google, Inc. /* 111 8th Avenue /* New York, NY 10011, USA
/*--*/
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.