NAME
Sprocket::Client - The Sprocket Client
SYNOPSIS
use Sprocket qw( Client );
Sprocket::Client->spawn(
Name => 'My Client',
ClientList => [
'127.0.0.1:9979',
],
Plugins => [
{
plugin => MyPlugin->new(),
priority => 0, # default
},
],
LogLevel => 4,
MaxConnections => 10000,
);
DESCRIPTION
Sprocket::Client defines a TCP/IP Client, initiates a TCP/IP connection with a server on a given IP and Port
METHODS
- spawn( %options )
-
Create a new Sprocket::Client object.
- Name => (Str)
-
The Name for this server. Must be unique.
- ClientList => (ArrayRef)
-
A list of servers to connect to.
- LogLevel => (Int)
-
The minimum level of logging, defaults to 4
- Plugins => (ArrayRef)
-
Plugins that this client will hand off processing to. In an ArrayRef of HashRefs format as so:
{ plugin => MyPlugin->new(), priority => 0 # default }
- shutdown()
-
Shutdown this server cleanly
EVENTS
These events are handled by plugins. See Sprocket::Plugin.
- remote_accept
- remote_connected
- remote_recieve
- remote_disconnected
- remote_connect_error
- remote_resolve_failed
SEE ALSO
POE, Sprocket, Sprocket::Connection, Sprocket::Plugin, Sprocket::Server
AUTHOR
David Davis <xantus@cpan.org>
RATING
Please rate this module. http://cpanratings.perl.org/rate/?distribution=Sprocket
COPYRIGHT AND LICENSE
Copyright 2006-2007 by David Davis
See Sprocket for license information.