logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

UR::Service::RPC::Server - Class for implementing RPC servers

Description

       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.

Name

       UR::Service::RPC::Server - Class for implementing RPC servers

See Also

       UR::Service::RPC::Executer, UR::Service::RPC::Message

perl v5.38.2                                       2024-06-15                      UR::Service::RPC::Server(3pm)

Synopsis

         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

See Also