PHP Wrench (websocket) - problems with cellular connection?


So... i've been having great fun creating a websocket app in/for Wrench. It seems Wrench itself is pretty robust(for it's simplicity)? Seemed like the best option for the PHP language after getting feedback here.

The problem I have is that Mobile Phones using Cellular connection can't connect to the websocket in the first place. And when using WiFi on the Phone it connects, but if i turn wifi off and let the cellular connection take over, it disconnects and eventually crashes the Server due to not being able to find the connection (it seems the default server doesn't handle this disconnect well).

It also crashes the server if I connect on the phone with WiFi but then let the browser sit in the background and not do anything for a while.

Some of the Wrench Error msg:

Fatal error: Uncaught exception 'Wrench\Exception\SocketException' with message 'Cannot get socket IP address' in /***/Wrench/lib/Wrench/Socket/Socket.php:156

Fatal error: Uncaught exception 'Wrench\Exception\ConnectionException' with message 'Could not send data to connection: Unknown error' in /***/Wrench/lib/Wrench/Connection.php:379

I'm sure i can add code to stop the server from crashing in those circumstances, and even stop mobile users( with wifi) from getting a connection in the first place, but i would really like to get them to connect...

Is it possible to have mobile users with cellular connection connect to Wrench Websockets? If so, how? Configure the Server Script? Or is it a Hosting issue?


People are also looking for solutions to the problem: php - session.cookie_secure not saving


Didn't find the answer?

Our community is visited by hundreds of web development professionals every day. Ask your question and get a quick answer for free.

Ask a Question

Write quick answer

Do you know the answer to this question? Write a quick response to it. With your help, we will make our community stronger.

Similar questions

Find the answer in similar questions on our website.