![]() |
C-chat
|
Defines constants used on client and server (used for consistency) More...
Go to the source code of this file.
Macros | |
#define | MSG_MAX_LENGTH 250 |
Maximum message size. | |
#define | USERNAME_MAX_LENGTH 20 |
Maximum length for a client username. | |
#define | FILE_TRANSFER_CHUNK_SIZE 200 |
Size of data chunks for file transfer. | |
#define | MAX_FILE_SIZE_UPLOAD 800000000 |
Maximum allowed size for file upload (bytes) | |
#define | MAX_CONCURRENT_FILE_TRANSFER 2 |
Maximum concurrent transfer of file allowed per client. | |
#define | ROOM_NAME_MAX_LENGTH 20 |
The maximum length for a name of a room. | |
#define | ROOM_DESC_MAX_LENGTH 120 |
The maximum length for the description of a room. | |
#define | MAX_USERS_PER_ROOM 10 |
The maximum amount of users connected simultaneously to a room. | |
#define | NUMBER_ROOM_MAX 20 |
The maximum of supported rooms. | |
#define | JOIN_MESSAGE_TYPE 0 |
An integer representing a join message. | |
#define | LEAVE_MESSAGE_TYPE 1 |
An integer representing a leave message. | |
#define | TEXT_MESSAGE_TYPE 2 |
An integer representing a text message. | |
#define | DEFINE_USERNAME_MESSAGE_TYPE 3 |
An integer representing a message meant to define the client username. | |
#define | SERVER_ERROR_MESSAGE_TYPE 4 |
An integer representing an error message sent by server. | |
#define | USERNAME_CHANGED_MESSAGE_TYPE 5 |
An integer representing a message meant to notify clients a client changed its username. | |
#define | QUIT_MESSAGE_TYPE 6 |
An integer representing a message meant to notify the server the client wants to quit the room. | |
#define | FILE_UPLOAD_REQUEST_MESSAGE_TYPE 7 |
An integer representing a message meant to ask the server for file upload. | |
#define | FILE_DOWNLOAD_REQUEST_MESSAGE_TYPE 8 |
An integer representing a message meant to ask the server for file download. | |
#define | FILE_UPLOAD_VALIDATION_MESSAGE_TYPE 9 |
An integer representing a message sent by server to client to validate/invalidate its file upload request. | |
#define | FILE_DATA_TRANSFER_MESSAGE_TYPE 10 |
An integer representing a message that transfers file data between client and server. | |
#define | FILE_DOWNLOAD_VALIDATION_MESSAGE_TYPE 11 |
An integer representing a message sent by server to client to validate/invalidate its file download request. | |
#define | FILE_TRANSFER_CANCEL_MESSAGE_TYPE 12 |
An integer representing a message sent between client/server to cancel a file transfer. | |
#define | SERVER_SUCCESS_MESSAGE_TYPE 13 |
An integer representing a success message sent by server. | |
#define | CREATE_ROOM_MESSAGE_TYPE 14 |
An integer representing a message sent by client to ask for room creation. | |
#define | JOIN_ROOM_MESSAGE_TYPE 15 |
An integer representing a message sent by client to join room. | |
#define | LEAVE_ROOM_MESSAGE_TYPE 16 |
An integer representing a message sent by client to leave a room. | |
#define | LIST_ROOMS_MESSAGE_TYPE 17 |
An integer representing a message sent by client to ask existing rooms list. | |
Defines constants used on client and server (used for consistency)