working on some socket handling fixes and tests
going back to variation of old Connected logic, passing tests