Optimize recv(); Fix setsendbuffer()/setrecvbuffer() variables.

Optimize recv(); Fix setsendbuffer()/setrecvbuffer() variables.