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