don't register failed devices with poller
refactor socket bind/connect functions so they can be reused in s2s