|
|
@ -25,5 +25,6 @@ pub trait ServerState { |
|
|
|
fn on_connect(&mut self, id: ClientId) -> Vec<OnConnect<Self::SendPacket>>;
|
|
|
|
fn handle(&mut self, id: ClientId, pkt: &Self::RecvPacket)
|
|
|
|
-> Result<Box<dyn Iterator<Item = (ClientId, Self::SendPacket)>>, Self::PacketError>;
|
|
|
|
fn on_disconnect(&mut self, id: ClientId) -> Vec<(ClientId, Self::SendPacket)>;
|
|
|
|
}
|
|
|
|
|