UR::Service::RPC::Server(3pm)

UR::Service::RPC::Server3pm

Class for implementing rpc servers

Usage

  my $executer = Some::Exec::Class->create(fh => $fh);
  my $server = UR::Service::RPC::Server->create();
  $server->add_executer($executer);
  $server->loop(5);  # Process messages for 5 seconds

Overview

The RPC server implementation isn't fleshed out very well yet, and may change in the future.

Methods

add_executer
  $server->add_executer($exec);

Incorporate a new UR::Service::RPC::Executer instance to this server. It adds the Executer's filehandle to its own internal IO::Select object.

loop
  $server->loop();
  $server->loop(0);
  $server->loop($timeout);

Enter the Server's event loop for the given number of seconds. If the timeout is undef, it will stay in the loop forever. If the timeout is 0, it will make a single pass though the readable filehandles and call "execute" on their Executer objects.

If the return value of an Executer's "execute" method is false, that Executer's file handle is removed from the internal Select object.

Releases

6 releases since Debian 8 (Jessie); the text changed 4 times.

  1. 8
  2. 9
  3. 10–11
  4. 12
  5. 13

From libur-perl 0.470+ds-3 in Debian 13 (Trixie). Parsed by carta from the page's man source.