1

I am using http://socketo.me/ for my project and I implemented Push integration.

It is basic example with subscription. It is almost copy/paste example which can be found on socketo.me. On my PC with latest Chrome and Firefox it works like a charm, but on my colleague PC with identical versions of browsers it doesn't work. We both have the same Avast antivirus and OS version which is Windows 7. The strange part is that sometimes on colleague console I am getting this error:

WebSocket connection to 'ws://example:8080/' failed: Error in connection establishment: net::ERR_CONNECTION_REFUSED

But sometimes dont, it is just empty console. The same scenario happend on another computer. It works on my mobile phone, android, it works on Mac and iPhone.

My project is based on realtime auctions and when user bids I am using this code to notify all users which are subscribed on that auction and with autobahn.js I am handling the object:

$json_data = json_encode($data);
$context = new ZMQContext();
$socket = $context->getSocket(ZMQ::SOCKET_PUSH, 'my pusher');
$socket->connect("tcp://localhost:5555");
$socket->send($json_data);

and this works. Also, when the colleague bids I am successfully receiving the object but he doesn't, and otherwise. On server I am not getting any PHP errors.

The implementation works on 10 of 12 computers/phones so I am thinking that problem is not up to my code, also, the centos server is not serving big traffic, it is for our test purposes only with 8GB of ram which is almost always available about 7GB.

Does someone knows what can be the cause of this problem? Is something blocking the sockets?

Thanks

2
  • Can you please provide your current setup? i.e. PHP engine, webserver, browser used on error, so we can help you Aug 3, 2015 at 8:35
  • Were you able to find out solution?
    – Volatil3
    Apr 7, 2016 at 8:31

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.