use sockets instead of ports