Added timeout to network comunications

I added a 'wait for bytes to be avalible within a timeout' function