socket: Replicate soreceive() to sorecvtcp() for cleanup and optimization