Selecting the best transport layer protocol by analysing the incoming data packets