|
@@ -237,6 +237,12 @@ profile {
|
237
|
237
|
behaviour {
|
238
|
238
|
requestModesOnJoin = true
|
239
|
239
|
alwaysEchoMessages = true
|
|
240
|
+ preferIPv6 = false
|
|
241
|
+ sendPings {
|
|
242
|
+ sendPeriod = Duration.ofSeconds(120)
|
|
243
|
+ responseGracePeriod = Duration.ofSeconds(30)
|
|
244
|
+ incomingLinesResetTimer = true
|
|
245
|
+ }
|
240
|
246
|
}
|
241
|
247
|
|
242
|
248
|
sasl {
|
|
@@ -318,6 +324,41 @@ advanced IRC features even if the server doesn't support them:
|
318
|
324
|
|
319
|
325
|
The behaviour block is optional in its entirety.
|
320
|
326
|
|
|
327
|
+==== Ping timeouts
|
|
328
|
+
|
|
329
|
+The behaviour config has an optional `sendPings` configuration, which
|
|
330
|
+instructs KtIrc to automatically send ping requests to the server.
|
|
331
|
+This ensures that the server is still connected and operating properly,
|
|
332
|
+and will trigger a disconnect if that is not the case.
|
|
333
|
+
|
|
334
|
+The sendPings block looks like:
|
|
335
|
+
|
|
336
|
+[source,kotlin]
|
|
337
|
+----
|
|
338
|
+sendPings {
|
|
339
|
+ sendPeriod = Duration.ofSeconds(120) <1>
|
|
340
|
+ responseGracePeriod = Duration.ofSeconds(30) <2>
|
|
341
|
+ incomingLinesResetTimer = true <3>
|
|
342
|
+}
|
|
343
|
+----
|
|
344
|
+<1> The `sendPeriod` defines how often KtIrc should send pings. Most
|
|
345
|
+ applications will probably want to send pings somewhere between
|
|
346
|
+ every 30 seconds and every minute or two. If the `sendPings`
|
|
347
|
+ block is present, this field is required.
|
|
348
|
+<2> The `responseGracePeriod` defines how long KtIrc will wait for a
|
|
349
|
+ response from the server before it considers the server to be
|
|
350
|
+ malfunctioning. Setting this too low will result in disconnects
|
|
351
|
+ when the connection to the server is merely suffering from high
|
|
352
|
+ latency, rather than irreparably broken. If the `sendPings`
|
|
353
|
+ block is present, this field is required.
|
|
354
|
+<3> The only optional field in the `sendPings` block, the
|
|
355
|
+ `incomingLinesResetTimer` setting determines whether KtIrc will
|
|
356
|
+ treat _any_ incoming line in the same way as a `PONG` response;
|
|
357
|
+ in effect it prevents KtIrc from disconnecting from a server
|
|
358
|
+ suffering from high latency as long as the server keeps sending
|
|
359
|
+ _something_. When disabled (or not specified), KtIrc will require
|
|
360
|
+ an explicit `PONG` reply.
|
|
361
|
+
|
321
|
362
|
=== SASL configuration
|
322
|
363
|
|
323
|
364
|
SASL ("Simple Authentication and Security Layer") is a standard mechanism
|
|
@@ -1179,6 +1220,14 @@ If the user is no longer logged in to an account, `newAccount` will be
|
1179
|
1220
|
Raised when the IRC server sends a PING message to the client. KtIrc will
|
1180
|
1221
|
automatically reply with an appropriate PONG.
|
1181
|
1222
|
|
|
1223
|
+==== PongReceived
|
|
1224
|
+* Type: IrcEvent
|
|
1225
|
+* Properties:
|
|
1226
|
+** `nonce`: `ByteArray` - the unique data that was sent in the PING
|
|
1227
|
+
|
|
1228
|
+Raised when the IRC server sends a PONG message to the client. KtIrc can
|
|
1229
|
+automatically send pings and handle pongs, see <<Ping timeouts>>.
|
|
1230
|
+
|
1182
|
1231
|
==== ServerFeaturesUpdated
|
1183
|
1232
|
* Type: IrcEvent
|
1184
|
1233
|
* Properties:
|