Client fail to receive server message

I have to use Serial.readString() to clear serial buffer in order for my client to read data from server.why is that happening???

Please post a complete sketch that illustrates the problem

Please follow the advice given in the link below when posting code , use code tags and post the code here to make it easier to read and copy for examination