<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN" "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd" [
<!ENTITY version SYSTEM "version.xml">
]>
<refentry id="milter-manager-Client-library">
<refmeta>
<refentrytitle role="top_of_page" id="milter-manager-Client-library.top_of_page">クライアントライブラリ</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo>milter managerライブラリ</refmiscinfo>
</refmeta>
<refnamediv>
<refname>クライアントライブラリ</refname>
<refpurpose>milterを実装するためのクライアントライブラリ。</refpurpose>
</refnamediv>

<refsect1 id="milter-manager-Client-library.functions" role="functions_proto">
<title role="functions_proto.title">Functions</title>
<informaltable pgwide="1" frame="none">
<tgroup cols="2">
<colspec colname="functions_return" colwidth="150px"/>
<colspec colname="functions_name"/>
<tbody>
<row><entry role="define_keyword">#define</entry><entry role="function_name"><link linkend="MILTER-CLIENT-ERROR:CAPS">MILTER_CLIENT_ERROR</link></entry></row>
<row><entry role="function_type"><link linkend="GQuark"><returnvalue>GQuark</returnvalue></link>
</entry><entry role="function_name"><link linkend="milter-client-error-quark">milter_client_error_quark</link> <phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="MilterClient"><returnvalue>MilterClient</returnvalue></link> *
</entry><entry role="function_name"><link linkend="milter-client-new">milter_client_new</link> <phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="gchar"><returnvalue>gchar</returnvalue></link> *
</entry><entry role="function_name"><link linkend="milter-client-get-default-connection-spec">milter_client_get_default_connection_spec</link> <phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>
</entry><entry role="function_name"><link linkend="milter-client-set-connection-spec">milter_client_set_connection_spec</link> <phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="GIOChannel"><returnvalue>GIOChannel</returnvalue></link> *
</entry><entry role="function_name"><link linkend="milter-client-get-listen-channel">milter_client_get_listen_channel</link> <phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><link linkend="milter-client-set-listen-channel">milter_client_set_listen_channel</link> <phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><link linkend="milter-client-set-listen-backlog">milter_client_set_listen_backlog</link> <phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>
</entry><entry role="function_name"><link linkend="milter-client-is-remove-unix-socket-on-create">milter_client_is_remove_unix_socket_on_create</link> <phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><link linkend="milter-client-set-remove-unix-socket-on-create">milter_client_set_remove_unix_socket_on_create</link> <phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><link linkend="milter-client-set-timeout">milter_client_set_timeout</link> <phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="guint"><returnvalue>guint</returnvalue></link>
</entry><entry role="function_name"><link linkend="milter-client-get-unix-socket-mode">milter_client_get_unix_socket_mode</link> <phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="guint"><returnvalue>guint</returnvalue></link>
</entry><entry role="function_name"><link linkend="milter-client-get-default-unix-socket-mode">milter_client_get_default_unix_socket_mode</link> <phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><link linkend="milter-client-set-default-unix-socket-mode">milter_client_set_default_unix_socket_mode</link> <phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type">const <link linkend="gchar"><returnvalue>gchar</returnvalue></link> *
</entry><entry role="function_name"><link linkend="milter-client-get-unix-socket-group">milter_client_get_unix_socket_group</link> <phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type">const <link linkend="gchar"><returnvalue>gchar</returnvalue></link> *
</entry><entry role="function_name"><link linkend="milter-client-get-default-unix-socket-group">milter_client_get_default_unix_socket_group</link> <phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><link linkend="milter-client-set-default-unix-socket-group">milter_client_set_default_unix_socket_group</link> <phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>
</entry><entry role="function_name"><link linkend="milter-client-is-remove-unix-socket-on-close">milter_client_is_remove_unix_socket_on_close</link> <phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>
</entry><entry role="function_name"><link linkend="milter-client-get-default-remove-unix-socket-on-close">milter_client_get_default_remove_unix_socket_on_close</link> <phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><link linkend="milter-client-set-default-remove-unix-socket-on-close">milter_client_set_default_remove_unix_socket_on_close</link> <phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>
</entry><entry role="function_name"><link linkend="milter-client-main">milter_client_main</link> <phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><link linkend="milter-client-shutdown">milter_client_shutdown</link> <phrase role="c_punctuation">()</phrase></entry></row>

</tbody>
</tgroup>
</informaltable>
</refsect1>
<refsect1 id="milter-manager-Client-library.properties" role="properties">
<title role="properties.title">プロパティ</title>
<informaltable frame="none">
<tgroup cols="3">
<colspec colname="properties_type" colwidth="150px"/>
<colspec colname="properties_name" colwidth="300px"/>
<colspec colname="properties_flags" colwidth="200px"/>
<tbody>
<row><entry role="property_type"><link linkend="gchar"><type>gchar</type></link> *</entry><entry role="property_name"><link linkend="MilterClient--connection-spec">connection-spec</link></entry><entry role="property_flags">Read</entry></row>
<row><entry role="property_type"><link linkend="gpointer"><type>gpointer</type></link></entry><entry role="property_name"><link linkend="MilterClient--custom-fork">custom-fork</link></entry><entry role="property_flags">Read / Write</entry></row>
<row><entry role="property_type"><link linkend="guint"><type>guint</type></link></entry><entry role="property_name"><link linkend="MilterClient--default-packet-buffer-size">default-packet-buffer-size</link></entry><entry role="property_flags">Read / Write</entry></row>
<row><entry role="property_type"><link linkend="MilterEventLoop"><type>MilterEventLoop</type></link> *</entry><entry role="property_name"><link linkend="MilterClient--event-loop">event-loop</link></entry><entry role="property_flags">Read</entry></row>
<row><entry role="property_type"><link linkend="MilterClientEventLoopBackend"><type>MilterClientEventLoopBackend</type></link></entry><entry role="property_name"><link linkend="MilterClient--event-loop-backend">event-loop-backend</link></entry><entry role="property_flags">Read / Write</entry></row>
<row><entry role="property_type"><link linkend="guint"><type>guint</type></link></entry><entry role="property_name"><link linkend="MilterClient--maintenance-interval">maintenance-interval</link></entry><entry role="property_flags">Read / Write</entry></row>
<row><entry role="property_type"><link linkend="guint"><type>guint</type></link></entry><entry role="property_name"><link linkend="MilterClient--max-pending-finished-sessions">max-pending-finished-sessions</link></entry><entry role="property_flags">Read / Write</entry></row>
<row><entry role="property_type"><link linkend="guint"><type>guint</type></link></entry><entry role="property_name"><link linkend="MilterClient--n-workers">n-workers</link></entry><entry role="property_flags">Read / Write</entry></row>
<row><entry role="property_type"><link linkend="gchar"><type>gchar</type></link> *</entry><entry role="property_name"><link linkend="MilterClient--pid-file">pid-file</link></entry><entry role="property_flags">Read / Write</entry></row>
<row><entry role="property_type"><link linkend="gboolean"><type>gboolean</type></link></entry><entry role="property_name"><link linkend="MilterClient--remove-pid-file-on-exit">remove-pid-file-on-exit</link></entry><entry role="property_flags">Read / Write</entry></row>
<row><entry role="property_type"><link linkend="gchar"><type>gchar</type></link> *</entry><entry role="property_name"><link linkend="MilterClient--run-as-daemon">run-as-daemon</link></entry><entry role="property_flags">Read / Write</entry></row>
<row><entry role="property_type"><link linkend="gboolean"><type>gboolean</type></link></entry><entry role="property_name"><link linkend="MilterClient--start-syslog">start-syslog</link></entry><entry role="property_flags">Write</entry></row>
<row><entry role="property_type"><link linkend="gchar"><type>gchar</type></link> *</entry><entry role="property_name"><link linkend="MilterClient--syslog-facility">syslog-facility</link></entry><entry role="property_flags">Read / Write</entry></row>
<row><entry role="property_type"><link linkend="gchar"><type>gchar</type></link> *</entry><entry role="property_name"><link linkend="MilterClient--syslog-identify">syslog-identify</link></entry><entry role="property_flags">Read / Write</entry></row>
<row><entry role="property_type"><link linkend="guint"><type>guint</type></link></entry><entry role="property_name"><link linkend="MilterClient--worker-id">worker-id</link></entry><entry role="property_flags">Read</entry></row>

