R
R
roskom_nadzor2016-08-31 03:50:35
Computer networks
roskom_nadzor, 2016-08-31 03:50:35

How to get confirmation from the client that a packet has been received via http?

The client sends a get request, the server returns a response to it, and now, depending on whether the client received the response, the function should be executed on the server.
Of course, you can simply set on the client that when a response is received from the server, a second request should occur, indicating that the data was received successfully. But this will increase the number of hits by 2 times.
Can this be achieved at the protocol level?
I am using node.js with express and request.
P.S.
this problem arose because you need to perform 2 simultaneous actions on the server and the client, and for this you need to make sure that both the server and the client receive messages.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
SagePtr, 2016-08-31
@SagePtr

In general, this problem has no solution. After all, the client must make sure that the server received confirmation from him. And the server, in turn, must make sure that the client received an acknowledgment for confirmation. Someone must have the last word anyway, but he will not be able to determine whether this last word has reached the recipient or has been lost.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question