Skip to content

Commit

Permalink
Support HttpServer for Swow. (#2659)
Browse files Browse the repository at this point in the history
  • Loading branch information
limingxinleo committed Oct 15, 2020
1 parent 6558e31 commit 97e4c23
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
9 changes: 5 additions & 4 deletions src/OnRequestInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,11 @@
*/
namespace Hyperf\Contract;

use Swoole\Http\Request as SwooleRequest;
use Swoole\Http\Response as SwooleResponse;

interface OnRequestInterface
{
public function onRequest(SwooleRequest $request, SwooleResponse $response): void;
/**
* @param mixed $request swoole request or psr server request
* @param mixed $response swoole response or swow session
*/
public function onRequest($request, $response): void;
}
6 changes: 4 additions & 2 deletions src/ResponseEmitterInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,11 @@
namespace Hyperf\Contract;

use Psr\Http\Message\ResponseInterface;
use Swoole\Http\Response;

interface ResponseEmitterInterface
{
public function emit(ResponseInterface $response, Response $swooleResponse, bool $withContent = true);
/**
* @param mixed $connection swoole response or swow session
*/
public function emit(ResponseInterface $response, $connection, bool $withContent = true);
}

0 comments on commit 97e4c23

Please sign in to comment.