diff --git a/README.md b/README.md index 076b0e2..8143fb7 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,43 @@ Php-rpc =============== -Small library to provide remote proceedure calls in PHP over System V on Linux. \ No newline at end of file +Small library to provide remote proceedure calls in PHP over System V on Linux. + +### Installation +-------- + +Currently the project contains only one file. Simply add it to your project. + +The following methods are use to invoke an RPC +
+ rpc( $funcName, ...$params ); + rpc_listen( &$caller_id, &$msgArr, $bBlock = true ); + rpc_reply( $caller_id, $obj ); ++ + +# rpc( $funcName, ...$params ) +-------- + + Invoke a remote proceedure call. All parameters are serialized and sent to + the server. The call blocks until the results are returned. + + +# rpc_listen( &$caller_id, &$msgArr, $bBlock = true ); +-------- + + The server must periodically call rpc_listen(). This call will populate the + array &msgArr and $caller_id according to what message has been retrieved from + the queue. The array &msgArr might contain other client messages which have only partially been + recieved. The array must be used on subsequent calls to rpc_listen if it is not empty. + + The unserialized object is returned. + + +# rpc_reply( $caller_id, $obj ); +-------- + + This call must be invoked after the rpc instructions have been completed by the server. It is up to the + server implementation whether or not these calls invoke a 'real' PHP function or something else. The call + must pass back the results of the RPC in $obj. These will be serialized to back to the client. Note that + the client is blocking on this call.