Today I've worked really a lot on the engine.
I started by implementing the non-blocking communication on the server by using select. It is still not perfect because I've not really took into account the error handling.
For the client I'm not sure how to proceed, because the only way to handle non-blocking functions seems to be the select as well, but for a single socket program it seems a disproportionate solution.
In the afternoon I spent a lot of time refactoring the window system, and now I can set the size in a easy way at the beginning of the execution.
I then created two other dummy projects in order to have a server and three clients on screen, and I managed to implement a simple chat application that allows communication between the clients.
In the picture, if the resolution will allow it, it is possible to see the messages sent and received by each client, as well as the multiple connections accepted by the server.

Nessun commento:
Posta un commento