TCP is a connection-based protocol. it has built-in automatic retry when data isn't received. there is nothing you need to do. just send the data, and let TCP do its job.