typos; remove the requirement of socket_type::pair for signal; remove some code duplication