rewrite: onData function in SocketServer for better stability.

Signed-off-by: liuyanghejerry <liuyanghejerry@126.com>