Skip to content

Commit 48a8d65

Browse files
authored
Added SwooleConnection::getSocket to get swoole response. (#5518)
1 parent 2f6f4e5 commit 48a8d65

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

src/Server/Connection/SwooleConnection.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,9 @@ public function write(string $data): bool
2525
{
2626
return $this->response->write($data);
2727
}
28+
29+
public function getSocket(): mixed
30+
{
31+
return $this->response;
32+
}
2833
}

src/Server/ConnectionInterface.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,8 @@
1313

1414
interface ConnectionInterface
1515
{
16+
/**
17+
* @return mixed|\Swoole\Http\Response
18+
*/
19+
public function getSocket(): mixed;
1620
}

0 commit comments

Comments
 (0)