Edit content

RPC to App Server

You can connect to application server via SocketRelay:

$relay = new Spiral\Goridge\SocketRelay("127.0.0.1", 6001);
$rpc = new Spiral\Goridge\RPC($relay);

You can immediately use this RPC to call embedded RPC services such as HTTP:

var_dump($rpc->call('http.Workers', true));

See RPC method definition here.

You can read how to create your own services and RPC methods in this section.