Skip to content

Commit eb7f5e4

Browse files
committed
Changes
1 parent 0e3d405 commit eb7f5e4

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

src/Application/Websocket/Application.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,11 @@ public function onConnect(TcpConnection $tcpConnection): void {
5252
$authService = $this->authService;
5353

5454
$tcpConnection->onWebSocketConnected = static function (TcpConnection $tcpConnection, Request $request) use ($authService, $container, $collection) {
55+
print_r('New connection: ' . $tcpConnection->id . "\n");
56+
print_r("RemoteIP:" . $tcpConnection->getRemoteIp() . "\n");
57+
print_r("Remote Address:" . $tcpConnection->getRemoteAddress() . "\n");
58+
echo "-------------------------\n";
59+
5560
try {
5661
$authorized = $authService->verify($request->header('Authorization', ''));
5762
} catch (UnauthorizedException) {
@@ -68,6 +73,10 @@ public function onConnect(TcpConnection $tcpConnection): void {
6873
$tcpConnection
6974
);
7075

76+
print_r("Client connected: " . $client->id . "\n");
77+
print_r($client);
78+
echo "-------------------------\n";
79+
7180
$collection->add($client);
7281
$container->get(OnConnectInterface::class)->handle($client);
7382
};

0 commit comments

Comments
 (0)