Hello, my task is to implement a client-server application. C # server, Java client (Android). When I just need to make a request to the server, send information from the client to the server and get an answer, then there is no problem. But if I need to send a message from the Server to the client, send it from the Server to the client? Is it appropriate in this case to send every message, for example, 3-4 seconds from the client, and to parse also the response from the server immediately, or are there other beautiful ways? Just a request to the server is logically clear, we know the ip-address and port and connect to it, and when you need to send information from the server to the client on the contrary, does the client have to periodically make a request to the server to keep track of the change in response?
- Use SignalR for this. - Ares
- There is a websocket tag, so you know about it. So why ask such a question? Here, via the web server, the server will send the data to the client independently. - Alexander Petrov
- I do not know the campaign ( - GoodRA Nov.
- Please, some example. - GoodRA
- oneno, not everything is simple. and you will understand it very quickly when you read about dynamic IPs, which with a probability of 99.9 percent of the client. Server status notification is a very difficult task, due to the fact that we use HTTP v1.1, and in it there is only Request - Response. I would advise you to deal with these basic concepts before proceeding to the use of such things as, for example, websocket - Dmitry
|