also use port and resource when connecting