The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

POE::Component::GCS::Server::Msg - Subclass of POE::Event::Message

SYNOPSIS

use POE::Component::GCS::Server::Msg;

$msgClass = "POE::Component::GCS::Server::Msg";

$message  = $msgClass->new();
$message  = $msgClass->new( undef, $messageBody, $clientId );

$response = $msgClass->new( $message, $responseBody, $clientId );

DESCRIPTION

This subclass extends the parent class, POE::Event::Message, with 'ClientId' methods specific to the Generic Client Server (GCS).

Constructor

new ( Header, Body, ClientId )

This method extends the parent class constructor to include a ClientId argument. This is then used to determine whether the message is a 'User Message' or a 'System Message'.

A numeric value indicates a 'User Message' that was received by the GCS server daemon via a TCP interface.

A non-numeric value indicates a 'System Message' that was generated internally by a GCS server event.

This distinction is useful in determining whether a given 'command message' will be dispatched to a given command handler method. See POE::Component::GCS::Server::Cmd for details.

Methods

userMessage ()

Based on the ClientId: If value is numeric then returns 'true'.

systemMessage ()

Based on the ClientId: If value is non-numeric then returns 'true'.

DEPENDENCIES

This class uses the parent class 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.