Hello Mr. Salem,
Thank you for the reply.
I found the solution.
Instead of MAXSIZE, I should write sizeof(sendBuffer)Code:unsigned char sendBuffer[] = {255, 255, 255, 255, 4, 'Y', 'E', 'S'}; if (sendto(sock, sendBuffer, MAXSIZE, 0, (struct sockaddr *) & ClntAddr, sizeof(ClntAddr)) < 0) DieWithError("sendto() failed");