to test connection to port