 |
C-chat
|
Go to the documentation of this file.
6 #ifndef C_CHAT_PACKETS_H
7 #define C_CHAT_PACKETS_H
260 #endif //C_CHAT_PACKETS_H
This packet is sent to server to ask for file upload.
Definition: packets.h:97
This packet is sent to server by client to notify him he wants to quit the room.
Definition: packets.h:87
This packet is sent to all clients of a room when a client sends a message.
Definition: packets.h:41
const union Packet NewPacketServerErrorMessage
Definition: packets.c:7
const union Packet NewPacketText
Definition: packets.c:5
This packet is sent by client to leave its room.
Definition: packets.h:201
Information of a socket.
Definition: sockets.h:19
This packet is sent by client to join a room.
Definition: packets.h:190
This packet is sent to all client of a room when a client leaves the room.
Definition: packets.h:27
const union Packet NewPacketFileDownloadRequest
Definition: packets.c:11
This packet is sent to server to ask for file download.
Definition: packets.h:108
#define USERNAME_MAX_LENGTH
Maximum length for a client username.
Definition: constants.h:23
This packet is sent to server by client to re-define its username.
Definition: packets.h:53
int receiveNextPacket(Socket socket, Packet *packet)
Receives the next packet incoming on the given socket.
Definition: packets.c:71
const union Packet NewPacketQuit
Definition: packets.c:9
const union Packet NewPacketFileTransferCancel
Definition: packets.c:15
const union Packet NewPacketServerSuccess
Definition: packets.c:16
const union Packet NewPacketJoin
Definition: packets.c:3
A generic union type for packets.
Definition: packets.h:221
const union Packet NewPacketFileDataTransfer
Definition: packets.c:14
This packet is sent by server to client on success.
Definition: packets.h:167
This packet is sent between client/server to cancel a file transfer.
Definition: packets.h:156
const union Packet NewPacketDefineUsername
Definition: packets.c:6
#define FILE_TRANSFER_CHUNK_SIZE
Size of data chunks for file transfer.
Definition: constants.h:29
int sendPacket(Socket socket, Packet *packet)
Sends the given packet on the given socket.
Definition: packets.c:95
const union Packet NewPacketLeave
Definition: packets.c:4
This packet is sent to all client of a room when an user of the room changes its username.
Definition: packets.h:75
This packet is sent to client by server to accept/reject a file upload.
Definition: packets.h:119
const union Packet NewPacketLeaveRoom
Definition: packets.c:19
This packet is sent by client to request existing rooms list.
Definition: packets.h:211
#define ROOM_DESC_MAX_LENGTH
The maximum length for the description of a room.
Definition: constants.h:54
#define MSG_MAX_LENGTH
Maximum message size.
Definition: constants.h:17
const union Packet NewPacketFileUploadRequest
Definition: packets.c:10
#define ROOM_NAME_MAX_LENGTH
The maximum length for a name of a room.
Definition: constants.h:48
const union Packet NewPacketFileUploadValidation
Definition: packets.c:12
This packet is sent by server to an user when an error occurs.
Definition: packets.h:64
Defines constants used on client and server (used for consistency)
This packet is exchanged between client and server to transfer file content.
Definition: packets.h:144
const union Packet NewPacketCreateRoom
Definition: packets.c:17
const union Packet NewPacketListRooms
Definition: packets.c:20
This packet is sent to client by server to accept/reject a file download.
Definition: packets.h:131
This packet is sent to all client of a room when a client joins the room.
Definition: packets.h:16
const union Packet NewPacketUsernameChanged
Definition: packets.c:8
This packet is sent by client to create a room.
Definition: packets.h:178
const union Packet NewPacketFileDownloadValidation
Definition: packets.c:13
const union Packet NewPacketJoinRoom
Definition: packets.c:18