</tbody>
</tgroup>
</informaltable>
</refsect1>
<refsect1 id="milter-manager-Client-library.signals" role="signal_proto">
<title role="signal_proto.title">シグナル</title>
<informaltable frame="none">
<tgroup cols="3">
<colspec colname="signals_return" colwidth="150px"/>
<colspec colname="signals_name" colwidth="300px"/>
<colspec colname="signals_flags" colwidth="200px"/>
<tbody>
<row><entry role="signal_type"><link linkend="void"><returnvalue>void</returnvalue></link></entry><entry role="signal_name"><link linkend="MilterClient-connection-established">connection-established</link></entry><entry role="signal_flags"><link linkend="G-SIGNAL-RUN-LAST:CAPS">Run Last</link></entry></row>
<row><entry role="signal_type"><link linkend="void"><returnvalue>void</returnvalue></link></entry><entry role="signal_name"><link linkend="MilterClient-event-loop-created">event-loop-created</link></entry><entry role="signal_flags"><link linkend="G-SIGNAL-RUN-LAST:CAPS">Run Last</link></entry></row>
<row><entry role="signal_type"><link linkend="void"><returnvalue>void</returnvalue></link></entry><entry role="signal_name"><link linkend="MilterClient-listen-started">listen-started</link></entry><entry role="signal_flags"><link linkend="G-SIGNAL-RUN-LAST:CAPS">Run Last</link></entry></row>
<row><entry role="signal_type"><link linkend="void"><returnvalue>void</returnvalue></link></entry><entry role="signal_name"><link linkend="MilterClient-maintain">maintain</link></entry><entry role="signal_flags"><link linkend="G-SIGNAL-RUN-LAST:CAPS">Run Last</link></entry></row>
<row><entry role="signal_type"><link linkend="void"><returnvalue>void</returnvalue></link></entry><entry role="signal_name"><link linkend="MilterClient-sessions-finished">sessions-finished</link></entry><entry role="signal_flags"><link linkend="G-SIGNAL-RUN-LAST:CAPS">Run Last</link></entry></row>
<row><entry role="signal_type"><link linkend="void"><returnvalue>void</returnvalue></link></entry><entry role="signal_name"><link linkend="MilterClient-worker-created">worker-created</link></entry><entry role="signal_flags"><link linkend="G-SIGNAL-RUN-LAST:CAPS">Run Last</link></entry></row>
<row><entry role="signal_type"><link linkend="void"><returnvalue>void</returnvalue></link></entry><entry role="signal_name"><link linkend="MilterClient-workers-created">workers-created</link></entry><entry role="signal_flags"><link linkend="G-SIGNAL-RUN-LAST:CAPS">Run Last</link></entry></row>

</tbody>
</tgroup>
</informaltable>
</refsect1>
<anchor id="MilterClient"/><refsect1 id="milter-manager-Client-library.other" role="other_proto">
<title role="other_proto.title">Types and Values</title>
<informaltable role="enum_members_table" pgwide="1" frame="none">
<tgroup cols="2">
<colspec colname="name" colwidth="150px"/>
<colspec colname="description"/>
<tbody>
<row><entry role="datatype_keyword">enum</entry><entry role="function_name"><link linkend="MilterClientError">MilterClientError</link></entry></row>
<row><entry role="datatype_keyword"/><entry role="function_name"><link linkend="MilterClient-struct">MilterClient</link></entry></row>

</tbody>
</tgroup>
</informaltable>
</refsect1>
<refsect1 id="milter-manager-Client-library.object-hierarchy" role="object_hierarchy">
<title role="object_hierarchy.title">オブジェクト階層</title>
<screen>    <link linkend="GObject">GObject</link>
    <phrase role="lineart">╰──</phrase> MilterClient
</screen>
</refsect1>
<refsect1 id="milter-manager-Client-library.implemented-interfaces" role="impl_interfaces">
<title role="impl_interfaces.title">実装されたインターフェイス</title>
<para>MilterClientは<link linkend="MilterErrorEmittable">MilterErrorEmittable</link>を実装しています。</para>

</refsect1>


<refsect1 id="milter-manager-Client-library.description" role="desc">
<title role="desc.title">説明</title>
<para>milter-clientライブラリはクライアント側のすべてのmilterプロトコルを処理する機能を提供します。「クライアント側」というのは「milter側」ということで、「MTA側」ではありません。</para>
<para>milter-clientライブラリでの主要なクラスは<link linkend="MilterClient"><literal>MilterClient</literal></link>と<link linkend="MilterClientContext"><literal>MilterClientContext</literal></link>です。<link linkend="MilterClient"><literal>MilterClient</literal></link>はMTAからの複数の接続を受け付け、各接続は<link linkend="MilterClientContext"><literal>MilterClientContext</literal></link>が処理します。</para>
<rd>
== Usage overview

You need to set connection spec and connect
<link linkend="MilterClient-connection-established"><type>“connection-established”</type></link> signal before
entering mail loop.

Connection spec is a entry point of <link linkend="MilterClient"><literal>MilterClient</literal></link> for
MTA.  It has 'PROTOCOL:INFORMATION' format. For IPv4
socket, 'inet:PORT', 'inet:PORT&commat;HOST' or
'inet:PORT&commat;[ADDRESS]' are valid formats. For IPv6
socket, 'inet6:PORT', 'inet6:PORT&commat;HOST' or
'inet6:PORT&commat;[ADDRESS]' are valid formats. For UNIX
domain socket, 'unix:PATH' is a valid format.

<link linkend="MilterClient"><literal>MilterClient</literal></link> emits <link linkend="MilterClient-connection-established"><type>“connection-established”</type></link>
signal. <link linkend="MilterClientContext"><literal>MilterClientContext</literal></link> setup should be done in the
signal. In many cases, you just connect callbacks to
the passed <link linkend="MilterClientContext"><literal>MilterClientContext</literal></link>. See <link linkend="MilterClientContext"><literal>MilterClientContext</literal></link>
for available signals.

<link linkend="milter-client-run"><function>milter_client_run()</function></link> is running main loop function. You
can enter into main loop after you finish to prepare your
<link linkend="MilterClient"><literal>MilterClient</literal></link>.

