Added check for socket.send not sending all data.