clear the recv buffer before filling it up