UDP does not send any response, but will it send any response?
I installed the UDP server client program. If I let the client send data to a non-existent server, then will the client get any response?
My guess is:
Client → Broadcast Server Address (ARP) Server → Reply to Client with its MAC Address (ARP) Client sends data to the server (UDP)
In any case, the client will receive only an ARP response. If the server exists or not, it will not receive any UDP response?
The client uses the sendto function to send data. We can get error information after calling sendto.
So my question is how is this information available when the client does not receive an answer. The error code can be obtained from WSAGetLastError.
I tried to send data to a non-existent host, but sendto call succeeded. According to the documentation, it should fail with a return value of SOCKET_ERROR.
Any thoughts ??
anand
source share