Replies: 3 comments
-
Yes, it can be done.. and has been done. Although I'm not too sure about specific details, and it may be tricky if the sandbox doesn't offer regular real networking access. (Arguably we could make a webasm platform port.) |
Beta Was this translation helpful? Give feedback.
-
@gdamore is there anyway to nng implement websockets natively on webasm? Or do we need to somehow use the existing javascript api and interface it backwards to C? Is there any code to investigate? |
Beta Was this translation helpful? Give feedback.
-
@Grabber you could use websockets directly, but not as part of NNG proper. There isn't a pure JS version of the protocols. -- although you could probably implement a very light weight version if you only need a subset of the functionality. The wire protocol is documented., For the record, NNG 2.0 is probably going to change the websocket encoding slightly -- it was a grave mistake in nanomsg (and thus also NNG 1.0 and mangos) to rely upon the low level websocket framing. I'm going to fix that. |
Beta Was this translation helpful? Give feedback.
-
Is it possible to use nng as a webasm module for WebSocket?
I have one scenario where I would like to have just one low-level networking library to connect to WebSocket and use it as a base for Android, iOS, WebApp etc.
Is it possible somehow?
Beta Was this translation helpful? Give feedback.
All reactions