bind method

Future<void> bind(
  1. InternetAddress address,
  2. int port
)

Bind Socks server to given address and port.

Implementation

Future<void> bind(InternetAddress address, int port) async {
  if (proxies.containsKey(port))
    throw const SocketException('Port is already bound to a proxy server.');
  return addServerSocket(await ServerSocket.bind(address, port));
}