sacOO7 / socketcluster-client-go

GO client for socketcluster
https://socketcluster.io/
Apache License 2.0
55 stars 20 forks source link

Reconnection , auto channel Subscribe and proper logging #1

Open sacOO7 opened 6 years ago

sacOO7 commented 6 years ago

Need to implement reconnection and auto channel subscribe for the client. Implement proper logging using https://github.com/sirupsen/logrus

evnix commented 5 years ago

was this ever implemented? At the moment it is useless for any long running go programs without auto reconnection when internet is lost

evnix commented 5 years ago

some example to copy from here: https://github.com/Freeaqingme/go-socketcluster-client

stevenaldinger commented 3 years ago

I need auto-reconnecting too, do you have any tips on how to hack that into this client @sacOO7 or does it absolutely need to be handled in the https://github.com/sacOO7/GoWebsocket dependency?

edit for anyone who has this issue. if you run client.Connect() in onDisconnect handler it seems to work well enough:

func onDisconnect(client scclient.Client, err error) {
    fmt.Printf("Error: %s\n", err.Error())
    client.Connect()
}
sacOO7 commented 3 years ago

Okay, I will check and let you know : )

On Mon, Mar 8, 2021 at 8:32 AM Steven Aldinger notifications@github.com wrote:

I need auto-reconnecting too, do you have any tips on how to hack that into this client @sacOO7 https://github.com/sacOO7 or does it absolutely need to be handled in the https://github.com/sacOO7/GoWebsocket dependency?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/sacOO7/socketcluster-client-go/issues/1#issuecomment-792426567, or unsubscribe https://github.com/notifications/unsubscribe-auth/AD7S6SK4MXBDND6CXCXZEYLTCQ45HANCNFSM4EIYD4VA .