-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to check that the connection is open? #2
Comments
Hmmm I don't quite understand, can you please describe it a bit more? |
Yes, the explanation is complicated, and my explanation was bad. |
Of course, I have not seen any problems so far. |
aaa you talk about automatic reconnection, yes I had that in mind but let's not hurry, this is an active project and the next update will contain automatic reconnection, we don't have to implement them from version zero, good feature request though. |
@kataras yes I Talk about automatic reconnection.
I have a lot of '''server error disconect during work!''' my log in database |
OK let me implement it now then :) |
However you can check if it's closed by |
@kataras thank you . You're so good . I really owe you Because the projects of iris and neffos have helped me a lot. And when I have a problem, you fix it. When I used the signalr in .NET or when I used socketio, I had a lot of memory usage problems in browser. But in neffos, I can open several tabs without a memory usage problem. |
@kataras I'm trying to find a solution to avoid multiple connections over multiple open tabs or multiple browser. |
It's my pleasure @majidbigdeli !!! It's done with neffos.js: d3bb155 and neffos: kataras/neffos@5314c23. Simple by pass a neffos.js/_examples/browserify/app.js Lines 52 to 59 in d3bb155
UPDATE I also added some features that you didn't ask but I think you will love it, such as count of total retries on suceed reconnection on the server-side. neffos.js/_examples/browserify/app.js Lines 36 to 39 in 91eb944
Lines 91 to 94 in 91eb944
|
@majidbigdeli You need to communicate across web browser windows, this requires some knowedge about the window api and how
For nodejs and go side there is a Hope I helped you |
@kataras You are wonderful. |
…ailable, relative to kataras/neffos.js#2
…d wasReconnected(): boolean method to check if a connection is a result of a reconnection - same as the go server side #2
Thanks @majidbigdeli !!! I updated the API a bit giving some more information on the connection itself, go:
|
Updated: reconnection is available on nodejs side as well. |
hello @kataras |
@majidbigdeli, no need to duplicate the issues, this belongs to this repository:P Lines 871 to 874 in ca73e99
Line 884 in ca73e99
But yes... javascript replace works with regexp, funny that it worked locally, anyway... I'll replace it with this one instead: Sorry for the delay but I was working with the wiki and a pdf book of the neffos (on the neffos/README). |
@kataras I am Sorry. |
Hey no worries @majidbigdeli !!! Does the new neffos.js version fixed the issue? |
I get another issue I get and when I re connect network i get I get two server ; 1 panel (https://dev.iwin.ir) and 2 neffos server (wss.ami.dev.iwin.local:3811) that this call in panel |
OK that's normal, first of all: The Lines 868 to 869 in 374700d
The second one is easy to fix, I wanted to do it but I didn't think was necessary, as it seems it is. Update to 0.0.18 and tell me the results, thanks a lot @majidbigdeli |
thanks a lot @kataras
. But I now see Your last Commit( 7384e2d ) for version 0.0.18 |
Nice @majidbigdeli , however, you don't need an external middleware for that, just set a header:
can I ask why you don't use Iris in this one? You can use it with Iris v11.1.1 too: app.Get("/echo", iris.FromStd(server)) and on v11.2.0 you can optionally do the following to have import (
// [...]
"github.com/kataras/iris/websocket"
"github.com/kataras/neffos"
) app.Get("/echo", websocket.Handler(server)) neffos.OnNamespaceConnected: func(nsConn *neffos.NSConn, msg neffos.Message) error {
// with `websocket.GetContext` you can retrieve the Iris' `Context`.
ctx := websocket.GetContext(nsConn.Conn)
// [...]
} |
@kataras yes . I just use iris . Thank you . |
You are amazing @majidbigdeli thank you for your truly support once again! Earlier today I've pushed a new Iris feature that some of my clients wanted as well, it's not the correct repository and issue to describe it, but in short it offers request authentication and verification that your company may want to use at: https://github.com/kataras/iris/blob/660849d01ce59cf926ffbb6df83d1385cdb239db/_examples/authentication/request/main.go |
@kataras I read this. Thank you. |
What's your idea about this issue that the event will not be caught e.g 5 hours after connecting,
When we press the F5 key (refresh) the problem will be fixed.
Is it possible for network problems ? If the problem is this, how to fix it?
E.g. sending a request to the server again for connecting
The text was updated successfully, but these errors were encountered: