How can a client both react to user input and data received from the server?
I created a UDP server, which can handle multiple clients and can react to the data received from each clients. So far the clients only react to user input.
Is it possible, that the clients check for both user input and data on a specific port simultaneously?
There are multiple way to implement this using multiple process, multi-thread etc. But the most suitable to your application is one process that “multi-plexes” all requests, servicing each request as much as it can. And its solution is select(), poll(), epoll() available in all programming language . Read here and here.