The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

POE::Component::IKC::Server - POE Inter-kernel Communication server

SYNOPSIS

    use POE;
    use POE::Component::IKC::Server;
    create_ikc_server(
        ip=>$ip, 
        port=>$port,
        name=>'Server',);
    ...
    $poe_kernel->run();

DESCRIPTION

This module implements a POE IKC server. A IKC server listens for incoming connections from IKC clients. When a client connects, it negociates certain connection parameters. After this, the POE server and client are pretty much identical.

EXPORTED FUNCTIONS

create_ikc_server

This function initiates all the work of building the IKC server. Parameters are :

ip

Address to listen on. Can be a doted-quad ('127.0.0.1') or a host name ('foo.pied.nu'). Defaults to '0.0.0.0', aka INADDR_ANY.

port

Port to listen on. Can be numeric (80) or a service ('http').

unix

Path to the unix-socket to listen on. Note: this path is unlinked before socket is attempted! Buyer beware.

name

Local kernel name. This is how we shall "advertise" ourself to foreign kernels. It acts as a "kernel alias". This parameter is temporary, pending the addition of true kernel names in the POE core. This name, and all aliases will be registered with the responder so that you can post to them as if they were remote.

aliases

Arrayref of even more aliases for this kernel. Fun Fun Fun!

verbose

Print extra information to STDERR if true. This allows you to see what is going on and potentially trace down problems and stuff.

processes

Activates the pre-forking server code. If set to a positive value, IKC will fork processes-1 children. IKC requests are only serviced by the children. Default is 1 (ie, no forking).

babysit

Time, in seconds, between invocations of the babysitter event.

connections

Number of connections a child will accept before exiting. Currently, connections are serviced concurrently, because there's no way to know when we have finished a request. Defaults to 1 (ie, one connection per child).

EVENTS

shutdown

This event causes the server to close it's socket and skiddadle on down the road. Normally it is only posted from IKC::Responder.

BUGS

Preforking is something of a hack. In particular, you must make sure that your sessions will permit children exiting. This means, if you have a delay()-loop, or event loop, children will not exit. Once POE gets multicast events, I'll change this behaviour.

AUTHOR

Philip Gwyn, <perl-ikc at pied.nu>

SEE ALSO

POE, POE::Component::IKC::Client

4 POD Errors

The following errors were encountered while parsing the POD:

Around line 867:

'=item' outside of any '=over'

Around line 925:

You forgot a '=back' before '=head1'

Around line 927:

'=item' outside of any '=over'

Around line 932:

You forgot a '=back' before '=head1'