public void Send(Packet packet) { writer = new PacketWriter(); packet.Write(writer); sock.Send(writer.Buffer()); }
public void Read(Packet packet) { reader = new PacketReader(new MemoryStream(packet.Buffer())); packet.Process(reader); }