0.3.2: UDP timeout support, fix #4
This commit is contained in:
1 parent
4d178d951f
commit
40b8723132
12 files changed
+130
-37
No files matched your search
@@ -1,6 +1,6 @@
|
||||
# Kiloparsec
|
||||
|
||||
__Recommended version is `0.3.2`: to keep the code compatible with current and further versions we
|
||||
__Recommended version is `0.3.3`: to keep the code compatible with current and further versions we
|
||||
ask to upgrade to `0.3.2` at least.__ Starting from this version some pacakage names are changed for
|
||||
better clarity and fast UDP endpoints are added.
|
||||
|
||||
@@ -183,6 +183,8 @@ Is very much straightforward, same as with TCP/IP:
|
||||
|
||||
### UDP specifics
|
||||
|
||||
#### Command size
|
||||
|
||||
Each command invocation and result are packed in a separate UDP diagram using effective binary packing.
|
||||
Thus for the best results commands and results should be relatively short, best to fit into 240 bytes. While bigger datagrams are often transmitted successfully, the probability of the effective transmission drops with the size.
|
||||
|
||||
@@ -190,6 +192,14 @@ Kiloparsec UDP transport does not retransmits not delivered packets. Use TCP/IP
|
||||
|
||||
For the best results we recommend using [push](https://code.sergeych.net/docs/kiloparsec/kiloparsec/net.sergeych.kiloparsec/-remote-interface/index.html#1558240250%2FFunctions%2F788909594) for remote interfaces with UDP.
|
||||
|
||||
#### Timeouts
|
||||
|
||||
As Datagrams do not form protocol itself, kiloparsec issues pings when no data is circulated between parties.
|
||||
When no pings are received long enough, kiloparsec connection is closed. There are `maxInactivityTimeout` in all
|
||||
relevant functions and constructors.
|
||||
|
||||
Client shoudl not issue pings manually.
|
||||
|
||||
## Reusing code between servers
|
||||
|
||||
The same instance of the [KiloInterface](https://code.sergeych.net/docs/kiloparsec/kiloparsec/net.sergeych.kiloparsec/-kilo-interface/index.html?query=open%20class%20KiloInterface%3CS%3E%20:%20LocalInterface%3CKiloScope%3CS%3E%3E) could easily be reused with all instances of servers with different protocols.
|
||||
|
||||
Reference in new issue
Block a user