April 2018
Beginner
714 pages
18h 21m
English
This example has shown us how to send a simple text. If you now go on and define a schema for how the communication should work, you can use it as a base for more complex communication. For instance, if you want to enable the client to receive a list of all other clients (and their usernames), you need to define that the server will return such a list if it gets a special message from a client. You can use special text commands such as /allClients, or you can implement a more complex message structure using QDataStream or JSON serialization. Therefore, you have to parse all messages received by the server before forwarding them to all the connected clients. Go ahead and try to implement ...
Read now
Unlock full access