requireUnixSocketSupport function

void requireUnixSocketSupport()

Throws a SocketException if the current platform does not support Unix domain sockets.

On Windows, AF_UNIX sockets require Dart 3.11+. On macOS and Linux they are always available.

Implementation

void requireUnixSocketSupport() {
  if (!hasUnixSocketSupport()) {
    throw SocketException(
      'Unix domain sockets require Dart 3.11+ on Windows '
      '(current: ${Platform.version.split(' ').first}).',
    );
  }
}