src/network/core/packet.h
changeset 6169 31cdbb4845f1
parent 6151 4b5e33f35bbe
child 6268 4b5241e5dd10
equal deleted inserted replaced
6168:b587bfc4e44e 6169:31cdbb4845f1
    43 	Packet(PacketType type);
    43 	Packet(PacketType type);
    44 
    44 
    45 	/* Sending/writing of packets */
    45 	/* Sending/writing of packets */
    46 	void PrepareToSend(void);
    46 	void PrepareToSend(void);
    47 
    47 
       
    48 	void Send_bool  (bool   data);
    48 	void Send_uint8 (uint8  data);
    49 	void Send_uint8 (uint8  data);
    49 	void Send_uint16(uint16 data);
    50 	void Send_uint16(uint16 data);
    50 	void Send_uint32(uint32 data);
    51 	void Send_uint32(uint32 data);
    51 	void Send_uint64(uint64 data);
    52 	void Send_uint64(uint64 data);
    52 	void Send_string(const char* data);
    53 	void Send_string(const char* data);
    54 	/* Reading/receiving of packets */
    55 	/* Reading/receiving of packets */
    55 	void ReadRawPacketSize(void);
    56 	void ReadRawPacketSize(void);
    56 	void PrepareToRead(void);
    57 	void PrepareToRead(void);
    57 
    58 
    58 	bool   CanReadFromPacket (uint bytes_to_read);
    59 	bool   CanReadFromPacket (uint bytes_to_read);
       
    60 	bool   Recv_bool  (void);
    59 	uint8  Recv_uint8 (void);
    61 	uint8  Recv_uint8 (void);
    60 	uint16 Recv_uint16(void);
    62 	uint16 Recv_uint16(void);
    61 	uint32 Recv_uint32(void);
    63 	uint32 Recv_uint32(void);
    62 	uint64 Recv_uint64(void);
    64 	uint64 Recv_uint64(void);
    63 	void   Recv_string(char* buffer, size_t size);
    65 	void   Recv_string(char* buffer, size_t size);