src/BotManFactory.php
public static function passRequestToSocket($port = 8080, Request $request = null)
    {
        if (empty($request)) {
            $request = Request::createFromGlobals();
        }

        $client = stream_socket_client('tcp://127.0.0.1:'.$port);
        fwrite($client, json_encode([
            'attributes' => $request->attributes->all(),
            'query' => $request->query->all(),
            'request' => $request->request->all(),
            'content' => $request->getContent(),
        ]));
        fclose($client);
    }
public static function passRequestToSocket($port = 8080, Request $request = null)
    {
        if (empty($request)) {
            $request = Request::createFromGlobals();
        }

        $client = stream_socket_client('tcp://127.0.0.1:'.$port);
        fwrite($client, json_encode([
            'attributes' => $request->attributes->all(),
            'query' => $request->query->all(),
            'request' => $request->request->all(),
            'content' => $request->getContent(),
        ]));
        fclose($client);
    }
public static function passRequestToSocket ( $ port = 8080 , Request $ request = null ) { if ( empty ( $ request ) ) { $ request = Request :: createFromGlobals ( ) ; } $ client = stream_socket_client ( 'tcp://127.0.0.1:' . $ port ) ; fwrite ( $ client , json_encode ( [ 'attributes' => $ request -> attributes -> all ( ) , 'query' => $ request -> query -> all ( ) , 'request' => $ request -> request -> all ( ) , 'content' => $ request -> getContent ( ) , ] ) ) ; fclose ( $ client ) ; }
Pass an incoming HTTP request to the socket.

@param  int      $port    The port to use. Default is 8080
@param  Request|null $request
@return void
Pass an incoming HTTP request to the socket .