NAME
RPC::Simple::Factory - Perl extension for creating client
SYNOPSIS
use Tk; use RPC::Simple::Factory;
my $mw = MainWindow-> new ; my $verbose = 1 ; # up to you
# create fatory my $factory = new RPC::Simple::Factory($mw,\$verbose) ;
DESCRIPTION
This class handles all the tricky stuff involving socket handling. Note that this was written to be used with Tk.
new($tkTop, $verboseRef, [remote_host], [port] )
create the factory. One factory must be created for each remote host..
tkTop is the ref of Tk's main window.
$verboseRef is the ref of a variable. When set to 1 at any time, the object will become verbose.
Methods
logmsg (...)
print arguments if verbose mode.
newRemoteObject( $owner_ref, $specs, context_specs, optionnal ref)
Will create a remote object tied to the owner.
context_ref and spec_ref and optionnal_hash_ref are 3 hash containing relevant info tor the remote object.
The content of these hash are merged in that order (i.e. the first values may be clobberred) before the remote object is created.
getremoteHostName
return the remote host name
writeSockBuffer ( agent_index, remote_method, request_id, parameter, [object_name])
Encode the method, object, parameter and send it to the remote object.
agent_index and request_id are used later for the call-back mechanism.
readSock
read pending data on the socket. Do an eval on the read data to call-back the relevent Agents.
Note that there's no security implemented (yet).
AUTHOR
Dominique Dumont, Dominique_Dumont@grenoble.hp.com
SEE ALSO
perl(1), RPC::Simple::Agent(3), RPC::Simple::AnyLocal(3).