open method
To start IM service.
If Client init with a valid Client.tag and open with non-reconnect
, it will force other clients that has the same Client.id and Client.tag into closed.
If reconnect
is true
and this client has been closed by other, the result of this action is a RTMException, default is false
.
Implementation
Future<void> open({
bool reconnect = false,
}) async {
_Bridge().clientMap[id] = this;
var args = {
'clientId': id,
'r': reconnect,
'signRegistry': {
'sessionOpen': (_openSignatureHandler != null),
'conversation': (_conversationSignatureHandler != null),
},
};
if (tag != null) {
args['tag'] = tag!;
}
await call(
method: 'openClient',
arguments: args,
);
}