bindSecure method
Future<void>
bindSecure(
- InternetAddress address,
- int port,
- SecurityContext context, {
- int backlog = 0,
- bool v6Only = false,
- bool requestClientCertificate = false,
- bool requireClientCertificate = false,
- List<
String> ? supportedProtocols,
Bind Socks secure server to given address
and port
.
See SecureServerSocket.bind for detailed information on named arguments.
Implementation
Future<void> bindSecure(InternetAddress address, int port, SecurityContext context, {
int backlog = 0,
bool v6Only = false,
bool requestClientCertificate = false,
bool requireClientCertificate = false,
List<String>? supportedProtocols,
bool shared = false,
}) async {
if (_isPortInUse(port))
throw const SocketException('Port is already bound to a proxy server.');
return addSecureServerSocket(
await SecureServerSocket.bind(address, port, context,
backlog: backlog,
v6Only: v6Only,
requestClientCertificate: requestClientCertificate,
requireClientCertificate: requireClientCertificate,
supportedProtocols: supportedProtocols,
shared: shared,
),
);
}