PHP code example of roadrunner / goridge

1. Go to this page and download the library: Download roadrunner/goridge library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

roadrunner / goridge example snippets




use Spiral\Goridge;
C(
    Goridge\Relay::create('tcp://127.0.0.1:6001')
);

//or, using factory:
$tcpRPC = Goridge\RPC\RPC::create('tcp://127.0.0.1:6001');
$unixRPC = Goridge\RPC\RPC::create('unix:///tmp/rpc.sock');
$streamRPC = Goridge\RPC\RPC::create('pipes://stdin:stdout');

echo $rpc->call("App.Hi", "Antony");