0
私はセットアップテストエンジンを持っています。 IPC PHPとクライアントとのやりとりをしたい。私はUbuntuにいます。 これは私の現在のコードです:(?FIFO)PHP IPC with geth Ethereum
$myValType = NULL;
$msg = "";
($key = ftok("/home/john/.ethereum/testnet/geth.ipc","="));
$queue = msg_get_queue($key);
msg_send($queue, 1, '{"jsonrpc":"2.0","method":"miner_start","params":[],"id":1}');
msg_receive($queue,0,$myValType,2048,$msg);
dd($msg); # (Die and Dump, Laravel)
これは、IPCファイルがある:これは正常に動作している
srwxrwxrwx 1 john john 0 Jun 17 01:30 geth.ipc=
echo '{"jsonrpc":"2.0","method":"rpc_modules","params":[],"id":1}' | nc -U geth.ipc
私はよく分からないどのように実際にクライアントと通信する。送信時に応答がありません。 msg_receive
には、最初に送信されたメッセージが返されます。
誰かが呼吸していて、とても親切で、私に適切な解決策を教えてください。