Network code documentation for my turn-based game 1.0
|
CClientData | ClientData is a struct which contains the username of a client and its port number. It is used by the Lobby class to provide an easy way to differentiate the clients in a game and facilitate the packet communications between them |
CClientNetworkInterface | ClientNetworkInterface is an interface to communicates with a server |
CClientNetworkManager | ClientNetworkManager is the implementation of the ClientNetworkInterface. It manages the communications with the server and owns the client's socket |
CClientPacket | ClientPacket is an object containing data that a client wishes to send to the server and its remote port. This struct must be used in the server side only |
CHttpInterface | HttpInterface is an interface to perform GET and POST requests via the HTTP protocol. All requests must have a json body |
CHttpManager | HttpManager is an implementation of the HttpInterface which enable to send Http GET and POST requests with a json body using a sf::Http object |
CLobby | Lobby is a class which provides a simple, naive way of differentiating between the different clients connected to the server. It uses the ClientData struct to simplify packet communications between two players in a game |
CPlayerData | PlayerData is a struct containing the username of a player and its elo |
CServerNetworkInterface | ServerNetworkInterface is an interface to communicates with multiple clients |
CServerNetworkManager | ServerNetworkManager is an implementation of the NetworkInterface which manages network communications between the server and the clients |