bugfix: socket readall , clear buffer offset