Here is an example codes that uses the milter-client
library. See also tool/milter-test-client.c. It is an
example milter implementation using the milter-client
library.

<informalexample><programlisting><![CDATA[
#include <stdlib.h>
#include <milter/client.h>

static void
cb_connection_established (MilterClient *client,
                           MilterClientContext *context,
                           gpointer user_data)
{
   connect_to_your_interesting_signals(client, context, user_data);
}

int
main (int argc, char **argv)
{
    gboolean success;
    const gchar spec[] = "inet:10025@localhost";
    MilterClient *client;
    GError *error = NULL;

    milter_init();
    milter_client_init();

    client = milter_client_new();
    if (!milter_client_set_connection_spec(client, spec, &error)) {
        g_print("%s\n", error->message);
        g_error_free(error);
        return EXIT_FAILURE;
    }
    g_signal_connect(client, "connection-established",
                     G_CALLBACK(cb_connection_established), NULL);
    milter_client_run(client);

    milter_client_quit();
    milter_quit();

    return success ? EXIT_SUCCESS : EXIT_FAILURE;
}
]]></programlisting></informalexample>

== Processing model

The libmilter provided by Sendmail uses a thread for each
connection model. But the milter-client library doesn't
use it. The milter-client library uses two threads. One
thread is for <link linkend="MilterClient"><literal>MilterClient</literal></link> and other thread is for
<link linkend="MilterClientContext"><literal>MilterClientContext</literal></link>s. <link linkend="MilterClient"><literal>MilterClient</literal></link> just
accepting connections from MTA and dispatches it in the
first thread. Each connection is associated with
<link linkend="MilterClientContext"><literal>MilterClientContext</literal></link> and they are processed in the second
thread. The milter-client library's model is the same
model of memcached. (memcached uses libevent as its event
loop backend but the milter-client library uses GLib's
<link linkend="GMainLoop"><literal>GMainLoop</literal></link> for it.)

The libmilter's model will have more cost to accept a
connection rather than the milter-client library's
model. Because the libmilter's model creates a thread but
the milter-client library just allocate
<link linkend="MilterClientContext"><literal>MilterClientContext</literal></link>. But in many case, this difference
is not bottleneck. :-|</rd>

</refsect1>
<refsect1 id="milter-manager-Client-library.functions_details" role="details">
<title role="details.title">Functions</title>
<refsect2 id="MILTER-CLIENT-ERROR:CAPS" role="macro">
<title>MILTER_CLIENT_ERROR</title>
<indexterm zone="MILTER-CLIENT-ERROR:CAPS"><primary>MILTER_CLIENT_ERROR</primary></indexterm>
<programlisting language="C">#define MILTER_CLIENT_ERROR           (milter_client_error_quark())
</programlisting>
<para><link linkend="MilterClient"><type>MilterClient</type></link>のエラー用の<link linkend="GError"><type>GError</type></link>クォークを取得するために使われます。</para>
</refsect2>
<refsect2 id="milter-client-error-quark" role="function">
<title>milter_client_error_quark ()</title>
<indexterm zone="milter-client-error-quark"><primary>milter_client_error_quark</primary></indexterm>
<programlisting language="C"><link linkend="GQuark"><returnvalue>GQuark</returnvalue></link>
milter_client_error_quark (<parameter><type>void</type></parameter>);</programlisting>
<para>
</para>
<refsect3 role="returns">
<title>Returns</title>

<para/>
</refsect3></refsect2>
<refsect2 id="milter-client-new" role="function">
<title>milter_client_new ()</title>
<indexterm zone="milter-client-new"><primary>milter_client_new</primary></indexterm>
<programlisting language="C"><link linkend="MilterClient"><returnvalue>MilterClient</returnvalue></link> *
milter_client_new (<parameter><type>void</type></parameter>);</programlisting>
<para>新しいクライアントを生成します。</para>
<refsect3 role="returns">
<title>Returns</title>
<para>新しい<link linkend="MilterClient"><literal>MilterClient</literal></link>オブジェクト。</para>
<para/>
</refsect3></refsect2>
<refsect2 id="milter-client-get-default-connection-spec" role="function">
<title>milter_client_get_default_connection_spec ()</title>
<indexterm zone="milter-client-get-default-connection-spec"><primary>milter_client_get_default_connection_spec</primary></indexterm>
<programlisting language="C"><link linkend="gchar"><returnvalue>gchar</returnvalue></link> *
milter_client_get_default_connection_spec
                               (<parameter><link linkend="MilterClient"><type>MilterClient</type></link> *client</parameter>);</programlisting>
<para>既定の接続指定を取得します。必要がなくなったら、既定の接続指定を開放してください。</para>
<refsect3 role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>client</para></entry>
<entry role="parameter_description"><para><link linkend="MilterClient"><literal>MilterClient</literal></link>。</para></entry>
<entry role="parameter_annotations"/></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 role="returns">
<title>Returns</title>
<para>既定の接続指定のコピー。</para>
<para/>
</refsect3></refsect2>
<refsect2 id="milter-client-set-connection-spec" role="function">
<title>milter_client_set_connection_spec ()</title>
<indexterm zone="milter-client-set-connection-spec"><primary>milter_client_set_connection_spec</primary></indexterm>
<programlisting language="C"><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>
milter_client_set_connection_spec (<parameter><link linkend="MilterClient"><type>MilterClient</type></link> *client</parameter>,
                                   <parameter>const <link linkend="gchar"><type>gchar</type></link> *spec</parameter>,
                                   <parameter><link linkend="GError"><type>GError</type></link> **error</parameter>);</programlisting>
<para>Sets a connection specification. If <parameter>spec</parameter>
 is invalid
format and <parameter>error</parameter>
 is not <link linkend="NULL:CAPS"><literal>NULL</literal></link>, error detail is stored
into <parameter>error</parameter>
.</para>
<refsect3 role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>client</para></entry>
<entry role="parameter_description"><para><link linkend="MilterClient"><literal>MilterClient</literal></link>。</para></entry>
<entry role="parameter_annotations"/></row>
<row><entry role="parameter_name"><para>spec</para></entry>
<entry role="parameter_description"><para>inet:10025のような接続指定。</para></entry>
<entry role="parameter_annotations"/></row>
<row><entry role="parameter_name"><para>error</para></entry>
<entry role="parameter_description"><para>エラーを受け取る場所のアドレス、または<link linkend="NULL:CAPS"><literal>NULL</literal></link>。</para></entry>
<entry role="parameter_annotations"/></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 role="returns">
<title>Returns</title>
<para>成功時は<link linkend="TRUE:CAPS"><literal>TRUE</literal></link>。</para>
<para/>
</refsect3></refsect2>
<refsect2 id="milter-client-get-listen-channel" role="function">
<title>milter_client_get_listen_channel ()</title>
<indexterm zone="milter-client-get-listen-channel"><primary>milter_client_get_listen_channel</primary></indexterm>
<programlisting language="C"><link linkend="GIOChannel"><returnvalue>GIOChannel</returnvalue></link> *
milter_client_get_listen_channel (<parameter><link linkend="MilterClient"><type>MilterClient</type></link> *client</parameter>);</programlisting>
<para>接続待ち用のチャンネルを取得します。</para>
<refsect3 role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>client</para></entry>
<entry role="parameter_description"><para><link linkend="MilterClient"><literal>MilterClient</literal></link>。</para></entry>
<entry role="parameter_annotations"/></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 role="returns">
<title>Returns</title>
<para>接続待ち用チャンネル。</para>
<para/>
</refsect3></refsect2>
<refsect2 id="milter-client-set-listen-channel" role="function">
<title>milter_client_set_listen_channel ()</title>
<indexterm zone="milter-client-set-listen-channel"><primary>milter_client_set_listen_channel</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
milter_client_set_listen_channel (<parameter><link linkend="MilterClient"><type>MilterClient</type></link> *client</parameter>,
                                  <parameter><link linkend="GIOChannel"><type>GIOChannel</type></link> *channel</parameter>);</programlisting>
