doConnect method
- @mustCallSuper
- ApiOptions apiOptions,
- ClientOptions clientOptions,
- Future<
NyxxGateway> connect()
inherited
Perform the connection operation.
People overriding this method should call it to obtain the client instance.
Implementation
@mustCallSuper
Future<ClientType> doConnect(ApiOptions apiOptions, ClientOptions clientOptions, Future<ClientType> Function() connect) async {
final state = await createState();
await state.beforeConnect(apiOptions, clientOptions);
final client = await connect();
_states[client] = state;
await state.afterConnect(client);
return client;
}