message: Improve test with EOF.
diff: @@ -6,6 +6,8 @@ swoole_http_server: http server parse form data with charset
  <?php
  require __DIR__ . '/../include/bootstrap.php';
  +define('EOF', get_safe_random());
  +
  function getRandomData(int $num): array
  {
  $data = [];
  @@ -32,7 +34,7 @@ function arrayToMultipartString(array $var, string $boundary): string
  function sendData(string $host, int $port, array $get, array $post): string
  {
  - $client = new swoole_client(SWOOLE_SOCK_TCP);
  + $client = new Co\Client(SWOOLE_SOCK_TCP);
  if (!$client->connect($host, $port, 1)) {
  exit("connect failed. Error: {$client->errCode}\n");
  }
  @@ -56,12 +58,21 @@ Content-Length: {$content_length}{$CR}
  {$post}
  HTTP;
  - $client->send($data);
  - return $client->recv();
  + assert($client->send($data));
  + $data = '';
  + while ($ret = $client->recv()) {
  + $data .= $ret;
  + if (strrpos($data, EOF) !== false) {
  + $data = substr($data, 0, strlen($data) - strlen(EOF));
  + break;
  + }
  + }
  + return $data;
  }
  $pm = new ProcessManager;
  -$pm->parentFunc = function ($pid) use ($pm) {
  +$pm->parentFunc = function () use ($pm) {
  + go(function () use ($pm) {
  foreach (range(1, 100) as $_) {
  $get = getRandomData(50);
  $post = getRandomData(100);
  @@ -69,17 +80,20 @@ $pm->parentFunc = function ($pid) use ($pm) {
  list($_, $body) = explode("\r\n\r\n", $ret);
  assert($body === var_dump_return($get, $post));
  }
  - swoole_process::kill($pid);
  + $pm->kill();
  + echo "DONE\n";
  + });
  };
  $pm->childFunc = function () use ($pm) {
  - $http = new swoole_http_server('127.0.0.1', $pm->getFreePort(), SWOOLE_BASE);
  + $http = new Swoole\Http\Server('127.0.0.1', $pm->getFreePort(), SWOOLE_BASE);
  $http->set(['log_file' => '/dev/null']);
  - $http->on("WorkerStart", function ($serv, $wid) use ($pm) {
  + $http->on('WorkerStart', function ($serv, $wid) use ($pm) {
  $pm->wakeup();
  });
  - $http->on("request", function (swoole_http_request $request, swoole_http_response $response) {
  + $http->on('Request', function (swoole_http_request $request, swoole_http_response $response) use ($http) {
  $response->end(var_dump_return($request->get, $request->post));
  + $http->send($request->fd, EOF);
  });
  $http->start();
  };
  @@ -88,3 +102,4 @@ $pm->childFirst();
  $pm->run();
  ?>
  --EXPECT--
  +DONE
  