Added trys. Sent only packet size not whole buffer.