I'm totally new to webRTC/easyRTC I'm facing issue that when new client is connecting to the room then sometimes client can't able to see other previously connected person.
Can anyone have any idea what are the issues behind this.
Related
NestJS 8, socket.io 4
Client user has a socket being able to receive data from the server. Not sending.
Refresh browser, the socket ID changed. Socket on the client receive 'connect' event! Yet. On server side, no logging at all. Which kind of explained point 1.
After reboot nest, problem is gone. But it comes back eventually.
My current troubleshooting direction is
Was the connection on the client dead already and it's still trying somehow to update the socket?
Browser does some caching, service worker?
I hope someone can enlighten. This happens after upgrade to socket.io 4 from 2.
It's my own stupidity.
My tenant who own the namespace. In order to reach him, I create his namespace and send message to it no matter he's online or offline.
This works fine in socket.io 2. I don't know why.
What I should do, is to check whether or not, the namespace exists or not first.
That's why the issue that I have is that the server somehow seems able to pipe message to the namespace, yet the tenant cannot send the message to the server because the tenant was not initialized properly in the nest gateway.
This question is with regards to my project on federated learning using the pysyft library, but those with the knowledge of websockets can help too since pysyft uses websockets for the server and client interaction.
To start off, i have an issue regarding server and client interaction. I have created a dashboard to launch a pysyft server and a pysyft client which connects to the aforementioned server. However, i have a scenario where i want to have the client disconnect from the server from time to time (manual disconnection) so as to perform changes in model parameters.
My solution was to perform a close() on the pysyft websocketClientWorker which calls the shutdown() function on the websocket object. Doing which, i presume, will close the connection between the client and the server. After whatever changes to the model parameters have been done. I will recreate the pysyft websocketClientWorker object again and perform the model training all over again. However, i am faced with the issue of : websocket._exceptions.WebSocketConnectionClosedException: socket is already closed. This exception is being thrown (despite the successful connection to the server) during the iteration of the dataloader.
Perhaps there's a better way to go about this scenario, or am i missing certain fundamental understanding of websockets. Any help will be appreciated. Thank you :)
I managed to find the solution to my question after days of thorough inspection of the pysyft library. Turns out there is no issue with the Websocket connection and re-connection. Apparently, the superclass of websocketclient (baseworker) contains a worker registry which caches the websocketclient objects when the auto_add variable is set to True. This registry is indexed by the websocketclient ID and thus, recreation of the websocketclient object will not get replaced in the registry if the ID is the same. Therefore, this explains the 'socket is already closed' issue since it's referencing to the previous websocketclient connection that I have closed. The solution was to simply call the remove_worker_from_local_worker_registry() method on the websocketclient object before closing its connection.
Lately, my internet connection is going sour and sometimes I get no internet, can I work with like resuming this chat-feature, will I be able to write one without an internet connection
https://blog.pusher.com/how-to-build-a-laravel-chat-app-with-pusher/
You can use https://www.npmjs.com/package/laravel-echo-server which is a self-hosted pusher compatible server.
I have tried following the code snippet provided in flutter.io cookbook(https://flutter.io/cookbook/networking/web-sockets/) to connect to websockets.
It was working well for the test server "echo.websocket.org" provided in the code but same is not getting connected when trying with custom websocket server written in Spring. I have tried with multiple websockets which are working in other projects, even sample test websocket is also not getting connected.
Please help to resolve the issue or suggest steps to take to achieve successful connectivity to websockets.
I really appreciate any help you can provide.
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.