mirror of
https://github.com/taigrr/nats.docs
synced 2025-01-18 04:03:23 -08:00
clean up some code blocks
This commit is contained in:
parent
c966383582
commit
ffe4837710
@ -43,7 +43,7 @@ nc.on('error', (err) => {
|
||||
t.log('client got an error:', err);
|
||||
});
|
||||
nc.on('connect', () => {
|
||||
t.log(nc.info.max_payload);
|
||||
t.log(nc.info.max_payload);
|
||||
});
|
||||
```
|
||||
{% endtab %}
|
||||
@ -65,7 +65,7 @@ print("Maximum payload is %d bytes" % nc.max_payload)
|
||||
require 'nats/client'
|
||||
|
||||
NATS.start(max_outstanding_pings: 5) do |nc|
|
||||
nc.on_reconnect do
|
||||
nc.on_reconnect do
|
||||
puts "Got reconnected to #{nc.connected_server}"
|
||||
end
|
||||
|
||||
|
@ -38,7 +38,7 @@ nc.close();
|
||||
|
||||
{% tab title="JavaScript" %}
|
||||
```javascript
|
||||
// Reconnect buffer size is not configurable on NATS Javascript client
|
||||
// Reconnect buffer size is not configurable on NATS JavaScript client
|
||||
```
|
||||
{% endtab %}
|
||||
|
||||
@ -56,7 +56,7 @@ nc.close();
|
||||
|
||||
{% tab title="TypeScript" %}
|
||||
```typescript
|
||||
// Reconnect buffer size is not configurable on NATS Typescript client
|
||||
// Reconnect buffer size is not configurable on NATS TypeScript client
|
||||
```
|
||||
{% endtab %}
|
||||
|
||||
|
@ -32,7 +32,7 @@ nc.close();
|
||||
|
||||
{% tab title="JavaScript" %}
|
||||
```javascript
|
||||
llet nc = NATS.connect({
|
||||
let nc = NATS.connect({
|
||||
reconnect: false,
|
||||
servers: ["nats://demo.nats.io:4222"]
|
||||
});
|
||||
|
@ -40,7 +40,8 @@ nc.close();
|
||||
```javascript
|
||||
let nc = NATS.connect({
|
||||
noRandomize: true,
|
||||
servers: ["nats://127.0.0.1:4443",
|
||||
servers: [
|
||||
"nats://127.0.0.1:4443",
|
||||
"nats://demo.nats.io:4222"
|
||||
]
|
||||
});
|
||||
@ -83,7 +84,8 @@ end
|
||||
// will throw an exception if connection fails
|
||||
let nc = await connect({
|
||||
noRandomize: true,
|
||||
servers: ["nats://127.0.0.1:4443",
|
||||
servers: [
|
||||
"nats://127.0.0.1:4443",
|
||||
"nats://demo.nats.io:4222"
|
||||
]
|
||||
});
|
||||
|
Loading…
x
Reference in New Issue
Block a user