5 releases

0.1.4 May 4, 2022
0.1.3 May 4, 2022
0.1.2 May 3, 2022
0.1.1 May 3, 2022
0.1.0 May 3, 2022

#5 in #realm

Download history 15/week @ 2024-07-18 18/week @ 2024-07-25 2/week @ 2024-08-01 50/week @ 2024-09-12 155/week @ 2024-09-19 162/week @ 2024-09-26 160/week @ 2024-10-03 74/week @ 2024-10-10

97 downloads per month
Used in realm_core

MIT license

4KB

Realm Hook

crates.io Released API docs

Realm's flexible hooks.

Pre-connect Hook

// Get the required length of first packet.
uint32_t realm_first_pkt_len();
// Get the index of the selected remote peer.
//
// Remote peers are defined in `remote`(default) and `extra_remotes`(extended),
// where there should be at least 1 remote peer whose idx is 0.
//
// idx < 0 means **ban**.
// idx = 0 means **default**.
int32_t realm_decide_remote_idx(const char*);

lib.rs:

Realm's flexible hooks.

Pre-connect Hook

first_pkt_len

decide_remote_idx

Dependencies

~120–310KB