Hello
I have already a libuv event loop driving a nodejs libuv client(say client A) via named pipe . I want the same to drive c-nats client as well . Do i need to use libuv adapter and write the below code
// Indicate which loop and callbacks to use once connected.
if (s == NATS_OK)
s = natsOptions_SetEventLoop(opts, (void*)uvLoop,
natsLibuv_Attach,
natsLibuv_Read,
natsLibuv_Write,
natsLibuv_Detach);
if (s == NATS_OK)
s = natsConnection_Connect(&conn, opts);
if (s == NATS_OK)
s = natsConnection_Subscribe(&sub, conn, subj.c_str(), onMsg, NULL);
Here the uvloop is already running .
This way can i get all the same writes from libuv that happens to the client A ,so that it can be forwarded to nats broker ?