<para>接続待ち用チャンネルを設定します。</para>
<refsect3 role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>client</para></entry>
<entry role="parameter_description"><para><link linkend="MilterClient"><literal>MilterClient</literal></link>。</para></entry>
<entry role="parameter_annotations"/></row>
<row><entry role="parameter_name"><para>channel</para></entry>
<entry role="parameter_description"><para>接続待ち用のチャンネル。</para></entry>
<entry role="parameter_annotations"/></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="milter-client-set-listen-backlog" role="function">
<title>milter_client_set_listen_backlog ()</title>
<indexterm zone="milter-client-set-listen-backlog"><primary>milter_client_set_listen_backlog</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
milter_client_set_listen_backlog (<parameter><link linkend="MilterClient"><type>MilterClient</type></link> *client</parameter>,
                                  <parameter><link linkend="gint"><type>gint</type></link> backlog</parameter>);</programlisting>
<para>listen(2)用のバックログを設定します。</para>
<refsect3 role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>client</para></entry>
<entry role="parameter_description"><para><link linkend="MilterClient"><literal>MilterClient</literal></link>。</para></entry>
<entry role="parameter_annotations"/></row>
<row><entry role="parameter_name"><para>backlog</para></entry>
<entry role="parameter_description"><para>listen(2)用のバックログ。</para></entry>
<entry role="parameter_annotations"/></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="milter-client-is-remove-unix-socket-on-create" role="function">
<title>milter_client_is_remove_unix_socket_on_create ()</title>
<indexterm zone="milter-client-is-remove-unix-socket-on-create"><primary>milter_client_is_remove_unix_socket_on_create</primary></indexterm>
<programlisting language="C"><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>
milter_client_is_remove_unix_socket_on_create
                               (<parameter><link linkend="MilterClient"><type>MilterClient</type></link> *client</parameter>);</programlisting>
<para>新しいUNIXドメインソケットを作成する前に既存のUNIXドメインソケットを削除するかどうかを取得します。</para>
<refsect3 role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>client</para></entry>
<entry role="parameter_description"><para><link linkend="MilterClient"><literal>MilterClient</literal></link>。</para></entry>
<entry role="parameter_annotations"/></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 role="returns">
<title>Returns</title>
<para>作成時に既存のUNIXドメインソケットを削除する場合は<link linkend="TRUE:CAPS"><literal>TRUE</literal></link>、そうでない場合は<link linkend="FALSE:CAPS"><literal>FALSE</literal></link>。</para>
<para/>
</refsect3></refsect2>
<refsect2 id="milter-client-set-remove-unix-socket-on-create" role="function">
<title>milter_client_set_remove_unix_socket_on_create ()</title>
<indexterm zone="milter-client-set-remove-unix-socket-on-create"><primary>milter_client_set_remove_unix_socket_on_create</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
milter_client_set_remove_unix_socket_on_create
                               (<parameter><link linkend="MilterClient"><type>MilterClient</type></link> *client</parameter>,
                                <parameter><link linkend="gboolean"><type>gboolean</type></link> remove</parameter>);</programlisting>
<para>新しいUNIXドメインソケットを作成する前に既存のUNIXドメインソケットを削除するかどうかを設定します。</para>
<refsect3 role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>client</para></entry>
<entry role="parameter_description"><para><link linkend="MilterClient"><literal>MilterClient</literal></link>。</para></entry>
<entry role="parameter_annotations"/></row>
<row><entry role="parameter_name"><para>remove</para></entry>
<entry role="parameter_description"><para>新しいUNIXドメインソケットを作成する前に既存のUNIXドメインソケットを削除するなら<link linkend="TRUE:CAPS"><literal>TRUE</literal></link>。</para></entry>
<entry role="parameter_annotations"/></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="milter-client-set-timeout" role="function">
<title>milter_client_set_timeout ()</title>
<indexterm zone="milter-client-set-timeout"><primary>milter_client_set_timeout</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
milter_client_set_timeout (<parameter><link linkend="MilterClient"><type>MilterClient</type></link> *client</parameter>,
                           <parameter><link linkend="guint"><type>guint</type></link> timeout</parameter>);</programlisting>
<para>接続が確立した<link linkend="MilterClientContext"><literal>MilterClientContext</literal></link>に設定するタイムアウト値を設定します。</para>
<refsect3 role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>client</para></entry>
<entry role="parameter_description"><para><link linkend="MilterClient"><literal>MilterClient</literal></link>。</para></entry>
<entry role="parameter_annotations"/></row>
<row><entry role="parameter_name"><para>timeout</para></entry>
<entry role="parameter_description"><para>秒単位でのタイムアウト。</para></entry>
<entry role="parameter_annotations"/></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="milter-client-get-unix-socket-mode" role="function">
<title>milter_client_get_unix_socket_mode ()</title>
<indexterm zone="milter-client-get-unix-socket-mode"><primary>milter_client_get_unix_socket_mode</primary></indexterm>
<programlisting language="C"><link linkend="guint"><returnvalue>guint</returnvalue></link>
milter_client_get_unix_socket_mode (<parameter><link linkend="MilterClient"><type>MilterClient</type></link> *client</parameter>);</programlisting>
<para>UNIXドメインソケットのモードを取得します。</para>
<refsect3 role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>client</para></entry>
<entry role="parameter_description"><para><link linkend="MilterClient"><literal>MilterClient</literal></link>。</para></entry>
<entry role="parameter_annotations"/></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 role="returns">
<title>Returns</title>
<para>UNIXドメインソケットのモード。</para>
<para/>
</refsect3></refsect2>
<refsect2 id="milter-client-get-default-unix-socket-mode" role="function">
<title>milter_client_get_default_unix_socket_mode ()</title>
<indexterm zone="milter-client-get-default-unix-socket-mode"><primary>milter_client_get_default_unix_socket_mode</primary></indexterm>
<programlisting language="C"><link linkend="guint"><returnvalue>guint</returnvalue></link>
milter_client_get_default_unix_socket_mode
                               (<parameter><link linkend="MilterClient"><type>MilterClient</type></link> *client</parameter>);</programlisting>
<para>既定のUNIXドメインソケットのモードを取得します。</para>
<refsect3 role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>client</para></entry>
<entry role="parameter_description"><para><link linkend="MilterClient"><literal>MilterClient</literal></link>。</para></entry>
<entry role="parameter_annotations"/></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 role="returns">
<title>Returns</title>
<para>既定のUNIXドメインソケットのモード。</para>
<para/>
</refsect3></refsect2>
<refsect2 id="milter-client-set-default-unix-socket-mode" role="function">
<title>milter_client_set_default_unix_socket_mode ()</title>
<indexterm zone="milter-client-set-default-unix-socket-mode"><primary>milter_client_set_default_unix_socket_mode</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
milter_client_set_default_unix_socket_mode
                               (<parameter><link linkend="MilterClient"><type>MilterClient</type></link> *client</parameter>,
                                <parameter><link linkend="guint"><type>guint</type></link> mode</parameter>);</programlisting>
