mirror of
https://github.com/taigrr/nats.docs
synced 2025-01-18 04:03:23 -08:00
GitBook: [master] 178 pages modified
This commit is contained in:
committed by
gitbook-bot
parent
30e3cdc1fa
commit
d21aed4887
@@ -91,16 +91,16 @@ let nc = await connect({
|
||||
nnatsConnection *conn = NULL;
|
||||
natsOptions *opts = NULL;
|
||||
natsStatus s = NATS_OK;
|
||||
|
||||
|
||||
s = natsOptions_Create(&opts);
|
||||
if (s == NATS_OK)
|
||||
// Set the timeout to 10 seconds (10,000 milliseconds)
|
||||
s = natsOptions_SetTimeout(opts, 10000);
|
||||
if (s == NATS_OK)
|
||||
s = natsConnection_Connect(&conn, opts);
|
||||
|
||||
|
||||
(...)
|
||||
|
||||
|
||||
// Destroy objects that were created
|
||||
natsConnection_Destroy(conn);
|
||||
natsOptions_Destroy(opts);
|
||||
|
||||
Reference in New Issue
Block a user