How to acknowledge from client to server in sockets

Hi all,
i am having a doubt regarding how to get the acknowledgement(reply) from client to server & how to recieve at the server....imagine there r 8 frames...we have to send first 4frames at a time and after tat we have to receive and ack and only after receiving an ack we have to send the next set of frames

If you are using TCP, you officially don't have access to the information about which frames have been received/delivered. Are you trying to re-create a raw socket or doing something with UDP?