Bloop Server Framework
This library helps you to quickly get a Bloop server up and running. It handles all the heavy lifting like the network protocol, general game logic, and a few additional extras.
The framework implements the Bloop Protocol v3. The wire format itself lives in the
bloop-protocol crate, re-exported here as
bloop_server_framework::bloop_protocol.
Custom messages
Protocol extensions (opcodes 0x80 and above) are defined with the bloop-protocol derives. The derive macros
expand to paths in the bloop_protocol crate, so extension crates need it as a direct dependency next to the
framework:
[]
= "1"
= "2"
Messages plug into the listener via NetworkListenerBuilder::custom_req_tx. The channel's message type selects the
listener's extension sets, and your handler receives fully typed requests:
use ;
use ;
use mpsc;
;
async
Unknown opcodes and malformed payloads are answered by the listener itself; handlers only ever see requests that decoded into their extension set.
Quick start
A minimal in-memory example can be found in the examples folder. You can run it like this:
cargo run --example simple --all-features
Evaluators
This library comes with a couple of generic evaluators you can plug straight into your achievements!