Initial commit
This commit is contained in:
13
examples/jsonproto.php
Normal file
13
examples/jsonproto.php
Normal file
@@ -0,0 +1,13 @@
|
||||
<?php
|
||||
|
||||
require_once __DIR__."/../vendor/autoload.php";
|
||||
|
||||
use NoccyLabs\React\Protocol\Json\JsonProtocol;
|
||||
|
||||
|
||||
$proto = new JsonProtocol(
|
||||
frameSeparator: "\n",
|
||||
prependSizeBytes: 0,
|
||||
);
|
||||
|
||||
echo $proto->packFrame([ 'hello'=>'world', 'answer'=>42 ]);
|
||||
Reference in New Issue
Block a user