We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hi, I'm trying to get the remote address IP from current connection, because I need to make a ACL service using the IP.
This is part of my code:
$wss = new SocketIO(8084); $wss->on("connection", function ($socket) use ($wss) { $socket->on("ready", function ($msg) use ($socket) { print "Ready received: {$socket->id}@{$socket->getRemoteIP()}\n"; $socket->emit("ack", $msg); }); });
But is not working, any advice? Thanks anyway
The text was updated successfully, but these errors were encountered:
#15
Sorry, something went wrong.
$io->on('connection', function($socket)use($io){ var_dump($socket->conn->remoteAddress); });
Will display like ip:port format.
ip:port
Got it. Thanks @walkor
No branches or pull requests
Hi, I'm trying to get the remote address IP from current connection, because I need to make a ACL service using the IP.
This is part of my code:
But is not working, any advice? Thanks anyway
The text was updated successfully, but these errors were encountered: