creating sockets with host and port