Realm Hook

crates.io Released API docs

Realm's flexible hooks.

Pre-connect Hook

c // Get the required length of first packet. uint32_t realm_first_pkt_len();

c // 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*);