logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

Mail::MtPolicyd::Client - a policyd client class

Author

       Markus Benning <ich@markusbenning.de>

Description

       Client class to query a policyd server.

   SYNOPSIS
         use Mail::MtPolicyd::Client;
         use Mail::MtPolicyd::Client::Request;

         my $client = Mail::MtPolicyd::Client->new(
           host => 'localhost:12345',
           keepalive => 1,
         );

         my $request = Mail::MtPolicyd::Client::Request->new(
           'client_address' => '192.168.0.1',
         );

         my $response = $client->request( $request );
         print $response->as_string;

   METHODS
       request ( $request )
           Will    send    a    Mail::MtPolicyd::Client::Request    to    the   remote   host   and   return   a
           Mail::MtPolicyd::Client::Response.

   ATTRIBUTES
       socket_path (default: undef)
           Path of a socket of the policyd server.

           If defined this socket will be used instead of a tcp connection.

       host (default: localhost:12345)
           Remote address/port of the policyd server.

       keepalive (default: 0)
           Keep connection open for multiple requests.

Name

       Mail::MtPolicyd::Client - a policyd client class

Version

       version 2.05

See Also