GH #129 - Made 'enmasse' and 'invoke' use common code for connecting to servers