<para>既定のUNIXドメインソケットモードを設定します。</para>
<refsect3 role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>client</para></entry>
<entry role="parameter_description"><para><link linkend="MilterClient"><literal>MilterClient</literal></link>。</para></entry>
<entry role="parameter_annotations"/></row>
<row><entry role="parameter_name"><para>mode</para></entry>
<entry role="parameter_description"><para>UNIXドメインソケットのモード。</para></entry>
<entry role="parameter_annotations"/></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="milter-client-get-unix-socket-group" role="function">
<title>milter_client_get_unix_socket_group ()</title>
<indexterm zone="milter-client-get-unix-socket-group"><primary>milter_client_get_unix_socket_group</primary></indexterm>
<programlisting language="C">const <link linkend="gchar"><returnvalue>gchar</returnvalue></link> *
milter_client_get_unix_socket_group (<parameter><link linkend="MilterClient"><type>MilterClient</type></link> *client</parameter>);</programlisting>
<para>UNIXドメインソケットのグループを設定します。</para>
<refsect3 role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>client</para></entry>
<entry role="parameter_description"><para><link linkend="MilterClient"><literal>MilterClient</literal></link>。</para></entry>
<entry role="parameter_annotations"/></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 role="returns">
<title>Returns</title>
<para>UNIXドメインソケットのグループ名。</para>
<para/>
</refsect3></refsect2>
<refsect2 id="milter-client-get-default-unix-socket-group" role="function">
<title>milter_client_get_default_unix_socket_group ()</title>
<indexterm zone="milter-client-get-default-unix-socket-group"><primary>milter_client_get_default_unix_socket_group</primary></indexterm>
<programlisting language="C">const <link linkend="gchar"><returnvalue>gchar</returnvalue></link> *
milter_client_get_default_unix_socket_group
                               (<parameter><link linkend="MilterClient"><type>MilterClient</type></link> *client</parameter>);</programlisting>
<para>既定のUNIXドメインソケットグループを取得します。</para>
<refsect3 role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>client</para></entry>
<entry role="parameter_description"><para><link linkend="MilterClient"><literal>MilterClient</literal></link>。</para></entry>
<entry role="parameter_annotations"/></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 role="returns">
<title>Returns</title>
<para>既定のUNIXドメインソケットグループ名。</para>
<para/>
</refsect3></refsect2>
<refsect2 id="milter-client-set-default-unix-socket-group" role="function">
<title>milter_client_set_default_unix_socket_group ()</title>
<indexterm zone="milter-client-set-default-unix-socket-group"><primary>milter_client_set_default_unix_socket_group</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
milter_client_set_default_unix_socket_group
                               (<parameter><link linkend="MilterClient"><type>MilterClient</type></link> *client</parameter>,
                                <parameter>const <link linkend="gchar"><type>gchar</type></link> *group</parameter>);</programlisting>
<para>既定のUNIXドメインソケットグループを設定します。</para>
<refsect3 role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>client</para></entry>
<entry role="parameter_description"><para><link linkend="MilterClient"><literal>MilterClient</literal></link>。</para></entry>
<entry role="parameter_annotations"/></row>
<row><entry role="parameter_name"><para>group</para></entry>
<entry role="parameter_description"><para>グループ名。</para></entry>
<entry role="parameter_annotations"/></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="milter-client-is-remove-unix-socket-on-close" role="function">
<title>milter_client_is_remove_unix_socket_on_close ()</title>
<indexterm zone="milter-client-is-remove-unix-socket-on-close"><primary>milter_client_is_remove_unix_socket_on_close</primary></indexterm>
<programlisting language="C"><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>
milter_client_is_remove_unix_socket_on_close
                               (<parameter><link linkend="MilterClient"><type>MilterClient</type></link> *client</parameter>);</programlisting>
<para>UNIXドメインソケットを閉じた後に削除するかどうかを取得します。</para>
<refsect3 role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>client</para></entry>
<entry role="parameter_description"><para><link linkend="MilterClient"><literal>MilterClient</literal></link>。</para></entry>
<entry role="parameter_annotations"/></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 role="returns">
<title>Returns</title>
<para>UNIXドメインソケットを閉じたときに削除するなら<link linkend="TRUE:CAPS"><literal>TRUE</literal></link>、そうでなければ<link linkend="FALSE:CAPS"><literal>FALSE</literal></link>。</para>
<para/>
</refsect3></refsect2>
<refsect2 id="milter-client-get-default-remove-unix-socket-on-close" role="function">
<title>milter_client_get_default_remove_unix_socket_on_close ()</title>
<indexterm zone="milter-client-get-default-remove-unix-socket-on-close"><primary>milter_client_get_default_remove_unix_socket_on_close</primary></indexterm>
<programlisting language="C"><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>
milter_client_get_default_remove_unix_socket_on_close
                               (<parameter><link linkend="MilterClient"><type>MilterClient</type></link> *client</parameter>);</programlisting>
<para>ソケットを閉じた後にUNIXドメインソケットを削除するかどうかの既定の値を取得します。</para>
<refsect3 role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>client</para></entry>
<entry role="parameter_description"><para><link linkend="MilterClient"><literal>MilterClient</literal></link>。</para></entry>
<entry role="parameter_annotations"/></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 role="returns">
<title>Returns</title>
<para>UNIXドメインソケットを閉じたときに削除するなら<link linkend="TRUE:CAPS"><literal>TRUE</literal></link>、そうでなければ<link linkend="FALSE:CAPS"><literal>FALSE</literal></link>。</para>
<para/>
</refsect3></refsect2>
<refsect2 id="milter-client-set-default-remove-unix-socket-on-close" role="function">
<title>milter_client_set_default_remove_unix_socket_on_close ()</title>
<indexterm zone="milter-client-set-default-remove-unix-socket-on-close"><primary>milter_client_set_default_remove_unix_socket_on_close</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
milter_client_set_default_remove_unix_socket_on_close
                               (<parameter><link linkend="MilterClient"><type>MilterClient</type></link> *client</parameter>,
                                <parameter><link linkend="gboolean"><type>gboolean</type></link> remove</parameter>);</programlisting>
