NAME
Agent::Transport - the Transportable Agent Perl module
SYNOPSIS
use Agent;
my $t = new Agent::Transport(
Medium => $name,
Address => $addr
...
);
...
my $data = $t->recv( [%args] );
DESCRIPTION
This package provides a standard interface to different transport mediums. Agent::Transport
does not contain any transport code itself; it merely gets subclasses to do all the work.
CONSTRUCTOR
- new( %args )
-
new
must be passed a Medium argument. Address is a proposed standard for passing transport addresses. Any other arguments, both optional and requirerd, will be documented in the corresponding subclass (ie: Agent::Transport::TCP).
STANDARD METHODS
- $t->recv()
-
recv
attempts to retrieve a message (from said address, over said transport medium). Returns a list of data, or nothing if unsuccessful. - $t->transport()
-
Returns the transport medium over which the object communicates.
- $t->address()
-
Returns the primary address at which the object can be reached.
- $t->aliases()
-
Returns a list of addresses at which the object can be reached.
STANDARD SUBROUTINES
- send( %args )
-
send
too must be passed Medium. It also requires an Address (scalar), and a Message (anonymous list / reference). - valid_address( %args )
-
This checks to see if the Address provided is valid within the Medium specified. Returns the address if so, and nothing otherwise.
SEE ALSO
Agent
, Agent::Message
, Agent::Transport::*
, and the example agents.
AUTHOR
Steve Purkis <spurkis@engsoc.carleton.ca>
COPYRIGHT
Copyright (c) 1998 Steve Purkis. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
THANKS
The perl5-agents mailing list.