-
Notifications
You must be signed in to change notification settings - Fork 704
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
webassembly nats client over websocket #530
Comments
Thanks, will have a look asap. |
nice, thanks. I think there is a reason why conn.Read returns 'n', should not be ignored. 😊 |
Yes, but returning 0 with err==nil is strange.. |
yeah, I guess its related to the websocket connection. As I said, I was not sure if its worth to change nats-client code. I ll upload my code soon to github. |
it is strange... |
We are close to having our own websocket support right in the server. Will close for now but feel free to re-open. |
Even though this is closed, weighing my enthusiasm for implementing this here. I'm building a gui command+control app targeting wasm as one the platforms, and native websocket support would be fantastic. |
We have websocket support in master, fyi. Will be in next release but is already in nightly builds. |
This is related to #1146 because "wasm websocket" is not "js websocket". |
Hi all,
I have written a http server which forwards a raw tcp nats connection to websocket.
The client is written in go, compiled to webassembly, running inside the browser.
I created a nats.CustomDialer and try to connect.
The result is something like this: 'nats: expected PONG, got ?PONG' error origin
So there is an unwanted symbol inside the PONG message. I added a few lines of code in func (nc *Conn) readProto()
Now i can use the nats client inside the browser and it works like a charm. I am not sure but I think this should be added to the nats client? If read length is zero, do not add it to the buffer.
The text was updated successfully, but these errors were encountered: