disconnect method

bool disconnect(
  1. int connectionId
)
inherited

Closes and disconnects a connection.

The connectionId must be a valid connection identifier returned from connect. Returns true on success, false on failure.

Implementation

bool disconnect(int connectionId) => _captureSync(
      'disconnect',
      () {
        return _native.disconnect(connectionId);
      },
      failed: (value) => !value,
      nativeConnectionId: connectionId,
    );