NAME
POE::Component::GCS::ClientMsg - Message-based client to access GCS server
VERSION
This document describes version 0.01, released November, 2005.
SYNOPSIS
use POE::Component::GCS::ClientMsg;
$client = "POE::Component::GCS::ClientMsg";
($stat, $response) = $client->send( $command [,$host] [,$port] );
$stat and die $response;
print $response;
DESCRIPTION
This class is a generic client interface to a generic server process. The intent is for this to be used as a starting point when building network client/server applications.
Constructor
None. This module provides only class methods.
Methods
- send ( Command [, Host ] [, Port ] )
-
This method is used to send a command to the generic server process that is expected to be running on the local host.
- Command
-
This required parameter specifies the Command passed to the server, and must be in a format that the server is designed to recognize as valid.
- Host
-
The optional parameter is the name of the generic server. This defaults to a value of 'localhost'.
- Port
-
The optional parameter is the port number of the generic server. This defaults to a value of 'nnnn'.
- stat
-
This return value from the send method indicates the success (0) or failure (non-zero) of the command sent.
- response
-
This return value from the send method will be either the successful response (when status equals zero) or an error message (when status is non-zero).
DEPENDENCIES
This class depends upon the following classes:
IO::Socket
POE::Component::GCS::Server::Msg
POE::Event::Message
SEE ALSO
See POE::Component::GCS::Server, POE::Component::GCS::Server::Msg and POE::Event::Message.
AUTHOR
Chris Cobb, <no spam [at] ccobb [dot] net>
COPYRIGHT
Copyright (c) 2005-2010 by Chris Cobb. All rights reserved. This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself.