connect static method

Future<MumbleClient> connect({
  1. required ConnectionOptions options,
  2. OnBadCertificate? onBadCertificate,
  3. bool useUdp = true,
  4. Object? localUdpBindAddress,
  5. int localUdpBindPort = 0,
})

Connects a mumble server.

Every Mumble server provides a ssl certificate. If your local runtime does not trust this certificate, (e.g. self signed certificates) onBadCertificate is invoked with it. There you can decide, how to procceed.

On default, it is tried to use udp for audio transmitting. You can disable this using useUdp. If using udp you can use localUdpBindAddress and localUdpBindPort to speficy how the clients udp peer should be created. Leave this null to listen on all interfaces and set localUdpBindPort to 0 to use an ephemeral port.

A disconnected client can not be reconnected, so create a new client instance instead using this method.

Implementation

static Future<MumbleClient> connect(
    {required ConnectionOptions options,
    OnBadCertificate? onBadCertificate,
    bool useUdp: true,
    Object? localUdpBindAddress,
    int localUdpBindPort: 0}) {
  return MumbleClientBase.connect(
      options: options,
      onBadCertificate: onBadCertificate,
      useUdp: useUdp,
      localUdpBindAddress: localUdpBindAddress,
      localUdpBindPort: localUdpBindPort);
}