Socket to use for dynamic connections?

What socket type should I use if I need to connect, disconnect then reconnect to a different domain? Im using liveview but once the hooks are defined for the initial connection they cannot be redefined therefore mounted is not called after connecting to the new domain.

What are you trying to do? How is the domain switching? I don’t think we understand the problem well.