ping method
Sends a Ping action to keep the connection alive.
The server should respond with a Pong event.
Example:
final response = await ping();
if (response?.fields['Response'] == 'Success') {
print('Server is alive');
}
Implementation
Future<AmiResponse?> ping() {
return sendAction('Ping');
}