connectSecureSocket method

Future<SecureSocket> connectSecureSocket(
  1. InternetAddress address,
  2. int port,
  3. SecurityContext? context
)

Connects to a secure socket at the specified address and port.

Optionally accepts a SecurityContext and a bad certificate callback.

Returns a Future that completes with the connected SecureSocket.

Implementation

Future<SecureSocket> connectSecureSocket(
        InternetAddress address, int port, SecurityContext? context) =>
    SecureSocket.connect(address, port,
        context: context, onBadCertificate: onBadCertificate);