| UR::Service::RPC::Message(3pm) | User Contributed Perl Documentation | UR::Service::RPC::Message(3pm) | 
UR::Service::RPC::Message - Serializable object appropriate for sending RPC messages
  my $msg = UR::Service::RPC::Message->create(
                           target_class => 'URT::RPC::Thingy',
                           method_name  => 'join',
                           params       => ['-', @join_args],
                           'wantarray'  => 0,
                         );
  $msg->send($fh);
  my $resp = UR::Service::RPC::Message->recv($fh, 5);
This class is used as a message-passing interface by the RPC service modules.
These properties should be filled in by the initiating caller
These properties are assigned after the RPC call to the subroutine
  $bytes = $msg->send($fh);
    
    Serializes the Message object with FreezeThaw and writes the data to the filehandle $fh. Returns the number of bytes written. $bytes will be false if there was an error.
  $response = UR::Service::RPC::Message->recv($fh,$timeout);
  $response = $msg->recv();
    
    Reads a serialized Message from the filehandle and constructs a Message object that is then returned to the caller. In the first case, it reads from the given filehandle, waiting a maximum of $timeout seconds with select before giving up. In the second case, it reads from whatever filehandle is stored in $msg to read data from.
UR::Service::RPC::Server, UR::Service::RPC::Executor
| 2019-01-02 | perl v5.28.1 |