connect method return a boolean