Refactor socket handling with SocketMixin per-server vs. per-connection.