secure method
Future<SecureSocket>
secure(
- dynamic host, {
- SecurityContext? context,
- bool onBadCertificate(
- X509Certificate certificate
- void keyLog(
- String line
- List<
String> ? supportedProtocols,
inherited
Implementation
Future<SecureSocket> secure(dynamic host, {
SecurityContext? context,
bool Function(X509Certificate certificate)? onBadCertificate,
void Function(String line)? keyLog,
List<String>? supportedProtocols,
}) async {
final secureSocket = await SecureSocket.secure(socket,
host: host,
context: context,
onBadCertificate: onBadCertificate,
keyLog: keyLog,
supportedProtocols: supportedProtocols,
);
socket = secureSocket;
_broadcast = socket.asBroadcastStream();
return secureSocket;
}