<para>ソケットを閉じた後にUNIXドメインソケットを削除するかどうかの既定の値を取得します。</para>
<refsect3 role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>client</para></entry>
<entry role="parameter_description"><para><link linkend="MilterClient"><literal>MilterClient</literal></link>。</para></entry>
<entry role="parameter_annotations"/></row>
<row><entry role="parameter_name"><para>remove</para></entry>
<entry role="parameter_description"><para>ソケットを閉じた後にUNIXドメインソケットを削除するなら<link linkend="TRUE:CAPS"><literal>TRUE</literal></link>。</para></entry>
<entry role="parameter_annotations"/></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="milter-client-main" role="function" condition="deprecated:1.6.2: Use milter_client_run() instead.">
<title>milter_client_main ()</title>
<indexterm zone="milter-client-main" role="deprecated"><primary>milter_client_main</primary></indexterm>
<programlisting language="C"><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>
milter_client_main (<parameter><link linkend="MilterClient"><type>MilterClient</type></link> *client</parameter>);</programlisting>
<warning><para><literal>milter_client_main</literal> has been deprecated since version 1.6.2 and should not be used in newly-written code.</para> <para>Use <link linkend="milter-client-run"><function>milter_client_run()</function></link> instead.</para>
</warning>
<para>メインループを実行します。</para>
<refsect3 role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>client</para></entry>
<entry role="parameter_description"><para><link linkend="MilterClient"><literal>MilterClient</literal></link>。</para></entry>
<entry role="parameter_annotations"/></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 role="returns">
<title>Returns</title>
<para> <link linkend="TRUE:CAPS"><literal>TRUE</literal></link> if main loop is quitted successfully,
<link linkend="FALSE:CAPS"><literal>FALSE</literal></link> otherwise.</para>
<para/>
</refsect3></refsect2>
<refsect2 id="milter-client-shutdown" role="function">
<title>milter_client_shutdown ()</title>
<indexterm zone="milter-client-shutdown"><primary>milter_client_shutdown</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
milter_client_shutdown (<parameter><link linkend="MilterClient"><type>MilterClient</type></link> *client</parameter>);</programlisting>
<para>メインループを終了します。</para>
<refsect3 role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>client</para></entry>
<entry role="parameter_description"><para><link linkend="MilterClient"><literal>MilterClient</literal></link>。</para></entry>
<entry role="parameter_annotations"/></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>

</refsect1>
<refsect1 id="milter-manager-Client-library.other_details" role="details">
<title role="details.title">Types and Values</title>
<refsect2 id="MilterClientError" role="enum">
<title>enum MilterClientError</title>
<indexterm zone="MilterClientError"><primary>MilterClientError</primary></indexterm>
<para><link linkend="MilterClient"><literal>MilterClient</literal></link>の関数呼び出し中に発生するエラーを識別します。</para>
<refsect3 role="enum_members">
<title>Members</title>
<informaltable role="enum_members_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="enum_members_name" colwidth="300px"/>
<colspec colname="enum_members_description"/>
<colspec colname="enum_members_annotations" colwidth="200px"/>
<tbody>
<row role="constant"><entry role="enum_member_name"><para id="MILTER-CLIENT-ERROR-RUNNING:CAPS">MILTER_CLIENT_ERROR_RUNNING</para></entry>
<entry role="enum_member_description"><para>メインループがすでに回っていることを示します。</para>
</entry>
<entry role="enum_member_annotations"/>
</row>
<row role="constant"><entry role="enum_member_name"><para id="MILTER-CLIENT-ERROR-UNIX-SOCKET:CAPS">MILTER_CLIENT_ERROR_UNIX_SOCKET</para></entry>
<entry role="enum_member_description"><para>UNIXドメインソケット関連のエラーであることを示します。</para>
</entry>
<entry role="enum_member_annotations"/>
</row>
<row role="constant"><entry role="enum_member_name"><para id="MILTER-CLIENT-ERROR-IO-ERROR:CAPS">MILTER_CLIENT_ERROR_IO_ERROR</para></entry>
<entry role="enum_member_description"><para>IO関連のエラーであることを示します。</para>
</entry>
<entry role="enum_member_annotations"/>
</row>
<row role="constant"><entry role="enum_member_name"><para id="MILTER-CLIENT-ERROR-THREAD:CAPS">MILTER_CLIENT_ERROR_THREAD</para></entry>
<entry role="enum_member_description"/>
<entry role="enum_member_annotations"/>
</row>
<row role="constant"><entry role="enum_member_name"><para id="MILTER-CLIENT-ERROR-PASSWORD-ENTRY:CAPS">MILTER_CLIENT_ERROR_PASSWORD_ENTRY</para></entry>
<entry role="enum_member_description"/>
<entry role="enum_member_annotations"/>
</row>
<row role="constant"><entry role="enum_member_name"><para id="MILTER-CLIENT-ERROR-GROUP-ENTRY:CAPS">MILTER_CLIENT_ERROR_GROUP_ENTRY</para></entry>
<entry role="enum_member_description"/>
<entry role="enum_member_annotations"/>
</row>
<row role="constant"><entry role="enum_member_name"><para id="MILTER-CLIENT-ERROR-DROP-PRIVILEGE:CAPS">MILTER_CLIENT_ERROR_DROP_PRIVILEGE</para></entry>
<entry role="enum_member_description"/>
<entry role="enum_member_annotations"/>
</row>
<row role="constant"><entry role="enum_member_name"><para id="MILTER-CLIENT-ERROR-DETACH-IO:CAPS">MILTER_CLIENT_ERROR_DETACH_IO</para></entry>
<entry role="enum_member_description"/>
<entry role="enum_member_annotations"/>
</row>
<row role="constant"><entry role="enum_member_name"><para id="MILTER-CLIENT-ERROR-DAEMONIZE:CAPS">MILTER_CLIENT_ERROR_DAEMONIZE</para></entry>
<entry role="enum_member_description"/>
<entry role="enum_member_annotations"/>
</row>
<row role="constant"><entry role="enum_member_name"><para id="MILTER-CLIENT-ERROR-NOT-LISTENED-YET:CAPS">MILTER_CLIENT_ERROR_NOT_LISTENED_YET</para></entry>
<entry role="enum_member_description"/>
<entry role="enum_member_annotations"/>
</row>
<row role="constant"><entry role="enum_member_name"><para id="MILTER-CLIENT-ERROR-PROCESS:CAPS">MILTER_CLIENT_ERROR_PROCESS</para></entry>
<entry role="enum_member_description"/>
<entry role="enum_member_annotations"/>
</row>
<row role="constant"><entry role="enum_member_name"><para id="MILTER-CLIENT-ERROR-PID-FILE:CAPS">MILTER_CLIENT_ERROR_PID_FILE</para></entry>
<entry role="enum_member_description"/>
<entry role="enum_member_annotations"/>
</row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="MilterClient-struct" role="struct">
<title>MilterClient</title>
<indexterm zone="MilterClient-struct"><primary>MilterClient</primary></indexterm>
<programlisting language="C">typedef struct _MilterClient MilterClient;</programlisting>
<para><link linkend="MilterClient"><literal>MilterClient</literal></link>は前面にでるオブジェクトです。このオブジェクトがMTAからの接続を受け付けて、各コンテキストに割り振ります。</para>
</refsect2>

