Websockets not working on my network - websocket

Websockets applications are not working on my network.
However, websites like http://www.websocket.org/echo.html and http://websocketstest.com/ tell me that everything is working.
When trying an application of my own, it appears the handshake goes through successfully, but after that none of the messages get across.
Any ideas what could be the reason for this? An explanation would be much appreciated.

Related

Can websocket be used in https

My websocket connection is working completely fine in http.But the message is not showing in https.Can anyone give me a better solution
.I am getting like this.

Is there any unrecognizable proxy platform?

Due to the too-strict filtering in Iran by its government, any proxy I've ever used has been blocked.
I used L2TP, IPSec, Shaddowsocks, V2ray (Vmess, Vless), and many VPN applications like StarVPN, X-VPN, HotspotShield and etc, but they've been blocked recently.
V2ray was working until yesterday, but today it has been blocked. I even changed the server and it's not still working.
I don't know how exactly the government blocks these protocols, but I think they are recognizable, so I'm looking for an unrecognizable proxy protocol. Do you have any suggestions?
Thanks in advance

Making request using WebSockets in sails but not receiving response from the server

I'm starting with Websockets and I have a problem.
I have a sails.js application that uses sockets to update the client side.
On the client side it makes an API call using socket.get("/api/v1/actor...") to bring all the items of the database. When I see what the WebSocket's traffic on the Chrome console:
As you can see, the connection has been established and the API call has been correctly done through the socket.
The problem is, there is no answer from the server, not even an error.
If I make the same API call using ajax, I get response, but it doesn't work using WebSockets.
Any idea what might be producing this behavior?
EDIT: I add here the code here that processes the request and this one here that sends the request, but the problem is that it never execute this code. I think we we are closer to the find the cause, since we think it has to do with a network problem. We figured there is an F5 reverse-proxy which is not properly set up to handle websockets
The answer didn't make any sense now that I've seen the code that's why I've edited it. I only answered because I could't comment on your question and ask you for the code.
Your calling code seems correct and the server side of things the process of response should be handled automatically by the framework, you only need to return some JSON in the controller method.
I instantiated a copy of the server (just changed the adapters to run it locally) and the server replied to the web socket requests (although I only tested the route '/index').
Normally when the problems are caused by a reverse proxy the socket simply refuses to connect and you can't even send data to server. Does the property "socket.socket.connected" returns true?
The best way to test is to write a small node application with socket.io client and test it in the same machine that the application server is running, then you can exclude network problems.

Browser not sending any data (no errors)

So I have a faye server and a rails web application. It all worked fine till recently. Now the browser is not sending anythin to the server. There a no error not on the server not even in browser (I can create an instance of Faye.Client just fine). But when I do publish the server gets nothing. It doesn't even get anythin on the meta channel, like connect or subscribe. The thing is that if I send something with curl the server shows the message (cause I'm logging it).
I can't pin point the problem. :/
Make sure the code to send messages is being reached. Make sure your client is still valid. Test an earlier code version etc. Just a few ideas.
Solved the problem. The url to which faye was connecting was not OK, but faye failed silently because the url responded. :/

Communication between server and client

Been following this tutorial: http://www.tutorialspoint.com/ruby/ruby_socket_programming.htm (couldn't find a more complete one)
I got it up and running. Except I don't know how to make the client send a message to the server (and respond to it) and viceversa. How do I achieve that?
There are many docs but none of them seem to detail about this.

Resources