Skip to content

Commit e48b497

Browse files
authored
Added Hyperf\WebSocketServer\Sender::getResponses(). (#5227)
1 parent 9d51cee commit e48b497

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/Sender.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,9 @@ public function check($fd): bool
9797
}
9898

9999
/**
100+
* The responses of coroutine style swoole server.
101+
* Or connections of swow server.
102+
* And so on.
100103
* @param null|Connection|Response $response
101104
*/
102105
public function setResponse(int $fd, mixed $response): void
@@ -113,6 +116,11 @@ public function getResponse(int $fd): mixed
113116
return $this->responses[$fd] ?? null;
114117
}
115118

119+
public function getResponses(): array
120+
{
121+
return $this->responses;
122+
}
123+
116124
public function getFdAndMethodFromProxyMethod(string $method, array $arguments): array
117125
{
118126
if (! in_array($method, ['push', 'disconnect'])) {

0 commit comments

Comments
 (0)