-
-
Notifications
You must be signed in to change notification settings - Fork 193
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 get information about why the first connection attempt has failed? #407
Comments
@dmg46664 Hi Daniel,
Sorry, can you please clarify: it sounds like you're trying to connect a Sente client to a a non-Sente server? |
Thanks for a prompt response @ptaoussanis |
@dmg46664 No problem.
Unfortunately Sente won't work in this case- a Sente client can connect only to a Sente server.
I believe that the README and examples are hopefully reasonably clear that Sente is a client+server library that requires the server component? The Getting Started guide and examples all begin by starting a Sente server, and no support is claimed for the NodeJS WS library. In any case, I understand that this must be frustrating news. I apologise if this could have been clearer, it hadn't occurred to me that someone might expect Sente to interop directly with NodeJS WS. PR very welcome to help improve the README 👍
As the README mentions, this will include things like the automatic buffering/batching, arbitrary Clojure value support, the built-in user-id mechanism, etc. Different libraries will inevitably offer different tradeoffs - Sente's objective was never interop with other servers, but a maximally pleasant experience for its common use case of Clojure server and Clojure clients. Am not certain, but I guess there may be other lighter Clojure clients available that can interop directly with NodeJS WS. Best of luck! |
Not NodeJS WS, but the WebSocket protocol. Yip, that is very frustrating 😢
None of the features mentioned in the quoted list conflict fundamentally with Websockets and so the expectation was this provides convenience on top of the protocol. |
I thought the value add here was |
Sorry, still not sure I clearly understand what you're trying to accomplish. In any case, it does seem that Sente won't be useful in your case due to its custom protocol. You may want to consider just using WebSockets directly if possible (often pretty easy if you don't want auto fallback and all the other features), or you could check if there's other libraries around more in line with your needs. Closing for now, but PR welcome if you'd like to suggest any clarifications to the README. Cheers :-) |
Hi,
I'm porting client test code over to sente (because I was using a node.js lib and core.async) but the actual target will be react-native.
There is no evidence on the local server (already written with npm ws) that any connection attempt was made. ❌ (eventual server will be AWS gateway websockets backed by lambda fns)
⚠️ I'm more perplexed however that I can't find a way to see any error state on the client, or any evidence as to the nature of connection attempt.
My code is as follows:
Apon calling this I can see the following coming from somewhere within
sente
but not failure message is in the logs.followed by my debug message:
Eventually the watch shows
but this doesn't give me the ability to look for the failed connection information. Only a change in state.
What am I doing wrong? TIA
P.S. Logging here as per #406 your suggestion about node.js
The text was updated successfully, but these errors were encountered: