modify socket send and receive