This commit is contained in:
2026-02-23 21:37:50 +07:00
parent 76f42be740
commit 0fa6eaf95b

View File

@@ -465,7 +465,7 @@ smartsend("/topic", data)
```javascript ```javascript
await smartsend("/topic", [ await smartsend("/topic", [
{ dataname: "message", data: "Hello", type: "text" } { dataname: "message", data: "Hello", type: "text" }
], { isPublish: false }); ]);
``` ```
#### Julia #### Julia
@@ -488,7 +488,7 @@ smartsend("/topic", data, fileserver_url="http://localhost:8080")
```javascript ```javascript
await smartsend("/topic", [ await smartsend("/topic", [
{ dataname: "file", data: largeData, type: "binary" } { dataname: "file", data: largeData, type: "binary" }
], { fileserverUrl: "http://localhost:8080", isPublish: false }); ], { fileserverUrl: "http://localhost:8080" });
``` ```
#### Julia #### Julia
@@ -694,7 +694,7 @@ asyncio.run(main())
```javascript ```javascript
const { smartsend } = require('./src/NATSBridge'); const { smartsend } = require('./src/NATSBridge');
await smartsend("/device/command", [ const { env, msg_json_str } = await smartsend("/device/command", [
{ dataname: "command", data: { action: "read_sensor" }, type: "dictionary" } { dataname: "command", data: { action: "read_sensor" }, type: "dictionary" }
], { ], {
replyTo: "/device/response" replyTo: "/device/response"
@@ -736,7 +736,7 @@ main();
```julia ```julia
using NATSBridge using NATSBridge
env = NATSBridge.smartsend( env, msg_json_str = NATSBridge.smartsend(
"/device/command", "/device/command",
[("command", Dict("action" => "read_sensor"), "dictionary")]; [("command", Dict("action" => "read_sensor"), "dictionary")];
reply_to="/device/response" reply_to="/device/response"