Use sockets properly in tests
update components to the new port API
Merge pull request #7 from djdeath/new-port-api

Update components to new port api