Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
joedixon committed Nov 14, 2023
1 parent 042ad1f commit 0b8d528
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/Servers/Reverb/Factory.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
use React\Http\HttpServer;
use React\Http\Message\Response;
use React\Http\Middleware\LimitConcurrentRequestsMiddleware;
use React\Http\Middleware\RequestBodyBufferMiddleware;
use React\Socket\SocketServer;
use Symfony\Component\Routing\Route;
use Symfony\Component\Routing\RouteCollection;
Expand All @@ -27,16 +28,14 @@ class Factory
*/
public static function make(string $host = '0.0.0.0', string $port = '8080', LoopInterface $loop = null)
{
set_time_limit(0);
ob_implicit_flush();

$loop = $loop ?: Loop::get();

$socket = new SocketServer("{$host}:{$port}", [], $loop);

$server = new HttpServer(
$loop,
new LimitConcurrentRequestsMiddleware(10000),
new RequestBodyBufferMiddleware(2 * 1024 * 1024),
new WebSocketMiddleware(App::make(Server::class)),
function (ServerRequestInterface $request) {
$payload = json_decode($request->getBody()->getContents(), true);
Expand Down

0 comments on commit 0b8d528

Please sign in to comment.