[improvement] move complicated methods to cpp file
[bugfix] when client socket timeout triggered, the socket read operation callback will receive operation_aborted error