Moved socket handling into listener plugin.