modifications and new recv function

Added looping rcv that waits for a null bytestring