</refsect1>
<refsect1 id="milter-manager-Client-library.property-details" role="property_details">
<title role="property_details.title">プロパティ詳細</title>
<refsect2 id="MilterClient--connection-spec" role="property"><title>The <literal>“connection-spec”</literal> property</title>
<indexterm zone="MilterClient--connection-spec"><primary>MilterClient:connection-spec</primary></indexterm>
<programlisting>  “connection-spec”          <link linkend="gchar"><type>gchar</type></link> *</programlisting>
<para>クライアントの接続指定。</para><para>Flags: Read</para>
<para>デフォルト値: NULL</para>
</refsect2>
<refsect2 id="MilterClient--custom-fork" role="property"><title>The <literal>“custom-fork”</literal> property</title>
<indexterm zone="MilterClient--custom-fork"><primary>MilterClient:custom-fork</primary></indexterm>
<programlisting>  “custom-fork”              <link linkend="gpointer"><type>gpointer</type></link></programlisting>
<para>The custom fork.</para><para>Flags: Read / Write</para>
</refsect2>
<refsect2 id="MilterClient--default-packet-buffer-size" role="property"><title>The <literal>“default-packet-buffer-size”</literal> property</title>
<indexterm zone="MilterClient--default-packet-buffer-size"><primary>MilterClient:default-packet-buffer-size</primary></indexterm>
<programlisting>  “default-packet-buffer-size” <link linkend="guint"><type>guint</type></link></programlisting>
<para>The default packet buffer size of each client context of the client.</para><para>Flags: Read / Write</para>
<para>デフォルト値: 0</para>
</refsect2>
<refsect2 id="MilterClient--event-loop" role="property"><title>The <literal>“event-loop”</literal> property</title>
<indexterm zone="MilterClient--event-loop"><primary>MilterClient:event-loop</primary></indexterm>
<programlisting>  “event-loop”               <link linkend="MilterEventLoop"><type>MilterEventLoop</type></link> *</programlisting>
<para>クライアントのイベントループ。</para><para>Flags: Read</para>
</refsect2>
<refsect2 id="MilterClient--event-loop-backend" role="property"><title>The <literal>“event-loop-backend”</literal> property</title>
<indexterm zone="MilterClient--event-loop-backend"><primary>MilterClient:event-loop-backend</primary></indexterm>
<programlisting>  “event-loop-backend”       <link linkend="MilterClientEventLoopBackend"><type>MilterClientEventLoopBackend</type></link></programlisting>
<para>クライアントのイベントループバックエンド。</para><para>Flags: Read / Write</para>
<para>Default value: MILTER_CLIENT_EVENT_LOOP_BACKEND_DEFAULT</para>
</refsect2>
<refsect2 id="MilterClient--maintenance-interval" role="property"><title>The <literal>“maintenance-interval”</literal> property</title>
<indexterm zone="MilterClient--maintenance-interval"><primary>MilterClient:maintenance-interval</primary></indexterm>
<programlisting>  “maintenance-interval”     <link linkend="guint"><type>guint</type></link></programlisting>
<para>Maintenance interval of the client. each 'maintenance-interval' sessions finished 'maintenance' signal is emitted. 0 means 'disabled'.</para><para>Flags: Read / Write</para>
<para>デフォルト値: 0</para>
</refsect2>
<refsect2 id="MilterClient--max-pending-finished-sessions" role="property"><title>The <literal>“max-pending-finished-sessions”</literal> property</title>
<indexterm zone="MilterClient--max-pending-finished-sessions"><primary>MilterClient:max-pending-finished-sessions</primary></indexterm>
<programlisting>  “max-pending-finished-sessions” <link linkend="guint"><type>guint</type></link></programlisting>
<para>The maximum number of pending finished sessions of the client.</para><para>Flags: Read / Write</para>
<para>デフォルト値: 0</para>
</refsect2>
<refsect2 id="MilterClient--n-workers" role="property"><title>The <literal>“n-workers”</literal> property</title>
<indexterm zone="MilterClient--n-workers"><primary>MilterClient:n-workers</primary></indexterm>
<programlisting>  “n-workers”                <link linkend="guint"><type>guint</type></link></programlisting>
<para>The Number of worker processes of the client.</para><para>Flags: Read / Write</para>
<para>Allowed values: &lt;= 1000</para>
<para>デフォルト値: 0</para>
</refsect2>
<refsect2 id="MilterClient--pid-file" role="property"><title>The <literal>“pid-file”</literal> property</title>
<indexterm zone="MilterClient--pid-file"><primary>MilterClient:pid-file</primary></indexterm>
<programlisting>  “pid-file”                 <link linkend="gchar"><type>gchar</type></link> *</programlisting>
<para>クライアントのPIDファイル。</para><para>Flags: Read / Write</para>
<para>デフォルト値: NULL</para>
</refsect2>
<refsect2 id="MilterClient--remove-pid-file-on-exit" role="property"><title>The <literal>“remove-pid-file-on-exit”</literal> property</title>
<indexterm zone="MilterClient--remove-pid-file-on-exit"><primary>MilterClient:remove-pid-file-on-exit</primary></indexterm>
<programlisting>  “remove-pid-file-on-exit”  <link linkend="gboolean"><type>gboolean</type></link></programlisting>
<para>Whether removing PID file of the client on exist.</para><para>Flags: Read / Write</para>
<para>デフォルト値: TRUE</para>
</refsect2>
<refsect2 id="MilterClient--run-as-daemon" role="property"><title>The <literal>“run-as-daemon”</literal> property</title>
<indexterm zone="MilterClient--run-as-daemon"><primary>MilterClient:run-as-daemon</primary></indexterm>
<programlisting>  “run-as-daemon”            <link linkend="gchar"><type>gchar</type></link> *</programlisting>
<para>Whether running the client as a daemon or not.</para><para>Flags: Read / Write</para>
<para>デフォルト値: NULL</para>
</refsect2>
<refsect2 id="MilterClient--start-syslog" role="property"><title>The <literal>“start-syslog”</literal> property</title>
<indexterm zone="MilterClient--start-syslog"><primary>MilterClient:start-syslog</primary></indexterm>
<programlisting>  “start-syslog”             <link linkend="gboolean"><type>gboolean</type></link></programlisting>
<para>Start syslog for the client.</para><para>Flags: Write</para>
<para>Default value: FALSE</para>
</refsect2>
<refsect2 id="MilterClient--syslog-facility" role="property"><title>The <literal>“syslog-facility”</literal> property</title>
<indexterm zone="MilterClient--syslog-facility"><primary>MilterClient:syslog-facility</primary></indexterm>
<programlisting>  “syslog-facility”          <link linkend="gchar"><type>gchar</type></link> *</programlisting>
<para>クライアントのsyslogファシリティ名。</para><para>Flags: Read / Write</para>
<para>デフォルト値: NULL</para>
</refsect2>
<refsect2 id="MilterClient--syslog-identify" role="property"><title>The <literal>“syslog-identify”</literal> property</title>
<indexterm zone="MilterClient--syslog-identify"><primary>MilterClient:syslog-identify</primary></indexterm>
<programlisting>  “syslog-identify”          <link linkend="gchar"><type>gchar</type></link> *</programlisting>
<para>Syslog identify of the client.</para><para>Flags: Read / Write</para>
<para>デフォルト値: NULL</para>
</refsect2>
<refsect2 id="MilterClient--worker-id" role="property"><title>The <literal>“worker-id”</literal> property</title>
<indexterm zone="MilterClient--worker-id"><primary>MilterClient:worker-id</primary></indexterm>
<programlisting>  “worker-id”                <link linkend="guint"><type>guint</type></link></programlisting>
<para>クライアントのワーカープロセスID。</para><para>Flags: Read</para>
<para>Allowed values: &lt;= 1000</para>
<para>デフォルト値: 0</para>
</refsect2>

