-
Notifications
You must be signed in to change notification settings - Fork 18
Open
Description
We could add impl Middleware for Option<M: Middleware>.
Then piplines could be done line so
struct Pipeline {
encryption: Option<Encryption>,
compression: Option<Compression>,
}
fn handle(packet: _, pipeline: &mut Pipeline) {
match packet {
LoginSuccess => {
pipeline.encryption = Some(Encryption::new(..));
},
}
}This would be required for protocols such as minecraft, which optionally enables encryption at login.
Metadata
Metadata
Assignees
Labels
No labels