Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

rpcpeer(3i) [debian man page]

RpcPeer(3I)						    InterViews Reference Manual 					       RpcPeer(3I)

NAME
RpcPeer - support bi-directional RPC between two services SYNOPSIS
#include <Dispatch/rpcpeer.h> DESCRIPTION
An RpcPeer (actually, an instance of a derived class) tries to open a connection to another RpcPeer. If the other RpcPeer is not yet run- ning, the RpcPeer will create its own port and wait for the other RpcPeer to open a connection. When either RpcPeer opens a connection, each RpcPeer will create both a reader and a writer so each RpcPeer can send RPC requests to its opposite over the same connection. CONSTRUCTOR
RpcPeer(const char* lPath, int lPort = 0) Store the arguments for later use since a base constructor can't call a derived class's virtual function. The derived class's con- structor should call ``init'', described below. void init(const char* rPath) Find the host name and port number registered by the other RpcPeer and try to open a connection to it. If it's not running, create our own port and wait for the other RpcPeer to open a connection. PUBLIC OPERATIONS
void run() void quitRunning() Read RPC requests continuously until ``quitRunning()'' terminates the loop. If you're using InterViews, you don't have to call ``run()'' since the InterViews event-reading code will also read RPC requests. PROTECTED OPERATIONS
virtual boolean createReaderAndWriter(const char* rHost, int rPort) = 0 virtual void createReaderAndWriter(int fd) = 0 You must define both functions in a derived class in order to start reading and writing RPC requests over the connection. Typically both functions would create a writer using the given parameters and then attach a reader to the writer's rpcstream. SEE ALSO
Dispatcher(3I), RpcReader(3I), RpcRegistry(3I), RpcWriter(3I) InterViews 27 March 1991 RpcPeer(3I)

Check Out this Related Man Page

Event::RPC::Connection(3pm)				User Contributed Perl Documentation			       Event::RPC::Connection(3pm)

NAME
Event::RPC::Connection - Represents a RPC connection SYNOPSIS
Note: you never create instances of this class in your own code, it's only used internally by Event::RPC::Server. But you may request connection objects using the connection_hook of Event::RPC::Server and then having some read access on them. my $connection = Event::RPC::Server::Connection->new ( $rpc_server, $client_socket ); As well you can get the currently active connection from your Event::RPC::Server object: my $server = Event::RPC::Server->instance; my $connection = $server->get_active_connection; DESCRIPTION
Objects of this class represents a connection from an Event::RPC::Client to an Event::RPC::Server instance. They live inside the server and the whole Client/Server protocol is implemented here. READ ONLY ATTRIBUTES
The following attributes may be read using the corresponding get_ATTRIBUTE accessors: cid The connection ID of this connection. A number which is unique for this server instance. server The Event::RPC::Server instance this connection belongs to. is_authenticated This boolean value reflects whether the connection is authenticated resp. whether the client passed correct credentials. auth_user This is the name of the user who was authenticated successfully for this connection. client_oids This is a hash reference of object id's which are in use by the client of this connection. Keys are the object ids, value is always 1. You can get the corresponding objects by using the $connection->get_client_object($oid) method. Don't change anything in this hash, in particular don't delete or add entries. Event::RPC does all the necessary garbage collection transparently, no need to mess with that. AUTHORS
Joern Reder <joern at zyn dot de> COPYRIGHT AND LICENSE
Copyright (C) 2002-2006 by Joern Reder, All Rights Reserved. This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. perl v5.10.1 2008-10-25 Event::RPC::Connection(3pm)
Man Page