mirror of
https://github.com/griffi-gh/kubi.git
synced 2024-11-25 16:28:42 -06:00
x
This commit is contained in:
parent
65ecf0de62
commit
8ff2a828ad
|
@ -24,6 +24,7 @@ impl<S, R> Client<S, R> where S: Encode + Decode, R: Encode + Decode {
|
|||
client.send_packet(&ClientPacket::Connect)?;
|
||||
Ok(client)
|
||||
}
|
||||
//maybe move generics here if possible?
|
||||
fn send_packet(&self, packet: &ClientPacket<S>) -> anyhow::Result<()> {
|
||||
let bytes = bincode::encode_to_vec(packet, BINCODE_CONFIG)?;
|
||||
self.socket.send(&bytes)?;
|
||||
|
|
Loading…
Reference in a new issue