* Create a packet that is used to read from a network socket. * @param cs The socket handler associated with the socket we are reading from. * @param limit The maximum size of packets to accept. * @param initial_read_size The initial amount of data to transfer from the socket into the * packet. This defaults to just the required bytes to dete
| 29 | * size for the packet you expect from the network. |
| 30 | */ |
| 31 | Packet::Packet(NetworkSocketHandler *cs, size_t limit, size_t initial_read_size) : pos(0), limit(limit) |
| 32 | { |
| 33 | assert(cs != nullptr); |
| 34 | |
| 35 | this->cs = cs; |
| 36 | this->buffer.resize(initial_read_size); |
| 37 | } |
| 38 | |
| 39 | /** |
| 40 | * Creates a packet to send |
nothing calls this directly
no test coverage detected