| Crates.io | realm_hook |
| lib.rs | realm_hook |
| version | 0.1.5 |
| created_at | 2022-05-03 11:58:46.30029+00 |
| updated_at | 2026-01-10 22:44:59.120781+00 |
| description | Realm's flexible hooks. |
| homepage | |
| repository | https://github.com/zhboner/realm |
| max_upload_size | |
| id | 579697 |
| size | 5,739 |
Realm's flexible hooks.
// 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(int32_t max_remote_idx, const char *pkt);