http/socket_srv: refactored a little, some comments for better undestaning