![]() |
C-chat
|
Defines types of packets that are exchanged between client and server. More...
Go to the source code of this file.
Classes | |
class | PacketJoin |
This packet is sent to all client of a room when a client joins the room. More... | |
class | PacketLeave |
This packet is sent to all client of a room when a client leaves the room. More... | |
class | PacketText |
This packet is sent to all clients of a room when a client sends a message. More... | |
class | PacketDefineUsername |
This packet is sent to server by client to re-define its username. More... | |
class | PacketServerErrorMessage |
This packet is sent by server to an user when an error occurs. More... | |
class | PacketUsernameChanged |
This packet is sent to all client of a room when an user of the room changes its username. More... | |
class | PacketQuit |
This packet is sent to server by client to notify him he wants to quit the room. More... | |
class | PacketFileUploadRequest |
This packet is sent to server to ask for file upload. More... | |
class | PacketFileDownloadRequest |
This packet is sent to server to ask for file download. More... | |
class | PacketFileUploadValidation |
This packet is sent to client by server to accept/reject a file upload. More... | |
class | PacketFileDownloadValidation |
This packet is sent to client by server to accept/reject a file download. More... | |
class | PacketFileDataTransfer |
This packet is exchanged between client and server to transfer file content. More... | |
class | PacketFileTransferCancel |
This packet is sent between client/server to cancel a file transfer. More... | |
class | PacketServerSuccess |
This packet is sent by server to client on success. More... | |
class | PacketCreateRoom |
This packet is sent by client to create a room. More... | |
class | PacketJoinRoom |
This packet is sent by client to join a room. More... | |
class | PacketLeaveRoom |
This packet is sent by client to leave its room. More... | |
class | PacketListRooms |
This packet is sent by client to request existing rooms list. More... | |
class | Packet |
A generic union type for packets. More... | |
Typedefs | |
typedef union Packet | Packet |
Functions | |
int | receiveNextPacket (Socket socket, Packet *packet) |
Receives the next packet incoming on the given socket. More... | |
int | sendPacket (Socket socket, Packet *packet) |
Sends the given packet on the given socket. More... | |
Variables | |
const union Packet | NewPacketJoin |
const union Packet | NewPacketLeave |
const union Packet | NewPacketText |
const union Packet | NewPacketDefineUsername |
const union Packet | NewPacketServerErrorMessage |
const union Packet | NewPacketUsernameChanged |
const union Packet | NewPacketQuit |
const union Packet | NewPacketFileUploadRequest |
const union Packet | NewPacketFileDownloadRequest |
const union Packet | NewPacketFileUploadValidation |
const union Packet | NewPacketFileDownloadValidation |
const union Packet | NewPacketFileDataTransfer |
const union Packet | NewPacketFileTransferCancel |
const union Packet | NewPacketServerSuccess |
const union Packet | NewPacketCreateRoom |
const union Packet | NewPacketJoinRoom |
const union Packet | NewPacketLeaveRoom |
const union Packet | NewPacketListRooms |
Defines types of packets that are exchanged between client and server.
Receives the next packet incoming on the given socket.
socket | The socket to receive the packet on |
packet | The packet to fill in with received data |
Sends the given packet on the given socket.
socket | The socket to send the packet on |
packet | The packet to send on the socket |
const union Packet NewPacketCreateRoom |
This instance is used to create a new PacketCreateRoom
const union Packet NewPacketDefineUsername |
This instance is used create a new PacketDefineUsername
const union Packet NewPacketFileDataTransfer |
This instance is used to create a new PacketFileDataTransfer
const union Packet NewPacketFileDownloadRequest |
This instance is used to create new PacketFileDownloadRequest
const union Packet NewPacketFileDownloadValidation |
This instance is used to create new PacketFileDownloadValidation
const union Packet NewPacketFileTransferCancel |
This instance is used to create a new PacketFileTransferCancel
const union Packet NewPacketFileUploadRequest |
This instance is used to create a new PacketFileUploadRequest
const union Packet NewPacketFileUploadValidation |
This instance is used to create new PacketFileUploadValidation
const union Packet NewPacketJoin |
This instance is used to create a new PacketJoin
const union Packet NewPacketJoinRoom |
This instance is used to create a new PacketJoinRoom
const union Packet NewPacketLeave |
This instance is used to create a new PacketLeave
const union Packet NewPacketLeaveRoom |
This instance is used to create a new PacketLeaveRoom
const union Packet NewPacketListRooms |
This instance is used to create a new PacketListRooms
const union Packet NewPacketQuit |
This instance is ued to create a new PacketQuit
const union Packet NewPacketServerErrorMessage |
This instance is used to create a new PacketServerErrorMessage
const union Packet NewPacketServerSuccess |
This instance is used to create a new PacketServerSuccess
const union Packet NewPacketText |
This instance is used to create a new PacketText
const union Packet NewPacketUsernameChanged |
This instance is used to create a new PacketUsernameChanged