I know, that i can send the commands to the server and receive it in client without direct access to the network class via queue, but it causes some problems, e.g. when the queue is empty, the program will give an error, when i'm trying to read an informations from the queue, and in my opinion it's not enough elegant to do this using queue. Is any way to send and receive the messages from and to server and some specific clients which send a message to the server. FOr Example, some client is moving through the map, and asking, what is located around you. Which method use to reply to specific clients?
I know, that i can send the commands to the server and receive it in client without direct access to the network class via queue, but it causes some problems, e.g. when the queue is empty, the program will give an error, when i'm trying to read an informations from the queue, and in my opinion it's not enough elegant to do this using queue. Is any way to send and receive the messages from and to server and some specific clients which send a message to the server. FOr Example, some client is moving through the map, and asking, what is located around you. Which method use to reply to specific clients?