Allow to specifiy read-only mode in connect method