divide client input and recv