Comments (5)
@museghost Are you using source that include this merged change to attach? #93
The library calls natsLibuv_Attach
with natsSock
which on Windows is a SOCKET and not an int. So this should work.
Note that in libuv master, the call uv_pool_init_socket
has been removed (see libuv/libuv#1166). So your changes would work only in the 1.x branch.
Let's first make sure that you are using the changes described above.
Thanks!
from nats.c.
@kozlovic
At first, thank you for your guide. For both two points, here is my situation.
-
the source what I have used is the latest one after #93 patch already.
-
For being ready for 2.x branch, hmm... I need to more investigate and test it.
As you see the source of libuv 1.14 branch around uv_poll_init in src/win/poll.c (since line 508), uv_poll_init tries to get the os file handler using uv__os_osfhandler().
And the function might make this issue and that's what I want to check deeply. Then I will let you know it asap.
Also my windows environment is windows server 2012 R2 64 bit with mingw 64 7.1.0.
Thank you again.
from nats.c.
@kozlovic
Dear CNATS team
For this issue, it is found at libuv/libuv#1077. According to the libuv dev team, they guided as below.
On Windows uv_poll_init should be used for CRT fds and uv_poll_init_socket for SOCKET handles.
If natsSocket (in fact, ctx->fd) is SOCKET in windows, uv_poll_init_socket() is required as above, however, for 2.0 branch, it might be not feasible.
Could you please tell me your opinion on that ? Do we need a patch ?
Best Regards
Thank you again,
from nats.c.
@museghost Sorry for the delay. Could you try with code from PR #117?
I am using UV_VERSION_MAJOR
to detect if running against libuv 1.x or above. As you know, starting in 2.0, they have removed uv_poll_init_socket
and actually renamed it to uv_poll_init
, so when running with libuv 2.0, we have to call uv_poll_init
(since the xx_socket
API has been removed) and uv_poll_init_socket
on libuv < 2.0.
I have checked and it works for me on MacOS X (tried with libuv 1.16 and master) and Windows (tried with 2.0). Please let me know if it works for you and I will merge it to master.
from nats.c.
@museghost I did not get confirmation that this worked for you, but I went ahead and merged the PR #117. Hope this helps. Thanks!
from nats.c.
Related Issues (20)
- Jetstream: API for QueueSubscribeSync() HOT 1
- Error: multiple non-filtered consumers not allowed on workqueue stream HOT 2
- add upb support HOT 1
- close Realtek Gaming 2.5GbE Family Controller,nats server subject has been forever HOT 3
- build fails on armel HOT 1
- natsSubscription_Destroy submits UNSUB even after DELSUB HOT 2
- natsStatus_GetText does not work with jsErrCode HOT 1
- unable to build c-nats client dependency protoc-c as "Protobuf_SRC_ROOT_FOLDER-NOTFOUND" error is always there. HOT 1
- unable to build c-nats client dependency protoc-c HOT 1
- jsErrCode comments/naming incorrect in status.h? HOT 1
- Please document the use of UTF-8 HOT 2
- Compile Using MinGW-w64 w/ pthreads
- js_DirectGetMsg return NATS_TIMEOUT HOT 3
- Consumer/Durable name validation
- Jetstream doesn't work with SetNoEcho HOT 3
- natsConnection_Status segfaults HOT 1
- Question: Is it possible to guard against the asynchronous callbacks for reconnect, disconnect and closed HOT 1
- OpenSSL 3? HOT 6
- Jetstream consumer configuration HOT 2
- Rate Limit of Push Consumers for KV Watches HOT 13
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 nats.c.