socket listen and connect