</refsect1>
<refsect1 id="milter-manager-Client-library.signal-details" role="signals">
<title role="signals.title">シグナル詳細</title>
<refsect2 id="MilterClient-connection-established" role="signal"><title>The <literal>“connection-established”</literal> signal</title>
<indexterm zone="MilterClient-connection-established"><primary>MilterClient::connection-established</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
user_function (<link linkend="MilterClient"><type>MilterClient</type></link>        *milterclient,
               <link linkend="MilterClientContext"><type>MilterClientContext</type></link> *arg1,
               <link linkend="gpointer"><type>gpointer</type></link>             user_data)</programlisting>
<para>
</para>
<refsect3 role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>milterclient</para></entry>
<entry role="parameter_description"><para>the object which received the signal.</para></entry>
<entry role="parameter_annotations"/></row>
<row><entry role="parameter_name"><simpara>user_data</simpara></entry>
<entry role="parameter_description"><simpara>user data set when the signal handler was connected.</simpara></entry>
<entry role="parameter_annotations"/></row>
</tbody></tgroup></informaltable>
</refsect3><para>Flags: <link linkend="G-SIGNAL-RUN-LAST:CAPS">Run Last</link></para>
</refsect2><refsect2 id="MilterClient-event-loop-created" role="signal"><title>The <literal>“event-loop-created”</literal> signal</title>
<indexterm zone="MilterClient-event-loop-created"><primary>MilterClient::event-loop-created</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
user_function (<link linkend="MilterClient"><type>MilterClient</type></link>    *milterclient,
               <link linkend="MilterEventLoop"><type>MilterEventLoop</type></link> *arg1,
               <link linkend="gpointer"><type>gpointer</type></link>         user_data)</programlisting>
<para>
</para>
<refsect3 role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>milterclient</para></entry>
<entry role="parameter_description"><para>the object which received the signal.</para></entry>
<entry role="parameter_annotations"/></row>
<row><entry role="parameter_name"><simpara>user_data</simpara></entry>
<entry role="parameter_description"><simpara>user data set when the signal handler was connected.</simpara></entry>
<entry role="parameter_annotations"/></row>
</tbody></tgroup></informaltable>
</refsect3><para>Flags: <link linkend="G-SIGNAL-RUN-LAST:CAPS">Run Last</link></para>
</refsect2><refsect2 id="MilterClient-listen-started" role="signal"><title>The <literal>“listen-started”</literal> signal</title>
<indexterm zone="MilterClient-listen-started"><primary>MilterClient::listen-started</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
user_function (<link linkend="MilterClient"><type>MilterClient</type></link> *milterclient,
               <link linkend="gpointer"><type>gpointer</type></link>      arg1,
               <link linkend="guint"><type>guint</type></link>         arg2,
               <link linkend="gpointer"><type>gpointer</type></link>      user_data)</programlisting>
<para>
</para>
<refsect3 role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>milterclient</para></entry>
<entry role="parameter_description"><para>the object which received the signal.</para></entry>
<entry role="parameter_annotations"/></row>
<row><entry role="parameter_name"><simpara>user_data</simpara></entry>
<entry role="parameter_description"><simpara>user data set when the signal handler was connected.</simpara></entry>
<entry role="parameter_annotations"/></row>
</tbody></tgroup></informaltable>
</refsect3><para>Flags: <link linkend="G-SIGNAL-RUN-LAST:CAPS">Run Last</link></para>
</refsect2><refsect2 id="MilterClient-maintain" role="signal"><title>The <literal>“maintain”</literal> signal</title>
<indexterm zone="MilterClient-maintain"><primary>MilterClient::maintain</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
user_function (<link linkend="MilterClient"><type>MilterClient</type></link> *milterclient,
               <link linkend="gpointer"><type>gpointer</type></link>      user_data)</programlisting>
<para>
</para>
<refsect3 role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>milterclient</para></entry>
<entry role="parameter_description"><para>the object which received the signal.</para></entry>
<entry role="parameter_annotations"/></row>
<row><entry role="parameter_name"><simpara>user_data</simpara></entry>
<entry role="parameter_description"><simpara>user data set when the signal handler was connected.</simpara></entry>
<entry role="parameter_annotations"/></row>
</tbody></tgroup></informaltable>
</refsect3><para>Flags: <link linkend="G-SIGNAL-RUN-LAST:CAPS">Run Last</link></para>
</refsect2><refsect2 id="MilterClient-sessions-finished" role="signal"><title>The <literal>“sessions-finished”</literal> signal</title>
<indexterm zone="MilterClient-sessions-finished"><primary>MilterClient::sessions-finished</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
user_function (<link linkend="MilterClient"><type>MilterClient</type></link> *milterclient,
               <link linkend="guint"><type>guint</type></link>         arg1,
               <link linkend="gpointer"><type>gpointer</type></link>      user_data)</programlisting>
<para>
</para>
<refsect3 role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>milterclient</para></entry>
<entry role="parameter_description"><para>the object which received the signal.</para></entry>
<entry role="parameter_annotations"/></row>
<row><entry role="parameter_name"><simpara>user_data</simpara></entry>
<entry role="parameter_description"><simpara>user data set when the signal handler was connected.</simpara></entry>
<entry role="parameter_annotations"/></row>
</tbody></tgroup></informaltable>
</refsect3><para>Flags: <link linkend="G-SIGNAL-RUN-LAST:CAPS">Run Last</link></para>
</refsect2><refsect2 id="MilterClient-worker-created" role="signal"><title>The <literal>“worker-created”</literal> signal</title>
<indexterm zone="MilterClient-worker-created"><primary>MilterClient::worker-created</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
user_function (<link linkend="MilterClient"><type>MilterClient</type></link> *milterclient,
               <link linkend="gpointer"><type>gpointer</type></link>      user_data)</programlisting>
<para>
</para>
<refsect3 role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>milterclient</para></entry>
<entry role="parameter_description"><para>the object which received the signal.</para></entry>
<entry role="parameter_annotations"/></row>
<row><entry role="parameter_name"><simpara>user_data</simpara></entry>
<entry role="parameter_description"><simpara>user data set when the signal handler was connected.</simpara></entry>
<entry role="parameter_annotations"/></row>
</tbody></tgroup></informaltable>
</refsect3><para>Flags: <link linkend="G-SIGNAL-RUN-LAST:CAPS">Run Last</link></para>
</refsect2><refsect2 id="MilterClient-workers-created" role="signal"><title>The <literal>“workers-created”</literal> signal</title>
<indexterm zone="MilterClient-workers-created"><primary>MilterClient::workers-created</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
user_function (<link linkend="MilterClient"><type>MilterClient</type></link> *milterclient,
               <link linkend="guint"><type>guint</type></link>         arg1,
               <link linkend="gpointer"><type>gpointer</type></link>      user_data)</programlisting>
<para>
</para>
<refsect3 role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>milterclient</para></entry>
<entry role="parameter_description"><para>the object which received the signal.</para></entry>
<entry role="parameter_annotations"/></row>
<row><entry role="parameter_name"><simpara>user_data</simpara></entry>
<entry role="parameter_description"><simpara>user data set when the signal handler was connected.</simpara></entry>
<entry role="parameter_annotations"/></row>
</tbody></tgroup></informaltable>
</refsect3><para>Flags: <link linkend="G-SIGNAL-RUN-LAST:CAPS">Run Last</link></para>
</refsect2>
</refsect1>

</refentry>
