I am currently developing an APP that makes A UDP connection to another host to send commands (old quake3 engine game server) so you can moderate your gameserver without having to boot the game up on your pc.
I’m using laravel (overkill, but I’m learning the framework as well) and locally it works just fine, I can send the command and retrieve the message just as i want it to be. Now when deploying, the app doesn’t seem to work anymore, it doesn’t send any commands and I can’t seem to debug that, udp doesn’t have status (sometimes shows it connected even though the host is dead) so I’m running out of ideas, the firewall is set-up to allow outgoing UDP/TCP connections(I’ve tried with the firewall disabled as well) to the port I’m sending commands to (29070) and when asking the support about any possible blocking they said no. As you guys are probably way more experienced than me, is this a PHP problem or a VPS one?
$this->fp = fsockopen($this->host, $this->port, $this->errno, $this->errstr, 5); socket_set_timeout($this->fp, 5);
and if I do
if ($this->fp) echo 'sucess';
It echoes out sucess, but you can’t really trust that when it comes to UDP connections.
How should I proceed?
ps used lemp and lamp on ubuntu 16.04
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.
Click below to sign up and get $200 of credit to try our products over 60 days!