Comments (5)
I am re-resting this with the latest NNG build and an updated version of my code. The characterisation above was unfortunately incorrect - it was the long-running task that sometimes did not exit (this is also re-spawned periodically).
If I had to guess, it would be a deadlock upon closing a websocket stream. But this is possibly my error and not the library. Hope to report back shortly.
from nng.
It seems to be resolved. FYI I think the issue was a deadlock on stream dialer close on a 'wss' stream, as I was not building libmbedtls with pthread support (needs to be enabled in 'mbedtls_config.h').
There is nothing gating from my side now for an NNG 1.6.0 release. Thanks, and apologies for raising a false concern!
from nng.
It seems to be resolved. FYI I think the issue was a deadlock on stream dialer close on a 'wss' stream, as I was not building libmbedtls with pthread support (needs to be enabled in 'mbedtls_config.h').
There is nothing gating from my side now for an NNG 1.6.0 release. Thanks, and apologies for raising a false concern!
Hi, i want to build a websocket server use NNG, but there seems just a little information about this, no matter in docs or codes.
The problem which most confused me is that if just use simple rep/req mode how can i create a new websocket server? If i use http api, this seems will totally become a http server, just like nng/demo/rest?
Could you please tell me how you solved this problem?
from nng.
In that particular case, I was in fact using SP over WebSocket i.e. req/rep. If that's all you mean, then just specify a URL with the scheme 'ws://' instread of 'tcp://' in your listen / dial.
If you want to create an actual WebSocket server (speaking to a non-NNG client), then you need the low-level stream interface, and look into setting options for 'ws:recv-text' and 'ws:send-text' if you need to deal with text rather than binary frames.
I maintain the R language binding and there is quite extensive documentation there (https://shikokuchuo.net/nanonext/), which may help provide some intuitive grounding.
from nng.
In that particular case, I was in fact using SP over WebSocket i.e. req/rep. If that's all you mean, then just specify a URL with the scheme 'ws://' instread of 'tcp://' in your listen / dial.
If you want to create an actual WebSocket server (speaking to a non-NNG client), then you need the low-level stream interface, and look into setting options for 'ws:recv-text' and 'ws:send-text' if you need to deal with text rather than binary frames.
I maintain the R language binding and there is quite extensive documentation there (https://shikokuchuo.net/nanonext/), which may help provide some intuitive grounding.
Thanks for your reply.
It's unforunately that may be i need create a real WebSocket Server. Because it should need received multi-clients connections and transport information with them, although client&server communication by NNG.
from nng.
Related Issues (20)
- Deadlock during nng_close() - multi platform HOT 23
- Sendmsg Thread Blocking HOT 3
- How to create a new language binding using a binary/dll? HOT 1
- Compiler warnings / errors from new logging feature on Windows HOT 2
- Windows a deadlock on `nng_close()` HOT 13
- mqttv5_client chokes on CONNACK packet HOT 2
- setting NNG_OPT_TLS_CONFIG on socket should hold reference HOT 6
- Memory Leak in nng_rep0_open HOT 2
- IPC - Use After Free HOT 4
- Will the NNG framework built-in handle packet splitting and sticking issues during streaming transmission? HOT 2
- Tools or API could obtain all communication endpoint information for establishing communication with this machine HOT 2
- nng_socket_set_ms didn't work HOT 2
- How to build nng_testing as a dynamic library? HOT 2
- Add support for TLS PSK
- merge wolfSSL support inline, and relicense it under same terms as NNG and add PSK HOT 1
- Document - Wrong description HOT 1
- add TLS 1.3 support for Mbed TLS HOT 1
- Warning on calloc() HOT 2
- Some confusion about using nng together with select/poll/epoll on linux HOT 1
- I feel that nng has experienced a serious memory leak. Can someone tell me what happened? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nng.