master 517fff0cf686 cached
255 files
22.6 MB
5.9M tokens
1775 symbols
1 requests
Copy disabled (too large) Download .txt
Showing preview only (23,783K chars total). Download the full file to get everything.
Repository: ValveSoftware/GameNetworkingSockets
Branch: master
Commit: 517fff0cf686
Files: 255
Total size: 22.6 MB

Directory structure:
gitextract_ynny6nih/

├── .editorconfig
├── .github/
│   ├── action.sh
│   ├── build.sh
│   ├── install/
│   │   ├── alpine.sh
│   │   ├── archlinux.sh
│   │   ├── fedora.sh
│   │   ├── opensuse.sh
│   │   └── ubuntu.sh
│   ├── install-post.sh
│   ├── preinstall.sh
│   ├── update-packages/
│   │   ├── alpine.sh
│   │   ├── archlinux.sh
│   │   ├── fedora.sh
│   │   ├── opensuse.sh
│   │   └── ubuntu.sh
│   └── workflows/
│       ├── build.yml
│       ├── linux-flavors.yml
│       └── macos.yml
├── .gitignore
├── .gitmodules
├── .travis-run-local.py
├── .travis.yml
├── BUILDING.md
├── BUILDING_WINDOWS_MANUAL.md
├── CMakeLists.txt
├── GameNetworkingSockets.code-workspace
├── LICENSE
├── README.md
├── README_P2P.md
├── SECURITY.md
├── cmake/
│   ├── DefaultBuildType.cmake
│   ├── FindASan.cmake
│   ├── FindMSan.cmake
│   ├── FindSanitizers.cmake
│   ├── FindTSan.cmake
│   ├── FindUBSan.cmake
│   ├── Findsodium.cmake
│   ├── FlagsMSVC.cmake
│   ├── GameNetworkingSocketsConfig.cmake.in
│   ├── asan-wrapper
│   ├── sanitize-helpers.cmake
│   └── tryCompileTestBCrypt.cpp
├── examples/
│   ├── CMakeLists.txt
│   ├── example_chat.cpp
│   ├── trivial_signaling_client.cpp
│   ├── trivial_signaling_client.h
│   ├── trivial_signaling_server.go
│   └── vcpkg_example_chat/
│       ├── CMakeLists.txt
│       ├── README.md
│       └── vcpkg.json
├── include/
│   └── steam/
│       ├── isteamnetworkingmessages.h
│       ├── isteamnetworkingsockets.h
│       ├── isteamnetworkingutils.h
│       ├── steam_api_common.h
│       ├── steamclientpublic.h
│       ├── steamnetworkingcustomsignaling.h
│       ├── steamnetworkingsockets.h
│       ├── steamnetworkingsockets_flat.h
│       ├── steamnetworkingtypes.h
│       ├── steamtypes.h
│       └── steamuniverse.h
├── src/
│   ├── CMakeLists.txt
│   ├── common/
│   │   ├── crypto.cpp
│   │   ├── crypto.h
│   │   ├── crypto_25519.h
│   │   ├── crypto_25519_donna.cpp
│   │   ├── crypto_25519_libsodium.cpp
│   │   ├── crypto_25519_openssl.cpp
│   │   ├── crypto_bcrypt.cpp
│   │   ├── crypto_constants.h
│   │   ├── crypto_digest_opensslevp.cpp
│   │   ├── crypto_libsodium.cpp
│   │   ├── crypto_openssl.cpp
│   │   ├── crypto_sha1_wpa.cpp
│   │   ├── crypto_symmetric_opensslevp.cpp
│   │   ├── crypto_textencode.cpp
│   │   ├── keypair.cpp
│   │   ├── keypair.h
│   │   ├── opensslwrapper.cpp
│   │   ├── opensslwrapper.h
│   │   ├── percentile_generator.h
│   │   ├── steamid.cpp
│   │   ├── steamid.h
│   │   ├── steamnetworkingsockets_messages.proto
│   │   ├── steamnetworkingsockets_messages_certs.proto
│   │   └── steamnetworkingsockets_messages_udp.proto
│   ├── external/
│   │   ├── curve25519-donna/
│   │   │   ├── README.md
│   │   │   ├── curve25519-donna-32bit.h
│   │   │   ├── curve25519-donna-64bit.h
│   │   │   ├── curve25519-donna-common.h
│   │   │   ├── curve25519-donna-portable-identify.h
│   │   │   ├── curve25519-donna-portable.h
│   │   │   ├── curve25519-donna-scalarmult-base.h
│   │   │   ├── curve25519-donna-scalarmult-sse2.h
│   │   │   ├── curve25519-donna-sse2.h
│   │   │   ├── curve25519-donna.h
│   │   │   ├── curve25519-optimizations-32bit.md
│   │   │   ├── curve25519.c
│   │   │   ├── curve25519.h
│   │   │   ├── curve25519_VALVE_sse2.c
│   │   │   ├── readme_VALVE.txt
│   │   │   ├── test-ticks.h
│   │   │   └── test.c
│   │   ├── ed25519-donna/
│   │   │   ├── README.md
│   │   │   ├── curve25519-donna-32bit.h
│   │   │   ├── curve25519-donna-64bit.h
│   │   │   ├── curve25519-donna-helpers.h
│   │   │   ├── curve25519-donna-sse2.h
│   │   │   ├── ed25519-donna-32bit-sse2.h
│   │   │   ├── ed25519-donna-32bit-tables.h
│   │   │   ├── ed25519-donna-64bit-sse2.h
│   │   │   ├── ed25519-donna-64bit-tables.h
│   │   │   ├── ed25519-donna-64bit-x86-32bit.h
│   │   │   ├── ed25519-donna-64bit-x86.h
│   │   │   ├── ed25519-donna-basepoint-table.h
│   │   │   ├── ed25519-donna-batchverify.h
│   │   │   ├── ed25519-donna-impl-base.h
│   │   │   ├── ed25519-donna-impl-sse2.h
│   │   │   ├── ed25519-donna-portable-identify.h
│   │   │   ├── ed25519-donna-portable.h
│   │   │   ├── ed25519-donna.h
│   │   │   ├── ed25519-hash-bcrypt.h
│   │   │   ├── ed25519-hash-custom.h
│   │   │   ├── ed25519-hash-openssl.h
│   │   │   ├── ed25519-hash-ref.h
│   │   │   ├── ed25519-hash.h
│   │   │   ├── ed25519-randombytes-custom.h
│   │   │   ├── ed25519-randombytes.h
│   │   │   ├── ed25519.c
│   │   │   ├── ed25519.h
│   │   │   ├── ed25519_VALVE.c
│   │   │   ├── ed25519_VALVE_sse2.c
│   │   │   ├── fuzz/
│   │   │   │   ├── README.md
│   │   │   │   ├── curve25519-ref10.c
│   │   │   │   ├── curve25519-ref10.h
│   │   │   │   ├── ed25519-donna-sse2.c
│   │   │   │   ├── ed25519-donna.c
│   │   │   │   ├── ed25519-donna.h
│   │   │   │   ├── ed25519-ref10.c
│   │   │   │   ├── ed25519-ref10.h
│   │   │   │   ├── fuzz-curve25519.c
│   │   │   │   └── fuzz-ed25519.c
│   │   │   ├── modm-donna-32bit.h
│   │   │   ├── modm-donna-64bit.h
│   │   │   ├── readme_VALVE.txt
│   │   │   ├── regression.h
│   │   │   ├── test-internals.c
│   │   │   ├── test-ticks.h
│   │   │   └── test.c
│   │   ├── sha1-wpa/
│   │   │   ├── README
│   │   │   ├── sha1-internal.c
│   │   │   ├── sha1.c
│   │   │   ├── sha1.h
│   │   │   └── sha1_i.h
│   │   └── steamwebrtc/
│   │       ├── CMakeLists.txt
│   │       ├── ice_session.cpp
│   │       ├── ice_session.h
│   │       ├── steamwebrtc_internal.h
│   │       └── webrtc_sdp.cc
│   ├── public/
│   │   ├── minbase/
│   │   │   ├── minbase_annotations.h
│   │   │   ├── minbase_decls.h
│   │   │   ├── minbase_endian.h
│   │   │   ├── minbase_identify.h
│   │   │   ├── minbase_limits.h
│   │   │   ├── minbase_macros.h
│   │   │   ├── minbase_securezeromemory_impl.h
│   │   │   ├── minbase_types.h
│   │   │   └── minbase_warnings.h
│   │   ├── tier0/
│   │   │   ├── basetypes.h
│   │   │   ├── dbg.h
│   │   │   ├── memdbgoff.h
│   │   │   ├── memdbgon.h
│   │   │   ├── platform.h
│   │   │   ├── platform_sockets.h
│   │   │   ├── platformtime.h
│   │   │   ├── t0constants.h
│   │   │   ├── valve_off.h
│   │   │   ├── valve_on.h
│   │   │   ├── valve_tracelogging.h
│   │   │   ├── vprof.h
│   │   │   └── wchartypes.h
│   │   ├── tier1/
│   │   │   ├── fmtstr.h
│   │   │   ├── netadr.h
│   │   │   ├── utlbuffer.h
│   │   │   ├── utlhashmap.h
│   │   │   ├── utliterator.h
│   │   │   ├── utllinkedlist.h
│   │   │   ├── utlmemory.h
│   │   │   ├── utlpriorityqueue.h
│   │   │   └── utlvector.h
│   │   ├── vstdlib/
│   │   │   ├── random.h
│   │   │   └── strtools.h
│   │   └── winlite.h
│   ├── steamnetworkingsockets/
│   │   ├── certtool/
│   │   │   └── steamnetworkingsockets_certtool.cpp
│   │   ├── clientlib/
│   │   │   ├── SNP_WIRE_FORMAT.md
│   │   │   ├── csteamnetworkingmessages.cpp
│   │   │   ├── csteamnetworkingmessages.h
│   │   │   ├── csteamnetworkingsockets.cpp
│   │   │   ├── csteamnetworkingsockets.h
│   │   │   ├── ice_client_types.h
│   │   │   ├── steamnetworkingsockets_connections.cpp
│   │   │   ├── steamnetworkingsockets_connections.h
│   │   │   ├── steamnetworkingsockets_flat.cpp
│   │   │   ├── steamnetworkingsockets_lowlevel.cpp
│   │   │   ├── steamnetworkingsockets_lowlevel.h
│   │   │   ├── steamnetworkingsockets_p2p.cpp
│   │   │   ├── steamnetworkingsockets_p2p.h
│   │   │   ├── steamnetworkingsockets_p2p_ice.cpp
│   │   │   ├── steamnetworkingsockets_p2p_ice.h
│   │   │   ├── steamnetworkingsockets_p2p_webrtc.cpp
│   │   │   ├── steamnetworkingsockets_p2p_webrtc.h
│   │   │   ├── steamnetworkingsockets_snp.cpp
│   │   │   ├── steamnetworkingsockets_snp.h
│   │   │   ├── steamnetworkingsockets_stun.cpp
│   │   │   ├── steamnetworkingsockets_stun.h
│   │   │   ├── steamnetworkingsockets_udp.cpp
│   │   │   └── steamnetworkingsockets_udp.h
│   │   ├── steamnetworking_stats.h
│   │   ├── steamnetworking_statsutils.h
│   │   ├── steamnetworkingsockets_certs.cpp
│   │   ├── steamnetworkingsockets_certstore.cpp
│   │   ├── steamnetworkingsockets_certstore.h
│   │   ├── steamnetworkingsockets_internal.h
│   │   ├── steamnetworkingsockets_shared.cpp
│   │   ├── steamnetworkingsockets_stats.cpp
│   │   ├── steamnetworkingsockets_thinker.cpp
│   │   └── steamnetworkingsockets_thinker.h
│   ├── tier0/
│   │   ├── dbg.cpp
│   │   ├── platformtime.cpp
│   │   └── valve_tracelogging.cpp
│   ├── tier1/
│   │   ├── ipv6text.c
│   │   ├── ipv6text.h
│   │   ├── netadr.cpp
│   │   ├── utlbuffer.cpp
│   │   └── utlmemory.cpp
│   └── vstdlib/
│       └── strtools.cpp
├── tests/
│   ├── CMakeLists.txt
│   ├── aesgcmtestvectors/
│   │   ├── gcmDecrypt128.rsp
│   │   ├── gcmDecrypt192.rsp
│   │   ├── gcmDecrypt256.rsp
│   │   ├── gcmEncryptExtIV128.rsp
│   │   ├── gcmEncryptExtIV192.rsp
│   │   ├── gcmEncryptExtIV256.rsp
│   │   └── readme.txt
│   ├── make_test_certs.py
│   ├── test_common.cpp
│   ├── test_common.h
│   ├── test_connection.cpp
│   ├── test_crypto.cpp
│   ├── test_flat.c
│   ├── test_p2p.cpp
│   ├── test_p2p.py
│   └── test_pki.cpp
├── vcpkg.json
└── vcpkg_ports/
    └── gamenetworkingsockets/
        └── portfile.cmake

================================================
FILE CONTENTS
================================================

================================================
FILE: .editorconfig
================================================
root = true

[*]
end_of_line = lf
insert_final_newline = true

[*.py]
indent_style = space
indent_size = 4

[CMakeLists.txt,*.{cpp,h}]
indent_style = tab
indent_size = 4


================================================
FILE: .github/action.sh
================================================
#!/bin/bash

set -e
set -o pipefail

ACTION="$(basename "$0")"
ACTION="${ACTION%.sh}"

SCRIPT_CANDIDATES=(
	"$PWD/.github/${ACTION}/${IMAGE//\//-}.sh"
	"$PWD/.github/${ACTION}/${IMAGE%/*}.sh"
)

for SCRIPT in "${SCRIPT_CANDIDATES[@]}"; do
	if [[ -f "${SCRIPT}" ]]; then
		bash "${SCRIPT}" | cat
		exit $?
	fi
done

echo "Could not find script in any of these paths:"
for SCRIPT in "${SCRIPT_CANDIDATES[@]}"; do
	echo "   ${SCRIPT}"
done
echo ""
echo "Don't know how to do step '${ACTION}' for ${IMAGE}!"
echo ""
exit 1


================================================
FILE: .github/build.sh
================================================
#!/bin/bash
#
# This is a distribution-agnostic build script. Do not use "apt-get", "dnf", or
# similar in here. Add any package installation gunk into the appropriate
# install script instead.
#
set -e

has() {
	if type -P "$@" &>/dev/null; then
		return 0
	fi
	return 1
}

has_clang() {
	has clang && has clang++
}

has_gcc() {
	has gcc && has g++
}

msg() {
	echo "$1" >&2
}

die() {
	msg "$1"
	exit 1
}

CI_BUILD=${CI_BUILD:-0}
export BUILD_SANITIZERS=0

# Only run sanitizers on a couple of the builder types.
if [[ "$IMAGE" == "ubuntu" ]] && [[ "$IMAGE_TAG" == "rolling" ]]; then
	export BUILD_SANITIZERS=1
fi
if [[ "$IMAGE" == "fedora" ]] && [[ "$IMAGE_TAG" == "rawhide" ]]; then
	export BUILD_SANITIZERS=1
fi
if [[ "$CI_BUILD" -eq 0 ]]; then
	# If we're doing a non-CI build, we should build the sanitizers for our
	# own debugging.
	export BUILD_SANITIZERS=1
fi

msg "Image is $IMAGE:$IMAGE_TAG, sanitizers enabled: $BUILD_SANITIZERS"

# Make sure cmake is installed
has cmake || die "cmake required"

# We also need at least one compiler
has_clang || has_gcc || die "No compiler available"

export CCACHE_DIR=$PWD/build-ci-ccache
ccache -M4G

# Mark all directories as safe so checkouts performed in CMakeLists.txt don't cause "unsafe repository" errors.
# See https://github.com/actions/checkout/issues/766
git config --global --add safe.directory '*'

# Use shallow clones of submodules for space/time efficiency.
#git submodule update --init --depth=1 2>&1 | cat

if has_clang; then
	msg "Beginning build tests with Clang"
	export CC=clang CXX=clang++
	has cmake && bash .github/build-cmake.sh
fi

if has_gcc; then
	msg "Beginning build tests with GCC"
	export CC=gcc CXX=g++
	has cmake && bash .github/build-cmake.sh
fi

msg "All builds and tests executed successfully."

exit 0


================================================
FILE: .github/install/alpine.sh
================================================
#!/bin/bash
#
# This is an install script for Alpine-specific packages.
#
set -ex

# Base build packages
PACKAGES=(
	clang
	clang-dev
	gcc
	g++
	ccache
	cmake
	ninja
	pkgconf
	git
	linux-headers
	go
)

PACKAGES+=(protobuf-dev)
PACKAGES+=(openssl-dev)
PACKAGES+=(libsodium-dev)

apk add "${PACKAGES[@]}"

exit 0


================================================
FILE: .github/install/archlinux.sh
================================================
#!/bin/bash
#
# This is an install script for Arch Linux-specific packages.
#
set -ex

# Base build packages
PACKAGES=(
	base-devel
	ccache
	clang
	cmake
	git
	go
	ninja
)

PACKAGES+=(protobuf)
PACKAGES+=(openssl)
PACKAGES+=(libsodium)

pacman --noconfirm -Sy "${PACKAGES[@]}"

exit 0


================================================
FILE: .github/install/fedora.sh
================================================
#!/bin/bash
#
# This is an install script for Fedora-specific packages.
#
set -ex

# Base build packages
PACKAGES=(
	gcc-c++
	libasan
	libubsan
	ccache
	clang
	cmake
	ninja-build
	pkgconf-pkg-config
	git
	make
	golang
)

PACKAGES+=(protobuf-compiler protobuf-devel)
PACKAGES+=(openssl-devel)
PACKAGES+=(libsodium-devel)

dnf install -y "${PACKAGES[@]}"

exit 0


================================================
FILE: .github/install/opensuse.sh
================================================
#!/bin/bash
#
# This is an install script for OpenSuSE-specific packages.
#
set -ex

# Base build packages
PACKAGES=(
	gcc-c++
	ccache
	clang
	cmake
	ninja
	pkgconf-pkg-config
	git
	make
	go
)

PACKAGES+=(protobuf-devel)
PACKAGES+=(libopenssl-devel)
PACKAGES+=(libsodium-devel)

zypper install -y "${PACKAGES[@]}"

exit 0


================================================
FILE: .github/install/ubuntu.sh
================================================
#!/bin/bash
#
# This is an install script for Ubuntu-specific packages.
#
set -ex

APT_FLAGS=(-q -oDpkg::Use-Pty=0)

export DEBIAN_FRONTEND=noninteractive

apt-get ${APT_FLAGS[@]} install -y locales
locale-gen en_US.UTF-8

PACKAGES=(
	build-essential
	pkg-config
	ccache
	cmake
	ninja-build
	clang
	git
	golang
)

PACKAGES+=(libprotobuf-dev protobuf-compiler)
PACKAGES+=(libssl-dev)
PACKAGES+=(libsodium-dev)

apt-get ${APT_FLAGS[@]} install -y "${PACKAGES[@]}"

exit 0


================================================
FILE: .github/install-post.sh
================================================
#!/bin/bash
#
# This is a post-install script common to all Docker images.
#

cmake --version
g++ --version
clang++ --version
uname -a

echo "====================="
echo "GCC predefined macros"
echo "====================="
g++ -E -dM -xc /dev/null | sort

echo "======================="
echo "Clang predefined macros"
echo "======================="
clang++ -E -dM -xc /dev/null | sort

exit 0


================================================
FILE: .github/preinstall.sh
================================================
#!/bin/sh

if [ "$IMAGE" = "alpine" ]
then
	apk update
	apk add bash
fi

exit 0


================================================
FILE: .github/update-packages/alpine.sh
================================================
#!/bin/bash
#
# This is an install script for Alpine-specific package updates.
#
set -ex

apk update

exit 0


================================================
FILE: .github/update-packages/archlinux.sh
================================================
#!/bin/bash
#
# This is an install script for Arch Linux-specific package updates.
#
set -ex

pacman --noconfirm -Syu

exit 0


================================================
FILE: .github/update-packages/fedora.sh
================================================
#!/bin/bash
#
# This is an install script for Fedora-specific package updates.
#
set -ex

if ! grep '^fastestmirror' /etc/dnf/dnf.conf; then
	echo 'fastestmirror=1' >> /etc/dnf/dnf.conf
fi

dnf clean all
dnf update -y

exit 0


================================================
FILE: .github/update-packages/opensuse.sh
================================================
#!/bin/bash
#
# This is an install script for OpenSuSE-specific package updates.
#
set -ex

zypper update -y

exit 0


================================================
FILE: .github/update-packages/ubuntu.sh
================================================
#!/bin/bash
#
# This is an install script for Debian/Ubuntu-specific package updates.
#
set -ex

APT_FLAGS=(-q -oDpkg::Use-Pty=0)

export DEBIAN_FRONTEND=noninteractive

apt-get ${APT_FLAGS[@]} update
apt-get ${APT_FLAGS[@]} dist-upgrade -y

exit 0


================================================
FILE: .github/workflows/build.yml
================================================
name: CI
on: [push, pull_request]

jobs:

  build-and-test-ubuntu:
    #if: false  # Temporarily disable
    name: Build And Test Ubuntu
    runs-on: ubuntu-latest
    env:
      CI_BUILD: 1
      IMAGE: ubuntu
      IMAGE_TAG: latest
    steps:
      - uses: actions/checkout@main
      # Note only alpine needs "preinstall" step
      - name: Update packages
        run: sudo -E bash .github/update-packages.sh
      - name: Install dependencies
        run: |
          sudo -E bash .github/install.sh
          sudo -E bash .github/install-post.sh
      - name: Build and run tests
        run: bash .github/build.sh

      # Don't do it this way.  This causes the main badge to
      # go red if one of the flavors fails.
      ## Trigger testing of more linux flavors
      #- name: Trigger linux flavors build
      #  uses: peter-evans/repository-dispatch@v2
      #  with:
      #    event-type: build-linux-flavors

  build-and-test-windows:
    #if: false  # Temporarily disable
    name: Build And Test Windows ${{ matrix.os-version }} ${{ matrix.crypto }}
    runs-on: windows-${{ matrix.os-version }}
    strategy:
      fail-fast: false
      matrix:
        # Windows Server 2019 has been retired. The Windows Server 2019 image has been removed as of 2025-06-30. For more details, see https://github.com/actions/runner-images/issues/12045
        os-version: [2022, 2025]
        crypto: [OpenSSL, BCrypt]
    env:
      VCPKG_ROOT: ${{ github.workspace }}/vcpkg
    steps:
      - uses: actions/checkout@main

      - uses: lukka/get-cmake@latest

      # Setup MSVC command prompt environment vars.
      # We must do this before sedtting up our local vcpkg,
      # Because it will set VCPKG_ROOT to point to some global
      # install of vcpkg, and we don't want that
      - uses: ilammy/msvc-dev-cmd@v1

      - name: Restore artifacts, setup vcpkg
        uses: lukka/run-vcpkg@v11
        with:
          vcpkgGitCommitId: fba75d09065fcc76a25dcf386b1d00d33f5175af
          vcpkgDirectory: '${{ github.workspace }}/vcpkg'
          vcpkgJsonGlob: vcpkg.json
          runVcpkgInstall: false

      - name: vcpkg check / install dependencies
        working-directory: '${{ github.workspace }}'
        run: '"${{env.VCPKG_ROOT}}\\vcpkg" install --triplet=x64-windows'
        shell: cmd

      - name: Install dependencies and generate project files
        run: |
          mkdir build
          cd build
          cmake -S .. -G Ninja -DBUILD_TESTS=ON -DBUILD_EXAMPLES=ON -DBUILD_TOOLS=ON -DCMAKE_TOOLCHAIN_FILE=${{env.VCPKG_ROOT}}/scripts/buildsystems/vcpkg.cmake -DUSE_CRYPTO=${{matrix.crypto}}
        shell: cmd

      # Mark all directories as safe so checkouts performed in CMakeLists.txt don't cause "unsafe repository" errors.
      # See https://github.com/actions/checkout/issues/766
      - name: Configure Git
        run: git config --global --add safe.directory '*'
        shell: cmd

      - name: Build projects
        working-directory: '${{ github.workspace }}/build'
        run: ninja
        shell: cmd

      - name: Test crypto
        working-directory: '${{ github.workspace }}/build/bin'
        run: test_crypto.exe
        shell: cmd

      - name: Test connection
        working-directory: '${{ github.workspace }}/build/bin'
        #run: test_connection.exe suite-quick  # Loopback throughput test not performing on github hosted runners for some reason

        run: test_connection.exe identity quick lane_quick_queueanddrain lane_quick_priority_and_background
        shell: cmd



================================================
FILE: .github/workflows/linux-flavors.yml
================================================
# We put all of the different linux flavors in a separate workflow,
# so that we can have a different status badge for them.
name: Linux flavors

# Triggered from the main CI build workflow
on:
  workflow_run:
    workflows: ["CI"]
    types:
      - completed
  #workflow_call:
  #workflow_dispatch:
  #repository_dispatch:
  #  types: [ build-linux-flavors ]

jobs:

  build-and-test-flavors:
    #if: false  # Temporarily disable
    name: Build And Test Unix Flavors
    runs-on: ${{ matrix.os }}
    strategy:
      matrix:
        include:
          - build: ubuntu-bionic
            os: ubuntu-latest
            docker_image: ubuntu
            docker_tag: bionic
          #- build: ubuntu-latest
          #  os: ubuntu-latest
          #  docker_image: ubuntu
          #  docker_tag: latest
          - build: ubuntu-rolling
            os: ubuntu-latest
            docker_image: ubuntu
            docker_tag: rolling
          #- build: ubuntu-devel
          #  os: ubuntu-latest
          #  docker_image: ubuntu
          #  docker_tag: devel
          - build: fedora-latest
            os: ubuntu-latest
            docker_image: fedora
            docker_tag: latest
          - build: archlinux-latest
            os: ubuntu-latest
            docker_image: archlinux
            docker_tag: latest
          - build: alpine-latest
            os: ubuntu-latest
            docker_image: alpine
            docker_tag: latest
    steps:
      - uses: actions/checkout@main
      - name: Launch container
        run: |
          docker run -d --rm --name github-docker-builder -e LC_ALL="C" -e LANG="C" -v ${{ github.workspace }}:/build -w /build ${{ matrix.docker_image }}:${{ matrix.docker_tag }} tail -f /dev/null
          docker ps
          docker exec -e CI_BUILD=1 -e IMAGE=${{ matrix.docker_image }} -e IMAGE_TAG=${{ matrix.docker_tag }} -t github-docker-builder sh .github/preinstall.sh
      - name: Update packages
        run: |
          docker exec -e CI_BUILD=1 -e IMAGE=${{ matrix.docker_image }} -e IMAGE_TAG=${{ matrix.docker_tag }} -t github-docker-builder bash .github/update-packages.sh
      - name: Install dependencies
        run: |
          docker exec -e CI_BUILD=1 -e IMAGE=${{ matrix.docker_image }} -e IMAGE_TAG=${{ matrix.docker_tag }} -t github-docker-builder bash .github/install.sh
          docker exec -e CI_BUILD=1 -e IMAGE=${{ matrix.docker_image }} -e IMAGE_TAG=${{ matrix.docker_tag }} -t github-docker-builder bash .github/install-post.sh
      - name: Build and run project
        run: |
          docker exec -e CI_BUILD=1 -e IMAGE=${{ matrix.docker_image }} -e IMAGE_TAG=${{ matrix.docker_tag }} -t github-docker-builder bash .github/build.sh


================================================
FILE: .github/workflows/macos.yml
================================================
name: MacOS
on: [push, pull_request]

jobs:

  build-and-test-macos:
    name: Build And Test MacOS
    runs-on: macos-latest
    steps:
    - uses: actions/checkout@v3
    - name: Install Vcpkg
      run: |
        git clone https://github.com/Microsoft/vcpkg.git
        cd vcpkg
        ./bootstrap-vcpkg.sh
        ./vcpkg integrate install

    - name: Configure CMake
      # Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.
      # See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type
      run: cmake -B ${{github.workspace}}/build 
            -DCMAKE_BUILD_TYPE=Release
            -DCMAKE_TOOLCHAIN_FILE=${{ github.workspace }}/vcpkg/scripts/buildsystems/vcpkg.cmake
            -DBUILD_TESTS=ON

    - name: Build
      # Build the program with the given configuration
      run: cmake --build ${{github.workspace}}/build --config Release

    #- name: Test
    #  working-directory: ${{github.workspace}}/build
    #  # Execute tests defined by the CMake configuration.
    #  # See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail
    #  run: ctest -C Release

    - name: Test crypto
      working-directory: ${{github.workspace}}/build/bin
      run: ./test_crypto
      shell: bash

    - name: Test connection
      working-directory: ${{github.workspace}}/build/bin
      run: ./test_connection identity quick lane_quick_queueanddrain lane_quick_priority_and_background
      shell: bash


================================================
FILE: .gitignore
================================================
# Prerequisites
*.d

# Compiled Object files
*.slo
*.lo
*.o
*.obj
obj

# Precompiled Headers
*.gch
*.pch

/bin

# Ignore CMake outputs
compile_commands.json
CMakeCache.txt
CMakeFiles
Makefile
cmake_install.cmake

# Ignore outputs from "perf record"
perf.data
perf.data.old

# Default/recommended install directory for vcpkg
**/vcpkg

# Other misc stuff
*.VC.*
**/.vscode
**/build
**/build-*
**/build.bat
**/log.txt
**/.vs
/src/steamnetworkingsockets/Messageswin64Debug/*
/src/steamnetworkingsockets/certtool/win64/*
/src/steamnetworkingsockets/clientlib/win64/*
*.swp
/.github/build-ci-ccache
*.log
*build-ci-ccache*
vcpkg_installed
.p4config
P4CONFIG

# We use cmake, so no Visual studio project files should be in git
*.sln
*.vcxproj
*.vcxproj.filters
*.vcxproj.user
*.vpc_crc
*.vpc.sentinel
*_from_partner.bat
src/mp.bat
*_changes.html

# Unfortunately, in the partner branch we compile our generated protobufs
# directly into the common folder
src/common/*.pb.cc
src/common/*.pb.h

# Protobuf has some test scripts and we get warnings about line endings
src/external/protobuf-3.15.3/**/*.sh


================================================
FILE: .gitmodules
================================================
[submodule "src/external/abseil"]
	path = src/external/abseil
	url = https://github.com/abseil/abseil-cpp
	branch = lts_2020_02_25
[submodule "src/external/webrtc"]
	path = src/external/webrtc
	url = https://webrtc.googlesource.com/src
[submodule "src/external/picojson"]
	path = src/external/picojson
	url = https://github.com/kazuho/picojson.git


================================================
FILE: .travis-run-local.py
================================================
#!/usr/bin/python
"""
Usage:
    .travis-run-local.py [--arch=<arch>] [--image=<image> --image-tag=<tag>]

Options:
    -h --help          Print this help message.
    --arch=<arch>      Only build in containers with this CPU architecture. [default: any]
    --image=<image>    Only build for this image name. [default: any]
    --image-tag=<tag>  Only build for this image tag. [default: any]
"""

import logging
import os
import subprocess
import sys
import time
import yaml
from docopt import docopt

def read_travis_yml():
    return yaml.load(open('.travis.yml', 'r'), Loader=yaml.SafeLoader)

def docker_arch(travis_arch):
    if travis_arch == 'arm64':
        return 'arm64v8'
    return travis_arch

def image_name(image, tag, arch):
    # e.g. ubuntu:latest
    image = '%s:%s' % (image, tag)

    if arch != 'amd64':
        image_prefix = docker_arch(arch) + '/'
        os.environ['IMAGE_PREFIX'] = image_prefix
        return image_prefix + image

    return image

def env_parse(env, arch):
    kv_str = env.split()
    kv = { k: v for k, v in [ s.split('=') for s in kv_str ] }

    # Ugly trick to prepare for running commands for this image
    try:
        del os.environ['IMAGE_PREFIX']
    except KeyError:
        pass
    os.environ.update(kv)

    if 'IMAGE' not in kv or 'IMAGE_TAG' not in kv:
        return None

    if options['--arch'] != 'any' and arch != options['--arch']:
        return None

    if options['--image'] != 'any' and kv['IMAGE'] != options['--image']:
        return None

    if options['--image-tag'] != 'any' and kv['IMAGE_TAG'] != options['--image-tag']:
        return None

    return image_name(kv['IMAGE'], kv['IMAGE_TAG'], arch)

def get_images(travis):
    match_found = False

    for env in travis['env']['global']:
        env_parse(env, travis['arch'])

    for env in travis['env']['jobs']:
        image = env_parse(env, travis['arch'])
        if image is not None:
            match_found = True
            yield image

    for job in travis['jobs']['include']:
        image = env_parse(job['env'], job['arch'])
        if image is not None:
            match_found = True
            yield image

    # If we didn't find a match with our constraints, maybe the user wanted to
    # test a specific image not listed in .travis.yml.
    if not match_found:
        if 'any' not in [options['--image'], options['--image-tag'], options['--arch']]:
            image = env_parse(
                'IMAGE=%s IMAGE_TAG=%s' % (options['--image'], options['--image-tag']),
                options['--arch']
            )
            if image is not None:
                yield image

def docker_pull(image):
    subprocess.run(['docker', 'pull', image], check=True)

def pull_images(travis):
    for image in get_images(travis):
        docker_pull(image)

def init_logging(level=logging.INFO):
    root_logger = logging.getLogger('')
    root_logger.setLevel(level)

    # Log to stdout
    console_log_format = logging.Formatter(
        '%(asctime)s %(levelname)7s: %(message)s',
        '%Y-%m-%d %H:%M:%S')
    console_logger = logging.StreamHandler(sys.stdout)
    console_logger.setFormatter(console_log_format)
    console_logger.setLevel(level)
    root_logger.addHandler(console_logger)

    return root_logger

def kill_and_wait():
    log.info("Terminating build container")
    subprocess.run('docker kill $CONTAINER_NAME', shell=True, stdout=subprocess.DEVNULL)
    subprocess.run('docker container rm $CONTAINER_NAME', shell=True, stdout=subprocess.DEVNULL)

    # The container removal process is asynchronous and there's no
    # convenient way to wait for it, so we'll just poll and see if the
    # container still exists.
    log.info("Waiting for container to exit...")
    attempts = 0
    while True:
        proc = subprocess.run('docker container inspect $CONTAINER_NAME', shell=True, stdout=subprocess.DEVNULL)
        if proc.returncode != 0:
            break
        log.info("Container is still alive, waiting a few seconds")
        attempts += 1
        if attempts > 5:
            raise RuntimeError
        time.sleep(3)
    log.info("Container has exited.")

def main():
    global options
    global log
    log = init_logging()

    options = docopt(__doc__)

    # We do a shallow "git submodule update --init" in a real travis build, but
    # that's not useful for local development purposes. We should do a real
    # update before a container can make shallow clones.
    log.info("Updating submodules")
    subprocess.run(['git', 'submodule', 'update', '--init'])

    log.info("Parsing Travis configuration file")
    travis = read_travis_yml()

    # Pull the images down first
    log.info("Pulling Docker images")
    docker_pull('aptman/qus')
    pull_images(travis)

    # Initialize system environment
    log.info("Preparing system to run foreign architecture containers")
    subprocess.run(['docker', 'run', '--rm', '--privileged', 'aptman/qus', '-s', '--', '-r'], check=True)
    subprocess.run(['docker', 'run', '--rm', '--privileged', 'aptman/qus', '-s', '--', '-p'], check=True)

    # Run native tests first
    kill_and_wait()
    for image in get_images(travis):
        log.info("Running build and test process for image %s", image)
        stages = ['before_install', 'install', 'script', 'after_script']
        for stage in stages:
            for command in travis.get(stage, []):
                subprocess.run(command, shell=True, check=True)
        kill_and_wait()

    log.info("Build and test run complete!")


if __name__ == "__main__":
    main()


================================================
FILE: .travis.yml
================================================
language: minimal

dist: bionic

os: linux

services:
  - docker

arch: amd64

env:
  global:
    - CONTAINER_NAME=github-docker-builder
  jobs:
    - IMAGE=alpine IMAGE_TAG=latest
    - IMAGE=archlinux IMAGE_TAG=latest
    # 18.04 (Bionic) is the oldest one we want to attempt builds with.
    - IMAGE=ubuntu IMAGE_TAG=bionic
    - IMAGE=ubuntu IMAGE_TAG=latest
    - IMAGE=ubuntu IMAGE_TAG=rolling
    # Something broke here.  Commenting it out to see if it's just broken at the head.
    #- IMAGE=ubuntu IMAGE_TAG=devel
    - IMAGE=fedora IMAGE_TAG=latest
    - IMAGE=fedora IMAGE_TAG=rawhide

jobs:
  include:
    - arch: i386
      env: IMAGE=debian IMAGE_TAG=stable
    - arch: arm64
      env: IMAGE=ubuntu IMAGE_TAG=rolling
    # Disabled - the docker is failing to boot ver early with this output:
    # Unpacking locales (2.31-0ubuntu9) ...
    # dpkg: error processing archive /var/cache/apt/archives/locales_2.31-0ubuntu9_all.deb (--unpack):
    #   unable to install new version of './usr/share/doc/locales': Invalid cross-device link
    # dpkg-deb: error: paste subprocess was killed by signal (Broken pipe)
    # Errors were encountered while processing:
    #  /var/cache/apt/archives/locales_2.31-0ubuntu9_all.deb
    #- arch: ppc64le
    #  env: IMAGE=ubuntu IMAGE_TAG=rolling
    - arch: s390x
      env: IMAGE=ubuntu IMAGE_TAG=rolling

before_install:
  - docker run -d --rm --cap-add SYS_PTRACE --name $CONTAINER_NAME -e LC_ALL="C" -e LANG="C" -v $(pwd):/build -w /build $IMAGE_PREFIX$IMAGE:$IMAGE_TAG tail -f /dev/null
  - docker ps
  - docker exec -e CI_BUILD=1 -e IMAGE=$IMAGE -e IMAGE_TAG=$IMAGE_TAG -t $CONTAINER_NAME sh .github/preinstall.sh
  - docker exec -e CI_BUILD=1 -e IMAGE=$IMAGE -e IMAGE_TAG=$IMAGE_TAG -t $CONTAINER_NAME bash .github/update-packages.sh

install:
  - docker exec -e CI_BUILD=1 -e IMAGE=$IMAGE -e IMAGE_TAG=$IMAGE_TAG -t $CONTAINER_NAME bash .github/install.sh
  - docker exec -e CI_BUILD=1 -e IMAGE=$IMAGE -e IMAGE_TAG=$IMAGE_TAG -t $CONTAINER_NAME bash .github/install-post.sh

script:
  - docker exec -e CI_BUILD=1 -e IMAGE=$IMAGE -e IMAGE_TAG=$IMAGE_TAG -t $CONTAINER_NAME bash .github/build.sh
  - docker kill $CONTAINER_NAME

# vim: set ts=2 sts=2 sw=2 et:


================================================
FILE: BUILDING.md
================================================
Building
---

## Dependencies

* CMake 3.10 or later
* A build tool like Ninja, GNU Make or Visual Studio
* A C++11-compliant compiler, such as:
  * GCC 7.3 or later
  * Clang 3.3 or later
  * Visual Studio 2017 or later
* One of the following crypto solutions:
  * OpenSSL 1.1.1 or later
  * libsodium (can cause issues on Intel machines with AES-NI disabled see [here](https://github.com/ValveSoftware/GameNetworkingSockets/issues/243))
  * [bcrypt](https://docs.microsoft.com/en-us/windows/desktop/api/bcrypt/)
    (Windows only.  Note the primary reason this is supported is to satisfy
    an Xbox requirement.)
* Google protobuf 2.6.1+
* Google [webrtc](https://opensource.google/projects/webrtc) is used for
  NAT piercing (ICE) for P2P connections.  The relevant code is linked in as a
  git submodule.  You'll need to initialize that submodule to compile.

## Known Issues
* The build may have link errors when building with LLVM 10+:
  [LLVM bug #46313](https://bugs.llvm.org/show_bug.cgi?id=46313). As
  a workaround, consider building the library with GCC instead.

## Linux

### OpenSSL and protobuf

Just use the appropriate package manager.

Ubuntu/debian:

```
# apt install libssl-dev
# apt install libprotobuf-dev protobuf-compiler
```

Arch Linux:

```
# pacman -S openssl
# pacman -S protobuf
```

### Building

Using CMake (preferred):

```
$ mkdir build
$ cd build
$ cmake -G Ninja ..
$ ninja
```

## Using vcpkg to build the gamenetworkingsockets package

If you are using [vcpkg](https://github.com/microsoft/vcpkg/) and are OK with the latest release and default configuration (OpenSSL for the crypto backend, P2P disabled), then you do not need to sync any of this code or build gamenetworkingsockets explicitly.  You can just install the package using vcpkg.  See [this example](examples/vcpkg_example_chat/README.md)
for more.

## Windows / Visual Studio

To build gamenetworkingsockets on Windows, it's recommended to obtain the dependencies by using vcpkg in ["manifest mode"](https://learn.microsoft.com/en-us/vcpkg/concepts/manifest-mode).  The following instructions assume that you will follow the vcpkg recommendations and install vcpkg as a subfolder.  If you want to use "classic mode" or install vcpkg somewhere else, you're on your own.

If you don't want to use vcpkg, try the [manual instructions](BUILDING_WINDOWS_MANUAL.md).

First, bootstrap vcpkg.  From the root folder of your GameNetworkingSockets workspace:

```
> git clone https://github.com/microsoft/vcpkg
> .\vcpkg\bootstrap-vcpkg.bat
```

For the following commands, it's important to run them from a Visual Studio command prompt so that the compiler can be located.

You can obtain the dependent packages into your local `vcpkg` folder as an explicit step.  This is optional because the `cmake` command line below will also do it for you, but doing it as a separate step can help isolate any problems.

```
> .\vcpkg\vcpkg install --triplet=x64-windows
```

If you want to use the libsodium backend, install the libsodium dependencies by adding `--x-feature=libsodium`.

Now run cmake to create the project files.  Assuming you have vcpkg in the recommended location as shown above, the vcpkg toolchain will automatically be used, so you do not need to explicitly set `CMAKE_TOOLCHAIN_FILE`.  A minimal command line might look like this:

```
> cmake -S . -B build -G Ninja
```

To build all the examples and tests and add P2P/ICE support via the WebRTC submodule, use something like this:

```
> cmake -S . -B build -G Ninja -DBUILD_EXAMPLES=ON -DBUILD_TESTS=ON -DUSE_STEAMWEBRTC=ON
```

Finally, build the projects:

```
> cd build
> ninja
```

## Mac OS X

Using [Homebrew](https://brew.sh)

### OpenSSL

```
$ brew install openssl
$ export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/local/opt/openssl/lib/pkgconfig
```
GameNetworkingSockets requries openssl version 1.1+, so if you install and link openssl but at compile you see the error ```Dependency libcrypto found: NO (tried cmake and framework)``` you'll need to force Brew to install openssl 1.1. You can do that like this:
```
$ brew install openssl@1.1
$ export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/local/opt/openssl@1.1/lib/pkgconfig
```

### protobuf

```
$ brew install protobuf
```

## MSYS2

You can also build this project on [MSYS2](https://www.msys2.org). First,
follow the [instructions](https://www.msys2.org/wiki/MSYS2-installation) on the
MSYS2 website for updating your MSYS2 install.

**Be sure to follow the instructions at the site above to update MSYS2 before
you continue. A fresh install is *not* up to date by default.**

Next install the dependencies for building GameNetworkingSockets (if you want
a 32-bit build, install the i686 versions of these packages):

```
$ pacman -S \
    git \
    mingw-w64-x86_64-gcc \
    mingw-w64-x86_64-openssl \
    mingw-w64-x86_64-pkg-config \
    mingw-w64-x86_64-protobuf
```

And finally, clone the repository and build it:

```
$ git clone https://github.com/ValveSoftware/GameNetworkingSockets.git
$ cd GameNetworkingSockets
$ mkdir build
$ cd build
$ cmake -G Ninja ..
$ ninja
```

**NOTE:** When building with MSYS2, be sure you launch the correct version of
the MSYS2 terminal, as the three different Start menu entries will give you
different environment variables that will affect the build.  You should run the
Start menu item named `MSYS2 MinGW 64-bit` or `MSYS2 MinGW 32-bit`, depending
on the packages you've installed and what architecture you want to build
GameNetworkingSockets for.


## Visual Studio Code
If you're using Visual Studio Code, we have a few extensions to recommend
installing, which will help build the project. Once you have these extensions
installed, open up the .code-workspace file in Visual Studio Code.

### C/C++ by Microsoft
This extension provides IntelliSense support for C/C++.

VS Marketplace Link: https://marketplace.visualstudio.com/items?itemName=ms-vscode.cpptools

### CMake Tools by vector-of-bool
This extension allows for configuring the CMake project and building it from
within the Visual Studio Code IDE.

VS Marketplace Link: https://marketplace.visualstudio.com/items?itemName=vector-of-bool.cmake-tools


================================================
FILE: BUILDING_WINDOWS_MANUAL.md
================================================
Building Windows w/out Using vcpkg
---

We recommend using vcpkg to get the dependencies installed.  But if that
doesn't work for you for some reason, you might try these instructions.
This is a bit of an arduous gauntlet, and this method is no longer supported,
but since these instructions were written, and at the present time still work,
we didn't delete them in case somebody finds them useful.  However, this is
not a supported method of building the library so please don't file any issues.

#### Checking prerequisites

Start a Visual Studio Command Prompt (2017+), and double-check
that you have everything you need.  Note that Visual Studio comes with these tools,
but you might not have selected to install them.  Or just install them from somewhere
else and put them in your `PATH`.

*IMPORTANT*: Make sure you start the command prompt for the desired target
architecture (x64 or x64)!  In the examples here we are building 64-bit.

```
**********************************************************************
** Visual Studio 2019 Developer Command Prompt v16.5.4
** Copyright (c) 2019 Microsoft Corporation
**********************************************************************
[vcvarsall.bat] Environment initialized for: 'x64'

C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise> cd \dev

C:\dev> git --version
git version 2.17.1.windows.2

C:\dev> cmake --version       # 3.5 or higher is required
cmake version 3.16.19112601-MSVC_2

C:\dev> ninja --version
1.8.2
```

#### OpenSSL

You can install the [OpenSSL binaries](https://slproweb.com/products/Win32OpenSSL.html)
provided by Shining Light Productions. The Windows CMake distribution understands
how to find the OpenSSL binaries from these installers, which makes building a lot
easier. Be sure to pick the installers **without** the "Light"suffix. In this instance,
"Light" means no development libraries or headers.

For CMake to find the libraries, you may need to set the environment variable
`OPENSSL_ROOT_DIR`.

If you are linking statically with OpenSSL you will need to set `OPENSSL_USE_STATIC_LIBS` to `ON`.
`OPENSSL_MSVC_STATIC_RT` is automatically matched to the value of `MSVC_CRT_STATIC`.

Both need to be set before any calls to `find_package(OpenSSL REQUIRED)` because CMake caches the paths to libraries.
When building GameNetworkingSockets by itself it is sufficient to set these variables on the command line or in the GUI before first configuration.

See the documentation for [FindOpenSSL](https://cmake.org/cmake/help/latest/module/FindOpenSSL.html) for more information about CMake variables involing OpenSSL.

#### Protobuf

Instructions for getting a working installation of google protobuf on Windows can
be found [here](https://github.com/protocolbuffers/protobuf/blob/master/cmake/README.md).

Here is an example.  First, start a Visual Studio Command Prompt as above.  Then download
a particular release of the source.  Here we are using `git`, but
you can also just download a [release .zip](https://github.com/protocolbuffers/protobuf/releases).

```
C:\dev> git clone -b 3.5.x https://github.com/google/protobuf
C:\dev> cd protobuf
```

Compile the protobuf source.  You need to make sure that all of the following match
the settings you will use for compiling GameNetworkingSockets:

* The target architecture must match (controlled by the MSVC environment variables).
* ```CMAKE_BUILD_TYPE```, which controls debug or release for both projects,
  and must match.
* ```protobuf_BUILD_SHARED_LIBS=ON``` in the example indicates that
  GameNetworkingSockets will link dynamically with protobuf .dlls, which is the
  default for GameNetworkingSockets.  For static linkage, remove this and set
  ``Protobuf_USE_STATIC_LIBS=ON`` when building GameNetworkingSockets.
* If you link statically with protobuf, then you will also need to make sure that
  the linkage with the MSVC CRT is the same.  The default for both protobuf and
  GameNetworkingSockets is multithreaded dll.

Also, note the value for ```CMAKE_INSTALL_PREFIX```.  This specifies where to
"install" the library (headers, link libraries, and the protoc compiler tool).

```
C:\dev\protobuf> mkdir cmake_build
C:\dev\protobuf> cd cmake_build
C:\dev\protobuf\cmake_build> cmake -G Ninja -DCMAKE_BUILD_TYPE=Release -Dprotobuf_BUILD_TESTS=OFF -Dprotobuf_BUILD_SHARED_LIBS=ON -DCMAKE_INSTALL_PREFIX=c:\sdk\protobuf-amd64 ..\cmake
C:\dev\protobuf\cmake_build> ninja
C:\dev\protobuf\cmake_build> ninja install
```

#### Building

Start a Visual Studio Command Prompt, and create a directory to hold the build output.

```
C:\dev\GameNetworkingSockets> mkdir build
C:\dev\GameNetworkingSockets> cd build
```

You'll need to add the path to the protobuf `bin` folder to your path, so
CMake can find the protobuf compiler.  If you followed the example above, that would
be something like this:

```
C:\dev\GameNetworkingSockets\build> set PATH=%PATH%;C:\sdk\protobuf-amd64\bin
```

Now invoke cmake to generate the type or project you want to build.  Here we are creating
ninja files, for a 100% command line build.  It's also possible to get cmake to output
Visual studio project (`.vcxproj`) and solution (`.sln`) files.
```
C:\dev\GameNetworkingSockets\build> cmake -G Ninja -DCMAKE_BUILD_TYPE=Release ..
```

Finally, perform the build
```
C:\dev\GameNetworkingSockets\build> ninja
```




================================================
FILE: CMakeLists.txt
================================================
cmake_minimum_required(VERSION 3.9)

# If vcpkg present as submodule, bring in the toolchain
if( EXISTS ${CMAKE_SOURCE_DIR}/vcpkg/scripts/buildsystems/vcpkg.cmake )
	message(STATUS "Found ${CMAKE_SOURCE_DIR}/vcpkg/scripts/buildsystems/vcpkg.cmake; using it!")
	set(CMAKE_TOOLCHAIN_FILE ${CMAKE_SOURCE_DIR}/vcpkg/scripts/buildsystems/vcpkg.cmake
		CACHE STRING "Vcpkg toolchain file")
endif()

include(CheckIPOSupported)
include(CMakeDependentOption)
include(CMakePushCheckState)
include(CheckSymbolExists)

# CMP0069: INTERPROCEDURAL_OPTIMIZATION is enforced when enabled.
# This variable is needed for abseil, which has a different
# cmake_minimum_required version set (3.5).
set(CMAKE_POLICY_DEFAULT_CMP0069 NEW)

# Put all the output from all projects into the same folder
#set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)

project(GameNetworkingSockets C CXX)

set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_SOURCE_DIR}/cmake)

include(DefaultBuildType)
find_package(Sanitizers)

if(SANITIZE_ADDRESS OR SANITIZE_THREAD OR SANITIZE_MEMORY OR SANITIZE_UNDEFINED)
	set(SANITIZE ON)
endif()

include(FlagsMSVC)
add_definitions( -DVALVE_CRYPTO_ENABLE_25519 )
if(CMAKE_CXX_COMPILER_ID MATCHES "MSVC")
	add_definitions(
		-D_CRT_SECURE_NO_WARNINGS
		-D_CRT_NONSTDC_NO_WARNINGS
		)
endif()

option(BUILD_STATIC_LIB "Build the static link version of the client library" ON)
option(BUILD_SHARED_LIB "Build the shared library version of the client library" ON)
option(BUILD_EXAMPLES "Build the included examples" OFF)
option(BUILD_TESTS "Build crypto, pki and network connection tests" OFF)
option(BUILD_TOOLS "Build cert management tool" OFF)
option(LTO "Enable Link-Time Optimization" OFF)
option(ENABLE_ICE "Enable support for NAT-punched P2P connections using ICE protocol.  Build native ICE client" ON)
option(USE_STEAMWEBRTC "Build Google's WebRTC library to get ICE support for P2P" OFF)
option(Protobuf_USE_STATIC_LIBS "Link with protobuf statically" OFF)
if(CMAKE_CXX_COMPILER_ID MATCHES "MSVC")
	option(MSVC_CRT_STATIC "Link the MSVC CRT statically" OFF)
	configure_msvc_runtime()
	print_default_msvc_flags()
endif()

#
# Primary crypto library (for AES, SHA256, etc)
#
set(useCryptoOptions OpenSSL libsodium BCrypt)
set(USE_CRYPTO "OpenSSL" CACHE STRING "Crypto library to use for AES/SHA256")
set_property(CACHE USE_CRYPTO PROPERTY STRINGS ${useCryptoOptions})

list(FIND useCryptoOptions "${USE_CRYPTO}" useCryptoIndex)
if(useCryptoIndex EQUAL -1)
	message(FATAL_ERROR "USE_CRYPTO must be one of: ${useCryptoOptions}")
endif()
if(USE_CRYPTO STREQUAL "BCrypt" AND NOT WIN32)
	message(FATAL_ERROR "USE_CRYPTO=\"BCrypt\" is only valid on Windows")
endif()

if(LTO)
	check_ipo_supported()
endif()

if (WIN32)
	#
	# Strip compiler flags which conflict with ones we explicitly set. If we don't
	# do this, then we get a warning on every file we compile for the library.
	#
	string(REPLACE "/EHsc" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
	string(REPLACE "/GR" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")

	if (USE_CRYPTO STREQUAL "BCrypt")
		#
		# Check whether BCrypt can be used with this SDK version
		#
		try_compile(BCRYPT_AVAILABLE "${CMAKE_CURRENT_BINARY_DIR}/tryCompile" SOURCES "${CMAKE_CURRENT_LIST_DIR}/cmake/tryCompileTestBCrypt.cpp" LINK_LIBRARIES bcrypt OUTPUT_VARIABLE BCRYPT_AVAILABILITY_TEST_MESSAGES)
		if (NOT BCRYPT_AVAILABLE)
			message(STATUS ${BCRYPT_AVAILABILITY_TEST_MESSAGES})
			message(FATAL_ERROR "You're on Windows but BCrypt seems to be unavailable, you will need OpenSSL")
		endif()
	endif()
endif()

if (USE_CRYPTO STREQUAL "OpenSSL")
	# Match the OpenSSL runtime to our setting.
	# Note that once found the library paths are cached and will not change if the option is changed.
	if (MSVC)
		set(OPENSSL_MSVC_STATIC_RT ${MSVC_CRT_STATIC})
	endif()

	find_package(OpenSSL REQUIRED)
	message( STATUS "OPENSSL_INCLUDE_DIR = ${OPENSSL_INCLUDE_DIR}" )

	# Ensure the OpenSSL version is recent enough. We need a bunch of EVP
	# functionality.
	cmake_push_check_state()
		set(CMAKE_REQUIRED_INCLUDES ${OPENSSL_INCLUDE_DIR})
		set(CMAKE_REQUIRED_LIBRARIES OpenSSL::Crypto)
		if(WIN32 AND OPENSSL_USE_STATIC_LIBS)
			list(APPEND CMAKE_REQUIRED_LIBRARIES ws2_32 crypt32)
		endif()
		check_symbol_exists(EVP_MD_CTX_free openssl/evp.h OPENSSL_NEW_ENOUGH)
		if (NOT OPENSSL_NEW_ENOUGH)
			message(FATAL_ERROR "Cannot find EVP_MD_CTX_free in OpenSSL headers/libs for the target architecture.  Check that you're using OpenSSL 1.1.0 or later.")
		endif()
	cmake_pop_check_state()
	cmake_push_check_state()
		set(CMAKE_REQUIRED_LIBRARIES OpenSSL::Crypto)
		if(WIN32 AND OPENSSL_USE_STATIC_LIBS)
			list(APPEND CMAKE_REQUIRED_LIBRARIES ws2_32 crypt32)
		endif()
		if(USE_CRYPTO25519 STREQUAL "OpenSSL")
			check_symbol_exists(EVP_PKEY_get_raw_public_key openssl/evp.h OPENSSL_HAS_25519_RAW)
		endif()
	cmake_pop_check_state()
endif()

if(USE_CRYPTO25519 STREQUAL "OpenSSL" AND NOT OPENSSL_HAS_25519_RAW)
	message(FATAL_ERROR "Cannot find (EVP_PKEY_get_raw_public_key in OpenSSL headers/libs for the target architecture.  Please use -DUSE_CRYPTO25519=Reference or upgrade OpenSSL to 1.1.1 or later")
endif()

if(USE_CRYPTO STREQUAL "libsodium" OR USE_CRYPTO25519 STREQUAL "libsodium")
	find_package(sodium REQUIRED)
endif()

if(USE_CRYPTO STREQUAL "libsodium")
	if(NOT CMAKE_SYSTEM_PROCESSOR MATCHES "amd64.*|x86_64.*|AMD64.*|i686.*|i386.*|x86.*")
		message(FATAL_ERROR "-DUSE_CRYPTO=libsodium invalid, libsodium AES implementation only works on x86/x86_64 CPUs")
	endif()
endif()

# We always need at least sse2 on x86
if(CMAKE_SYSTEM_PROCESSOR MATCHES "amd64.*|x86_64.*|AMD64.*|i686.*|i386.*|x86.*")
       set(TARGET_ARCH_FLAGS "-msse2")
endif()

function(set_target_common_gns_properties TGT)
	target_compile_definitions( ${TGT} PRIVATE GOOGLE_PROTOBUF_NO_RTTI )

	if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang" OR CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
		# Reduce binary size by allowing for a pseudo-"function-level linking" analog
		target_compile_options(${TGT} PRIVATE -ffunction-sections -fdata-sections ${TARGET_ARCH_FLAGS})
	endif()

	if(CMAKE_SYSTEM_NAME MATCHES Linux)
		target_compile_definitions(${TGT} PUBLIC LINUX)
	elseif(CMAKE_SYSTEM_NAME MATCHES Darwin)
		target_compile_definitions(${TGT} PUBLIC OSX)
	elseif(CMAKE_SYSTEM_NAME MATCHES FreeBSD)
		target_compile_definitions(${TGT} PUBLIC FREEBSD)
	elseif(CMAKE_SYSTEM_NAME MATCHES Windows)
		target_compile_definitions(${TGT} PUBLIC _WINDOWS)
		if(CMAKE_CXX_COMPILER_ID MATCHES "MSVC")
			if(NOT Protobuf_USE_STATIC_LIBS)
				target_compile_definitions(${TGT} PRIVATE PROTOBUF_USE_DLLS)
			endif()
			target_compile_options(${TGT} PRIVATE
				/EHs-c-   # Disable C++ exceptions

				# Below are warnings we can't fix and don't want to see (mostly from protobuf, some from MSVC standard library)
				/wd4146   # include/google/protobuf/wire_format_lite.h(863): warning C4146: unary minus operator applied to unsigned type, result still unsigned
				/wd4530   # .../xlocale(319): warning C4530: C++ exception handler used, but unwind semantics are not enabled. Specify /EHsc
				/wd4244   # google/protobuf/wire_format_lite.h(935): warning C4244: 'argument': conversion from 'google::protobuf::uint64' to 'google::protobuf::uint32', possible loss of data
				/wd4251   # 'google::protobuf::io::CodedOutputStream::default_serialization_deterministic_': struct 'std::atomic<bool>' needs to have dll-interface to be used by clients of class 
				/wd4267   # google/protobuf/has_bits.h(73): warning C4267: 'argument': conversion from 'size_t' to 'int', possible loss of data
				)

			# Disable RTTI except in Debug, because we use dynamic_cast in assert_cast
			target_compile_options(${TGT} PRIVATE $<IF:$<CONFIG:Debug>,/GR,/GR->)
		else()
			target_compile_definitions(${TGT} PRIVATE
				__STDC_FORMAT_MACROS=1
				__USE_MINGW_ANSI_STDIO=0
				)
			target_compile_options(${TGT} PRIVATE -fno-stack-protector)
		endif()
	else()
		message(FATAL_ERROR "Could not identify your target operating system")
	endif()

	if(NOT CMAKE_SYSTEM_NAME MATCHES Windows)
		target_compile_options(${TGT} PRIVATE -fstack-protector-strong)
	endif()

	if(LTO)
		set_target_properties(${TGT} PROPERTIES INTERPROCEDURAL_OPTIMIZATION TRUE)
	endif()

	set_target_properties(${TGT} PROPERTIES
		CXX_STANDARD 11
	)
endfunction()

if(BUILD_EXAMPLES)
	if ( NOT BUILD_SHARED_LIB )
		# See also portfile.cmake
		message(FATAL_ERROR "Must build shared lib (-DBUILD_SHARED_LIB=ON) to build examples")
	endif()
endif()
add_subdirectory(examples) # examples/CMakeLists will check what's defined and only add appropriate targets

if(BUILD_TESTS)
	if ( NOT BUILD_STATIC_LIB )
		# See also portfile.cmake
		message(FATAL_ERROR "Must build static lib (-DBUILD_STATIC_LIB=ON) to build tests")
	endif()
	add_subdirectory(tests)
endif()

add_subdirectory(src)

#message(STATUS "---------------------------------------------------------")
message(STATUS "Crypto library for AES/SHA256: ${USE_CRYPTO}")
message(STATUS "Crypto library for ed25519/curve25519: ${USE_CRYPTO25519}")
message(STATUS "Link-time optimization: ${LTO}")
#message(STATUS "---------------------------------------------------------")


================================================
FILE: GameNetworkingSockets.code-workspace
================================================
{
	"folders": [
		{
			"path": "."
		}
	],
	"settings": {
		"cmake.buildDirectory": "${workspaceFolder}/build",
		"C_Cpp.default.compileCommands": "${workspaceFolder}/build/compile_commands.json",
		"C_Cpp.default.configurationProvider": "ms-vscode.cmake-tools"
	}
}


================================================
FILE: LICENSE
================================================
Copyright (c) 2018, Valve Corporation
All rights reserved.

Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:

1. Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.

2. Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation and/or
other materials provided with the distribution.

3. Neither the name of the copyright holder nor the names of its contributors
may be used to endorse or promote products derived from this software without
specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.


================================================
FILE: README.md
================================================
# GameNetworkingSockets
[![Windows, Ubuntu](https://github.com/ValveSoftware/GameNetworkingSockets/actions/workflows/build.yml/badge.svg)](https://github.com/ValveSoftware/GameNetworkingSockets/actions)  [![MacOS](https://github.com/ValveSoftware/GameNetworkingSockets/actions/workflows/macos.yml/badge.svg)](https://github.com/ValveSoftware/GameNetworkingSockets/actions) [![Linux flavors](https://github.com/ValveSoftware/GameNetworkingSockets/actions/workflows/linux-flavors.yml/badge.svg)](https://github.com/ValveSoftware/GameNetworkingSockets/actions)

GameNetworkingSockets is a basic transport layer for games.  The features are:

* Connection-oriented API (like TCP)
* ... but message-oriented (like UDP), not stream-oriented.
* Supports both reliable and unreliable message types
* Messages can be larger than underlying MTU.  The protocol performs
  fragmentation, reassembly, and retransmission for reliable messages.
* A [reliability layer](src/steamnetworkingsockets/clientlib/SNP_WIRE_FORMAT.md)
  significantly more sophisticated than a basic TCP-style sliding window.
  It is based on the "ack vector" model from DCCP (RFC 4340, section 11.4)
  and Google QUIC and discussed in the context of games by
  [Glenn Fiedler](https://gafferongames.com/post/reliable_ordered_messages/).
  The basic idea is for the receiver to efficiently communicate to the sender
  the status of every packet number (whether or not a packet was received
  with that number).  By remembering which segments were sent in each packet,
  the sender can deduce which segments need to be retransmitted.
* Encryption. AES-GCM-256 per packet, [Curve25519](https://cr.yp.to/ecdh.html) for
  key exchange and cert signatures. The details for shared key derivation and
  per-packet IV are based on the [design](https://docs.google.com/document/d/1g5nIXAIkN_Y-7XJW5K45IblHd_L2f5LTaDUDwvZ5L6g/edit?usp=sharing)
  used by Google's QUIC protocol.
* Tools for simulating packet latency/loss, and detailed stats measurement
* Head-of-line blocking control and bandwidth sharing of multiple message
  streams ("lanes") on the same connection.  You can use strict priority
  values, softer [weight values](https://en.wikipedia.org/wiki/Weighted_fair_queueing)
  that control how bandwidth is shared, or some combination of the two methods.
  See [``ISteamNetworkingSockets::ConfigureConnectionLanes``](include/steam/isteamnetworkingsockets.h).
* IPv6 support
* Peer-to-peer networking:
  * NAT traversal through google WebRTC's ICE implementation.
  * Plug in your own signaling service.
  * Unique "symmetric connect" mode.
  * [``ISteamNetworkingMessages``](include/steam/isteamnetworkingmessages.h) is an
    interface designed to make it easy to port UDP-based code to P2P use cases.  (By
    UDP-based, we mean non-connection-oriented code, where each time you send a
    packet, you specify the recipient's address.)
  * See [README_P2P.md](README_P2P.md) for more info
* Cross platform.  This library has shipped on consoles, mobile platforms, and non-Steam
  stores, and has been used to facilitate cross-platform connectivity.  Contact us to get
  access to the code.  (We are not allowed to distribute it here.)

What it does *not* do:

* Higher level serialization of entities, delta encoding of changed state
  variables, etc
* Compression

## Quick API overview

To get an idea of what the API is like, here are a few things to check out:

* The [include/steam](include/steam) folder has the public API headers.
  * [``ISteamNetworkingSockets``](include/steam/isteamnetworkingsockets.h) is the
    most important interface.
  * [``steamnetworkingtypes.h``](include/steam/steamnetworkingtypes.h) has misc
    types and declarations.
* The
  [Steamworks SDK documentation](https://partner.steamgames.com/doc/api/ISteamNetworkingSockets)
  offers web-based documentation for these APIs.  Note that some features
  are only available on Steam, such as Steam's authentication service,
  signaling service, and the SDR relay service.
* Look at these examples:
  * [example_chat.cpp](examples/example_chat.cpp).  Very simple client/server
    program using all reliable messages over ordinary IPv4.
  * [test_p2p.cpp](tests/test_p2p.cpp).  Shows how to get two hosts to connect
    to each other using P2P connectivity.  Also an example of how to write a
    signaling service plugin.

## Building

See [BUILDING](BUILDING.md) for more information.

## Language bindings

The library was written in C++, but there is also a plain C interface
to facilitate binding to other languages.

Third party language bindings:

* C#:
  * <https://github.com/nxrighthere/ValveSockets-CSharp>
  * <https://github.com/Facepunch/Facepunch.Steamworks>
* Go:
  * <https://github.com/nielsAD/gns/>
* Rust:
  * <https://github.com/hussein-aitlahcen/gns-rs>

## Why do I see "Steam" everywhere?

The main interface class is named SteamNetworkingSockets, and many files have
"steam" in their name.  But *Steam is not needed*.  If you don't make games or
aren't on Steam, feel free to use this code for whatever purpose you want.

The reason for "Steam" in the names is that this provides a subset of the
functionality of the [API](https://partner.steamgames.com/doc/api/ISteamNetworkingSockets)
with the same name in the Steamworks SDK.  Our main
reason for releasing this code is so that developers won't have any hesitation
coding to the API in the Steamworks SDK.  On Steam, you will link against the
Steamworks version, and you can access the additional services provided by
the [Steam Datagram Relay](https://partner.steamgames.com/doc/features/multiplayer/steamdatagramrelay)
network.  On other platforms and stores, as long as you ship a version of your
game on Steam, you might be able to take advantage of these services.  See
the Steamworks documentation for more information.  Because this is a live
service, and we need to control our security and backward compatibility burden,
at this time we are not able to offer access to SDR on other platforms to all
partners.

If you aren't a Steam partner, or don't have a version of your game on Steam,
then use this opensource version of the API and take advantage of the permissive
license to do whatever you want.  We want you to take maximum advantage of the
features in the Steamworks version.  That won't happen if this API is a weird
"wart" that's hidden behind `#ifdef STEAM`, which is why we're making this
opensource version available.

The desire to match the Steamworks SDK also explains a somewhat anachronistic
coding style and weird directory layout.  This project is kept in sync with the
Steam code here at Valve.  When we extracted the code from the much larger
codebase, we had to do some relatively gross hackery.  The files in folders
named  `tier0`, `tier1`, `vstdlib`, `common`, etc have especially suffered
trauma.  Also if you see code that appears to have unnecessary layers of
abstraction, it's probably because those layers are needed to support relayed
connection types or some part of the Steamworks SDK.

## Security

Did you find a security vulnerability?  Please inform us responsibly; you may
be eligible for a bug bounty.  See the [security policy](SECURITY.md) for more
information.


================================================
FILE: README_P2P.md
================================================
# About that P2P support....

SteamNetworkingSockets supports peer-to-peer connections.  A "peer-to-peer"
connection in this context means that the hosts do not (initially) know
each other's IP address.  Furthermore, they may be behind NAT, and so they
may not know their *own* public IP address.  They may not even *have* a public
IP that other hosts can use to send them inbound traffic.  [Here](https://tailscale.com/blog/how-nat-traversal-works/)
is a good article about the problem of NAT traversal.

[ICE](https://en.wikipedia.org/wiki/Interactive_Connectivity_Establishment)
is an internet standard protocol for discovering and sharing IP addresses,
negotiating NAT, and establishing a direct connection or fallback to relaying
the connection if necessary.

The opensource version of the code can compile with [google webrtc](https://webrtc.googlesource.com/src)'s ICE
implementation.  We interface with the WebRTC code at a reletaively low level
and only use it for datagram transport.  We don't use DTLS or WebRTC data
channels.  (In the future, we may offer alternate NAT traversal
implementations.  In particular, we'd like to have an implementation that
uses [PCP](https://tools.ietf.org/html/rfc6887), which is not used by
the current google WebRTC code.)

## Symmetric connect mode

SteamNetworkingSockets offers a unique feature known as *symmetric
connect mode*, which really puts the "peer" in "peer-to-peer connection".
This feature is useful in the following common use case:

* Two hosts wish to establish a *single* connection between them.
* Either host may initiate the connection.
* The hosts may initiate the connection at the same time.

This situation involves race conditions that can be tricky to get
right, especially when authentication, encryption, ICE roles, etc
are involved.  With symmetric connect mode, sorting out these race
conditions and producing a single connection is handled by the API.

See the ``k_ESteamNetworkingConfig_SymmetricConnect``
connection flag in [steamnetworkingtypes.h](include/steam/steamnetworkingtypes.h)
for more info.

## ISteamNetworkingMessages

Most P2P libraries, such as google WebRTC, and indeed our own
[ISteamNetworkingSockets](include/steam/isteamnetworkingsockets.h), are *connection
oriented*.  To talk to a peer, you first establish a connection to the peer, and
when you send and receive messages, the peer is identified by the connection handle.

Much existing network code is based on UDP with a single socket, where
 connection handles are not used.  Instead, packets are sent with the IP address
 of the recipeient specified for each packet.   (E.g. ``sentto()`` and ``recvfrom()``).
[ISteamNetworkingMessages](include/steam/isteamnetworkingmessages.h) was created
to provide a more "ad-hoc" interface like UDP.  It can be useful when adding P2P
support to existing code, depending on the abstraction you are working with.  If
the code you are modifing already has the concept of a connection, then you might
find it easier to use ISteamNetworkinSockets directly.  But if you are modifying code
at a lower level, you may find that you need to maintain a table of active connections,
and each time you send a packet, use the existing connection if one exists, or
create a new connection if one does not exist.  This is exactly what
ISteamNetworkingMessages does for you.  It creates symmetric-mode connections on
demand the first time you communicate with a given peer, and idle connections are
automatically closed when they are no longer needed.

## Requirements

Peer-to-peer connections require more than just working code.  In addition
to the code in this library, there are several other prerequisites.
(Note that the Steamworks API provides all of these services for Steam games.)

### Signaling service

A side channel, capable of relaying small rendezvous
messages from one host to another.  This means hosts must have a constant
connection to your service, once that enables you to *push* messages to them.

SteamNetworkingSockets supports a pluggable signaling service.  The requirements
placed on your signaling service are relatively minimal:

* Individual rendezvous messages are small.  (Perhaps bigger than IP MTU,
  but never more than a few KB.)
* Only datagram "best-effort" delivery is required.  The signaling protocol
  is tolerant of dropped, duplicated, or reordered messages.
  These anomalies may cause negotiation to take longer, but not fail.
  This means, for example that there doesn't need to be a mechanism to
  inform the system when your connection to the signaling service is
  disrupted.
* The channel can be relatively low bandwidth and high latency.  Usually
  there is a burst of a handful of exchanges when a connection is created,
  followed by silence, unless something changes with the connection.


### STUN server(s)

A [STUN](https://en.wikipedia.org/wiki/STUN) server is used to help peers
discover their own public IP address and open up firewalls.  STUN
servers are relatively low bandwidth, and there are publicly-available ones.

### Relay fallback

Unfortunatley, for some pairs of hosts, NAT piercing is not successful.
In this situation, the traffic must be relayed.  In the ICE protocol, this is
done using [TURN](https://en.wikipedia.org/wiki/Traversal_Using_Relays_around_NAT)
servers.  (NOTE: Any TURN server also doubles as a STUN server.)  Because the TURN
server is relaying every packet, is is a relatively costly service, so you probably
will need to run your own, or just fail connections that cannot pierce NAT.

On Steam we use a custom relay service known as [Steam Datgaram Relay](https://partner.steamgames.com/doc/features/multiplayer/steamdatagramrelay)
-- SDR for short -- carrying packets through our network of relays and
on our backbone.   (You may see this mentioned in the opensource code here,
but the SDR support code is not opensource.)  Also, on Steam we always
relay traffic and do not share IP addresses between untrusted peers, so
that malicious players cannot DoS attack.

### Naming hosts and matchmaking

The above requirements are just what is needed to make a connection between two
hosts, once you know who to connect to.  But before that, you need a way to assign an
identity to a host, authenticate them, matchmaking them, etc.  Those services are
also included with Steam, but outside the scope of a transport library like this.

## Using P2P

Assuming you have all of those requirements, you can use SteamNetworkingSockets
to make P2P connections!

To compile with ICE support, set USE_STEAMWEBRTC when building the project files:
```
cmake -DUSE_STEAMWEBRTC=ON (etc...)
```

You'll also need to activate two git submodules to pull down the google WebRTC code.
(Just run ``cmake`` and follow the instructions.)

Take a look at these files for more information:

* [steamnetworkingcustomsignaling.h](include/steam/steamnetworkingcustomsignaling.h)
  contains the interfaces you'll need to implement for your signaling service.
* An example of a really trivial signaling protocol:
  * [trivial_signaling_server.go](examples/trivial_signaling_server.go) server
  * [trivial_signaling_client.cpp](examples/trivial_signaling_client.cpp) client
* A test case that puts everything together.  It starts up an example trivial
  signaling protocol server and two peers, and has them connect to each other
  and exchange a few messages.  We use the publicly-available google STUN servers.
  (No TURN servers for relay fallback in this example.)
  * [test_p2p.py](tests/test_p2p.py) Executive test script that starts all the processes.
  * [test_p2p.cpp](tests/test_p2p.cpp) Code for the process each peer runs.

## Roadmap

Here are some things we have in mind to make P2P support better:

* Get plugins written for standard, opensource protocols that could be used for
signaling, such as [XMPP](https://xmpp.org/).  This would be a great project for
  somebody else to do!  We would welcome contributions to this repository, or
  happily link to your own project.  (See issue #136)
* LAN beacon support, so that P2P connections can be made even when signaling
  is down or the hosts do not have Internet connectivity.  (See issue #82)


================================================
FILE: SECURITY.md
================================================
# Security Policy

If you believe you have found a security vulnerability, please do not file a
public issue or pull request.  Instead, disclose it responsibly through
[hacker one](https://hackerone.com/valve).

Because most of the code in this library is used in the Steamworks SDK and our
games, it is in scope for hackerone reports.  Note that to be eligible
for a bounty, the vulnerability needs to be in a part of the code that is used
by Steam players.


================================================
FILE: cmake/DefaultBuildType.cmake
================================================
# Set a default build type if none was specified
set(default_build_type "RelWithDebInfo")

if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
  message(STATUS "Setting CMAKE_BUILD_TYPE to '${default_build_type}' as none was specified.")
  set(CMAKE_BUILD_TYPE "${default_build_type}" CACHE STRING "Choose the type of build." FORCE)

  # Set the possible values of build type for cmake-gui
  set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS "Debug" "Release" "MinSizeRel" "RelWithDebInfo")
else()
  message(STATUS "CMAKE_BUILD_TYPE='${CMAKE_BUILD_TYPE}'")
endif()


================================================
FILE: cmake/FindASan.cmake
================================================
# The MIT License (MIT)
#
# Copyright (c)
#   2013 Matthew Arsenault
#   2015-2016 RWTH Aachen University, Federal Republic of Germany
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in all
# copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.

option(SANITIZE_ADDRESS "Enable AddressSanitizer for sanitized targets." Off)

set(FLAG_CANDIDATES
    # Clang 3.2+ use this version. The no-omit-frame-pointer option is optional.
    "-g -fsanitize=address -fno-omit-frame-pointer"
    "-g -fsanitize=address"

    # Older deprecated flag for ASan
    "-g -faddress-sanitizer"
)


if (SANITIZE_ADDRESS AND (SANITIZE_THREAD OR SANITIZE_MEMORY))
    message(FATAL_ERROR "AddressSanitizer is not compatible with "
        "ThreadSanitizer or MemorySanitizer.")
endif ()


include(sanitize-helpers)

if (SANITIZE_ADDRESS)
    sanitizer_check_compiler_flags("${FLAG_CANDIDATES}" "AddressSanitizer"
        "ASan")

    find_program(ASan_WRAPPER "asan-wrapper" PATHS ${CMAKE_MODULE_PATH})
	mark_as_advanced(ASan_WRAPPER)
endif ()

function (add_sanitize_address TARGET)
    if (NOT SANITIZE_ADDRESS)
        return()
    endif ()

    sanitizer_add_flags(${TARGET} "AddressSanitizer" "ASan")
endfunction ()


================================================
FILE: cmake/FindMSan.cmake
================================================
# The MIT License (MIT)
#
# Copyright (c)
#   2013 Matthew Arsenault
#   2015-2016 RWTH Aachen University, Federal Republic of Germany
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in all
# copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.

option(SANITIZE_MEMORY "Enable MemorySanitizer for sanitized targets." Off)

set(FLAG_CANDIDATES
    "-g -fsanitize=memory"
)


include(sanitize-helpers)

if (SANITIZE_MEMORY)
    if (NOT ${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
        message(WARNING "MemorySanitizer disabled for target ${TARGET} because "
            "MemorySanitizer is supported for Linux systems only.")
        set(SANITIZE_MEMORY Off CACHE BOOL
            "Enable MemorySanitizer for sanitized targets." FORCE)
    elseif (NOT ${CMAKE_SIZEOF_VOID_P} EQUAL 8)
        message(WARNING "MemorySanitizer disabled for target ${TARGET} because "
            "MemorySanitizer is supported for 64bit systems only.")
        set(SANITIZE_MEMORY Off CACHE BOOL
            "Enable MemorySanitizer for sanitized targets." FORCE)
    else ()
        sanitizer_check_compiler_flags("${FLAG_CANDIDATES}" "MemorySanitizer"
            "MSan")
    endif ()
endif ()

function (add_sanitize_memory TARGET)
    if (NOT SANITIZE_MEMORY)
        return()
    endif ()

    sanitizer_add_flags(${TARGET} "MemorySanitizer" "MSan")
endfunction ()


================================================
FILE: cmake/FindSanitizers.cmake
================================================
# The MIT License (MIT)
#
# Copyright (c)
#   2013 Matthew Arsenault
#   2015-2016 RWTH Aachen University, Federal Republic of Germany
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in all
# copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.

# If any of the used compiler is a GNU compiler, add a second option to static
# link against the sanitizers.
option(SANITIZE_LINK_STATIC "Try to link static against sanitizers." Off)




set(FIND_QUIETLY_FLAG "")
if (DEFINED Sanitizers_FIND_QUIETLY)
    set(FIND_QUIETLY_FLAG "QUIET")
endif ()

find_package(ASan ${FIND_QUIETLY_FLAG})
find_package(TSan ${FIND_QUIETLY_FLAG})
find_package(MSan ${FIND_QUIETLY_FLAG})
find_package(UBSan ${FIND_QUIETLY_FLAG})




function(sanitizer_add_blacklist_file FILE)
    if(NOT IS_ABSOLUTE ${FILE})
        set(FILE "${CMAKE_CURRENT_SOURCE_DIR}/${FILE}")
    endif()
    get_filename_component(FILE "${FILE}" REALPATH)

    sanitizer_check_compiler_flags("-fsanitize-blacklist=${FILE}"
        "SanitizerBlacklist" "SanBlist")
endfunction()

function(add_sanitizers ...)
    # If no sanitizer is enabled, return immediately.
    if (NOT (SANITIZE_ADDRESS OR SANITIZE_MEMORY OR SANITIZE_THREAD OR
        SANITIZE_UNDEFINED))
        return()
    endif ()

    foreach (TARGET ${ARGV})
        # Check if this target will be compiled by exactly one compiler. Other-
        # wise sanitizers can't be used and a warning should be printed once.
        get_target_property(TARGET_TYPE ${TARGET} TYPE)
        if (TARGET_TYPE STREQUAL "INTERFACE_LIBRARY")
            message(WARNING "Can't use any sanitizers for target ${TARGET}, "
                    "because it is an interface library and cannot be "
                    "compiled directly.")
            return()
        endif ()
        sanitizer_target_compilers(${TARGET} TARGET_COMPILER)
        list(LENGTH TARGET_COMPILER NUM_COMPILERS)
        if (NUM_COMPILERS GREATER 1)
            message(WARNING "Can't use any sanitizers for target ${TARGET}, "
                    "because it will be compiled by incompatible compilers. "
                    "Target will be compiled without sanitizers.")
            return()

        # If the target is compiled by no or no known compiler, give a warning.
        elseif (NUM_COMPILERS EQUAL 0)
            message(WARNING "Sanitizers for target ${TARGET} may not be"
                    " usable, because it uses no or an unknown compiler. "
                    "This is a false warning for targets using only "
		    "object lib(s) as input.")
        endif ()

        # Add sanitizers for target.
        add_sanitize_address(${TARGET})
        add_sanitize_thread(${TARGET})
        add_sanitize_memory(${TARGET})
        add_sanitize_undefined(${TARGET})
	endforeach ()
endfunction(add_sanitizers)


================================================
FILE: cmake/FindTSan.cmake
================================================
# The MIT License (MIT)
#
# Copyright (c)
#   2013 Matthew Arsenault
#   2015-2016 RWTH Aachen University, Federal Republic of Germany
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in all
# copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.

option(SANITIZE_THREAD "Enable ThreadSanitizer for sanitized targets." Off)

set(FLAG_CANDIDATES
    "-g -fsanitize=thread"
)


# ThreadSanitizer is not compatible with MemorySanitizer.
if (SANITIZE_THREAD AND SANITIZE_MEMORY)
    message(FATAL_ERROR "ThreadSanitizer is not compatible with "
        "MemorySanitizer.")
endif ()


include(sanitize-helpers)

if (SANITIZE_THREAD)
  if (NOT ${CMAKE_SYSTEM_NAME} STREQUAL "Linux" AND
      NOT ${CMAKE_SYSTEM_NAME} STREQUAL "Darwin")
        message(WARNING "ThreadSanitizer disabled for target ${TARGET} because "
          "ThreadSanitizer is supported for Linux systems and macOS only.")
        set(SANITIZE_THREAD Off CACHE BOOL
            "Enable ThreadSanitizer for sanitized targets." FORCE)
    elseif (NOT ${CMAKE_SIZEOF_VOID_P} EQUAL 8)
        message(WARNING "ThreadSanitizer disabled for target ${TARGET} because "
            "ThreadSanitizer is supported for 64bit systems only.")
        set(SANITIZE_THREAD Off CACHE BOOL
            "Enable ThreadSanitizer for sanitized targets." FORCE)
    else ()
        sanitizer_check_compiler_flags("${FLAG_CANDIDATES}" "ThreadSanitizer"
            "TSan")
    endif ()
endif ()

function (add_sanitize_thread TARGET)
    if (NOT SANITIZE_THREAD)
        return()
    endif ()

    sanitizer_add_flags(${TARGET} "ThreadSanitizer" "TSan")
endfunction ()


================================================
FILE: cmake/FindUBSan.cmake
================================================
# The MIT License (MIT)
#
# Copyright (c)
#   2013 Matthew Arsenault
#   2015-2016 RWTH Aachen University, Federal Republic of Germany
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in all
# copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.

option(SANITIZE_UNDEFINED
    "Enable UndefinedBehaviorSanitizer for sanitized targets." Off)

set(FLAG_CANDIDATES
    "-g -fsanitize=undefined -fno-sanitize=alignment"
)


include(sanitize-helpers)

if (SANITIZE_UNDEFINED)
    sanitizer_check_compiler_flags("${FLAG_CANDIDATES}"
        "UndefinedBehaviorSanitizer" "UBSan")
endif ()

function (add_sanitize_undefined TARGET)
    if (NOT SANITIZE_UNDEFINED)
        return()
    endif ()

    sanitizer_add_flags(${TARGET} "UndefinedBehaviorSanitizer" "UBSan")
endfunction ()


================================================
FILE: cmake/Findsodium.cmake
================================================
# Written in 2016 by Henrik Steffen Gaßmann <henrik@gassmann.onl>
#
# To the extent possible under law, the author(s) have dedicated all copyright
# and related and neighboring rights to this software to the public domain
# worldwide. This software is distributed without any warranty.
#
# You should have received a copy of the CC0 Public Domain Dedication along with
# this software. If not, see
#
# http://creativecommons.org/publicdomain/zero/1.0/
#
# ##############################################################################
# Tries to find the local libsodium installation.
#
# On Windows the sodium_DIR environment variable is used as a default hint which
# can be overridden by setting the corresponding cmake variable.
#
# Once done the following variables will be defined:
#
# sodium_FOUND sodium_INCLUDE_DIR sodium_LIBRARY_DEBUG sodium_LIBRARY_RELEASE
# sodium_VERSION_STRING
#
# Furthermore an imported "sodium" target is created.
#

if(CMAKE_C_COMPILER_ID STREQUAL "GNU" OR CMAKE_C_COMPILER_ID STREQUAL "Clang")
  set(_GCC_COMPATIBLE 1)
endif()

# static library option
if(NOT DEFINED sodium_USE_STATIC_LIBS)
  option(sodium_USE_STATIC_LIBS "enable to statically link against sodium" OFF)
endif()
if(NOT (sodium_USE_STATIC_LIBS EQUAL sodium_USE_STATIC_LIBS_LAST))
  unset(sodium_LIBRARY CACHE)
  unset(sodium_LIBRARY_DEBUG CACHE)
  unset(sodium_LIBRARY_RELEASE CACHE)
  unset(sodium_DLL_DEBUG CACHE)
  unset(sodium_DLL_RELEASE CACHE)
  set(sodium_USE_STATIC_LIBS_LAST
      ${sodium_USE_STATIC_LIBS}
      CACHE INTERNAL "internal change tracking variable")
endif()

# ##############################################################################
# UNIX
if(UNIX)
  # import pkg-config
  find_package(PkgConfig QUIET)
  if(PKG_CONFIG_FOUND)
    pkg_check_modules(sodium_PKG QUIET libsodium)
  endif()

  if(sodium_USE_STATIC_LIBS)
    if(sodium_PKG_STATIC_LIBRARIES)
      foreach(_libname ${sodium_PKG_STATIC_LIBRARIES})
        if(NOT _libname MATCHES "^lib.*\\.a$") # ignore strings already ending
                                               # with .a
          list(INSERT sodium_PKG_STATIC_LIBRARIES 0 "lib${_libname}.a")
        endif()
      endforeach()
      list(REMOVE_DUPLICATES sodium_PKG_STATIC_LIBRARIES)
    else()
      # if pkgconfig for libsodium doesn't provide static lib info, then
      # override PKG_STATIC here..
      set(sodium_PKG_STATIC_LIBRARIES libsodium.a)
    endif()

    set(XPREFIX sodium_PKG_STATIC)
  else()
    if(sodium_PKG_LIBRARIES STREQUAL "")
      set(sodium_PKG_LIBRARIES sodium)
    endif()

    set(XPREFIX sodium_PKG)
  endif()

  find_path(sodium_INCLUDE_DIR sodium.h HINTS ${${XPREFIX}_INCLUDE_DIRS})
  find_library(sodium_LIBRARY_DEBUG
               NAMES ${${XPREFIX}_LIBRARIES}
               HINTS ${${XPREFIX}_LIBRARY_DIRS})
  find_library(sodium_LIBRARY_RELEASE
               NAMES ${${XPREFIX}_LIBRARIES}
               HINTS ${${XPREFIX}_LIBRARY_DIRS})

  # ############################################################################
  # Windows
elseif(WIN32)
  set(sodium_DIR "$ENV{sodium_DIR}" CACHE FILEPATH "sodium install directory")
  mark_as_advanced(sodium_DIR)

  find_path(sodium_INCLUDE_DIR sodium.h
            HINTS ${sodium_DIR}
            PATH_SUFFIXES include)

  if(MSVC)
    # detect target architecture
    file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/arch.c" [=[
            #if defined _M_IX86
            #error ARCH_VALUE x86_32
            #elif defined _M_X64
            #error ARCH_VALUE x86_64
            #endif
            #error ARCH_VALUE unknown
        ]=])
    try_compile(_UNUSED_VAR "${CMAKE_CURRENT_BINARY_DIR}"
                "${CMAKE_CURRENT_BINARY_DIR}/arch.c"
                OUTPUT_VARIABLE _COMPILATION_LOG)
    string(REGEX
           REPLACE ".*ARCH_VALUE ([a-zA-Z0-9_]+).*"
                   "\\1"
                   _TARGET_ARCH
                   "${_COMPILATION_LOG}")

    # construct library path
    if(_TARGET_ARCH STREQUAL "x86_32")
      string(APPEND _PLATFORM_PATH "Win32")
    elseif(_TARGET_ARCH STREQUAL "x86_64")
      string(APPEND _PLATFORM_PATH "x64")
    else()
      message(
        FATAL_ERROR
          "the ${_TARGET_ARCH} architecture is not supported by Findsodium.cmake."
        )
    endif()
    string(APPEND _PLATFORM_PATH "/$$CONFIG$$")

    if(MSVC_VERSION LESS 1900)
      math(EXPR _VS_VERSION "${MSVC_VERSION} / 10 - 60")
    else()
      math(EXPR _VS_VERSION "${MSVC_VERSION} / 10 - 50")
    endif()
    string(APPEND _PLATFORM_PATH "/v${_VS_VERSION}")

    if(sodium_USE_STATIC_LIBS)
      string(APPEND _PLATFORM_PATH "/static")
    else()
      string(APPEND _PLATFORM_PATH "/dynamic")
    endif()

    string(REPLACE "$$CONFIG$$"
                   "Debug"
                   _DEBUG_PATH_SUFFIX
                   "${_PLATFORM_PATH}")
    string(REPLACE "$$CONFIG$$"
                   "Release"
                   _RELEASE_PATH_SUFFIX
                   "${_PLATFORM_PATH}")

    find_library(sodium_LIBRARY_DEBUG libsodium.lib
                 HINTS ${sodium_DIR}
                 PATH_SUFFIXES ${_DEBUG_PATH_SUFFIX})
    find_library(sodium_LIBRARY_RELEASE libsodium.lib
                 HINTS ${sodium_DIR}
                 PATH_SUFFIXES ${_RELEASE_PATH_SUFFIX})
    if(NOT sodium_USE_STATIC_LIBS)
      set(CMAKE_FIND_LIBRARY_SUFFIXES_BCK ${CMAKE_FIND_LIBRARY_SUFFIXES})
      set(CMAKE_FIND_LIBRARY_SUFFIXES ".dll")
      find_library(sodium_DLL_DEBUG libsodium
                   HINTS ${sodium_DIR}
                   PATH_SUFFIXES ${_DEBUG_PATH_SUFFIX})
      find_library(sodium_DLL_RELEASE libsodium
                   HINTS ${sodium_DIR}
                   PATH_SUFFIXES ${_RELEASE_PATH_SUFFIX})
      set(CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES_BCK})
    endif()

  elseif(_GCC_COMPATIBLE)
    if(sodium_USE_STATIC_LIBS)
      find_library(sodium_LIBRARY_DEBUG libsodium.a
                   HINTS ${sodium_DIR}
                   PATH_SUFFIXES lib)
      find_library(sodium_LIBRARY_RELEASE libsodium.a
                   HINTS ${sodium_DIR}
                   PATH_SUFFIXES lib)
    else()
      find_library(sodium_LIBRARY_DEBUG libsodium.dll.a
                   HINTS ${sodium_DIR}
                   PATH_SUFFIXES lib)
      find_library(sodium_LIBRARY_RELEASE libsodium.dll.a
                   HINTS ${sodium_DIR}
                   PATH_SUFFIXES lib)

      file(GLOB _DLL
           LIST_DIRECTORIES false
           RELATIVE "${sodium_DIR}/bin"
           "${sodium_DIR}/bin/libsodium*.dll")
      find_library(sodium_DLL_DEBUG ${_DLL} libsodium
                   HINTS ${sodium_DIR}
                   PATH_SUFFIXES bin)
      find_library(sodium_DLL_RELEASE ${_DLL} libsodium
                   HINTS ${sodium_DIR}
                   PATH_SUFFIXES bin)
    endif()
  else()
    message(FATAL_ERROR "this platform is not supported by FindSodium.cmake")
  endif()

  # ############################################################################
  # unsupported
else()
  message(FATAL_ERROR "this platform is not supported by FindSodium.cmake")
endif()

# ##############################################################################
# common stuff

# extract sodium version
if(sodium_INCLUDE_DIR)
  set(_VERSION_HEADER "${sodium_INCLUDE_DIR}/sodium/version.h")
  if(EXISTS "${_VERSION_HEADER}")
    file(READ "${_VERSION_HEADER}" _VERSION_HEADER_CONTENT)
    string(REGEX
           REPLACE ".*define[ \t]+SODIUM_VERSION_STRING[^\"]+\"([^\"]+)\".*"
                   "\\1"
                   sodium_VERSION_STRING
                   "${_VERSION_HEADER_CONTENT}")
    set(sodium_VERSION_STRING "${sodium_VERSION_STRING}")
  endif()
endif()

# communicate results
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(sodium
                                  REQUIRED_VARS
                                  sodium_LIBRARY_RELEASE
                                  sodium_LIBRARY_DEBUG
                                  sodium_INCLUDE_DIR
                                  VERSION_VAR
                                  sodium_VERSION_STRING)

# mark file paths as advanced
mark_as_advanced(sodium_INCLUDE_DIR)
mark_as_advanced(sodium_LIBRARY_DEBUG)
mark_as_advanced(sodium_LIBRARY_RELEASE)
if(WIN32)
  mark_as_advanced(sodium_DLL_DEBUG)
  mark_as_advanced(sodium_DLL_RELEASE)
endif()

# create imported target
if(sodium_USE_STATIC_LIBS)
  set(_LIB_TYPE STATIC)
else()
  set(_LIB_TYPE SHARED)
endif()
add_library(sodium ${_LIB_TYPE} IMPORTED)

set_target_properties(sodium
                      PROPERTIES INTERFACE_INCLUDE_DIRECTORIES
                                 "${sodium_INCLUDE_DIR}"
                                 IMPORTED_LINK_INTERFACE_LANGUAGES
                                 "C")

if(sodium_USE_STATIC_LIBS)
  set_target_properties(sodium
                        PROPERTIES INTERFACE_COMPILE_DEFINITIONS
                                   "SODIUM_STATIC"
                                   IMPORTED_LOCATION
                                   "${sodium_LIBRARY_RELEASE}"
                                   IMPORTED_LOCATION_DEBUG
                                   "${sodium_LIBRARY_DEBUG}")
else()
  if(UNIX)
    set_target_properties(sodium
                          PROPERTIES IMPORTED_LOCATION
                                     "${sodium_LIBRARY_RELEASE}"
                                     IMPORTED_LOCATION_DEBUG
                                     "${sodium_LIBRARY_DEBUG}")
  elseif(WIN32)
    set_target_properties(sodium
                          PROPERTIES IMPORTED_IMPLIB
                                     "${sodium_LIBRARY_RELEASE}"
                                     IMPORTED_IMPLIB_DEBUG
                                     "${sodium_LIBRARY_DEBUG}")
    if(NOT (sodium_DLL_DEBUG MATCHES ".*-NOTFOUND"))
      set_target_properties(sodium
                            PROPERTIES IMPORTED_LOCATION_DEBUG
                                       "${sodium_DLL_DEBUG}")
    endif()
    if(NOT (sodium_DLL_RELEASE MATCHES ".*-NOTFOUND"))
      set_target_properties(sodium
                            PROPERTIES IMPORTED_LOCATION_RELWITHDEBINFO
                                       "${sodium_DLL_RELEASE}"
                                       IMPORTED_LOCATION_MINSIZEREL
                                       "${sodium_DLL_RELEASE}"
                                       IMPORTED_LOCATION_RELEASE
                                       "${sodium_DLL_RELEASE}")
    endif()
  endif()
endif()


================================================
FILE: cmake/FlagsMSVC.cmake
================================================
macro(configure_msvc_runtime)
	if(MSVC)
		# Set compiler options.
		set(variables
			CMAKE_C_FLAGS_DEBUG
			CMAKE_C_FLAGS_MINSIZEREL
			CMAKE_C_FLAGS_RELEASE
			CMAKE_C_FLAGS_RELWITHDEBINFO
			CMAKE_CXX_FLAGS_DEBUG
			CMAKE_CXX_FLAGS_MINSIZEREL
			CMAKE_CXX_FLAGS_RELEASE
			CMAKE_CXX_FLAGS_RELWITHDEBINFO
		)
		if(MSVC_CRT_STATIC)
			message(STATUS "MSVC -> forcing use of statically-linked runtime.")
			foreach(variable ${variables})
				if(${variable} MATCHES "/MD")
					string(REGEX REPLACE "/MD" "/MT" ${variable} "${${variable}}")
				endif()
			endforeach()
			set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS}")
			set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS}")
		else()
			message(STATUS "MSVC -> forcing use of dynamically-linked runtime.")
			foreach(variable ${variables})
				if(${variable} MATCHES "/MT")
					string(REGEX REPLACE "/MT" "/MD" ${variable} "${${variable}}")
				endif()
			endforeach()
			set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS}")
			set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS}")
		endif()
	endif()
endmacro()
macro(print_default_msvc_flags)
	if(MSVC)
		set(variables
			CMAKE_C_FLAGS_DEBUG
			CMAKE_C_FLAGS_MINSIZEREL
			CMAKE_C_FLAGS_RELEASE
			CMAKE_C_FLAGS_RELWITHDEBINFO
			CMAKE_CXX_FLAGS_DEBUG
			CMAKE_CXX_FLAGS_MINSIZEREL
			CMAKE_CXX_FLAGS_RELEASE
			CMAKE_CXX_FLAGS_RELWITHDEBINFO
		)
		message(STATUS "Initial build flags:")
		foreach(variable ${variables})
			message(STATUS "  '${variable}': ${${variable}}")
		endforeach()
		message(STATUS "")
	endif()
endmacro()

================================================
FILE: cmake/GameNetworkingSocketsConfig.cmake.in
================================================
@PACKAGE_INIT@

include(CMakeFindDependencyMacro)

find_dependency(Threads)
find_dependency(Protobuf)

if(@USE_CRYPTO@ STREQUAL "OpenSSL")
    find_dependency(OpenSSL)
endif()

if(@USE_CRYPTO@ STREQUAL "libsodium")
    find_dependency(sodium)
endif()

if(@STEAMWEBRTC_ABSL_SOURCE@ STREQUAL "package")
    find_dependency(absl REQUIRED)
endif()

if(@USE_STEAMWEBRTC@)
    include(${CMAKE_CURRENT_LIST_DIR}/steamwebrtc.cmake)
endif()

include(${CMAKE_CURRENT_LIST_DIR}/GameNetworkingSockets.cmake)

if(${CMAKE_VERSION} VERSION_GREATER_EQUAL "3.11.0")
    # Need to set IMPORTED_GLOBAL in order to create the aliases
    # However, IMPORTED_GLOBAL only exists in 3.11 and up
    # Also, setting IMPORTED_GLOBAL from another directory from where it was first set blows up
    # so we can only set it once.

    if(@BUILD_SHARED_LIB@)
        get_target_property(GNS_IMPORTED_GLOBAL_SET GameNetworkingSockets::GameNetworkingSockets IMPORTED_GLOBAL)

        if(NOT ${GNS_IMPORTED_GLOBAL_SET})
            set_target_properties(
                GameNetworkingSockets::GameNetworkingSockets
                PROPERTIES IMPORTED_GLOBAL True
            )
        endif()

        unset(GNS_IMPORTED_GLOBAL_SET)

        add_library(GameNetworkingSockets::shared ALIAS GameNetworkingSockets::GameNetworkingSockets)
    endif()

    if(@BUILD_STATIC_LIB@)
        get_target_property(GNS_IMPORTED_GLOBAL_SET GameNetworkingSockets::GameNetworkingSockets_s IMPORTED_GLOBAL)

        if(NOT ${GNS_IMPORTED_GLOBAL_SET})
            set_target_properties(
                GameNetworkingSockets::GameNetworkingSockets_s
                PROPERTIES IMPORTED_GLOBAL True
            )
        endif()

        unset(GNS_IMPORTED_GLOBAL_SET)

        add_library(GameNetworkingSockets::static ALIAS GameNetworkingSockets::GameNetworkingSockets_s)
    endif()
endif()

check_required_components(GameNetworkingSockets)
set(GameNetworkingSockets_FOUND 1)


================================================
FILE: cmake/asan-wrapper
================================================
#!/bin/sh

# The MIT License (MIT)
#
# Copyright (c)
#   2013 Matthew Arsenault
#   2015-2016 RWTH Aachen University, Federal Republic of Germany
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in all
# copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.

# This script is a wrapper for AddressSanitizer. In some special cases you need
# to preload AddressSanitizer to avoid error messages - e.g. if you're
# preloading another library to your application. At the moment this script will
# only do something, if we're running on a Linux platform. OSX might not be
# affected.


# Exit immediately, if platform is not Linux.
if [ "$(uname)" != "Linux" ]
then
    exec $@
fi


# Get the used libasan of the application ($1). If a libasan was found, it will
# be prepended to LD_PRELOAD.
libasan=$(ldd $1 | grep libasan | sed "s/^[[:space:]]//" | cut -d' ' -f1)
if [ -n "$libasan" ]
then
    if [ -n "$LD_PRELOAD" ]
    then
        export LD_PRELOAD="$libasan:$LD_PRELOAD"
    else
        export LD_PRELOAD="$libasan"
    fi
fi

# Execute the application.
exec $@


================================================
FILE: cmake/sanitize-helpers.cmake
================================================
# The MIT License (MIT)
#
# Copyright (c)
#   2013 Matthew Arsenault
#   2015-2016 RWTH Aachen University, Federal Republic of Germany
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in all
# copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.

# Helper function to get the language of a source file.
function (sanitizer_lang_of_source FILE RETURN_VAR)
    get_filename_component(LONGEST_EXT "${FILE}" EXT)
    # If extension is empty return. This can happen for extensionless headers
    if("${LONGEST_EXT}" STREQUAL "")
       set(${RETURN_VAR} "" PARENT_SCOPE)
       return()
    endif()
    # Get shortest extension as some files can have dot in their names
    string(REGEX REPLACE "^.*(\\.[^.]+)$" "\\1" FILE_EXT ${LONGEST_EXT})
    string(TOLOWER "${FILE_EXT}" FILE_EXT)
    string(SUBSTRING "${FILE_EXT}" 1 -1 FILE_EXT)

    get_property(ENABLED_LANGUAGES GLOBAL PROPERTY ENABLED_LANGUAGES)
    foreach (LANG ${ENABLED_LANGUAGES})
        list(FIND CMAKE_${LANG}_SOURCE_FILE_EXTENSIONS "${FILE_EXT}" TEMP)
        if (NOT ${TEMP} EQUAL -1)
            set(${RETURN_VAR} "${LANG}" PARENT_SCOPE)
            return()
        endif ()
    endforeach()

    set(${RETURN_VAR} "" PARENT_SCOPE)
endfunction ()


# Helper function to get compilers used by a target.
function (sanitizer_target_compilers TARGET RETURN_VAR)
    # Check if all sources for target use the same compiler. If a target uses
    # e.g. C and Fortran mixed and uses different compilers (e.g. clang and
    # gfortran) this can trigger huge problems, because different compilers may
    # use different implementations for sanitizers.
    set(BUFFER "")
    get_target_property(TSOURCES ${TARGET} SOURCES)
    foreach (FILE ${TSOURCES})
        # If expression was found, FILE is a generator-expression for an object
        # library. Object libraries will be ignored.
        string(REGEX MATCH "TARGET_OBJECTS:([^ >]+)" _file ${FILE})
        if ("${_file}" STREQUAL "")
            sanitizer_lang_of_source(${FILE} LANG)
            if (LANG)
                list(APPEND BUFFER ${CMAKE_${LANG}_COMPILER_ID})
            endif ()
        endif ()
    endforeach ()

    list(REMOVE_DUPLICATES BUFFER)
    set(${RETURN_VAR} "${BUFFER}" PARENT_SCOPE)
endfunction ()


# Helper function to check compiler flags for language compiler.
function (sanitizer_check_compiler_flag FLAG LANG VARIABLE)
    if (${LANG} STREQUAL "C")
        include(CheckCCompilerFlag)
        check_c_compiler_flag("${FLAG}" ${VARIABLE})

    elseif (${LANG} STREQUAL "CXX")
        include(CheckCXXCompilerFlag)
        check_cxx_compiler_flag("${FLAG}" ${VARIABLE})

    elseif (${LANG} STREQUAL "Fortran")
        # CheckFortranCompilerFlag was introduced in CMake 3.x. To be compatible
        # with older Cmake versions, we will check if this module is present
        # before we use it. Otherwise we will define Fortran coverage support as
        # not available.
        include(CheckFortranCompilerFlag OPTIONAL RESULT_VARIABLE INCLUDED)
        if (INCLUDED)
            check_fortran_compiler_flag("${FLAG}" ${VARIABLE})
        elseif (NOT CMAKE_REQUIRED_QUIET)
            message(STATUS "Performing Test ${VARIABLE}")
            message(STATUS "Performing Test ${VARIABLE}"
                " - Failed (Check not supported)")
        endif ()
    endif()
endfunction ()


# Helper function to test compiler flags.
function (sanitizer_check_compiler_flags FLAG_CANDIDATES NAME PREFIX)
    set(CMAKE_REQUIRED_QUIET ${${PREFIX}_FIND_QUIETLY})

    get_property(ENABLED_LANGUAGES GLOBAL PROPERTY ENABLED_LANGUAGES)
    foreach (LANG ${ENABLED_LANGUAGES})
        # Sanitizer flags are not dependend on language, but the used compiler.
        # So instead of searching flags foreach language, search flags foreach
        # compiler used.
        set(COMPILER ${CMAKE_${LANG}_COMPILER_ID})
        if (NOT DEFINED ${PREFIX}_${COMPILER}_FLAGS)
            foreach (FLAG ${FLAG_CANDIDATES})
                if(NOT CMAKE_REQUIRED_QUIET)
                    message(STATUS "Try ${COMPILER} ${NAME} flag = [${FLAG}]")
                endif()

                set(CMAKE_REQUIRED_FLAGS "${FLAG}")
                unset(${PREFIX}_FLAG_DETECTED CACHE)
                sanitizer_check_compiler_flag("${FLAG}" ${LANG}
                    ${PREFIX}_FLAG_DETECTED)

                if (${PREFIX}_FLAG_DETECTED)
                    # If compiler is a GNU compiler, search for static flag, if
                    # SANITIZE_LINK_STATIC is enabled.
                    if (SANITIZE_LINK_STATIC AND (${COMPILER} STREQUAL "GNU"))
                        string(TOLOWER ${PREFIX} PREFIX_lower)
                        sanitizer_check_compiler_flag(
                            "-static-lib${PREFIX_lower}" ${LANG}
                            ${PREFIX}_STATIC_FLAG_DETECTED)

                        if (${PREFIX}_STATIC_FLAG_DETECTED)
                            set(FLAG "-static-lib${PREFIX_lower} ${FLAG}")
                        endif ()
                    endif ()

                    set(${PREFIX}_${COMPILER}_FLAGS "${FLAG}" CACHE STRING
                        "${NAME} flags for ${COMPILER} compiler.")
                    mark_as_advanced(${PREFIX}_${COMPILER}_FLAGS)
                    break()
                endif ()
            endforeach ()

            if (NOT ${PREFIX}_FLAG_DETECTED)
                set(${PREFIX}_${COMPILER}_FLAGS "" CACHE STRING
                    "${NAME} flags for ${COMPILER} compiler.")
                mark_as_advanced(${PREFIX}_${COMPILER}_FLAGS)

                message(WARNING "${NAME} is not available for ${COMPILER} "
                        "compiler. Targets using this compiler will be "
                        "compiled without ${NAME}.")
            endif ()
        endif ()
    endforeach ()
endfunction ()


# Helper to assign sanitizer flags for TARGET.
function (sanitizer_add_flags TARGET NAME PREFIX)
    # Get list of compilers used by target and check, if sanitizer is available
    # for this target. Other compiler checks like check for conflicting
    # compilers will be done in add_sanitizers function.
    sanitizer_target_compilers(${TARGET} TARGET_COMPILER)
    list(LENGTH TARGET_COMPILER NUM_COMPILERS)
    if ("${${PREFIX}_${TARGET_COMPILER}_FLAGS}" STREQUAL "")
        return()
    endif()

    # Set compile- and link-flags for target.
    set_property(TARGET ${TARGET} APPEND_STRING
        PROPERTY COMPILE_FLAGS " ${${PREFIX}_${TARGET_COMPILER}_FLAGS}")
    set_property(TARGET ${TARGET} APPEND_STRING
        PROPERTY COMPILE_FLAGS " ${SanBlist_${TARGET_COMPILER}_FLAGS}")
    set_property(TARGET ${TARGET} APPEND_STRING
        PROPERTY LINK_FLAGS " ${${PREFIX}_${TARGET_COMPILER}_FLAGS}")
endfunction ()


================================================
FILE: cmake/tryCompileTestBCrypt.cpp
================================================
#include <Windows.h>
#include <bcrypt.h>
#include <cstdio>

int main(int, char **)
{
	printf("%p\n", &BCryptEncrypt);
}


================================================
FILE: examples/CMakeLists.txt
================================================
#
# Trivial signaling server, written in go
#
if( ENABLE_ICE AND ( BUILD_EXAMPLES OR BUILD_TESTS ) )
	find_program( GO go )
	if ( NOT GO )
		message(WARNING "Could not find 'go' binary, will not build signaling server example program")
	else()
		set(SIGNAL_SERVER_TARGET trivial_signaling_server)

		if ( WIN32 )
			set(SIGNAL_SERVER_OUTPUT ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/trivial_signaling_server.exe)
		else()
			set(SIGNAL_SERVER_OUTPUT ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/trivial_signaling_server)
		endif()
		set(SIGNAL_SERVER_SRCS
			trivial_signaling_server.go
			)
		add_custom_command(
			OUTPUT ${SIGNAL_SERVER_OUTPUT}
			DEPENDS ${SIGNAL_SERVER_SRCS}
			WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
			COMMENT "Building GO Trivial signaling server"
			COMMAND ${GO} build -o "${SIGNAL_SERVER_OUTPUT}" ${CMAKE_GO_FLAGS} ${SIGNAL_SERVER_SRCS}
			)
		add_custom_target(${SIGNAL_SERVER_TARGET} ALL DEPENDS ${SIGNAL_SERVER_OUTPUT})
	endif()
endif()

#
# Examples
#
if( BUILD_EXAMPLES )

	#
	# Really simple client/server chat
	#

	add_executable(
		example_chat
		example_chat.cpp)

	target_link_libraries(example_chat GameNetworkingSockets::shared)

	add_sanitizers(example_chat)

endif()


================================================
FILE: examples/example_chat.cpp
================================================
//====== Copyright Valve Corporation, All rights reserved. ====================
//
// Example client/server chat application using SteamNetworkingSockets

#include <assert.h>
#include <stdio.h>
#include <stdarg.h>
#include <string.h>
#include <algorithm>
#include <string>
#include <random>
#include <chrono>
#include <thread>
#include <mutex>
#include <queue>
#include <map>
#include <cctype>

#include <steam/steamnetworkingsockets.h>
#include <steam/isteamnetworkingutils.h>
#ifndef STEAMNETWORKINGSOCKETS_OPENSOURCE
#include <steam/steam_api.h>
#endif

#ifdef _WIN32
	#include <windows.h> // Ug, for NukeProcess -- see below
#else
	#include <unistd.h>
	#include <signal.h>
#endif

/////////////////////////////////////////////////////////////////////////////
//
// Common stuff
//
/////////////////////////////////////////////////////////////////////////////

bool g_bQuit = false;

SteamNetworkingMicroseconds g_logTimeZero;

// We do this because I won't want to figure out how to cleanly shut
// down the thread that is reading from stdin.
static void NukeProcess( int rc )
{
	#ifdef _WIN32
		ExitProcess( rc );
	#else
		(void)rc; // Unused formal parameter
		kill( getpid(), SIGKILL );
	#endif
}

static void DebugOutput( ESteamNetworkingSocketsDebugOutputType eType, const char *pszMsg )
{
	SteamNetworkingMicroseconds time = SteamNetworkingUtils()->GetLocalTimestamp() - g_logTimeZero;
	printf( "%10.6f %s\n", time*1e-6, pszMsg );
	fflush(stdout);
	if ( eType == k_ESteamNetworkingSocketsDebugOutputType_Bug )
	{
		fflush(stdout);
		fflush(stderr);
		NukeProcess(1);
	}
}

static void FatalError( const char *fmt, ... )
{
	char text[ 2048 ];
	va_list ap;
	va_start( ap, fmt );
	vsprintf( text, fmt, ap );
	va_end(ap);
	char *nl = strchr( text, '\0' ) - 1;
	if ( nl >= text && *nl == '\n' )
		*nl = '\0';
	DebugOutput( k_ESteamNetworkingSocketsDebugOutputType_Bug, text );
}

static void Printf( const char *fmt, ... )
{
	char text[ 2048 ];
	va_list ap;
	va_start( ap, fmt );
	vsprintf( text, fmt, ap );
	va_end(ap);
	char *nl = strchr( text, '\0' ) - 1;
	if ( nl >= text && *nl == '\n' )
		*nl = '\0';
	DebugOutput( k_ESteamNetworkingSocketsDebugOutputType_Msg, text );
}

static void InitSteamDatagramConnectionSockets()
{
	#ifdef STEAMNETWORKINGSOCKETS_OPENSOURCE
		SteamDatagramErrMsg errMsg;
		if ( !GameNetworkingSockets_Init( nullptr, errMsg ) )
			FatalError( "GameNetworkingSockets_Init failed.  %s", errMsg );
	#else
		SteamDatagram_SetAppID( 570 ); // Just set something, doesn't matter what
		SteamDatagram_SetUniverse( false, k_EUniverseDev );

		SteamDatagramErrMsg errMsg;
		if ( !SteamDatagramClient_Init( errMsg ) )
			FatalError( "SteamDatagramClient_Init failed.  %s", errMsg );

		// Disable authentication when running with Steam, for this
		// example, since we're not a real app.
		//
		// Authentication is disabled automatically in the open-source
		// version since we don't have a trusted third party to issue
		// certs.
		SteamNetworkingUtils()->SetGlobalConfigValueInt32( k_ESteamNetworkingConfig_IP_AllowWithoutAuth, 1 );
	#endif

	g_logTimeZero = SteamNetworkingUtils()->GetLocalTimestamp();

	SteamNetworkingUtils()->SetDebugOutputFunction( k_ESteamNetworkingSocketsDebugOutputType_Msg, DebugOutput );
}

static void ShutdownSteamDatagramConnectionSockets()
{
	// Give connections time to finish up.  This is an application layer protocol
	// here, it's not TCP.  Note that if you have an application and you need to be
	// more sure about cleanup, you won't be able to do this.  You will need to send
	// a message and then either wait for the peer to close the connection, or
	// you can pool the connection to see if any reliable data is pending.
	std::this_thread::sleep_for( std::chrono::milliseconds( 500 ) );

	#ifdef STEAMNETWORKINGSOCKETS_OPENSOURCE
		GameNetworkingSockets_Kill();
	#else
		SteamDatagramClient_Kill();
	#endif
}

/////////////////////////////////////////////////////////////////////////////
//
// Non-blocking console user input.  Sort of.
// Why is this so hard?
//
/////////////////////////////////////////////////////////////////////////////

std::mutex mutexUserInputQueue;
std::queue< std::string > queueUserInput;

std::thread *s_pThreadUserInput = nullptr;

void LocalUserInput_Init()
{
	s_pThreadUserInput = new std::thread( []()
	{
		while ( !g_bQuit )
		{
			char szLine[ 4000 ];
			if ( !fgets( szLine, sizeof(szLine), stdin ) )
			{
				// Well, you would hope that you could close the handle
				// from the other thread to trigger this.  Nope.
				if ( g_bQuit )
					return;
				g_bQuit = true;
				Printf( "Failed to read on stdin, quitting\n" );
				break;
			}

			mutexUserInputQueue.lock();
			queueUserInput.push( std::string( szLine ) );
			mutexUserInputQueue.unlock();
		}
	} );
}

void LocalUserInput_Kill()
{
// Does not work.  We won't clean up, we'll just nuke the process.
//	g_bQuit = true;
//	_close( fileno( stdin ) );
//
//	if ( s_pThreadUserInput )
//	{
//		s_pThreadUserInput->join();
//		delete s_pThreadUserInput;
//		s_pThreadUserInput = nullptr;
//	}
}

// You really gotta wonder what kind of pedantic garbage was
// going through the minds of people who designed std::string
// that they decided not to include trim.
// https://stackoverflow.com/questions/216823/whats-the-best-way-to-trim-stdstring

// trim from start (in place)
static inline void ltrim(std::string &s) {
    s.erase(s.begin(), std::find_if(s.begin(), s.end(), [](int ch) {
        return !std::isspace(ch);
    }));
}

// trim from end (in place)
static inline void rtrim(std::string &s) {
    s.erase(std::find_if(s.rbegin(), s.rend(), [](int ch) {
        return !std::isspace(ch);
    }).base(), s.end());
}


// Read the next line of input from stdin, if anything is available.
bool LocalUserInput_GetNext( std::string &result )
{
	bool got_input = false;
	mutexUserInputQueue.lock();
	while ( !queueUserInput.empty() && !got_input )
	{
		result = queueUserInput.front();
		queueUserInput.pop();
		ltrim(result);
		rtrim(result);
		got_input = !result.empty(); // ignore blank lines
	}
	mutexUserInputQueue.unlock();
	return got_input;
}

/////////////////////////////////////////////////////////////////////////////
//
// ChatServer
//
/////////////////////////////////////////////////////////////////////////////

class ChatServer
{
public:
	void Run( uint16 nPort )
	{
		// Select instance to use.  For now we'll always use the default.
		// But we could use SteamGameServerNetworkingSockets() on Steam.
		m_pInterface = SteamNetworkingSockets();

		// Start listening
		SteamNetworkingIPAddr serverLocalAddr;
		serverLocalAddr.Clear();
		serverLocalAddr.m_port = nPort;
		SteamNetworkingConfigValue_t opt;
		opt.SetPtr( k_ESteamNetworkingConfig_Callback_ConnectionStatusChanged, (void*)SteamNetConnectionStatusChangedCallback );
		m_hListenSock = m_pInterface->CreateListenSocketIP( serverLocalAddr, 1, &opt );
		if ( m_hListenSock == k_HSteamListenSocket_Invalid )
			FatalError( "Failed to listen on port %d", nPort );
		m_hPollGroup = m_pInterface->CreatePollGroup();
		if ( m_hPollGroup == k_HSteamNetPollGroup_Invalid )
			FatalError( "Failed to listen on port %d", nPort );
		Printf( "Server listening on port %d\n", nPort );

		while ( !g_bQuit )
		{
			PollIncomingMessages();
			PollConnectionStateChanges();
			PollLocalUserInput();
			std::this_thread::sleep_for( std::chrono::milliseconds( 10 ) );
		}

		// Close all the connections
		Printf( "Closing connections...\n" );
		for ( auto it: m_mapClients )
		{
			// Send them one more goodbye message.  Note that we also have the
			// connection close reason as a place to send final data.  However,
			// that's usually best left for more diagnostic/debug text not actual
			// protocol strings.
			SendStringToClient( it.first, "Server is shutting down.  Goodbye." );

			// Close the connection.  We use "linger mode" to ask SteamNetworkingSockets
			// to flush this out and close gracefully.
			m_pInterface->CloseConnection( it.first, 0, "Server Shutdown", true );
		}
		m_mapClients.clear();

		m_pInterface->CloseListenSocket( m_hListenSock );
		m_hListenSock = k_HSteamListenSocket_Invalid;

		m_pInterface->DestroyPollGroup( m_hPollGroup );
		m_hPollGroup = k_HSteamNetPollGroup_Invalid;
	}
private:

	HSteamListenSocket m_hListenSock;
	HSteamNetPollGroup m_hPollGroup;
	ISteamNetworkingSockets *m_pInterface;

	struct Client_t
	{
		std::string m_sNick;
	};

	std::map< HSteamNetConnection, Client_t > m_mapClients;

	void SendStringToClient( HSteamNetConnection conn, const char *str )
	{
		m_pInterface->SendMessageToConnection( conn, str, (uint32)strlen(str), k_nSteamNetworkingSend_Reliable, nullptr );
	}

	void SendStringToAllClients( const char *str, HSteamNetConnection except = k_HSteamNetConnection_Invalid )
	{
		for ( auto &c: m_mapClients )
		{
			if ( c.first != except )
				SendStringToClient( c.first, str );
		}
	}

	void PollIncomingMessages()
	{
		char temp[ 1024 ];

		while ( !g_bQuit )
		{
			ISteamNetworkingMessage *pIncomingMsg = nullptr;
			int numMsgs = m_pInterface->ReceiveMessagesOnPollGroup( m_hPollGroup, &pIncomingMsg, 1 );
			if ( numMsgs == 0 )
				break;
			if ( numMsgs < 0 )
				FatalError( "Error checking for messages" );
			assert( numMsgs == 1 && pIncomingMsg );
			auto itClient = m_mapClients.find( pIncomingMsg->m_conn );
			assert( itClient != m_mapClients.end() );

			// '\0'-terminate it to make it easier to parse
			std::string sCmd;
			sCmd.assign( (const char *)pIncomingMsg->m_pData, pIncomingMsg->m_cbSize );
			const char *cmd = sCmd.c_str();

			// We don't need this anymore.
			pIncomingMsg->Release();

			// Check for known commands.  None of this example code is secure or robust.
			// Don't write a real server like this, please.

			if ( strncmp( cmd, "/nick", 5 ) == 0 )
			{
				const char *nick = cmd+5;
				while ( isspace(*nick) )
					++nick;

				// Let everybody else know they changed their name
				sprintf( temp, "%s shall henceforth be known as %s", itClient->second.m_sNick.c_str(), nick );
				SendStringToAllClients( temp, itClient->first );

				// Respond to client
				sprintf( temp, "Ye shall henceforth be known as %s", nick );
				SendStringToClient( itClient->first, temp );

				// Actually change their name
				SetClientNick( itClient->first, nick );
				continue;
			}

			// Assume it's just a ordinary chat message, dispatch to everybody else
			sprintf( temp, "%s: %s", itClient->second.m_sNick.c_str(), cmd );
			SendStringToAllClients( temp, itClient->first );
		}
	}

	void PollLocalUserInput()
	{
		std::string cmd;
		while ( !g_bQuit && LocalUserInput_GetNext( cmd ))
		{
			if ( strcmp( cmd.c_str(), "/quit" ) == 0 )
			{
				g_bQuit = true;
				Printf( "Shutting down server" );
				break;
			}

			// That's the only command we support
			Printf( "The server only knows one command: '/quit'" );
		}
	}

	void SetClientNick( HSteamNetConnection hConn, const char *nick )
	{

		// Remember their nick
		m_mapClients[hConn].m_sNick = nick;

		// Set the connection name, too, which is useful for debugging
		m_pInterface->SetConnectionName( hConn, nick );
	}

	void OnSteamNetConnectionStatusChanged( SteamNetConnectionStatusChangedCallback_t *pInfo )
	{
		char temp[1024];

		// What's the state of the connection?
		switch ( pInfo->m_info.m_eState )
		{
			case k_ESteamNetworkingConnectionState_None:
				// NOTE: We will get callbacks here when we destroy connections.  You can ignore these.
				break;

			case k_ESteamNetworkingConnectionState_ClosedByPeer:
			case k_ESteamNetworkingConnectionState_ProblemDetectedLocally:
			{
				// Ignore if they were not previously connected.  (If they disconnected
				// before we accepted the connection.)
				if ( pInfo->m_eOldState == k_ESteamNetworkingConnectionState_Connected )
				{

					// Locate the client.  Note that it should have been found, because this
					// is the only codepath where we remove clients (except on shutdown),
					// and connection change callbacks are dispatched in queue order.
					auto itClient = m_mapClients.find( pInfo->m_hConn );
					assert( itClient != m_mapClients.end() );

					// Select appropriate log messages
					const char *pszDebugLogAction;
					if ( pInfo->m_info.m_eState == k_ESteamNetworkingConnectionState_ProblemDetectedLocally )
					{
						pszDebugLogAction = "problem detected locally";
						sprintf( temp, "Alas, %s hath fallen into shadow.  (%s)", itClient->second.m_sNick.c_str(), pInfo->m_info.m_szEndDebug );
					}
					else
					{
						// Note that here we could check the reason code to see if
						// it was a "usual" connection or an "unusual" one.
						pszDebugLogAction = "closed by peer";
						sprintf( temp, "%s hath departed", itClient->second.m_sNick.c_str() );
					}

					// Spew something to our own log.  Note that because we put their nick
					// as the connection description, it will show up, along with their
					// transport-specific data (e.g. their IP address)
					Printf( "Connection %s %s, reason %d: %s\n",
						pInfo->m_info.m_szConnectionDescription,
						pszDebugLogAction,
						pInfo->m_info.m_eEndReason,
						pInfo->m_info.m_szEndDebug
					);

					m_mapClients.erase( itClient );

					// Send a message so everybody else knows what happened
					SendStringToAllClients( temp );
				}
				else
				{
					assert( pInfo->m_eOldState == k_ESteamNetworkingConnectionState_Connecting );
				}

				// Clean up the connection.  This is important!
				// The connection is "closed" in the network sense, but
				// it has not been destroyed.  We must close it on our end, too
				// to finish up.  The reason information do not matter in this case,
				// and we cannot linger because it's already closed on the other end,
				// so we just pass 0's.
				m_pInterface->CloseConnection( pInfo->m_hConn, 0, nullptr, false );
				break;
			}

			case k_ESteamNetworkingConnectionState_Connecting:
			{
				// This must be a new connection
				assert( m_mapClients.find( pInfo->m_hConn ) == m_mapClients.end() );

				Printf( "Connection request from %s", pInfo->m_info.m_szConnectionDescription );

				// A client is attempting to connect
				// Try to accept the connection.
				if ( m_pInterface->AcceptConnection( pInfo->m_hConn ) != k_EResultOK )
				{
					// This could fail.  If the remote host tried to connect, but then
					// disconnected, the connection may already be half closed.  Just
					// destroy whatever we have on our side.
					m_pInterface->CloseConnection( pInfo->m_hConn, 0, nullptr, false );
					Printf( "Can't accept connection.  (It was already closed?)" );
					break;
				}

				// Assign the poll group
				if ( !m_pInterface->SetConnectionPollGroup( pInfo->m_hConn, m_hPollGroup ) )
				{
					m_pInterface->CloseConnection( pInfo->m_hConn, 0, nullptr, false );
					Printf( "Failed to set poll group?" );
					break;
				}

				// Generate a random nick.  A random temporary nick
				// is really dumb and not how you would write a real chat server.
				// You would want them to have some sort of signon message,
				// and you would keep their client in a state of limbo (connected,
				// but not logged on) until them.  I'm trying to keep this example
				// code really simple.
				char nick[ 64 ];
				sprintf( nick, "BraveWarrior%d", 10000 + ( rand() % 100000 ) );

				// Send them a welcome message
				sprintf( temp, "Welcome, stranger.  Thou art known to us for now as '%s'; upon thine command '/nick' we shall know thee otherwise.", nick ); 
				SendStringToClient( pInfo->m_hConn, temp ); 

				// Also send them a list of everybody who is already connected
				if ( m_mapClients.empty() )
				{
					SendStringToClient( pInfo->m_hConn, "Thou art utterly alone." ); 
				}
				else
				{
					sprintf( temp, "%d companions greet you:", (int)m_mapClients.size() ); 
					for ( auto &c: m_mapClients )
						SendStringToClient( pInfo->m_hConn, c.second.m_sNick.c_str() ); 
				}

				// Let everybody else know who they are for now
				sprintf( temp, "Hark!  A stranger hath joined this merry host.  For now we shall call them '%s'", nick ); 
				SendStringToAllClients( temp, pInfo->m_hConn ); 

				// Add them to the client list, using std::map wacky syntax
				m_mapClients[ pInfo->m_hConn ];
				SetClientNick( pInfo->m_hConn, nick );
				break;
			}

			case k_ESteamNetworkingConnectionState_Connected:
				// We will get a callback immediately after accepting the connection.
				// Since we are the server, we can ignore this, it's not news to us.
				break;

			default:
				// Silences -Wswitch
				break;
		}
	}

	static ChatServer *s_pCallbackInstance;
	static void SteamNetConnectionStatusChangedCallback( SteamNetConnectionStatusChangedCallback_t *pInfo )
	{
		s_pCallbackInstance->OnSteamNetConnectionStatusChanged( pInfo );
	}

	void PollConnectionStateChanges()
	{
		s_pCallbackInstance = this;
		m_pInterface->RunCallbacks();
	}
};

ChatServer *ChatServer::s_pCallbackInstance = nullptr;

/////////////////////////////////////////////////////////////////////////////
//
// ChatClient
//
/////////////////////////////////////////////////////////////////////////////

class ChatClient
{
public:
	void Run( const SteamNetworkingIPAddr &serverAddr )
	{
		// Select instance to use.  For now we'll always use the default.
		m_pInterface = SteamNetworkingSockets();

		// Start connecting
		char szAddr[ SteamNetworkingIPAddr::k_cchMaxString ];
		serverAddr.ToString( szAddr, sizeof(szAddr), true );
		Printf( "Connecting to chat server at %s", szAddr );
		SteamNetworkingConfigValue_t opt;
		opt.SetPtr( k_ESteamNetworkingConfig_Callback_ConnectionStatusChanged, (void*)SteamNetConnectionStatusChangedCallback );
		m_hConnection = m_pInterface->ConnectByIPAddress( serverAddr, 1, &opt );
		if ( m_hConnection == k_HSteamNetConnection_Invalid )
			FatalError( "Failed to create connection" );

		while ( !g_bQuit )
		{
			PollIncomingMessages();
			PollConnectionStateChanges();
			PollLocalUserInput();
			std::this_thread::sleep_for( std::chrono::milliseconds( 10 ) );
		}
	}
private:

	HSteamNetConnection m_hConnection;
	ISteamNetworkingSockets *m_pInterface;

	void PollIncomingMessages()
	{
		while ( !g_bQuit )
		{
			ISteamNetworkingMessage *pIncomingMsg = nullptr;
			int numMsgs = m_pInterface->ReceiveMessagesOnConnection( m_hConnection, &pIncomingMsg, 1 );
			if ( numMsgs == 0 )
				break;
			if ( numMsgs < 0 )
				FatalError( "Error checking for messages" );

			// Just echo anything we get from the server
			fwrite( pIncomingMsg->m_pData, 1, pIncomingMsg->m_cbSize, stdout );
			fputc( '\n', stdout );

			// We don't need this anymore.
			pIncomingMsg->Release();
		}
	}

	void PollLocalUserInput()
	{
		std::string cmd;
		while ( !g_bQuit && LocalUserInput_GetNext( cmd ))
		{

			// Check for known commands
			if ( strcmp( cmd.c_str(), "/quit" ) == 0 )
			{
				g_bQuit = true;
				Printf( "Disconnecting from chat server" );

				// Close the connection gracefully.
				// We use linger mode to ask for any remaining reliable data
				// to be flushed out.  But remember this is an application
				// protocol on UDP.  See ShutdownSteamDatagramConnectionSockets
				m_pInterface->CloseConnection( m_hConnection, 0, "Goodbye", true );
				break;
			}

			// Anything else, just send it to the server and let them parse it
			m_pInterface->SendMessageToConnection( m_hConnection, cmd.c_str(), (uint32)cmd.length(), k_nSteamNetworkingSend_Reliable, nullptr );
		}
	}

	void OnSteamNetConnectionStatusChanged( SteamNetConnectionStatusChangedCallback_t *pInfo )
	{
		assert( pInfo->m_hConn == m_hConnection || m_hConnection == k_HSteamNetConnection_Invalid );

		// What's the state of the connection?
		switch ( pInfo->m_info.m_eState )
		{
			case k_ESteamNetworkingConnectionState_None:
				// NOTE: We will get callbacks here when we destroy connections.  You can ignore these.
				break;

			case k_ESteamNetworkingConnectionState_ClosedByPeer:
			case k_ESteamNetworkingConnectionState_ProblemDetectedLocally:
			{
				g_bQuit = true;

				// Print an appropriate message
				if ( pInfo->m_eOldState == k_ESteamNetworkingConnectionState_Connecting )
				{
					// Note: we could distinguish between a timeout, a rejected connection,
					// or some other transport problem.
					Printf( "We sought the remote host, yet our efforts were met with defeat.  (%s)", pInfo->m_info.m_szEndDebug );
				}
				else if ( pInfo->m_info.m_eState == k_ESteamNetworkingConnectionState_ProblemDetectedLocally )
				{
					Printf( "Alas, troubles beset us; we have lost contact with the host.  (%s)", pInfo->m_info.m_szEndDebug );
				}
				else
				{
					// NOTE: We could check the reason code for a normal disconnection
					Printf( "The host hath bidden us farewell.  (%s)", pInfo->m_info.m_szEndDebug );
				}

				// Clean up the connection.  This is important!
				// The connection is "closed" in the network sense, but
				// it has not been destroyed.  We must close it on our end, too
				// to finish up.  The reason information do not matter in this case,
				// and we cannot linger because it's already closed on the other end,
				// so we just pass 0's.
				m_pInterface->CloseConnection( pInfo->m_hConn, 0, nullptr, false );
				m_hConnection = k_HSteamNetConnection_Invalid;
				break;
			}

			case k_ESteamNetworkingConnectionState_Connecting:
				// We will get this callback when we start connecting.
				// We can ignore this.
				break;

			case k_ESteamNetworkingConnectionState_Connected:
				Printf( "Connected to server OK" );
				break;

			default:
				// Silences -Wswitch
				break;
		}
	}

	static ChatClient *s_pCallbackInstance;
	static void SteamNetConnectionStatusChangedCallback( SteamNetConnectionStatusChangedCallback_t *pInfo )
	{
		s_pCallbackInstance->OnSteamNetConnectionStatusChanged( pInfo );
	}

	void PollConnectionStateChanges()
	{
		s_pCallbackInstance = this;
		m_pInterface->RunCallbacks();
	}
};

ChatClient *ChatClient::s_pCallbackInstance = nullptr;

const uint16 DEFAULT_SERVER_PORT = 27020;

void PrintUsageAndExit( int rc = 1 )
{
	fflush(stderr);
	printf(
R"usage(Usage:
    example_chat client SERVER_ADDR
    example_chat server [--port PORT]
)usage"
	);
	fflush(stdout);
	exit(rc);
}

int main( int argc, const char *argv[] )
{
	bool bServer = false;
	bool bClient = false;
	int nPort = DEFAULT_SERVER_PORT;
	SteamNetworkingIPAddr addrServer; addrServer.Clear();

	for ( int i = 1 ; i < argc ; ++i )
	{
		if ( !bClient && !bServer )
		{
			if ( !strcmp( argv[i], "client" ) )
			{
				bClient = true;
				continue;
			}
			if ( !strcmp( argv[i], "server" ) )
			{
				bServer = true;
				continue;
			}
		}
		if ( !strcmp( argv[i], "--port" ) )
		{
			++i;
			if ( i >= argc )
				PrintUsageAndExit();
			nPort = atoi( argv[i] );
			if ( nPort <= 0 || nPort > 65535 )
				FatalError( "Invalid port %d", nPort );
			continue;
		}

		// Anything else, must be server address to connect to
		if ( bClient && addrServer.IsIPv6AllZeros() )
		{
			if ( !addrServer.ParseString( argv[i] ) )
				FatalError( "Invalid server address '%s'", argv[i] );
			if ( addrServer.m_port == 0 )
				addrServer.m_port = DEFAULT_SERVER_PORT;
			continue;
		}

		PrintUsageAndExit();
	}

	if ( bClient == bServer || ( bClient && addrServer.IsIPv6AllZeros() ) )
		PrintUsageAndExit();

	// Create client and server sockets
	InitSteamDatagramConnectionSockets();
	LocalUserInput_Init();

	if ( bClient )
	{
		ChatClient client;
		client.Run( addrServer );
	}
	else
	{
		ChatServer server;
		server.Run( (uint16)nPort );
	}

	ShutdownSteamDatagramConnectionSockets();

	// Ug, why is there no simple solution for portable, non-blocking console user input?
	// Just nuke the process
	//LocalUserInput_Kill();
	NukeProcess(0);
}


================================================
FILE: examples/trivial_signaling_client.cpp
================================================
// Client of our dummy trivial signaling server service.
// Serves as an example of you how to hook up signaling server
// to SteamNetworkingSockets P2P connections

#include "../tests/test_common.h"

#include <string>
#include <mutex>
#include <deque>
#include <assert.h>

#include "trivial_signaling_client.h"
#include <steam/isteamnetworkingsockets.h>
#include <steam/isteamnetworkingutils.h>
#include <steam/steamnetworkingcustomsignaling.h>

#ifndef _WIN32
	#include <unistd.h>
	#include <sys/socket.h>
	#include <sys/types.h>
	#include <netinet/in.h>
	#include <netdb.h>
	#include <sys/ioctl.h>
	typedef int SOCKET;
	constexpr SOCKET INVALID_SOCKET = -1;
	inline void closesocket( SOCKET s ) { close(s); }
	inline int GetSocketError() { return errno; }
	inline bool IgnoreSocketError( int e )
	{
		return e == EAGAIN || e == ENOTCONN || e == EWOULDBLOCK;
	}
	#ifndef ioctlsocket
		#define ioctlsocket ioctl
	#endif
#endif
#ifdef _WIN32
	#include <winsock2.h>
	#include <ws2tcpip.h>
	typedef int socklen_t;
	inline int GetSocketError() { return WSAGetLastError(); }
	inline bool IgnoreSocketError( int e )
	{
		return e == WSAEWOULDBLOCK || e == WSAENOTCONN;
	}
#endif

inline int HexDigitVal( char c )
{
	if ( '0' <= c && c <= '9' )
		return c - '0';
	if ( 'a' <= c && c <= 'f' )
		return c - 'a' + 0xa;
	if ( 'A' <= c && c <= 'F' )
		return c - 'A' + 0xa;
	return -1;
}

/// Implementation of ITrivialSignalingClient
class CTrivialSignalingClient : public ITrivialSignalingClient
{

	// This is the thing we'll actually create to send signals for a particular
	// connection.
	struct ConnectionSignaling : ISteamNetworkingConnectionSignaling
	{
		CTrivialSignalingClient *const m_pOwner;
		std::string const m_sPeerIdentity; // Save off the string encoding of the identity we're talking to

		ConnectionSignaling( CTrivialSignalingClient *owner, const char *pszPeerIdentity )
		: m_pOwner( owner )
		, m_sPeerIdentity( pszPeerIdentity )
		{
		}

		//
		// Implements ISteamNetworkingConnectionSignaling
		//

		// This is called from SteamNetworkingSockets to send a signal.  This could be called from any thread,
		// so we need to be threadsafe, and avoid duoing slow stuff or calling back into SteamNetworkingSockets
		virtual bool SendSignal( HSteamNetConnection hConn, const SteamNetConnectionInfo_t &info, const void *pMsg, int cbMsg ) override
		{
			// Silence warnings
			(void)info;
			(void)hConn;

			// We'll use a dumb hex encoding.
			std::string signal;
			signal.reserve( m_sPeerIdentity.length() + cbMsg*2 + 4 );
			signal.append( m_sPeerIdentity );
			signal.push_back( ' ' );
			for ( const uint8_t *p = (const uint8_t *)pMsg ; cbMsg > 0 ; --cbMsg, ++p )
			{
				static const char hexdigit[] = "0123456789abcdef";
				signal.push_back( hexdigit[ *p >> 4U ] );
				signal.push_back( hexdigit[ *p & 0xf ] );
			}
			signal.push_back('\n');

			m_pOwner->Send( signal );
			return true;
		}

		// Self destruct.  This will be called by SteamNetworkingSockets when it's done with us.
		virtual void Release() override
		{
			delete this;
		}
	};

	sockaddr_storage m_adrServer;
	size_t const m_adrServerSize;
	ISteamNetworkingSockets *const m_pSteamNetworkingSockets;
	std::string m_sGreeting;
	std::deque< std::string > m_queueSend;

	std::recursive_mutex sockMutex;
	SOCKET m_sock;
	std::string m_sBufferedData;

	void CloseSocket()
	{
		if ( m_sock != INVALID_SOCKET )
		{
			closesocket( m_sock );
			m_sock = INVALID_SOCKET;
		}
		m_sBufferedData.clear();
		m_queueSend.clear();
	}

	void Connect()
	{
		CloseSocket();

		int sockType = SOCK_STREAM;
		#ifdef LINUX
			sockType |= SOCK_CLOEXEC;
		#endif
		m_sock = socket( m_adrServer.ss_family, sockType, IPPROTO_TCP );
		if ( m_sock == INVALID_SOCKET )
		{
			TEST_Printf( "socket() failed, error=%d\n", GetSocketError() );
			return;
		}

		// Request nonblocking IO
		unsigned long opt = 1;
		if ( ioctlsocket( m_sock, FIONBIO, &opt ) == -1 )
		{
			CloseSocket();
			TEST_Printf( "ioctlsocket() failed, error=%d\n", GetSocketError() );
			return;
		}

		connect( m_sock, (const sockaddr *)&m_adrServer, (socklen_t )m_adrServerSize );

		// And immediate send our greeting.  This just puts in in the buffer and
		// it will go out once the socket connects.
		Send( m_sGreeting );
	}

public:
	CTrivialSignalingClient( const sockaddr *adrServer, size_t adrServerSize, ISteamNetworkingSockets *pSteamNetworkingSockets )
	: m_adrServerSize( adrServerSize ), m_pSteamNetworkingSockets( pSteamNetworkingSockets )
	{
		memcpy( &m_adrServer, adrServer, adrServerSize );
		m_sock = INVALID_SOCKET;

		// Save off our identity
		SteamNetworkingIdentity identitySelf; identitySelf.Clear();
		pSteamNetworkingSockets->GetIdentity( &identitySelf );
		assert( !identitySelf.IsInvalid() );
		assert( !identitySelf.IsLocalHost() ); // We need something more specific than that
		m_sGreeting = SteamNetworkingIdentityRender( identitySelf ).c_str();
		assert( strchr( m_sGreeting.c_str(), ' ' ) == nullptr ); // Our protocol is dumb and doesn't support this
		m_sGreeting.push_back( '\n' );

		// Begin connecting immediately
		Connect();
	}

	// Send the signal.
	void Send( const std::string &s )
	{
		assert( s.length() > 0 && s[ s.length()-1 ] == '\n' ); // All of our signals are '\n'-terminated

		sockMutex.lock();

		// If we're getting backed up, delete the oldest entries.  Remember,
		// we are only required to do best-effort delivery.  And old signals are the
		// most likely to be out of date (either old data, or the client has already
		// timed them out and queued a retry).
		while ( m_queueSend.size() > 32 )
		{
			TEST_Printf( "Signaling send queue is backed up.  Discarding oldest signals\n" );
			m_queueSend.pop_front();
		}

		m_queueSend.push_back( s );
		sockMutex.unlock();
	}

	ISteamNetworkingConnectionSignaling *CreateSignalingForConnection(
		const SteamNetworkingIdentity &identityPeer,
		SteamNetworkingErrMsg &errMsg
	) override {
		SteamNetworkingIdentityRender sIdentityPeer( identityPeer );

		// FIXME - here we really ought to confirm that the string version of the
		// identity does not have spaces, since our protocol doesn't permit it.
		TEST_Printf( "Creating signaling session for peer '%s'\n", sIdentityPeer.c_str() );

		// Silence warnings
		(void)errMsg;

		return new ConnectionSignaling( this, sIdentityPeer.c_str() );
	}

	virtual void Poll() override
	{
		// Drain the socket into the buffer, and check for reconnecting
		sockMutex.lock();
		if ( m_sock == INVALID_SOCKET )
		{
			Connect();
		}
		else
		{
			for (;;)
			{
				char buf[256];
				int r = recv( m_sock, buf, sizeof(buf), 0 );
				if ( r == 0 )
					break;
				if ( r < 0 )
				{
					int e = GetSocketError();
					if ( !IgnoreSocketError( e ) )
					{
						TEST_Printf( "Failed to recv from trivial signaling server.  recv() returned %d, errno=%d.  Closing and restarting connection\n", r, e );
						CloseSocket();
					}
					break;
				}

				m_sBufferedData.append( buf, r );
			}
		}

		// Flush send queue
		if ( m_sock != INVALID_SOCKET )
		{
			while ( !m_queueSend.empty() )
			{
				const std::string &s = m_queueSend.front();
				int l = (int)s.length();
				int r = ::send( m_sock, s.c_str(), l, 0 );
				if ( r < 0 && IgnoreSocketError( GetSocketError() ) )
					break;

				if ( r == l )
				{
					m_queueSend.pop_front();
				}
				else if ( r != 0 )
				{
					// Socket hosed, or we sent a partial signal.
					// We need to restart connection
					TEST_Printf( "Failed to send %d bytes to trivial signaling server.  send() returned %d, errno=%d.  Closing and restarting connection.\n",
						l, r, GetSocketError() );
					CloseSocket();
					break;
				}
			}
		}

		// Release the lock now.  See the notes below about why it's very important
		// to release the lock early and not hold it while we try to dispatch the
		// received callbacks.
		sockMutex.unlock();

		// Now dispatch any buffered signals
		for (;;)
		{

			// Find end of line.  Do we have a complete signal?
			size_t l = m_sBufferedData.find( '\n' );
			if ( l == std::string::npos )
				break;

			// Locate the space that seperates [from] [payload]
			size_t spc = m_sBufferedData.find( ' ' );
			if ( spc != std::string::npos && spc < l )
			{

				// Hex decode the payload.  As it turns out, we actually don't
				// need the sender's identity.  The payload has everything needed
				// to process the message.  Maybe we should remove it from our
				// dummy signaling protocol?  It might be useful for debugging, tho.
				std::string data; data.reserve( ( l - spc ) / 2 );
				for ( size_t i = spc+1 ; i+2 <= l ; i += 2 )
				{
					int dh = HexDigitVal( m_sBufferedData[i] );
					int dl = HexDigitVal( m_sBufferedData[i+1] );
					if ( ( dh | dl ) & ~0xf )
					{
						// Failed hex decode.  Not a bug in our code here, but this is just example code, so we'll handle it this way
						assert( !"Failed hex decode from signaling server?!" );
						goto next_message;
					}
					data.push_back( (char)(dh<<4 | dl ) );
				}

				// Setup a context object that can respond if this signal is a connection request.
				struct Context : ISteamNetworkingSignalingRecvContext
				{
					CTrivialSignalingClient *m_pOwner;

					virtual ISteamNetworkingConnectionSignaling *OnConnectRequest(
						HSteamNetConnection hConn,
						const SteamNetworkingIdentity &identityPeer,
						int nLocalVirtualPort
					) override {
						// Silence warnings
						(void)hConn;
;						(void)nLocalVirtualPort;

						// We will just always handle requests through the usual listen socket state
						// machine.  See the documentation for this function for other behaviour we
						// might take.

						// Also, note that if there was routing/session info, it should have been in
						// our envelope that we know how to parse, and we should save it off in this
						// context object.
						SteamNetworkingErrMsg ignoreErrMsg;
						return m_pOwner->CreateSignalingForConnection( identityPeer, ignoreErrMsg );
					}

					virtual void SendRejectionSignal(
						const SteamNetworkingIdentity &identityPeer,
						const void *pMsg, int cbMsg
					) override {

						// We'll just silently ignore all failures.  This is actually the more secure
						// Way to handle it in many cases.  Actively returning failure might allow
						// an attacker to just scrape random peers to see who is online.  If you know
						// the peer has a good reason for trying to connect, sending an active failure
						// can improve error handling and the UX, instead of relying on timeout.  But
						// just consider the security implications.

						// Silence warnings
						(void)identityPeer;
						(void)pMsg;
						(void)cbMsg;
					}
				};
				Context context;
				context.m_pOwner = this;

				// Dispatch.
				// Remember: From inside this function, our context object might get callbacks.
				// And we might get asked to send signals, either now, or really at any time
				// from any thread!  If possible, avoid calling this function while holding locks.
				// To process this call, SteamnetworkingSockets will need take its own internal lock.
				// That lock may be held by another thread that is asking you to send a signal!  So
				// be warned that deadlocks are a possibility here.
				m_pSteamNetworkingSockets->ReceivedP2PCustomSignal( data.c_str(), (int)data.length(), &context );
			}

next_message:
			m_sBufferedData.erase( 0, l+1 );
		}
	}

	virtual void Release() override
	{
		// NOTE: Here we are assuming that the calling code has already cleaned
		// up all the connections, to keep the example simple.
		CloseSocket();
	}
};

// Start connecting to the signaling server.
ITrivialSignalingClient *CreateTrivialSignalingClient(
	const char *pszServerAddress, // Address of the server.
	ISteamNetworkingSockets *pSteamNetworkingSockets, // Where should we send signals when we get them?
	SteamNetworkingErrMsg &errMsg // Error message is retjrned here if we fail
) {

	std::string sAddress( pszServerAddress );
	std::string sService;
	size_t colon = sAddress.find( ':' );
	if ( colon == std::string::npos )
	{
		sService = "10000"; // Default port
	}
	else
	{
		sService = sAddress.substr( colon+1 );
		sAddress.erase( colon );
	}

	// Resolve name synchronously
	addrinfo *pAddrInfo = nullptr;
	int r = getaddrinfo( sAddress.c_str(), sService.c_str(), nullptr, &pAddrInfo );
	if ( r != 0 || pAddrInfo == nullptr )
	{
		sprintf( errMsg, "Invalid/unknown server address.  getaddrinfo returned %d", r );
		return nullptr;
	}

	auto *pClient = new CTrivialSignalingClient( pAddrInfo->ai_addr, pAddrInfo->ai_addrlen, pSteamNetworkingSockets );

	freeaddrinfo( pAddrInfo );

	return pClient;
}

	




================================================
FILE: examples/trivial_signaling_client.h
================================================
// Client of our dummy trivial signaling server service.
// Serves as an example of you how to hook up signaling server
// to SteamNetworkingSockets P2P connections

#pragma once

#include <steam/steamnetworkingcustomsignaling.h>

class ISteamNetworkingSockets;

/// Interface to our client.
class ITrivialSignalingClient
{
public:

	/// Create signaling object for a connection to peer
    virtual ISteamNetworkingConnectionSignaling *CreateSignalingForConnection(
        const SteamNetworkingIdentity &identityPeer,
        SteamNetworkingErrMsg &errMsg ) = 0;

	/// Poll the server for incoming signals and dispatch them.
	/// We use polling in this example just to keep it simple.
	/// You could use a service thread.
	virtual void Poll() = 0;

	/// Disconnect from the server and close down our polling thread.
	virtual void Release() = 0;
};

// Start connecting to the signaling server.
ITrivialSignalingClient *CreateTrivialSignalingClient(
	const char *address, // Address:port
	ISteamNetworkingSockets *pSteamNetworkingSockets, // Where should we send signals when we get them?
	SteamNetworkingErrMsg &errMsg // Error message is retjrned here if we fail
);

	




================================================
FILE: examples/trivial_signaling_server.go
================================================
// Really simple P2P signaling server.
//
// When establishing peer-to-peer connections, the peers
// need some sort of pre-arranged side channels that they
// can use to exchange messages.  This channel is assumed
// to be relatively low bandwidth and high latency.  This
// service is often called "signaling".
//
// This server has the following really simple protocol:
// It listens on a particular TCP port.  Clients connect
// raw TCP.  The protocol is text-based and line oriented,
// so it is easy to test using telnet.  When a client
// connects, it should send its identity on the first line.
// Afterwards, clients can send a message to a peer by
// sending a line formatted as follows:
//
// DESTINATION_IDENTITY PAYLOAD
//
// Identites may not contain spaces, and the payload
// should be plain ASCII text.  (Hex or base64 encode it).
//
// If there is a client with that destination identity,
// then the server will forward the message on.  Otherwise
// it is discarded.
//
// Forwarded messages have basically the same format and
// are the only type of message the server ever sends to the
// client.  The only difference is that the identity is the
// identity of the sender.
//
// This is just an example code to illustrate what a
// signaling service is.  A real production server would
// probably need to be able to scale across multiple
// processes, and provide authentication and rate
// limiting.
//
// Note that SteamNetworkingSockets use of signaling
// service does NOT assume guaranteed delivery.

package main

import (
	"bufio"
	"flag"
	"fmt"
	"log"
	"net"
	"strings"
)

const DEFAULT_LISTEN_PORT = 10000

// Current list of client connections
var g_mapClientConnections = make(map[string]net.Conn)

// Goroutine to service a client connection
func ServiceConnection(conn net.Conn) {

	// Save off address
	addr := conn.RemoteAddr().String()

	// Attach a Reader object to the connection, so we can read from it easily
	in := bufio.NewReader(conn)

	// In our trivial protocol, the first line contains the client identity
	// on a line by itself
	intro, err := in.ReadString('\n')
	if err != nil {
		log.Printf("[%s] Aborting connection before we ever received client identity", addr)
		conn.Close()
	}
	identity := strings.TrimSpace(intro)

	// Amnnnnnd that's it.  No authentication.

	// Locate existing connection, if any.
	existingConn := g_mapClientConnections[identity]

	// Add us to map or replace existing entry
	g_mapClientConnections[identity] = conn

	// Now handle existing entry
	if existingConn != nil {
		log.Printf("[%s@%s] Closing connection to make room for new connection from '%s'", identity, existingConn.RemoteAddr().String(), addr)
		existingConn.Close()
	}
	log.Printf("[%s@%s] Added connection", identity, addr)

	// Keep reading until connection is closed
	for {
		line, err := in.ReadString('\n')
		if err != nil {
			conn.Close()

			// Are we stil in the map?
			if g_mapClientConnections[identity] == conn {
				log.Printf("[%s@%s] Connecton closed. %s", identity, addr, err)
				delete(g_mapClientConnections, identity)
			} else {
				// Assume it's because we got replaced by another connection.
				// The other connection already logged, so don't do anything here
			}
			break
		}

		// Our protocol is just [destination peer identity] [payload]
		// And everything is in text.
		dest_and_msg := strings.SplitN(line, " ", 2)
		if len(dest_and_msg) != 2 {
			log.Printf("[%s@%s] Ignoring weird input '%s' (maybe truncated?)", identity, addr, line)
			continue
		}
		dest_identity := strings.TrimSpace(dest_and_msg[0])
		payload := dest_and_msg[1]

		// Locate the destination peer's connection.
		dest_conn := g_mapClientConnections[dest_identity]
		if dest_conn == nil {
			log.Printf("[%s@%s] Ignoring, destination peer '%s' not found", identity, addr, dest_identity)
			continue
		}

		// Format new message, putting the sender's identity in front.
		msg := identity + " " + payload

		// Send to the peer
		dest_conn.Write([]byte(msg))

		// Lawg
		log.Printf("[%s@%s] -> %s (%d chars)", identity, addr, dest_identity, len(payload))
	}

}

// Main entry point
func main() {

	// Parse command line flags
	port := flag.Int("port", DEFAULT_LISTEN_PORT, "Port to listen on")
	flag.Parse()
	listen_addr := fmt.Sprintf("0.0.0.0:%d", *port)

	// Start listening
	listener, err := net.Listen("tcp", listen_addr)
	if err != nil {
		log.Panic(err)
	}
	log.Printf("Listening at %s", listen_addr)

	// Main loop
	for {

		// Wait for the next incoming connection
		conn, err := listener.Accept()
		if err != nil {
			log.Panic(err)
		}

		// Start goroutine to service it
		go ServiceConnection(conn)
	}

}


================================================
FILE: examples/vcpkg_example_chat/CMakeLists.txt
================================================
#
# Example porject that uses GameNetworkingSockets, obtaining
# dependencies, etc entirely through vcpkg.
#
cmake_minimum_required(VERSION 3.9)
project( example_chat_vcpkg )

# Ask vcpkg to fetch gamenetworkingsockets and all
# its dependencies and build it
find_package(GameNetworkingSockets CONFIG REQUIRED)

# Our program only has one cpp file
add_executable(
	example_chat
	../example_chat.cpp)

# This example links GameNetworkingSockets as a shared lib.
target_link_libraries(example_chat GameNetworkingSockets::shared)


================================================
FILE: examples/vcpkg_example_chat/README.md
================================================
The purpose of this project is to demonstrate/test a project that pulls in
GameNetworkingSockets and its dependencies entirely using vcpkg.

# TL;DR

We assume that your project defines its dependences in a `vcpkg.json` file, and
you are pulling in vcpkg's cmake toolchain file.  Then all you need to do is:

* Add `gamenetworkingsockets` as a dependency in your project's `vcpkg.json`
* In your cmake file, add `find_package( GameNetworkingSockets )`
* Link your targets with the appropriate library:
  * `target_link_libraries(<your_target> GameNetworkingSockets::shared)`
  * or `target_link_libraries(<your_target> GameNetworkingSockets::static)`

# Building the example project using vcpkg in manifest mode

Here are some specific instructions that build the example project using vcpkg in
["manifest mode"](https://vcpkg.readthedocs.io/en/latest/users/manifests/).
This example assumes Windows, and also it's recommended to run this from a
Visual Studio command prompt so we know what compiler to use.

First, we bootstrap a project-specific installation of vcpkg ("manifest mode")
in the default location, `<project root>/vcpkg`.  From the project root, run these
commands:

```
> git clone https://github.com/microsoft/vcpkg
> .\vcpkg\bootstrap-vcpkg.bat
```

Now we ask vcpkg to install of the dependencies for our project, which are described by
the file `<project root>/vcpkg.json`.  Note that this step is optional, as cmake will
automatically do this.  But here we are doing it in a separate step so that we can isolate
any problems, because if problems happen here don't have anything to do with your
cmake files.

```
> .\vcpkg\vcpkg install --triplet=x64-windows
```

Next build the project files.  There are different options for telling cmake how
to integrate with vcpkg; here we use `CMAKE_TOOLCHAIN_FILE` on the command line.
Also we select Ninja project generator.

```
> cmake -S . -B build -G Ninja -DCMAKE_TOOLCHAIN_FILE=vcpkg\scripts\buildsystems\vcpkg.cmake
```

Finally, build the project:

```
> cd build
> ninja
```


================================================
FILE: examples/vcpkg_example_chat/vcpkg.json
================================================
{
	"$schema": "https://raw.githubusercontent.com/microsoft/vcpkg/master/scripts/vcpkg.schema.json",
	"name": "gamenetworkingsockets-vcpkg-example",
	"version-string": "1.0",
	"description": "Example app that uses vcpkg to declare dependencies and fetch gamenetworkingsockets",
	"dependencies": [ "gamenetworkingsockets" ]
}


================================================
FILE: include/steam/isteamnetworkingmessages.h
================================================
//====== Copyright Valve Corporation, All rights reserved. ====================

#ifndef ISTEAMNETWORKINGMESSAGES
#define ISTEAMNETWORKINGMESSAGES
#pragma once

#include "steamnetworkingtypes.h"
#include "steam_api_common.h"

//-----------------------------------------------------------------------------
/// The non-connection-oriented interface to send and receive messages
/// (whether they be "clients" or "servers").
///
/// ISteamNetworkingSockets is connection-oriented (like TCP), meaning you
/// need to listen and connect, and then you send messages using a connection
/// handle.  ISteamNetworkingMessages is more like UDP, in that you can just send
/// messages to arbitrary peers at any time.  The underlying connections are
/// established implicitly.
///
/// Under the hood ISteamNetworkingMessages works on top of the ISteamNetworkingSockets
/// code, so you get the same routing and messaging efficiency.  The difference is
/// mainly in your responsibility to explicitly establish a connection and
/// the type of feedback you get about the state of the connection.  Both
/// interfaces can do "P2P" communications, and both support both unreliable
/// and reliable messages, fragmentation and reassembly.
///
/// The primary purpose of this interface is to be "like UDP", so that UDP-based code
/// can be ported easily to take advantage of relayed connections.  If you find
/// yourself needing more low level information or control, or to be able to better
/// handle failure, then you probably need to use ISteamNetworkingSockets directly.
/// Also, note that if your main goal is to obtain a connection between two peers
/// without concerning yourself with assigning roles of "client" and "server",
/// you may find the symmetric connection mode of ISteamNetworkingSockets useful.
/// (See k_ESteamNetworkingConfig_SymmetricConnect.)
///
class ISteamNetworkingMessages
{
public:
	/// Sends a message to the specified host.  If we don't already have a session with that user,
	/// a session is implicitly created.  There might be some handshaking that needs to happen
	/// before we can actually begin sending message data.  If this handshaking fails and we can't
	/// get through, an error will be posted via the callback SteamNetworkingMessagesSessionFailed_t.
	/// There is no notification when the operation succeeds.  (You should have the peer send a reply
	/// for this purpose.)
	///
	/// Sending a message to a host will also implicitly accept any incoming connection from that host.
	///
	/// nSendFlags is a bitmask of k_nSteamNetworkingSend_xxx options
	///
	/// nRemoteChannel is a routing number you can use to help route message to different systems.
	/// You'll have to call ReceiveMessagesOnChannel() with the same channel number in order to retrieve
	/// the data on the other end.
	///
	/// Using different channels to talk to the same user will still use the same underlying
	/// connection, saving on resources.  If you don't need this feature, use 0.
	/// Otherwise, small integers are the most efficient.
	///
	/// It is guaranteed that reliable messages to the same host on the same channel
	/// will be be received by the remote host (if they are received at all) exactly once,
	/// and in the same order that they were sent.
	///
	/// NO other order guarantees exist!  In particular, unreliable messages may be dropped,
	/// received out of order with respect to each other and with respect to reliable data,
	/// or may be received multiple times.  Messages on different channels are *not* guaranteed
	/// to be received in the order they were sent.
	///
	/// A note for those familiar with TCP/IP ports, or converting an existing codebase that
	/// opened multiple sockets:  You might notice that there is only one channel, and with
	/// TCP/IP each endpoint has a port number.  You can think of the channel number as the
	/// *destination* port.  If you need each message to also include a "source port" (so the
	/// recipient can route the reply), then just put that in your message.  That is essentially
	/// how UDP works!
	///
	/// Returns:
	/// - k_EREsultOK on success.
	/// - k_EResultNoConnection, if the session has failed or was closed by the peer and
	///   k_nSteamNetworkingSend_AutoRestartBrokenSession was not specified.  (You can
	///   use GetSessionConnectionInfo to get the details.)  In order to acknowledge the
	///   broken session and start a new one, you must call CloseSessionWithUser, or you may
	///   repeat the call with k_nSteamNetworkingSend_AutoRestartBrokenSession.  See
	///   k_nSteamNetworkingSend_AutoRestartBrokenSession for more details.
	/// - See ISteamNetworkingSockets::SendMessageToConnection for more possible return values
	virtual EResult SendMessageToUser( const SteamNetworkingIdentity &identityRemote, const void *pubData, uint32 cubData, int nSendFlags, int nRemoteChannel ) = 0;

	/// Reads the next message that has been sent from another user via SendMessageToUser() on the given channel.
	/// Returns number of messages returned into your list.  (0 if no message are available on that channel.)
	///
	/// When you're done with the message object(s), make sure and call SteamNetworkingMessage_t::Release()!
	virtual int ReceiveMessagesOnChannel( int nLocalChannel, SteamNetworkingMessage_t **ppOutMessages, int nMaxMessages ) = 0;

	/// Call this in response to a SteamNetworkingMessagesSessionRequest_t callback.
	/// SteamNetworkingMessagesSessionRequest_t are posted when a user tries to send you a message,
	/// and you haven't tried to talk to them first.  If you don't want to talk to them, just ignore
	/// the request.  If the user continues to send you messages, SteamNetworkingMessagesSessionRequest_t
	/// callbacks will continue to be posted periodically.
	///
	/// Returns false if there is no session with the user pending or otherwise.  If there is an
	/// existing active session, this function will return true, even if it is not pending.
	///
	/// Calling SendMessageToUser() will implicitly accepts any pending session request to that user.
	virtual bool AcceptSessionWithUser( const SteamNetworkingIdentity &identityRemote ) = 0;

	/// Call this when you're done talking to a user to immediately free up resources under-the-hood.
	/// If the remote user tries to send data to you again, another SteamNetworkingMessagesSessionRequest_t
	/// callback will be posted.
	///
	/// Note that sessions that go unused for a few minutes are automatically timed out.
	virtual bool CloseSessionWithUser( const SteamNetworkingIdentity &identityRemote ) = 0;

	/// Call this  when you're done talking to a user on a specific channel.  Once all
	/// open channels to a user have been closed, the open session to the user will be
	/// closed, and any new data from this user will trigger a
	/// SteamSteamNetworkingMessagesSessionRequest_t callback
	virtual bool CloseChannelWithUser( const SteamNetworkingIdentity &identityRemote, int nLocalChannel ) = 0;

	/// Returns information about the latest state of a connection, if any, with the given peer.
	/// Primarily intended for debugging purposes, but can also be used to get more detailed
	/// failure information.  (See SendMessageToUser and k_nSteamNetworkingSend_AutoRestartBrokenSession.)
	///
	/// Returns the value of SteamNetConnectionInfo_t::m_eState, or k_ESteamNetworkingConnectionState_None
	/// if no connection exists with specified peer.  You may pass nullptr for either parameter if
	/// you do not need the corresponding details.  Note that sessions time out after a while,
	/// so if a connection fails, or SendMessageToUser returns k_EResultNoConnection, you cannot wait
	/// indefinitely to obtain the reason for failure.
	virtual ESteamNetworkingConnectionState GetSessionConnectionInfo( const SteamNetworkingIdentity &identityRemote, SteamNetConnectionInfo_t *pConnectionInfo, SteamNetConnectionRealTimeStatus_t *pQuickStatus ) = 0;
};
#define STEAMNETWORKINGMESSAGES_INTERFACE_VERSION "SteamNetworkingMessages002"

//
// Callbacks
//

#pragma pack( push, 1 )

/// Posted when a remote host is sending us a message, and we do not already have a session with them
struct SteamNetworkingMessagesSessionRequest_t
{ 
	enum { k_iCallback = k_iSteamNetworkingMessagesCallbacks + 1 };
	SteamNetworkingIdentity m_identityRemote;			// user who wants to talk to us
};

/// Posted when we fail to establish a connection, or we detect that communications
/// have been disrupted it an unusual way.  There is no notification when a peer proactively
/// closes the session.  ("Closed by peer" is not a concept of UDP-style communications, and
/// SteamNetworkingMessages is primarily intended to make porting UDP code easy.)
///
/// Remember: callbacks are asynchronous.   See notes on SendMessageToUser,
/// and k_nSteamNetworkingSend_AutoRestartBrokenSession in particular.
///
/// Also, if a session times out due to inactivity, no callbacks will be posted.  The only
/// way to detect that this is happening is that querying the session state may return
/// none, connecting, and findingroute again.
struct SteamNetworkingMessagesSessionFailed_t
{ 
	enum { k_iCallback = k_iSteamNetworkingMessagesCallbacks + 2 };

	/// Detailed info about the session that failed.
	/// SteamNetConnectionInfo_t::m_identityRemote indicates who this session
	/// was with.
	SteamNetConnectionInfo_t m_info;
};

#pragma pack(pop)

// Global accessors

// Using standalone lib
#ifdef STEAMNETWORKINGSOCKETS_STANDALONELIB

	static_assert( STEAMNETWORKINGMESSAGES_INTERFACE_VERSION[25] == '2', "Version mismatch" );

	STEAMNETWORKINGSOCKETS_INTERFACE ISteamNetworkingMessages *SteamNetworkingMessages_LibV2();
	inline ISteamNetworkingMessages *SteamNetworkingMessages_Lib() { return SteamNetworkingMessages_LibV2(); }

	// If running in context of steam, we also define a gameserver instance.
	STEAMNETWORKINGSOCKETS_INTERFACE ISteamNetworkingMessages *SteamGameServerNetworkingMessages_LibV2();
	inline ISteamNetworkingMessages *SteamGameServerNetworkingMessages_Lib() { return SteamGameServerNetworkingMessages_LibV2(); }

	#ifndef STEAMNETWORKINGSOCKETS_STEAMAPI
		inline ISteamNetworkingMessages *SteamNetworkingMessages() { return SteamNetworkingMessages_LibV2(); }
		inline ISteamNetworkingMessages *SteamGameServerNetworkingMessages() { return SteamGameServerNetworkingMessages_LibV2(); }
	#endif
#endif

// Using Steamworks SDK
#ifdef STEAMNETWORKINGSOCKETS_STEAMAPI

	// Steamworks SDK
	STEAM_DEFINE_USER_INTERFACE_ACCESSOR( ISteamNetworkingMessages *, SteamNetworkingMessages_SteamAPI, STEAMNETWORKINGMESSAGES_INTERFACE_VERSION );
	STEAM_DEFINE_GAMESERVER_INTERFACE_ACCESSOR( ISteamNetworkingMessages *, SteamGameServerNetworkingMessages_SteamAPI, STEAMNETWORKINGMESSAGES_INTERFACE_VERSION );

	#ifndef STEAMNETWORKINGSOCKETS_STANDALONELIB
		inline ISteamNetworkingMessages *SteamNetworkingMessages() { return SteamNetworkingMessages_SteamAPI(); }
		inline ISteamNetworkingMessages *SteamGameServerNetworkingMessages() { return SteamGameServerNetworkingMessages_SteamAPI(); }
	#endif
#endif

#endif // ISTEAMNETWORKINGMESSAGES


================================================
FILE: include/steam/isteamnetworkingsockets.h
================================================
//====== Copyright Valve Corporation, All rights reserved. ====================

#ifndef ISTEAMNETWORKINGSOCKETS
#define ISTEAMNETWORKINGSOCKETS
#pragma once

#include "steamnetworkingtypes.h"
#include "steam_api_common.h"

struct SteamNetAuthenticationStatus_t;
struct SteamNetworkingFakeIPResult_t;
class ISteamNetworkingConnectionSignaling;
class ISteamNetworkingSignalingRecvContext;
class ISteamNetworkingFakeUDPPort;

//-----------------------------------------------------------------------------
/// Lower level networking API.
///
/// - Connection-oriented API (like TCP, not UDP).  When sending and receiving
///   messages, a connection handle is used.  (For a UDP-style interface, where
///   the peer is identified by their address with each send/recv call, see
///   ISteamNetworkingMessages.)  The typical pattern is for a "server" to "listen"
///   on a "listen socket."  A "client" will "connect" to the server, and the
///   server will "accept" the connection.  If you have a symmetric situation
///   where either peer may initiate the connection and server/client roles are
///   not clearly defined, check out k_ESteamNetworkingConfig_SymmetricConnect.
/// - But unlike TCP, it's message-oriented, not stream-oriented.
/// - Mix of reliable and unreliable messages
/// - Fragmentation and reassembly
/// - Supports connectivity over plain UDP
/// - Also supports SDR ("Steam Datagram Relay") connections, which are
///   addressed by the identity of the peer.  There is a "P2P" use case and
///   a "hosted dedicated server" use case.
///
/// Note that neither of the terms "connection" nor "socket" necessarily correspond
/// one-to-one with an underlying UDP socket.  An attempt has been made to
/// keep the semantics as similar to the standard socket model when appropriate,
/// but some deviations do exist.
///
/// See also: ISteamNetworkingMessages, the UDP-style interface.  This API might be
/// easier to use, especially when porting existing UDP code.
class ISteamNetworkingSockets
{
public:

	/// Creates a "server" socket that listens for clients to connect to by 
	/// calling ConnectByIPAddress, over ordinary UDP (IPv4 or IPv6)
	///
	/// You must select a specific local port to listen on and set it
	/// the port field of the local address.
	///
	/// Usually you will set the IP portion of the address to zero (SteamNetworkingIPAddr::Clear()).
	/// This means that you will not bind to any particular local interface (i.e. the same
	/// as INADDR_ANY in plain socket code).  Furthermore, if possible the socket will be bound
	/// in "dual stack" mode, which means that it can accept both IPv4 and IPv6 client connections.
	/// If you really do wish to bind a particular interface, then set the local address to the
	/// appropriate IPv4 or IPv6 IP.
	///
	/// If you need to set any initial config options, pass them here.  See
	/// SteamNetworkingConfigValue_t for more about why this is preferable to
	/// setting the options "immediately" after creation.
	///
	/// When a client attempts to connect, a SteamNetConnectionStatusChangedCallback_t
	/// will be posted.  The connection will be in the connecting state.
	virtual HSteamListenSocket CreateListenSocketIP( const SteamNetworkingIPAddr &localAddress, int nOptions, const SteamNetworkingConfigValue_t *pOptions ) = 0;

	/// Creates a connection and begins talking to a "server" over UDP at the
	/// given IPv4 or IPv6 address.  The remote host must be listening with a
	/// matching call to CreateListenSocketIP on the specified port.
	///
	/// A SteamNetConnectionStatusChangedCallback_t callback will be triggered when we start
	/// connecting, and then another one on either timeout or successful connection.
	///
	/// If the server does not have any identity configured, then their network address
	/// will be the only identity in use.  Or, the network host may provide a platform-specific
	/// identity with or without a valid certificate to authenticate that identity.  (These
	/// details will be contained in the SteamNetConnectionStatusChangedCallback_t.)  It's
	/// up to your application to decide whether to allow the connection.
	///
	/// By default, all connections will get basic encryption sufficient to prevent
	/// casual eavesdropping.  But note that without certificates (or a shared secret
	/// distributed through some other out-of-band mechanism), you don't have any
	/// way of knowing who is actually on the other end, and thus are vulnerable to
	/// man-in-the-middle attacks.
	///
	/// If you need to set any initial config options, pass them here.  See
	/// SteamNetworkingConfigValue_t for more about why this is preferable to
	/// setting the options "immediately" after creation.
	virtual HSteamNetConnection ConnectByIPAddress( const SteamNetworkingIPAddr &address, int nOptions, const SteamNetworkingConfigValue_t *pOptions ) = 0;

	/// Like CreateListenSocketIP, but clients will connect using ConnectP2P.
	///
	/// nLocalVirtualPort specifies how clients can connect to this socket using
	/// ConnectP2P.  It's very common for applications to only have one listening socket;
	/// in that case, use zero.  If you need to open multiple listen sockets and have clients
	/// be able to connect to one or the other, then nLocalVirtualPort should be a small
	/// integer (<1000) unique to each listen socket you create.
	///
	/// If you use this, you probably want to call ISteamNetworkingUtils::InitRelayNetworkAccess()
	/// when your app initializes.
	///
	/// If you are listening on a dedicated servers in known data center,
	/// then you can listen using this function instead of CreateHostedDedicatedServerListenSocket,
	/// to allow clients to connect without a ticket.  Any user that owns
	/// the app and is signed into Steam will be able to attempt to connect to
	/// your server.  Also, a connection attempt may require the client to
	/// be connected to Steam, which is one more moving part that may fail.  When
	/// tickets are used, then once a ticket is obtained, a client can connect to
	/// your server even if they got disconnected from Steam or Steam is offline.
	///
	/// If you need to set any initial config options, pass them here.  See
	/// SteamNetworkingConfigValue_t for more about why this is preferable to
	/// setting the options "immediately" after creation.
	virtual HSteamListenSocket CreateListenSocketP2P( int nLocalVirtualPort, int nOptions, const SteamNetworkingConfigValue_t *pOptions ) = 0;

	/// Begin connecting to a peer that is identified using a platform-specific identifier.
	/// This uses the default rendezvous service, which depends on the platform and library
	/// configuration.  (E.g. on Steam, it goes through the steam backend.)
	///
	/// If you need to set any initial config options, pass them here.  See
	/// SteamNetworkingConfigValue_t for more about why this is preferable to
	/// setting the options "immediately" after creation.
	///
	/// To use your own signaling service, see:
	/// - ConnectP2PCustomSignaling
	/// - k_ESteamNetworkingConfig_Callback_CreateConnectionSignaling
	virtual HSteamNetConnection ConnectP2P( const SteamNetworkingIdentity &identityRemote, int nRemoteVirtualPort, int nOptions, const SteamNetworkingConfigValue_t *pOptions ) = 0;

	/// Accept an incoming connection that has been received on a listen socket.
	///
	/// When a connection attempt is received (perhaps after a few basic handshake
	/// packets have been exchanged to prevent trivial spoofing), a connection interface
	/// object is created in the k_ESteamNetworkingConnectionState_Connecting state
	/// and a SteamNetConnectionStatusChangedCallback_t is posted.  At this point, your
	/// application MUST either accept or close the connection.  (It may not ignore it.)
	/// Accepting the connection will transition it either into the connected state,
	/// or the finding route state, depending on the connection type.
	///
	/// You should take action within a second or two, because accepting the connection is
	/// what actually sends the reply notifying the client that they are connected.  If you
	/// delay taking action, from the client's perspective it is the same as the network
	/// being unresponsive, and the client may timeout the connection attempt.  In other
	/// words, the client cannot distinguish between a delay caused by network problems
	/// and a delay caused by the application.
	///
	/// This means that if your application goes for more than a few seconds without
	/// processing callbacks (for example, while loading a map), then there is a chance
	/// that a client may attempt to connect in that interval and fail due to timeout.
	///
	/// If the application does not respond to the connection attempt in a timely manner,
	/// and we stop receiving communication from the client, the connection attempt will
	/// be timed out locally, transitioning the connection to the
	/// k_ESteamNetworkingConnectionState_ProblemDetectedLocally state.  The client may also
	/// close the connection before it is accepted, and a transition to the
	/// k_ESteamNetworkingConnectionState_ClosedByPeer is also possible depending the exact
	/// sequence of events.
	///
	/// Returns k_EResultInvalidParam if the handle is invalid.
	/// Returns k_EResultInvalidState if the connection is not in the appropriate state.
	/// (Remember that the connection state could change in between the time that the
	/// notification being posted to the queue and when it is received by the application.)
	///
	/// A note about connection configuration options.  If you need to set any configuration
	/// options that are common to all connections accepted through a particular listen
	/// socket, consider setting the options on the listen socket, since such options are
	/// inherited automatically.  If you really do need to set options that are connection
	/// specific, it is safe to set them on the connection before accepting the connection.
	virtual EResult AcceptConnection( HSteamNetConnection hConn ) = 0;

	/// Disconnects from the remote host and invalidates the connection handle.
	/// Any unread data on the connection is discarded.
	///
	/// nReason is an application defined code that will be received on the other
	/// end and recorded (when possible) in backend analytics.  The value should
	/// come from a restricted range.  (See ESteamNetConnectionEnd.)  If you don't need
	/// to communicate any information to the remote host, and do not want analytics to
	/// be able to distinguish "normal" connection terminations from "exceptional" ones,
	/// You may pass zero, in which case the generic value of
	/// k_ESteamNetConnectionEnd_App_Generic will be used.
	///
	/// pszDebug is an optional human-readable diagnostic string that will be received
	/// by the remote host and recorded (when possible) in backend analytics.
	///
	/// If you wish to put the socket into a "linger" state, where an attempt is made to
	/// flush any remaining sent data, use bEnableLinger=true.  Otherwise reliable data
	/// is not flushed.
	///
	/// If the connection has already ended and you are just freeing up the
	/// connection interface, the reason code, debug string, and linger flag are
	/// ignored.
	virtual bool CloseConnection( HSteamNetConnection hPeer, int nReason, const char *pszDebug, bool bEnableLinger ) = 0;

	/// Destroy a listen socket.  All the connections that were accepting on the listen
	/// socket are closed ungracefully.
	virtual bool CloseListenSocket( HSteamListenSocket hSocket ) = 0;

	/// Set connection user data.  the data is returned in the following places
	/// - You can query it using GetConnectionUserData.
	/// - The SteamNetworkingmessage_t structure.
	/// - The SteamNetConnectionInfo_t structure.
	///   (Which is a member of SteamNetConnectionStatusChangedCallback_t -- but see WARNINGS below!!!!)
	///
	/// Do you need to set this atomically when the connection is created?
	/// See k_ESteamNetworkingConfig_ConnectionUserData.
	///
	/// WARNING: Be *very careful* when using the value provided in callbacks structs.
	/// Callbacks are queued, and the value that you will receive in your
	/// callback is the userdata that was effective at the time the callback
	/// was queued.  There are subtle race conditions that can happen if you
	/// don't understand this!
	///
	/// If any incoming messages for this connection are queued, the userdata
	/// field is updated, so that when when you receive messages (e.g. with
	/// ReceiveMessagesOnConnection), they will always have the very latest
	/// userdata.  So the tricky race conditions that can happen with callbacks
	/// do not apply to retrieving messages.
	///
	/// Returns false if the handle is invalid.
	virtual bool SetConnectionUserData( HSteamNetConnection hPeer, int64 nUserData ) = 0;

	/// Fetch connection user data.  Returns -1 if handle is invalid
	/// or if you haven't set any userdata on the connection.
	virtual int64 GetConnectionUserData( HSteamNetConnection hPeer ) = 0;

	/// Set a name for the connection, used mostly for debugging
	virtual void SetConnectionName( HSteamNetConnection hPeer, const char *pszName ) = 0;

	/// Fetch connection name.  Returns false if handle is invalid
	virtual bool GetConnectionName( HSteamNetConnection hPeer, char *pszName, int nMaxLen ) = 0;

	/// Send a message to the remote host on the specified connection.
	///
	/// nSendFlags determines the delivery guarantees that will be provided,
	/// when data should be buffered, etc.  E.g. k_nSteamNetworkingSend_Unreliable
	///
	/// Note that the semantics we use for messages are not precisely
	/// the same as the semantics of a standard "stream" socket.
	/// (SOCK_STREAM)  For an ordinary stream socket, the boundaries
	/// between chunks are not considered relevant, and the sizes of
	/// the chunks of data written will not necessarily match up to
	/// the sizes of the chunks that are returned by the reads on
	/// the other end.  The remote host might read a partial chunk,
	/// or chunks might be coalesced.  For the message semantics 
	/// used here, however, the sizes WILL match.  Each send call 
	/// will match a successful read call on the remote host 
	/// one-for-one.  If you are porting existing stream-oriented 
	/// code to the semantics of reliable messages, your code should 
	/// work the same, since reliable message semantics are more 
	/// strict than stream semantics.  The only caveat is related to 
	/// performance: there is per-message overhead to retain the 
	/// message sizes, and so if your code sends many small chunks 
	/// of data, performance will suffer. Any code based on stream 
	/// sockets that does not write excessively small chunks will 
	/// work without any changes. 
	///
	/// The pOutMessageNumber is an optional pointer to receive the
	/// message number assigned to the message, if sending was successful.
	///
	/// Returns:
	/// - k_EResultInvalidParam: invalid connection handle, or the individual message is too big.
	///   (See k_cbMaxSteamNetworkingSocketsMessageSizeSend)
	/// - k_EResultInvalidState: connection is in an invalid state
	/// - k_EResultNoConnection: connection has ended
	/// - k_EResultIgnored: You used k_nSteamNetworkingSend_NoDelay, and the message was dropped because
	///   we were not ready to send it.
	/// - k_EResultLimitExceeded: there was already too much data queued to be sent.
	///   (See k_ESteamNetworkingConfig_SendBufferSize)
	virtual EResult SendMessageToConnection( HSteamNetConnection hConn, const void *pData, uint32 cbData, int nSendFlags, int64 *pOutMessageNumber ) = 0;

	/// Send one or more messages without copying the message payload.
	/// This is the most efficient way to send messages. To use this
	/// function, you must first allocate a message object using
	/// ISteamNetworkingUtils::AllocateMessage.  (Do not declare one
	/// on the stack or allocate your own.)
	///
	/// You should fill in the message payload.  You can either let
	/// it allocate the buffer for you and then fill in the payload,
	/// or if you already have a buffer allocated, you can just point
	/// m_pData at your buffer and set the callback to the appropriate function
	/// to free it.  Note that if you use your own buffer, it MUST remain valid
	/// until the callback is executed.  And also note that your callback can be
	/// invoked at any time from any thread (perhaps even before SendMessages
	/// returns!), so it MUST be fast and threadsafe.
	///
	/// You MUST also fill in:
	/// - m_conn - the handle of the connection to send the message to
	/// - m_nFlags - bitmask of k_nSteamNetworkingSend_xxx flags.
	///
	/// All other fields are currently reserved and should not be modified.
	///
	/// The library will take ownership of the message structures.  They may
	/// be modified or become invalid at any time, so you must not read them
	/// after passing them to this function.
	///
	/// pOutMessageNumberOrResult is an optional array that will receive,
	/// for each message, the message number that was assigned to the message
	/// if sending was successful.  If sending failed, then a negative EResult
	/// value is placed into the array.  For example, the array will hold
	/// -k_EResultInvalidState if the connection was in an invalid state.
	/// See ISteamNetworkingSockets::SendMessageToConnection for possible
	/// failure codes.
	virtual void SendMessages( int nMessages, SteamNetworkingMessage_t *const *pMessages, int64 *pOutMessageNumberOrResult ) = 0;

	/// Flush any messages waiting on the Nagle timer and send them
	/// at the next transmission opportunity (often that means right now).
	///
	/// If Nagle is enabled (it's on by default) then when calling 
	/// SendMessageToConnection the message will be buffered, up to the Nagle time
	/// before being sent, to merge small messages into the same packet.
	/// (See k_ESteamNetworkingConfig_NagleTime)
	///
	/// Returns:
	/// k_EResultInvalidParam: invalid connection handle
	/// k_EResultInvalidState: connection is in an invalid state
	/// k_EResultNoConnection: connection has ended
	/// k_EResultIgnored: We weren't (yet) connected, so this operation has no effect.
	virtual EResult FlushMessagesOnConnection( HSteamNetConnection hConn ) = 0;

	/// Fetch the next available message(s) from the connection, if any.
	/// Returns the number of messages returned into your array, up to nMaxMessages.
	/// If the connection handle is invalid, -1 is returned.
	///
	/// The order of the messages returned in the array is relevant.
	/// Reliable messages will be received in the order they were sent (and with the
	/// same sizes --- see SendMessageToConnection for on this subtle difference from a stream socket).
	///
	/// Unreliable messages may be dropped, or delivered out of order with respect to
	/// each other or with respect to reliable messages.  The same unreliable message
	/// may be received multiple times.
	///
	/// If any messages are returned, you MUST call SteamNetworkingMessage_t::Release() on each
	/// of them free up resources after you are done.  It is safe to keep the object alive for
	/// a little while (put it into some queue, etc), and you may call Release() from any thread.
	virtual int ReceiveMessagesOnConnection( HSteamNetConnection hConn, SteamNetworkingMessage_t **ppOutMessages, int nMaxMessages ) = 0; 

	/// Returns basic information about the high-level state of the connection.
	virtual bool GetConnectionInfo( HSteamNetConnection hConn, SteamNetConnectionInfo_t *pInfo ) = 0;

	/// Returns a small set of information about the real-time state of the connection
	/// and the queue status of each lane.
	/// 
	/// - pStatus may be NULL if the information is not desired.  (E.g. you are only interested
	///   in the lane information.)
	/// - On entry, nLanes specifies the length of the pLanes array.  This may be 0
	///   if you do not wish to receive any lane data.  It's OK for this to be smaller than
	///   the total number of configured lanes.
	/// - pLanes points to an array that will receive lane-specific info.  It can be NULL
	///   if this is not needed.
	/// 
	/// Return value:
	/// - k_EResultNoConnection - connection handle is invalid or connection has been closed.
	/// - k_EResultInvalidParam - nLanes is bad
	virtual EResult GetConnectionRealTimeStatus( HSteamNetConnection hConn, SteamNetConnectionRealTimeStatus_t *pStatus,
		int nLanes, SteamNetConnectionRealTimeLaneStatus_t *pLanes ) = 0;

	/// Returns detailed connection stats in text format.  Useful
	/// for dumping to a log, etc.
	///
	/// Returns:
	/// -1 failure (bad connection handle)
	/// 0 OK, your buffer was filled in and '\0'-terminated
	/// >0 Your buffer was either nullptr, or it was too small and the text got truncated.
	///    Try again with a buffer of at least N bytes.
	virtual int GetDetailedConnectionStatus( HSteamNetConnection hConn, char *pszBuf, int cbBuf ) = 0;

	/// Returns local IP and port that a listen socket created using CreateListenSocketIP is bound to.
	///
	/// An IPv6 address of ::0 means "any IPv4 or IPv6"
	/// An IPv6 address of ::ffff:0000:0000 means "any IPv4"
	virtual bool GetListenSocketAddress( HSteamListenSocket hSocket, SteamNetworkingIPAddr *address ) = 0;

	/// Create a pair of connections that are talking to each other, e.g. a loopback connection.
	/// This is very useful for testing, or so that your client/server code can work the same
	/// even when you are running a local "server".
	///
	/// The two connections will immediately be placed into the connected state, and no callbacks
	/// will be posted immediately.  After this, if you close either connection, the other connection
	/// will receive a callback, exactly as if they were communicating over the network.  You must
	/// close *both* sides in order to fully clean up the resources!
	///
	/// By default, internal buffers are used, completely bypassing the network, the chopping up of
	/// messages into packets, encryption, copying the payload, etc.  This means that loopback
	/// packets, by default, will not simulate lag or loss.  Passing true for bUseNetworkLoopback will
	/// cause the socket pair to send packets through the local network loopback device (127.0.0.1)
	/// on ephemeral ports.  Fake lag and loss are supported in this case, and CPU time is expended
	/// to encrypt and decrypt.
	///
	/// If you wish to assign a specific identity to either connection, you may pass a particular
	/// identity.  Otherwise, if you pass nullptr, the respective connection will assume a generic
	/// "localhost" identity.  If you use real network loopback, this might be translated to the
	/// actual bound loopback port.  Otherwise, the port will be zero.
	virtual bool CreateSocketPair( HSteamNetConnection *pOutConnection1, HSteamNetConnection *pOutConnection2, bool bUseNetworkLoopback, const SteamNetworkingIdentity *pIdentity1, const SteamNetworkingIdentity *pIdentity2 ) = 0;

	/// Configure multiple outbound messages streams ("lanes") on a connection, and
	/// control head-of-line blocking between them.  Messages within a given lane
	/// are always sent in the order they are queued, but messages from different
	/// lanes may be sent out of order.  Each lane has its own message number
	/// sequence.  The first message sent on each lane will be assigned the number 1.
	///
	/// Each lane has a "priority".  Lanes with higher numeric values will only be processed
	/// when all lanes with lower number values are empty.  The magnitudes of the priority
	/// values are not relevant, only their sort order.
	/// 
	/// Each lane also is assigned a weight, which controls the approximate proportion
	/// of the bandwidth that will be consumed by the lane, relative to other lanes
	/// of the same priority.  (This is assuming the lane stays busy.  An idle lane
	/// does not build up "credits" to be be spent once a message is queued.)
	/// This value is only meaningful as a proportion, relative to other lanes with
	/// the same priority.  For lanes with different priorities, the strict priority
	/// order will prevail, and their weights relative to each other are not relevant.
	/// Thus, if a lane has a unique priority value, the weight value for that lane is
	/// not relevant.  
	///
	/// Example: 3 lanes, with priorities [ 0, 10, 10 ] and weights [ (NA), 20, 5 ].
	/// Messages sent on the first will always be sent first, before messages in the
	/// other two lanes.  Its weight value is irrelevant, since there are no other
	/// lanes with priority=0.  The other two lanes will share bandwidth, with the second
	/// and third lanes sharing bandwidth using a ratio of approximately 4:1.
	/// (The weights [ NA, 4, 1 ] would be equivalent.)
	///
	/// Notes:
	/// - At the time of this writing, some code has performance cost that is linear
	///   in the number of lanes, so keep the number of lanes to an absolute minimum.
	///   3 or so is fine; >8 is a lot.  The max number of lanes on Steam is 255,
	///   which is a very large number and not recommended!  If you are compiling this
	///   library from source, see STEAMNETWORKINGSOCKETS_MAX_LANES.)
	/// - Lane priority values may be any int.  Their absolute value is not relevant,
	///   only the order matters.
	/// - Weights must be positive, and due to implementation details, they are restricted
	///   to 16-bit values.  The absolute magnitudes don't matter, just the proportions.
	/// - Messages sent on a lane index other than 0 have a small overhead on the wire,
	///   so for maximum wire efficiency, lane 0 should be the "most common" lane, regardless
	///   of priorities or weights.
	/// - A connection has a single lane by default.  Calling this function with
	///   nNumLanes=1 is legal, but pointless, since the priority and weight values are
	///   irrelevant in that case.
	/// - You may reconfigure connection lanes at any time, however reducing the number of
	///   lanes is not allowed.
	/// - Reconfiguring lanes might restart any bandwidth sharing balancing.  Usually you
	///   will call this function once, near the start of the connection, perhaps after
	///   exchanging a few messages.
	/// - To assign all lanes the same priority, you may use pLanePriorities=NULL.
	/// - If you wish all lanes with the same priority to share bandwidth equally (or
	///   if no two lanes have the same priority value, and thus priority values are
	///   irrelevant), you may use pLaneWeights=NULL
	/// - Priorities and weights determine the order that messages are SENT on the wire.
	///   There are NO GUARANTEES on the order that messages are RECEIVED!  Due to packet
	///   loss, out-of-order delivery, and subtle details of packet serialization, messages
	///   might still be received slightly out-of-order!  The *only* strong guarantee is that
	///   *reliable* messages on the *same lane* will be delivered in the order they are sent.
	/// - Each host configures the lanes for the packets they send; the lanes for the flow
	///   in one direction are completely unrelated to the lanes in the opposite direction.
	/// 
	/// Return value:
	/// - k_EResultNoConnection - bad hConn
	/// - k_EResultInvalidParam - Invalid number of lanes, bad weights, or you tried to reduce the number of lanes
	/// - k_EResultInvalidState - Connection is already dead, etc
	/// 
	/// See also:
	/// SteamNetworkingMessage_t::m_idxLane
	virtual EResult ConfigureConnectionLanes( HSteamNetConnection hConn, int nNumLanes, const int *pLanePriorities, const uint16 *pLaneWeights ) = 0;

	//
	// Identity and authentication
	//

	/// Get the identity assigned to this interface.
	/// E.g. on Steam, this is the user's SteamID, or for the gameserver interface, the SteamID assigned
	/// to the gameserver.  Returns false and sets the result to an invalid identity if we don't know
	/// our identity yet.  (E.g. GameServer has not logged in.  On Steam, the user will know their SteamID
	/// even if they are not signed into Steam.)
	virtual bool GetIdentity( SteamNetworkingIdentity *pIdentity ) = 0;

	/// Indicate our desire to be ready participate in authenticated communications.
	/// If we are currently not ready, then steps will be taken to obtain the necessary
	/// certificates.   (This includes a certificate for us, as well as any CA certificates
	/// needed to authenticate peers.)
	///
	/// You can call this at program init time if you know that you are going to
	/// be making authenticated connections, so that we will be ready immediately when
	/// those connections are attempted.  (Note that essentially all connections require
	/// authentication, with the exception of ordinary UDP connections with authentication
	/// disabled using k_ESteamNetworkingConfig_IP_AllowWithoutAuth.)  If you don't call
	/// this function, we will wait until a feature is utilized that that necessitates
	/// these resources.
	///
	/// You can also call this function to force a retry, if failure has occurred.
	/// Once we make an attempt and fail, we will not automatically retry.
	/// In this respect, the behavior of the system after trying and failing is the same
	/// as before the first attempt: attempting authenticated communication or calling
	/// this function will call the system to attempt to acquire the necessary resources.
	///
	/// You can use GetAuthenticationStatus or listen for SteamNetAuthenticationStatus_t
	/// to monitor the status.
	///
	/// Returns the current value that would be returned from GetAuthenticationStatus.
	virtual ESteamNetworkingAvailability InitAuthentication() = 0;

	/// Query our readiness to participate in authenticated communications.  A
	/// SteamNetAuthenticationStatus_t callback is posted any time this status changes,
	/// but you can use this function to query it at any time.
	///
	/// The value of SteamNetAuthenticationStatus_t::m_eAvail is returned.  If you only
	/// want this high level status, you can pass NULL for pDetails.  If you want further
	/// details, pass non-NULL to receive them.
	virtual ESteamNetworkingAvailability GetAuthenticationStatus( SteamNetAuthenticationStatus_t *pDetails ) = 0;

	//
	// Poll groups.  A poll group is a set of connections that can be polled efficiently.
	// (In our API, to "poll" a connection means to retrieve all pending messages.  We
	// actually don't have an API to "poll" the connection *state*, like BSD sockets.)
	//

	/// Create a new poll group.
	///
	/// You should destroy the poll group when you are done using DestroyPollGroup
	virtual HSteamNetPollGroup CreatePollGroup() = 0;

	/// Destroy a poll group created with CreatePollGroup().
	///
	/// If there are any connections in the poll group, they are removed from the group,
	/// and left in a state where they are not part of any poll group.
	/// Returns false if passed an invalid poll group handle.
	virtual bool DestroyPollGroup( HSteamNetPollGroup hPollGroup ) = 0;

	/// Assign a connection to a poll group.  Note that a connection may only belong to a
	/// single poll group.  Adding a connection to a poll group implicitly removes it from
	/// any other poll group it is in.
	///
	/// You can pass k_HSteamNetPollGroup_Invalid to remove a connection from its current
	/// poll group without adding it to a new poll group.
	///
	/// If there are received messages currently pending on the connection, an attempt
	/// is made to add them to the queue of messages for the poll group in approximately
	/// the order that would have applied if the connection was already part of the poll
	/// group at the time that the messages were received.
	///
	/// Returns false if the connection handle is invalid, or if the poll group handle
	/// is invalid (and not k_HSteamNetPollGroup_Invalid).
	virtual bool SetConnectionPollGroup( HSteamNetConnection hConn, HSteamNetPollGroup hPollGroup ) = 0;

	/// Same as ReceiveMessagesOnConnection, but will return the next messages available
	/// on any connection in the poll group.  Examine SteamNetworkingMessage_t::m_conn
	/// to know which connection.  (SteamNetworkingMessage_t::m_nConnUserData might also
	/// be useful.)
	///
	/// Delivery order of messages among different connections will usually match the
	/// order that the last packet was received which completed the message.  But this
	/// is not a strong guarantee, especially for packets received right as a connection
	/// is being assigned to poll group.
	///
	/// Delivery order of messages on the same connection is well defined and the
	/// same guarantees are present as mentioned in ReceiveMessagesOnConnection.
	/// (But the messages are not grouped by connection, so they will not necessarily
	/// appear consecutively in the list; they may be interleaved with messages for
	/// other connections.)
	virtual int ReceiveMessagesOnPollGroup( HSteamNetPollGroup hPollGroup, SteamNetworkingMessage_t **ppOutMessages, int nMaxMessages ) = 0; 

	//
	// Clients connecting to dedicated servers hosted in a data center,
	// using tickets issued by your game coordinator.  If you are not
	// issuing your own tickets to restrict who can attempt to connect
	// to your server, then you won't use these functions.
	//

	/// Call this when you receive a ticket from your backend / matchmaking system.  Puts the
	/// ticket into a persistent cache, and optionally returns the parsed ticket.
	///
	/// See stamdatagram_ticketgen.h for more details.
	virtual bool ReceivedRelayAuthTicket( const void *pvTicket, int cbTicket, SteamDatagramRelayAuthTicket *pOutParsedTicket ) = 0;

	/// Search cache for a ticket to talk to the server on the specified virtual port.
	/// If found, returns the number of seconds until the ticket expires, and optionally
	/// the complete cracked ticket.  Returns 0 if we don't have a ticket.
	///
	/// Typically this is useful just to confirm that you have a ticket, before you
	/// call ConnectToHostedDedicatedServer to connect to the server.
	virtual int FindRelayAuthTicketForServer( const SteamNetworkingIdentity &identityGameServer, int nRemoteVirtualPort, SteamDatagramRelayAuthTicket *pOutParsedTicket ) = 0;

	/// Client call to connect to a server hosted in a Valve data center, on the specified virtual
	/// port.  You must have placed a ticket for this server into the cache, or else this connect
	/// attempt will fail!  If you are not issuing your own tickets, then to connect to a dedicated
	/// server via SDR in auto-ticket mode, use ConnectP2P.  (The server must be configured to allow
	/// this type of connection by listening using CreateListenSocketP2P.)
	///
	/// You may wonder why tickets are stored in a cache, instead of simply being passed as an argument
	/// here.  The reason is to make reconnection to a gameserver robust, even if the client computer loses
	/// connection to Steam or the central backend, or the app is restarted or crashes, etc.
	///
	/// If you use this, you probably want to call ISteamNetworkingUtils::InitRelayNetworkAccess()
	/// when your app initializes
	///
	/// If you need to set any initial config options, pass them here.  See
	/// SteamNetworkingConfigValue_t for more about why this is preferable to
	/// setting the options "immediately" after creation.
	virtual HSteamNetConnection ConnectToHostedDedicatedServer( const SteamNetworkingIdentity &identityTarget, int nRemoteVirtualPort, int nOptions, const SteamNetworkingConfigValue_t *pOptions ) = 0;

	//
	// Servers hosted in data centers known to the Valve relay network
	//

	/// Returns the value of the SDR_LISTEN_PORT environment variable.  This
	/// is the UDP server your server will be listening on.  This will
	/// configured automatically for you in production environments.
	///
	/// In development, you'll need to set it yourself.  See
	/// https://partner.steamgames.com/doc/api/ISteamNetworkingSockets
	/// for more information on how to configure dev environments.
	virtual uint16 GetHostedDedicatedServerPort() = 0;

	/// Returns 0 if SDR_LISTEN_PORT is not set.  Otherwise, returns the data center the server
	/// is running in.  This will be k_SteamDatagramPOPID_dev in non-production environment.
	virtual SteamNetworkingPOPID GetHostedDedicatedServerPOPID() = 0;

	/// Return info about the hosted server.  This contains the PoPID of the server,
	/// and opaque routing information that can be used by the relays to send traffic
	/// to your server.
	///
	/// You will need to send this information to your backend, and put it in tickets,
	/// so that the relays will know how to forward traffic from
	/// clients to your server.  See SteamDatagramRelayAuthTicket for more info.
	///
	/// Also, note that the routing information is contained in SteamDatagramGameCoordinatorServerLogin,
	/// so if possible, it's preferred to use GetGameCoordinatorServerLogin to send this info
	/// to your game coordinator service, and also login securely at the same time.
	///
	/// On a successful exit, k_EResultOK is returned
	///
	/// Unsuccessful exit:
	/// - Something other than k_EResultOK is returned.
	/// - k_EResultInvalidState: We are not configured to listen for SDR (SDR_LISTEN_SOCKET
	///   is not set.)
	/// - k_EResultPending: we do not (yet) have the authentication information needed.
	///   (See GetAuthenticationStatus.)  If you use environment variables to pre-fetch
	///   the network config, this data should always be available immediately.
	/// - A non-localized diagnostic debug message will be placed in m_data that describes
	///   the cause of the failure.
	///
	/// NOTE: The returned blob is not encrypted.  Send it to your backend, but don't
	///       directly share it with clients.
	virtual EResult GetHostedDedicatedServerAddress( SteamDatagramHostedAddress *pRouting ) = 0;

	/// Create a listen socket on the specified virtual port.  The physical UDP port to use
	/// will be determined by the SDR_LISTEN_PORT environment variable.  If a UDP port is not
	/// configured, this call will fail.
	///
	/// T
Download .txt
gitextract_ynny6nih/

├── .editorconfig
├── .github/
│   ├── action.sh
│   ├── build.sh
│   ├── install/
│   │   ├── alpine.sh
│   │   ├── archlinux.sh
│   │   ├── fedora.sh
│   │   ├── opensuse.sh
│   │   └── ubuntu.sh
│   ├── install-post.sh
│   ├── preinstall.sh
│   ├── update-packages/
│   │   ├── alpine.sh
│   │   ├── archlinux.sh
│   │   ├── fedora.sh
│   │   ├── opensuse.sh
│   │   └── ubuntu.sh
│   └── workflows/
│       ├── build.yml
│       ├── linux-flavors.yml
│       └── macos.yml
├── .gitignore
├── .gitmodules
├── .travis-run-local.py
├── .travis.yml
├── BUILDING.md
├── BUILDING_WINDOWS_MANUAL.md
├── CMakeLists.txt
├── GameNetworkingSockets.code-workspace
├── LICENSE
├── README.md
├── README_P2P.md
├── SECURITY.md
├── cmake/
│   ├── DefaultBuildType.cmake
│   ├── FindASan.cmake
│   ├── FindMSan.cmake
│   ├── FindSanitizers.cmake
│   ├── FindTSan.cmake
│   ├── FindUBSan.cmake
│   ├── Findsodium.cmake
│   ├── FlagsMSVC.cmake
│   ├── GameNetworkingSocketsConfig.cmake.in
│   ├── asan-wrapper
│   ├── sanitize-helpers.cmake
│   └── tryCompileTestBCrypt.cpp
├── examples/
│   ├── CMakeLists.txt
│   ├── example_chat.cpp
│   ├── trivial_signaling_client.cpp
│   ├── trivial_signaling_client.h
│   ├── trivial_signaling_server.go
│   └── vcpkg_example_chat/
│       ├── CMakeLists.txt
│       ├── README.md
│       └── vcpkg.json
├── include/
│   └── steam/
│       ├── isteamnetworkingmessages.h
│       ├── isteamnetworkingsockets.h
│       ├── isteamnetworkingutils.h
│       ├── steam_api_common.h
│       ├── steamclientpublic.h
│       ├── steamnetworkingcustomsignaling.h
│       ├── steamnetworkingsockets.h
│       ├── steamnetworkingsockets_flat.h
│       ├── steamnetworkingtypes.h
│       ├── steamtypes.h
│       └── steamuniverse.h
├── src/
│   ├── CMakeLists.txt
│   ├── common/
│   │   ├── crypto.cpp
│   │   ├── crypto.h
│   │   ├── crypto_25519.h
│   │   ├── crypto_25519_donna.cpp
│   │   ├── crypto_25519_libsodium.cpp
│   │   ├── crypto_25519_openssl.cpp
│   │   ├── crypto_bcrypt.cpp
│   │   ├── crypto_constants.h
│   │   ├── crypto_digest_opensslevp.cpp
│   │   ├── crypto_libsodium.cpp
│   │   ├── crypto_openssl.cpp
│   │   ├── crypto_sha1_wpa.cpp
│   │   ├── crypto_symmetric_opensslevp.cpp
│   │   ├── crypto_textencode.cpp
│   │   ├── keypair.cpp
│   │   ├── keypair.h
│   │   ├── opensslwrapper.cpp
│   │   ├── opensslwrapper.h
│   │   ├── percentile_generator.h
│   │   ├── steamid.cpp
│   │   ├── steamid.h
│   │   ├── steamnetworkingsockets_messages.proto
│   │   ├── steamnetworkingsockets_messages_certs.proto
│   │   └── steamnetworkingsockets_messages_udp.proto
│   ├── external/
│   │   ├── curve25519-donna/
│   │   │   ├── README.md
│   │   │   ├── curve25519-donna-32bit.h
│   │   │   ├── curve25519-donna-64bit.h
│   │   │   ├── curve25519-donna-common.h
│   │   │   ├── curve25519-donna-portable-identify.h
│   │   │   ├── curve25519-donna-portable.h
│   │   │   ├── curve25519-donna-scalarmult-base.h
│   │   │   ├── curve25519-donna-scalarmult-sse2.h
│   │   │   ├── curve25519-donna-sse2.h
│   │   │   ├── curve25519-donna.h
│   │   │   ├── curve25519-optimizations-32bit.md
│   │   │   ├── curve25519.c
│   │   │   ├── curve25519.h
│   │   │   ├── curve25519_VALVE_sse2.c
│   │   │   ├── readme_VALVE.txt
│   │   │   ├── test-ticks.h
│   │   │   └── test.c
│   │   ├── ed25519-donna/
│   │   │   ├── README.md
│   │   │   ├── curve25519-donna-32bit.h
│   │   │   ├── curve25519-donna-64bit.h
│   │   │   ├── curve25519-donna-helpers.h
│   │   │   ├── curve25519-donna-sse2.h
│   │   │   ├── ed25519-donna-32bit-sse2.h
│   │   │   ├── ed25519-donna-32bit-tables.h
│   │   │   ├── ed25519-donna-64bit-sse2.h
│   │   │   ├── ed25519-donna-64bit-tables.h
│   │   │   ├── ed25519-donna-64bit-x86-32bit.h
│   │   │   ├── ed25519-donna-64bit-x86.h
│   │   │   ├── ed25519-donna-basepoint-table.h
│   │   │   ├── ed25519-donna-batchverify.h
│   │   │   ├── ed25519-donna-impl-base.h
│   │   │   ├── ed25519-donna-impl-sse2.h
│   │   │   ├── ed25519-donna-portable-identify.h
│   │   │   ├── ed25519-donna-portable.h
│   │   │   ├── ed25519-donna.h
│   │   │   ├── ed25519-hash-bcrypt.h
│   │   │   ├── ed25519-hash-custom.h
│   │   │   ├── ed25519-hash-openssl.h
│   │   │   ├── ed25519-hash-ref.h
│   │   │   ├── ed25519-hash.h
│   │   │   ├── ed25519-randombytes-custom.h
│   │   │   ├── ed25519-randombytes.h
│   │   │   ├── ed25519.c
│   │   │   ├── ed25519.h
│   │   │   ├── ed25519_VALVE.c
│   │   │   ├── ed25519_VALVE_sse2.c
│   │   │   ├── fuzz/
│   │   │   │   ├── README.md
│   │   │   │   ├── curve25519-ref10.c
│   │   │   │   ├── curve25519-ref10.h
│   │   │   │   ├── ed25519-donna-sse2.c
│   │   │   │   ├── ed25519-donna.c
│   │   │   │   ├── ed25519-donna.h
│   │   │   │   ├── ed25519-ref10.c
│   │   │   │   ├── ed25519-ref10.h
│   │   │   │   ├── fuzz-curve25519.c
│   │   │   │   └── fuzz-ed25519.c
│   │   │   ├── modm-donna-32bit.h
│   │   │   ├── modm-donna-64bit.h
│   │   │   ├── readme_VALVE.txt
│   │   │   ├── regression.h
│   │   │   ├── test-internals.c
│   │   │   ├── test-ticks.h
│   │   │   └── test.c
│   │   ├── sha1-wpa/
│   │   │   ├── README
│   │   │   ├── sha1-internal.c
│   │   │   ├── sha1.c
│   │   │   ├── sha1.h
│   │   │   └── sha1_i.h
│   │   └── steamwebrtc/
│   │       ├── CMakeLists.txt
│   │       ├── ice_session.cpp
│   │       ├── ice_session.h
│   │       ├── steamwebrtc_internal.h
│   │       └── webrtc_sdp.cc
│   ├── public/
│   │   ├── minbase/
│   │   │   ├── minbase_annotations.h
│   │   │   ├── minbase_decls.h
│   │   │   ├── minbase_endian.h
│   │   │   ├── minbase_identify.h
│   │   │   ├── minbase_limits.h
│   │   │   ├── minbase_macros.h
│   │   │   ├── minbase_securezeromemory_impl.h
│   │   │   ├── minbase_types.h
│   │   │   └── minbase_warnings.h
│   │   ├── tier0/
│   │   │   ├── basetypes.h
│   │   │   ├── dbg.h
│   │   │   ├── memdbgoff.h
│   │   │   ├── memdbgon.h
│   │   │   ├── platform.h
│   │   │   ├── platform_sockets.h
│   │   │   ├── platformtime.h
│   │   │   ├── t0constants.h
│   │   │   ├── valve_off.h
│   │   │   ├── valve_on.h
│   │   │   ├── valve_tracelogging.h
│   │   │   ├── vprof.h
│   │   │   └── wchartypes.h
│   │   ├── tier1/
│   │   │   ├── fmtstr.h
│   │   │   ├── netadr.h
│   │   │   ├── utlbuffer.h
│   │   │   ├── utlhashmap.h
│   │   │   ├── utliterator.h
│   │   │   ├── utllinkedlist.h
│   │   │   ├── utlmemory.h
│   │   │   ├── utlpriorityqueue.h
│   │   │   └── utlvector.h
│   │   ├── vstdlib/
│   │   │   ├── random.h
│   │   │   └── strtools.h
│   │   └── winlite.h
│   ├── steamnetworkingsockets/
│   │   ├── certtool/
│   │   │   └── steamnetworkingsockets_certtool.cpp
│   │   ├── clientlib/
│   │   │   ├── SNP_WIRE_FORMAT.md
│   │   │   ├── csteamnetworkingmessages.cpp
│   │   │   ├── csteamnetworkingmessages.h
│   │   │   ├── csteamnetworkingsockets.cpp
│   │   │   ├── csteamnetworkingsockets.h
│   │   │   ├── ice_client_types.h
│   │   │   ├── steamnetworkingsockets_connections.cpp
│   │   │   ├── steamnetworkingsockets_connections.h
│   │   │   ├── steamnetworkingsockets_flat.cpp
│   │   │   ├── steamnetworkingsockets_lowlevel.cpp
│   │   │   ├── steamnetworkingsockets_lowlevel.h
│   │   │   ├── steamnetworkingsockets_p2p.cpp
│   │   │   ├── steamnetworkingsockets_p2p.h
│   │   │   ├── steamnetworkingsockets_p2p_ice.cpp
│   │   │   ├── steamnetworkingsockets_p2p_ice.h
│   │   │   ├── steamnetworkingsockets_p2p_webrtc.cpp
│   │   │   ├── steamnetworkingsockets_p2p_webrtc.h
│   │   │   ├── steamnetworkingsockets_snp.cpp
│   │   │   ├── steamnetworkingsockets_snp.h
│   │   │   ├── steamnetworkingsockets_stun.cpp
│   │   │   ├── steamnetworkingsockets_stun.h
│   │   │   ├── steamnetworkingsockets_udp.cpp
│   │   │   └── steamnetworkingsockets_udp.h
│   │   ├── steamnetworking_stats.h
│   │   ├── steamnetworking_statsutils.h
│   │   ├── steamnetworkingsockets_certs.cpp
│   │   ├── steamnetworkingsockets_certstore.cpp
│   │   ├── steamnetworkingsockets_certstore.h
│   │   ├── steamnetworkingsockets_internal.h
│   │   ├── steamnetworkingsockets_shared.cpp
│   │   ├── steamnetworkingsockets_stats.cpp
│   │   ├── steamnetworkingsockets_thinker.cpp
│   │   └── steamnetworkingsockets_thinker.h
│   ├── tier0/
│   │   ├── dbg.cpp
│   │   ├── platformtime.cpp
│   │   └── valve_tracelogging.cpp
│   ├── tier1/
│   │   ├── ipv6text.c
│   │   ├── ipv6text.h
│   │   ├── netadr.cpp
│   │   ├── utlbuffer.cpp
│   │   └── utlmemory.cpp
│   └── vstdlib/
│       └── strtools.cpp
├── tests/
│   ├── CMakeLists.txt
│   ├── aesgcmtestvectors/
│   │   ├── gcmDecrypt128.rsp
│   │   ├── gcmDecrypt192.rsp
│   │   ├── gcmDecrypt256.rsp
│   │   ├── gcmEncryptExtIV128.rsp
│   │   ├── gcmEncryptExtIV192.rsp
│   │   ├── gcmEncryptExtIV256.rsp
│   │   └── readme.txt
│   ├── make_test_certs.py
│   ├── test_common.cpp
│   ├── test_common.h
│   ├── test_connection.cpp
│   ├── test_crypto.cpp
│   ├── test_flat.c
│   ├── test_p2p.cpp
│   ├── test_p2p.py
│   └── test_pki.cpp
├── vcpkg.json
└── vcpkg_ports/
    └── gamenetworkingsockets/
        └── portfile.cmake
Download .txt
SYMBOL INDEX (1775 symbols across 147 files)

FILE: .travis-run-local.py
  function read_travis_yml (line 21) | def read_travis_yml():
  function docker_arch (line 24) | def docker_arch(travis_arch):
  function image_name (line 29) | def image_name(image, tag, arch):
  function env_parse (line 40) | def env_parse(env, arch):
  function get_images (line 65) | def get_images(travis):
  function docker_pull (line 94) | def docker_pull(image):
  function pull_images (line 97) | def pull_images(travis):
  function init_logging (line 101) | def init_logging(level=logging.INFO):
  function kill_and_wait (line 116) | def kill_and_wait():
  function main (line 137) | def main():

FILE: cmake/tryCompileTestBCrypt.cpp
  function main (line 5) | int main(int, char **)

FILE: examples/example_chat.cpp
  function NukeProcess (line 44) | static void NukeProcess( int rc )
  function DebugOutput (line 54) | static void DebugOutput( ESteamNetworkingSocketsDebugOutputType eType, c...
  function FatalError (line 67) | static void FatalError( const char *fmt, ... )
  function Printf (line 80) | static void Printf( const char *fmt, ... )
  function InitSteamDatagramConnectionSockets (line 93) | static void InitSteamDatagramConnectionSockets()
  function ShutdownSteamDatagramConnectionSockets (line 121) | static void ShutdownSteamDatagramConnectionSockets()
  function LocalUserInput_Init (line 149) | void LocalUserInput_Init()
  function LocalUserInput_Kill (line 174) | void LocalUserInput_Kill()
  function ltrim (line 194) | static inline void ltrim(std::string &s) {
  function rtrim (line 201) | static inline void rtrim(std::string &s) {
  function LocalUserInput_GetNext (line 209) | bool LocalUserInput_GetNext( std::string &result )
  class ChatServer (line 231) | class ChatServer
    method Run (line 234) | void Run( uint16 nPort )
    type Client_t (line 290) | struct Client_t
    method SendStringToClient (line 297) | void SendStringToClient( HSteamNetConnection conn, const char *str )
    method SendStringToAllClients (line 302) | void SendStringToAllClients( const char *str, HSteamNetConnection exce...
    method PollIncomingMessages (line 311) | void PollIncomingMessages()
    method PollLocalUserInput (line 363) | void PollLocalUserInput()
    method SetClientNick (line 380) | void SetClientNick( HSteamNetConnection hConn, const char *nick )
    method OnSteamNetConnectionStatusChanged (line 390) | void OnSteamNetConnectionStatusChanged( SteamNetConnectionStatusChange...
    method SteamNetConnectionStatusChangedCallback (line 534) | static void SteamNetConnectionStatusChangedCallback( SteamNetConnectio...
    method PollConnectionStateChanges (line 539) | void PollConnectionStateChanges()
  class ChatClient (line 554) | class ChatClient
    method Run (line 557) | void Run( const SteamNetworkingIPAddr &serverAddr )
    method PollIncomingMessages (line 585) | void PollIncomingMessages()
    method PollLocalUserInput (line 605) | void PollLocalUserInput()
    method OnSteamNetConnectionStatusChanged (line 630) | void OnSteamNetConnectionStatusChanged( SteamNetConnectionStatusChange...
    method SteamNetConnectionStatusChangedCallback (line 690) | static void SteamNetConnectionStatusChangedCallback( SteamNetConnectio...
    method PollConnectionStateChanges (line 695) | void PollConnectionStateChanges()
  function PrintUsageAndExit (line 706) | void PrintUsageAndExit( int rc = 1 )
  function main (line 719) | int main( int argc, const char *argv[] )

FILE: examples/trivial_signaling_client.cpp
  function closesocket (line 26) | inline void closesocket( SOCKET s ) { close(s); }
  function GetSocketError (line 27) | inline int GetSocketError() { return errno; }
  function IgnoreSocketError (line 28) | inline bool IgnoreSocketError( int e )
  function GetSocketError (line 40) | inline int GetSocketError() { return WSAGetLastError(); }
  function IgnoreSocketError (line 41) | inline bool IgnoreSocketError( int e )
  function HexDigitVal (line 47) | inline int HexDigitVal( char c )
  class CTrivialSignalingClient (line 59) | class CTrivialSignalingClient : public ITrivialSignalingClient
    type ConnectionSignaling (line 64) | struct ConnectionSignaling : ISteamNetworkingConnectionSignaling
      method ConnectionSignaling (line 69) | ConnectionSignaling( CTrivialSignalingClient *owner, const char *psz...
      method SendSignal (line 81) | virtual bool SendSignal( HSteamNetConnection hConn, const SteamNetCo...
      method Release (line 105) | virtual void Release() override
    method CloseSocket (line 121) | void CloseSocket()
    method Connect (line 132) | void Connect()
    method CTrivialSignalingClient (line 164) | CTrivialSignalingClient( const sockaddr *adrServer, size_t adrServerSi...
    method Send (line 184) | void Send( const std::string &s )
    method ISteamNetworkingConnectionSignaling (line 204) | ISteamNetworkingConnectionSignaling *CreateSignalingForConnection(
    method Poll (line 220) | virtual void Poll() override
    method Release (line 376) | virtual void Release() override
  function ITrivialSignalingClient (line 385) | ITrivialSignalingClient *CreateTrivialSignalingClient(

FILE: examples/trivial_signaling_client.h
  function class (line 12) | class ITrivialSignalingClient

FILE: examples/trivial_signaling_server.go
  constant DEFAULT_LISTEN_PORT (line 51) | DEFAULT_LISTEN_PORT = 10000
  function ServiceConnection (line 57) | func ServiceConnection(conn net.Conn) {
  function main (line 136) | func main() {

FILE: include/steam/isteamnetworkingmessages.h
  function class (line 36) | class ISteamNetworkingMessages
  type SteamNetworkingMessagesSessionRequest_t (line 136) | struct SteamNetworkingMessagesSessionRequest_t
  type SteamNetworkingMessagesSessionFailed_t (line 153) | struct SteamNetworkingMessagesSessionFailed_t
  function ISteamNetworkingMessages (line 173) | inline ISteamNetworkingMessages *SteamNetworkingMessages_Lib() { return ...
  function ISteamNetworkingMessages (line 177) | inline ISteamNetworkingMessages *SteamGameServerNetworkingMessages_Lib()...
  function ISteamNetworkingMessages (line 180) | inline ISteamNetworkingMessages *SteamNetworkingMessages() { return Stea...
  function ISteamNetworkingMessages (line 181) | inline ISteamNetworkingMessages *SteamGameServerNetworkingMessages() { r...
  function ISteamNetworkingMessages (line 193) | inline ISteamNetworkingMessages *SteamNetworkingMessages() { return Stea...
  function ISteamNetworkingMessages (line 194) | inline ISteamNetworkingMessages *SteamGameServerNetworkingMessages() { r...

FILE: include/steam/isteamnetworkingsockets.h
  type SteamNetAuthenticationStatus_t (line 10) | struct SteamNetAuthenticationStatus_t
  type SteamNetworkingFakeIPResult_t (line 11) | struct SteamNetworkingFakeIPResult_t
  function class (line 42) | class ISteamNetworkingSockets
  function ISteamNetworkingSockets (line 928) | inline ISteamNetworkingSockets *SteamNetworkingSockets_Lib() { return St...
  function ISteamNetworkingSockets (line 931) | inline ISteamNetworkingSockets *SteamGameServerNetworkingSockets_Lib() {...
  function ISteamNetworkingSockets (line 934) | inline ISteamNetworkingSockets *SteamNetworkingSockets() { return SteamN...
  function ISteamNetworkingSockets (line 935) | inline ISteamNetworkingSockets *SteamGameServerNetworkingSockets() { ret...
  function ISteamNetworkingSockets (line 945) | inline ISteamNetworkingSockets *SteamNetworkingSockets() { return SteamN...
  function ISteamNetworkingSockets (line 946) | inline ISteamNetworkingSockets *SteamGameServerNetworkingSockets() { ret...
  type SteamNetConnectionStatusChangedCallback_t (line 994) | struct SteamNetConnectionStatusChangedCallback_t
  type SteamNetAuthenticationStatus_t (line 1016) | struct SteamNetAuthenticationStatus_t

FILE: include/steam/isteamnetworkingutils.h
  type SteamDatagramRelayAuthTicket (line 14) | struct SteamDatagramRelayAuthTicket
  type SteamRelayNetworkStatus_t (line 15) | struct SteamRelayNetworkStatus_t
  function class (line 20) | class ISteamNetworkingUtils
  function ISteamNetworkingUtils (line 363) | inline ISteamNetworkingUtils *SteamNetworkingUtils_Lib() { return SteamN...
  function ISteamNetworkingUtils (line 366) | inline ISteamNetworkingUtils *SteamNetworkingUtils() { return SteamNetwo...
  function ISteamNetworkingUtils (line 383) | inline ISteamNetworkingUtils *SteamNetworkingUtils() { return SteamNetwo...
  type SteamRelayNetworkStatus_t (line 390) | struct SteamRelayNetworkStatus_t
  type SteamNetworkingIdentityRender (line 426) | struct SteamNetworkingIdentityRender
  type SteamNetworkingIPAddrRender (line 435) | struct SteamNetworkingIPAddrRender
  function InitRelayNetworkAccess (line 449) | inline void ISteamNetworkingUtils::InitRelayNetworkAccess() { CheckPingD...
  function SetGlobalConfigValueInt32 (line 450) | inline bool ISteamNetworkingUtils::SetGlobalConfigValueInt32( ESteamNetw...
  function SetGlobalConfigValueFloat (line 451) | inline bool ISteamNetworkingUtils::SetGlobalConfigValueFloat( ESteamNetw...
  function SetGlobalConfigValueString (line 452) | inline bool ISteamNetworkingUtils::SetGlobalConfigValueString( ESteamNet...
  function SetGlobalConfigValuePtr (line 453) | inline bool ISteamNetworkingUtils::SetGlobalConfigValuePtr( ESteamNetwor...
  function SetConnectionConfigValueInt32 (line 454) | inline bool ISteamNetworkingUtils::SetConnectionConfigValueInt32( HSteam...
  function SetConnectionConfigValueFloat (line 455) | inline bool ISteamNetworkingUtils::SetConnectionConfigValueFloat( HSteam...
  function SetConnectionConfigValueString (line 456) | inline bool ISteamNetworkingUtils::SetConnectionConfigValueString( HStea...
  function SetGlobalCallback_SteamNetConnectionStatusChanged (line 457) | inline bool ISteamNetworkingUtils::SetGlobalCallback_SteamNetConnectionS...
  function SetGlobalCallback_SteamNetAuthenticationStatusChanged (line 458) | inline bool ISteamNetworkingUtils::SetGlobalCallback_SteamNetAuthenticat...
  function SetGlobalCallback_SteamRelayNetworkStatusChanged (line 459) | inline bool ISteamNetworkingUtils::SetGlobalCallback_SteamRelayNetworkSt...
  function SetGlobalCallback_FakeIPResult (line 460) | inline bool ISteamNetworkingUtils::SetGlobalCallback_FakeIPResult( FnSte...
  function SetGlobalCallback_MessagesSessionRequest (line 461) | inline bool ISteamNetworkingUtils::SetGlobalCallback_MessagesSessionRequ...
  function SetGlobalCallback_MessagesSessionFailed (line 462) | inline bool ISteamNetworkingUtils::SetGlobalCallback_MessagesSessionFail...
  function SetConfigValueStruct (line 464) | inline bool ISteamNetworkingUtils::SetConfigValueStruct( const SteamNetw...
  function ToString (line 483) | inline void SteamNetworkingIPAddr::ToString( char *buf, size_t cbBuf, bo...
  function ParseString (line 484) | inline bool SteamNetworkingIPAddr::ParseString( const char *pszStr ) { r...
  function ESteamNetworkingFakeIPType (line 485) | inline ESteamNetworkingFakeIPType SteamNetworkingIPAddr::GetFakeIPType()...
  function ToString (line 491) | inline void SteamNetworkingIPAddr::ToString( char *buf, size_t cbBuf, bo...
  function ParseString (line 492) | inline bool SteamNetworkingIPAddr::ParseString( const char *pszStr ) { r...
  function ToString (line 494) | inline void SteamNetworkingIdentity::ToString( char *buf, size_t cbBuf )...
  function ParseString (line 495) | inline bool SteamNetworkingIdentity::ParseString( const char *pszStr ) {...

FILE: include/steam/steam_api_common.h
  type int32 (line 17) | typedef int32 HSteamPipe;
  type int32 (line 19) | typedef int32 HSteamUser;

FILE: include/steam/steamclientpublic.h
  type EResult (line 14) | enum EResult
  type EVoiceResult (line 149) | enum EVoiceResult
  type EDenyReason (line 165) | enum EDenyReason
  type uint32 (line 186) | typedef uint32 HAuthTicket;
  type EBeginAuthSessionResult (line 190) | enum EBeginAuthSessionResult
  type EAuthSessionResponse (line 201) | enum EAuthSessionResponse
  type EUserHasLicenseForAppResult (line 217) | enum EUserHasLicenseForAppResult
  type EAccountType (line 226) | enum EAccountType
  type EChatEntryType (line 249) | enum EChatEntryType
  type EChatRoomEnterResponse (line 273) | enum EChatRoomEnterResponse
  type EChatSteamIDInstanceFlags (line 299) | enum EChatSteamIDInstanceFlags
  type ENotificationPosition (line 314) | enum ENotificationPosition
  type EBroadcastUploadResult (line 327) | enum EBroadcastUploadResult
  type EMarketNotAllowedReasonFlags (line 360) | enum EMarketNotAllowedReasonFlags
  type EDurationControlProgress (line 421) | enum EDurationControlProgress
  type EDurationControlNotification (line 437) | enum EDurationControlNotification
  type EDurationControlOnlineState (line 455) | enum EDurationControlOnlineState
  type EBetaBranchFlags (line 464) | enum EBetaBranchFlags
  function class (line 479) | class CSteamID
  function Set (line 547) | void Set( uint32 unAccountID, EUniverse eUniverse, EAccountType eAccount...
  function InstancedSet (line 570) | void InstancedSet( uint32 unAccountID, uint32 unInstance, EUniverse eUni...
  function FullSet (line 583) | void FullSet( uint64 ulIdentifier, EUniverse eUniverse, EAccountType eAc...
  function SetFromUint64 (line 596) | void SetFromUint64( uint64 ulSteamID )
  function Clear (line 605) | void Clear()
  function CreateBlankAnonLogon (line 640) | void CreateBlankAnonLogon( EUniverse eUniverse )
  function CreateBlankAnonUserLogon (line 652) | void CreateBlankAnonUserLogon( EUniverse eUniverse )
  function SetAccountID (line 762) | void SetAccountID( uint32 unAccountID )		{ m_steamid.m_comp.m_unAccountI...
  function SetAccountInstance (line 763) | void SetAccountInstance( uint32 unInstance ){ m_steamid.m_comp.m_unAccou...
  function SetEUniverse (line 769) | void SetEUniverse( EUniverse eUniverse )	{ m_steamid.m_comp.m_EUniverse ...
  function IsValid (line 770) | bool IsValid() const;
  function val (line 787) | inline bool operator<( const CSteamID &val ) const { return m_steamid.m_...
  function val (line 788) | inline bool operator>( const CSteamID &val ) const { return m_steamid.m_...
  type SteamIDComponent_t (line 804) | struct SteamIDComponent_t
  function CSteamID (line 859) | inline CSteamID SteamIDFromSteam2UserID( TSteamGlobalUserID *pTSteamGlob...
  function TSteamGlobalUserID (line 873) | inline TSteamGlobalUserID SteamIDToSteam2UserID( CSteamID steamID )
  function class (line 921) | class CGameID
  function explicit (line 940) | explicit CGameID( uint64 ulGameID )
  function explicit (line 951) | explicit CGameID( int32 nAppID )
  function explicit (line 957) | explicit CGameID( uint32 nAppID )
  function explicit (line 964) | explicit CGameID( uint32 nAppID, uint32 nModID, CGameID::EGameIDType nTy...
  function uint64 (line 992) | uint64 *GetUint64Ptr()
  function Set (line 997) | void Set( uint64 ulGameID )
  function operator (line 1036) | bool operator == ( const CGameID &rhs ) const
  function operator (line 1041) | bool operator != ( const CGameID &rhs ) const
  function operator (line 1046) | bool operator < ( const CGameID &rhs ) const
  function Reset (line 1076) | void Reset()
  type GameID_t (line 1085) | struct GameID_t
  type EGameSearchErrorCode_t (line 1118) | enum EGameSearchErrorCode_t
  type EPlayerResult_t (line 1131) | enum EPlayerResult_t
  type ESteamIPv6ConnectivityProtocol (line 1141) | enum ESteamIPv6ConnectivityProtocol
  type ESteamIPv6ConnectivityState (line 1149) | enum ESteamIPv6ConnectivityState
  type ValvePackingSentinel_t (line 1179) | typedef struct ValvePackingSentinel_t

FILE: include/steam/steamnetworkingcustomsignaling.h
  function class (line 24) | class ISteamNetworkingConnectionSignaling
  function class (line 60) | class ISteamNetworkingSignalingRecvContext
  type ISteamNetworkingConnectionSignaling (line 105) | typedef ISteamNetworkingConnectionSignaling * (*FnSteamNetworkingSockets...

FILE: include/steam/steamnetworkingsockets_flat.h
  type uint64 (line 20) | typedef uint64 uint64_steamid;
  type ISteamNetworkingConnectionSignaling (line 157) | typedef ISteamNetworkingConnectionSignaling * (*FSteamNetworkingCustomSi...

FILE: include/steam/steamnetworkingtypes.h
  type SteamDatagramRelayAuthTicket (line 55) | struct SteamDatagramRelayAuthTicket
  type SteamDatagramHostedAddress (line 56) | struct SteamDatagramHostedAddress
  type SteamDatagramGameCoordinatorServerLogin (line 57) | struct SteamDatagramGameCoordinatorServerLogin
  type SteamNetConnectionStatusChangedCallback_t (line 58) | struct SteamNetConnectionStatusChangedCallback_t
  type SteamNetAuthenticationStatus_t (line 59) | struct SteamNetAuthenticationStatus_t
  type SteamRelayNetworkStatus_t (line 60) | struct SteamRelayNetworkStatus_t
  type SteamNetworkingMessagesSessionRequest_t (line 61) | struct SteamNetworkingMessagesSessionRequest_t
  type SteamNetworkingMessagesSessionFailed_t (line 62) | struct SteamNetworkingMessagesSessionFailed_t
  type SteamNetworkingFakeIPResult_t (line 63) | struct SteamNetworkingFakeIPResult_t
  type uint32 (line 73) | typedef uint32 HSteamNetConnection;
  type uint32 (line 79) | typedef uint32 HSteamListenSocket;
  type uint32 (line 84) | typedef uint32 HSteamNetPollGroup;
  type uint32 (line 96) | typedef uint32 SteamNetworkingPOPID;
  type int64 (line 103) | typedef int64 SteamNetworkingMicroseconds;
  type ESteamNetworkingAvailability (line 106) | enum ESteamNetworkingAvailability
  type ESteamNetworkingIdentityType (line 137) | enum ESteamNetworkingIdentityType
  type ESteamNetworkingFakeIPType (line 188) | enum ESteamNetworkingFakeIPType
  type SteamNetworkingIPAddr (line 203) | struct SteamNetworkingIPAddr
  type SteamNetworkingIdentity (line 262) | struct SteamNetworkingIdentity
  function IsLocalHost (line 296) | bool IsLocalHost() const; // Return true if this identity is localhost.
  function SetString (line 1792) | inline void SetString( ESteamNetworkingConfigValue eVal, const char *dat...
  type ESteamNetworkingGetConfigValueResult (line 1801) | enum ESteamNetworkingGetConfigValueResult
  type ESteamNetworkingSocketsDebugOutputType (line 1818) | enum ESteamNetworkingSocketsDebugOutputType
  function SteamNetworkingPOPID (line 1841) | inline SteamNetworkingPOPID CalculateSteamNetworkingPOPIDFromString( con...
  function GetSteamNetworkingLocationPOPStringFromID (line 1869) | void GetSteamNetworkingLocationPOPStringFromID( SteamNetworkingPOPID id,...
  type SteamNetworkingPOPIDRender (line 1885) | struct SteamNetworkingPOPIDRender
  type SteamNetworkingMessage_t (line 1901) | typedef SteamNetworkingMessage_t ISteamNetworkingMessage;
  type SteamNetworkingErrMsg (line 1902) | typedef SteamNetworkingErrMsg SteamDatagramErrMsg;
  function Clear (line 1904) | inline void SteamNetworkingIPAddr::Clear() { memset( this, 0, sizeof(*th...
  function IsIPv6AllZeros (line 1905) | inline bool SteamNetworkingIPAddr::IsIPv6AllZeros() const { const uint64...
  function SetIPv4 (line 1907) | inline void SteamNetworkingIPAddr::SetIPv4( uint32 nIP, uint16 nPort ) {...
  function SetIPv6LocalHost (line 1910) | inline void SteamNetworkingIPAddr::SetIPv6LocalHost( uint16 nPort ) { m_...
  function Clear (line 1914) | inline void SteamNetworkingIdentity::Clear() { memset( this, 0, sizeof(*...
  function SetSteamID (line 1916) | inline void SteamNetworkingIdentity::SetSteamID( CSteamID steamID ) { Se...
  function CSteamID (line 1917) | inline CSteamID SteamNetworkingIdentity::GetSteamID() const { return CSt...
  function SetXboxPairwiseID (line 1920) | inline bool SteamNetworkingIdentity::SetXboxPairwiseID( const char *pszS...
  function SetPSNID (line 1923) | inline void SteamNetworkingIdentity::SetPSNID( uint64 id ) { m_eType = k...
  function SetIPAddr (line 1925) | inline void SteamNetworkingIdentity::SetIPAddr( const SteamNetworkingIPA...
  function SteamNetworkingIPAddr (line 1926) | inline const SteamNetworkingIPAddr *SteamNetworkingIdentity::GetIPAddr()...
  function SetIPv4Addr (line 1927) | inline void SteamNetworkingIdentity::SetIPv4Addr( uint32 nIPv4, uint16 n...
  function SetLocalHost (line 1930) | inline void SteamNetworkingIdentity::SetLocalHost() { m_eType = k_ESteam...
  function SetGenericString (line 1932) | inline bool SteamNetworkingIdentity::SetGenericString( const char *pszSt...
  function SetGenericBytes (line 1935) | inline bool SteamNetworkingIdentity::SetGenericBytes( const void *data, ...
  function uint8 (line 1937) | inline const uint8 *SteamNetworkingIdentity::GetGenericBytes( int &cbLen...
  function x (line 1939) | inline bool SteamNetworkingIdentity::operator==(const SteamNetworkingIde...
  function Release (line 1940) | inline void SteamNetworkingMessage_t::Release() { (*m_pfnRelease)( this ...

FILE: include/steam/steamtypes.h
  type uint8 (line 11) | typedef unsigned char uint8;
  type uint8 (line 34) | typedef unsigned char uint8;
  type int8 (line 35) | typedef signed char int8;
  type __int16 (line 39) | typedef __int16 int16;
  type uint16 (line 40) | typedef unsigned __int16 uint16;
  type __int32 (line 41) | typedef __int32 int32;
  type uint32 (line 42) | typedef unsigned __int32 uint32;
  type __int64 (line 43) | typedef __int64 int64;
  type uint64 (line 44) | typedef unsigned __int64 uint64;
  type int64 (line 46) | typedef int64 lint64;
  type uint64 (line 47) | typedef uint64 ulint64;
  type __int64 (line 50) | typedef __int64 intp;
  type uintp (line 51) | typedef unsigned __int64 uintp;
  type __int32 (line 53) | typedef __int32 intp;
  type uintp (line 54) | typedef unsigned __int32 uintp;
  type int16 (line 59) | typedef short int16;
  type uint16 (line 60) | typedef unsigned short uint16;
  type int32 (line 61) | typedef int int32;
  type uint32 (line 62) | typedef unsigned int uint32;
  type int64 (line 63) | typedef long long int64;
  type uint64 (line 64) | typedef unsigned long long uint64;
  type lint64 (line 72) | typedef long int lint64;
  type ulint64 (line 73) | typedef unsigned long int ulint64;
  type intp (line 76) | typedef long long intp;
  type uintp (line 77) | typedef unsigned long long uintp;
  type intp (line 79) | typedef int intp;
  type uintp (line 80) | typedef unsigned int uintp;
  type uint32 (line 85) | typedef uint32 AppId_t;
  type uint32 (line 89) | typedef uint32 DepotId_t;
  type uint32 (line 94) | typedef uint32 RTime32;
  type uint64 (line 97) | typedef uint64 SteamAPICall_t;
  type uint32 (line 100) | typedef uint32 AccountID_t;
  type uint64 (line 104) | typedef uint64 PartyBeaconID_t;
  type ESteamIPType (line 107) | enum ESteamIPType
  function else (line 115) | struct SteamIPAddress_t
  function SteamIPAddress_t (line 140) | static SteamIPAddress_t IPv4Any()
  function SteamIPAddress_t (line 149) | static SteamIPAddress_t IPv6Any()
  function SteamIPAddress_t (line 159) | static SteamIPAddress_t IPv4Loopback()
  function SteamIPAddress_t (line 168) | static SteamIPAddress_t IPv6Loopback()

FILE: include/steam/steamuniverse.h
  type EUniverse (line 15) | enum EUniverse

FILE: src/common/crypto.h
  function END_TIER1_NAMESPACE (line 13) | END_TIER1_NAMESPACE
  type ISymmetricEncryptContext (line 36) | struct ISymmetricEncryptContext
  type ISymmetricDecryptContext (line 50) | struct ISymmetricDecryptContext
  function class (line 65) | class AES_GCM_CipherContext : public SymmetricCryptContextBase
  function virtual (line 105) | virtual bool Decrypt(

FILE: src/common/crypto_25519.h
  function class (line 12) | class CEC25519KeyBase : public CCryptoKeyBase_RawBuffer
  function class (line 34) | class CEC25519PublicKeyBase : public CEC25519KeyBase
  function class (line 49) | class CEC25519PrivateKeyBase : public CEC25519KeyBase
  function class (line 76) | class CECKeyExchangePrivateKey : public CEC25519PrivateKeyBase
  function class (line 88) | class CECKeyExchangePublicKey : public CEC25519PublicKeyBase
  function class (line 105) | class CECSigningPrivateKey : public CEC25519PrivateKeyBase
  function class (line 132) | class CECSigningPublicKey : public CEC25519PublicKeyBase
  function namespace (line 151) | namespace CCrypto

FILE: src/common/crypto_25519_donna.cpp
  function cpuid (line 34) | static bool cpuid(uint32 function, uint32& out_eax, uint32& out_ebx, uin...
  function CheckSSE2Technology (line 102) | static bool CheckSSE2Technology()
  function uint32 (line 206) | uint32 CEC25519KeyBase::GetRawData( void *pData ) const

FILE: src/common/crypto_25519_libsodium.cpp
  function uint32 (line 22) | uint32 CEC25519KeyBase::GetRawData( void *pData ) const

FILE: src/common/crypto_25519_openssl.cpp
  function uint32 (line 25) | uint32 CEC25519KeyBase::GetRawData( void *pData ) const

FILE: src/common/crypto_bcrypt.cpp
  type _BCryptContext (line 33) | struct _BCryptContext {
    method _BCryptContext (line 39) | _BCryptContext() {

FILE: src/common/crypto_digest_opensslevp.cpp
  function EVP_MD_CTX_free (line 15) | inline void EVP_MD_CTX_free( EVP_MD_CTX *ctx )
  class EVPCTXPointer (line 22) | class EVPCTXPointer
    method EVPCTXPointer (line 27) | EVPCTXPointer() { this->ctx = NULL; }
    method EVPCTXPointer (line 28) | EVPCTXPointer(CTXType ctx) { this->ctx = ctx; }

FILE: src/common/crypto_openssl.cpp
  function OneTimeCryptoInitOpenSSL (line 25) | void OneTimeCryptoInitOpenSSL()

FILE: src/common/crypto_textencode.cpp
  function uint32 (line 150) | uint32 CCrypto::Base64EncodeMaxOutput( size_t cubData, const char *pszLi...
  function BParsePEMHeaderOrFooter (line 434) | inline bool BParsePEMHeaderOrFooter( const char *&pchPEM, const char *pc...

FILE: src/common/keypair.cpp
  function BCheckAndEatBytes (line 15) | static bool BCheckAndEatBytes( CUtlBuffer &buf, const void *data, int sz )
  function BOpenSSHGetUInt32 (line 25) | static bool BOpenSSHGetUInt32( CUtlBuffer &buf, uint32 &result )
  function OpenSSHWriteUInt32 (line 34) | static void OpenSSHWriteUInt32( CUtlBuffer &buf, uint32 data )
  function BOpenSSHBinaryEd25519CheckAndEatKeyType (line 42) | static bool BOpenSSHBinaryEd25519CheckAndEatKeyType( CUtlBuffer &buf )
  function OpenSSHBinaryEd25519WriteKeyType (line 47) | static void OpenSSHBinaryEd25519WriteKeyType( CUtlBuffer &buf )
  function BOpenSSHBinaryReadFixedSizeKey (line 52) | static bool BOpenSSHBinaryReadFixedSizeKey( CUtlBuffer &buf, void *pOut,...
  function OpenSSHBinaryWriteFixedSizeKey (line 64) | static void OpenSSHBinaryWriteFixedSizeKey( CUtlBuffer &buf, const void ...
  function BParseOpenSSHBinaryEd25519Private (line 70) | static bool BParseOpenSSHBinaryEd25519Private( CUtlBuffer &buf, uint8 *p...
  function OpenSSHBinaryBeginSubBlock (line 173) | static int OpenSSHBinaryBeginSubBlock( CUtlBuffer &buf )
  function OpenSSHBinaryEndSubBlock (line 180) | static void OpenSSHBinaryEndSubBlock( CUtlBuffer &buf, int nSaveTell )
  function OpenSSHBinaryWriteEd25519Private (line 187) | static void OpenSSHBinaryWriteEd25519Private( CUtlBuffer &buf, const uin...
  function BParseOpenSSHBinaryEd25519Public (line 234) | static bool BParseOpenSSHBinaryEd25519Public( CUtlBuffer &buf, uint8 *pK...
  function OpenSSHBinaryEd25519WritePublic (line 246) | static void OpenSSHBinaryEd25519WritePublic( CUtlBuffer &buf, const uint...
  function GetBinaryDataAsPEM (line 253) | static bool GetBinaryDataAsPEM( char *pchPEMData, uint32_t cubPEMData, u...
  function uint32 (line 422) | uint32 CCryptoKeyBase_RawBuffer::GetRawData( void *pData ) const

FILE: src/common/keypair.h
  type ECryptoKeyType (line 26) | enum ECryptoKeyType
  function class (line 43) | class CCryptoKeyBase
  function class (line 115) | class CCryptoKeyBase_RawBuffer : public CCryptoKeyBase

FILE: src/common/opensslwrapper.cpp
  type CRYPTO_dynlock_value (line 29) | struct CRYPTO_dynlock_value
  function RAND_CryptoGenRandom_bytes (line 41) | static int RAND_CryptoGenRandom_bytes( unsigned char *buf, int num ) {
  function RAND_CryptoGenRandom_status (line 45) | static int RAND_CryptoGenRandom_status() { return 1; }
  function CRYPTO_dynlock_value (line 149) | CRYPTO_dynlock_value* COpenSSLWrapper::OpenSSLDynLockCreateCallback( con...

FILE: src/common/opensslwrapper.h
  type CRYPTO_dynlock_value (line 14) | struct CRYPTO_dynlock_value
  function class (line 20) | class COpenSSLWrapper

FILE: src/common/percentile_generator.h
  function Clear (line 28) | void Clear() { m_nSamples = m_nSamplesTotal = 0; m_bNeedSort = false; }
  function MaxSamples (line 41) | static int MaxSamples() { return MAX_SAMPLES; }
  function T (line 54) | const T *RawSamples() const { return m_arSamples; }
  function T (line 55) | T *MutableRawSamples() { m_bNeedSort = true; return m_arSamples; }
  function SetNumSamples (line 56) | void SetNumSamples( int n ) { m_nSamples = n; }
  function SetNumSamplesTotal (line 57) | void SetNumSamplesTotal( int n ) { m_nSamplesTotal = n; }
  function SetNeedSort (line 58) | void SetNeedSort() { m_bNeedSort = true; }

FILE: src/common/steamid.cpp
  function CSteamID (line 595) | CSteamID ChatIDFromSteamID( const CSteamID &steamID )
  function CSteamID (line 610) | CSteamID ClanIDFromSteamID( const CSteamID &steamID )
  function CSteamID (line 620) | CSteamID ChatIDFromClanID( const CSteamID &steamIDClan )
  function CSteamID (line 629) | CSteamID ClanIDFromChatID( const CSteamID &steamIDChat )

FILE: src/common/steamid.h
  function uint32 (line 10) | inline uint32 HashItem( const CSteamID &item )

FILE: src/external/curve25519-donna/curve25519-donna-32bit.h
  function DONNA_INLINE (line 7) | DONNA_INLINE static void
  function DONNA_INLINE (line 22) | DONNA_INLINE static void
  function DONNA_INLINE (line 37) | DONNA_INLINE static void
  function DONNA_INLINE (line 54) | DONNA_INLINE static void
  function DONNA_INLINE (line 72) | DONNA_INLINE static void
  function DONNA_INLINE (line 170) | DONNA_INLINE static void
  function curve25519_square_times (line 245) | static void
  function curve25519_expand (line 322) | static void
  function curve25519_contract (line 366) | static void
  function DONNA_INLINE (line 450) | DONNA_INLINE static void

FILE: src/external/curve25519-donna/curve25519-donna-64bit.h
  function DONNA_INLINE (line 7) | DONNA_INLINE static void
  function DONNA_INLINE (line 17) | DONNA_INLINE static void
  function DONNA_INLINE (line 30) | DONNA_INLINE static void
  function DONNA_INLINE (line 41) | DONNA_INLINE static void
  function DONNA_INLINE (line 64) | DONNA_INLINE static void
  function DONNA_INLINE (line 131) | DONNA_INLINE static void
  function DONNA_INLINE (line 183) | DONNA_INLINE static void
  function DONNA_INLINE (line 235) | DONNA_INLINE static void
  function DONNA_INLINE (line 272) | DONNA_INLINE static void
  function DONNA_INLINE (line 333) | DONNA_INLINE static void

FILE: src/external/curve25519-donna/curve25519-donna-common.h
  function curve25519_pow_two5mtwo0_two250mtwo0 (line 5) | static void

FILE: src/external/curve25519-donna/curve25519-donna-portable.h
  type uint128_t (line 36) | typedef unsigned __int128 uint128_t;
  type uint128_t (line 39) | typedef struct uint128_t {
  type uint128_t (line 54) | typedef unsigned __int128 uint128_t;
  type uint128_t (line 57) | typedef unsigned uint128_t __attribute__((mode(TI)));
  type uint128_t (line 60) | typedef struct uint128_t {

FILE: src/external/curve25519-donna/curve25519-donna-scalarmult-base.h
  function curve25519_scalarmult_donna (line 8) | static void

FILE: src/external/curve25519-donna/curve25519-donna-scalarmult-sse2.h
  function curve25519_scalarmult_donna (line 8) | static void

FILE: src/external/curve25519-donna/curve25519-donna-sse2.h
  type __m128i (line 2) | typedef __m128i xmmi;
  type packedelem8 (line 4) | typedef union packedelem8_t {
  type packedelem32 (line 9) | typedef union packedelem32_t {
  type packedelem64 (line 14) | typedef union packedelem64_t {
  type packedelem32 (line 21) | typedef packedelem32 packed32bignum25519[5];
  type packedelem64 (line 22) | typedef packedelem64 packed64bignum25519[10];
  function DONNA_INLINE (line 58) | DONNA_INLINE static void
  function DONNA_INLINE (line 70) | DONNA_INLINE static void
  function DONNA_INLINE (line 101) | DONNA_INLINE static void
  function DONNA_INLINE (line 167) | DONNA_INLINE static void
  function DONNA_INLINE (line 200) | DONNA_INLINE static void
  function DONNA_INLINE (line 219) | DONNA_INLINE static void
  function DONNA_INLINE (line 230) | DONNA_INLINE static void
  function DONNA_INLINE (line 240) | DONNA_INLINE static void
  function DONNA_INLINE (line 273) | DONNA_INLINE static void
  function curve25519_mul (line 329) | static void
  type bignum25519mulprecomp (line 473) | typedef struct bignum25519mulprecomp_t {
  function DONNA_INLINE (line 480) | DONNA_INLINE static void
  function DONNA_INLINE (line 514) | DONNA_INLINE static void
  function curve25519_square_times (line 629) | static void
  function DONNA_INLINE (line 755) | DONNA_INLINE static void
  function DONNA_INLINE (line 814) | DONNA_INLINE static void
  function DONNA_INLINE (line 839) | DONNA_INLINE static void
  function DONNA_INLINE (line 854) | DONNA_INLINE static void
  function DONNA_INLINE (line 901) | DONNA_INLINE static void
  function DONNA_INLINE (line 932) | DONNA_INLINE static void
  function DONNA_INLINE (line 957) | DONNA_INLINE static void

FILE: src/external/curve25519-donna/test-ticks.h
  function get_ticks (line 4) | static uint64_t

FILE: src/external/curve25519-donna/test.c
  function curveassert_die (line 12) | static void
  function curveassert_equal (line 25) | static void
  function test_main (line 61) | static void
  function main (line 100) | int

FILE: src/external/ed25519-donna/curve25519-donna-32bit.h
  function DONNA_INLINE (line 16) | DONNA_INLINE static void
  function DONNA_INLINE (line 31) | DONNA_INLINE static void
  function DONNA_INLINE (line 45) | DONNA_INLINE static void
  function DONNA_INLINE (line 61) | DONNA_INLINE static void
  function DONNA_INLINE (line 86) | DONNA_INLINE static void
  function DONNA_INLINE (line 102) | DONNA_INLINE static void
  function DONNA_INLINE (line 118) | DONNA_INLINE static void
  function DONNA_INLINE (line 135) | DONNA_INLINE static void
  function curve25519_mul (line 153) | static void
  function curve25519_square (line 251) | static void
  function curve25519_square_times (line 326) | static void
  function curve25519_expand (line 402) | static void
  function curve25519_contract (line 448) | static void
  function DONNA_INLINE (line 531) | DONNA_INLINE static void
  function DONNA_INLINE (line 564) | DONNA_INLINE static void

FILE: src/external/ed25519-donna/curve25519-donna-64bit.h
  function DONNA_INLINE (line 16) | DONNA_INLINE static void
  function DONNA_INLINE (line 26) | DONNA_INLINE static void
  function DONNA_INLINE (line 36) | DONNA_INLINE static void
  function DONNA_INLINE (line 45) | DONNA_INLINE static void
  function DONNA_INLINE (line 63) | DONNA_INLINE static void
  function DONNA_INLINE (line 73) | DONNA_INLINE static void
  function DONNA_INLINE (line 82) | DONNA_INLINE static void
  function DONNA_INLINE (line 94) | DONNA_INLINE static void
  function DONNA_INLINE (line 106) | DONNA_INLINE static void
  function DONNA_NOINLINE (line 173) | DONNA_NOINLINE static void
  function DONNA_NOINLINE (line 179) | DONNA_NOINLINE static void
  function DONNA_INLINE (line 236) | DONNA_INLINE static void
  function DONNA_INLINE (line 287) | DONNA_INLINE static void
  function DONNA_INLINE (line 324) | DONNA_INLINE static void
  function DONNA_INLINE (line 378) | DONNA_INLINE static void
  function DONNA_INLINE (line 398) | DONNA_INLINE static void

FILE: src/external/ed25519-donna/curve25519-donna-helpers.h
  function bignum25519 (line 38) | bignum25519 ALIGN(16) a,t0,b;

FILE: src/external/ed25519-donna/curve25519-donna-sse2.h
  type __m128i (line 9) | typedef __m128i xmmi;
  type packedelem8 (line 11) | typedef union packedelem8_t {
  type packedelem32 (line 16) | typedef union packedelem32_t {
  type packedelem64 (line 21) | typedef union packedelem64_t {
  type packedelem32 (line 28) | typedef packedelem32 packed32bignum25519[5];
  type packedelem64 (line 29) | typedef packedelem64 packed64bignum25519[10];
  function DONNA_INLINE (line 70) | DONNA_INLINE static void
  function DONNA_INLINE (line 82) | DONNA_INLINE static void
  function DONNA_INLINE (line 100) | DONNA_INLINE static void
  function DONNA_INLINE (line 134) | DONNA_INLINE static void
  function DONNA_INLINE (line 171) | DONNA_INLINE static void
  function DONNA_INLINE (line 208) | DONNA_INLINE static void
  function DONNA_INLINE (line 246) | DONNA_INLINE static void
  function curve25519_mul (line 282) | static void
  function DONNA_NOINLINE (line 426) | DONNA_NOINLINE static void
  function curve25519_square_times (line 432) | static void
  function DONNA_INLINE (line 557) | DONNA_INLINE static void
  function DONNA_INLINE (line 575) | DONNA_INLINE static void
  function DONNA_INLINE (line 593) | DONNA_INLINE static void
  function DONNA_INLINE (line 625) | DONNA_INLINE static void
  function DONNA_INLINE (line 634) | DONNA_INLINE static void
  function DONNA_INLINE (line 666) | DONNA_INLINE static void
  function DONNA_INLINE (line 703) | DONNA_INLINE static void
  function DONNA_INLINE (line 746) | DONNA_INLINE static void
  function DONNA_INLINE (line 764) | DONNA_INLINE static void
  function DONNA_INLINE (line 784) | DONNA_INLINE static void
  function DONNA_INLINE (line 798) | DONNA_INLINE static void
  function DONNA_INLINE (line 808) | DONNA_INLINE static void
  function DONNA_INLINE (line 863) | DONNA_INLINE static void
  function curve25519_expand (line 923) | static void
  function curve25519_contract (line 953) | static void
  function DONNA_INLINE (line 1035) | DONNA_INLINE static void
  function DONNA_INLINE (line 1069) | DONNA_INLINE static void

FILE: src/external/ed25519-donna/ed25519-donna-32bit-sse2.h
  function DONNA_NOINLINE (line 5) | DONNA_NOINLINE static void

FILE: src/external/ed25519-donna/ed25519-donna-64bit-sse2.h
  function DONNA_NOINLINE (line 5) | DONNA_NOINLINE static void

FILE: src/external/ed25519-donna/ed25519-donna-64bit-x86-32bit.h
  function DONNA_NOINLINE (line 5) | DONNA_NOINLINE static void

FILE: src/external/ed25519-donna/ed25519-donna-64bit-x86.h
  function DONNA_NOINLINE (line 5) | DONNA_NOINLINE static void

FILE: src/external/ed25519-donna/ed25519-donna-batchverify.h
  type heap_index_t (line 11) | typedef size_t heap_index_t;
  type batch_heap (line 13) | typedef struct batch_heap_t {
  function heap_swap (line 22) | static void
  function heap_insert_next (line 31) | static void
  function heap_updated_root (line 51) | static void
  function heap_build (line 80) | static void
  function heap_extend (line 89) | static void
  function heap_get_top2 (line 96) | static void
  function ge25519_multi_scalarmult_vartime_final (line 106) | static void
  function ge25519_multi_scalarmult_vartime (line 151) | static void
  function ge25519_is_neutral_vartime (line 193) | static int

FILE: src/external/ed25519-donna/ed25519-donna-impl-base.h
  function DONNA_INLINE (line 5) | DONNA_INLINE static void
  function DONNA_INLINE (line 12) | DONNA_INLINE static void
  function ge25519_full_to_pniels (line 20) | static void
  function ge25519_add_p1p1 (line 32) | static void
  function ge25519_double_p1p1 (line 53) | static void
  function ge25519_nielsadd2_p1p1 (line 69) | static void
  function ge25519_pnielsadd_p1p1 (line 88) | static void
  function ge25519_double_partial (line 108) | static void
  function ge25519_double (line 115) | static void
  function ge25519_add (line 122) | static void
  function ge25519_nielsadd2 (line 129) | static void
  function ge25519_pnielsadd (line 149) | static void
  function ge25519_pack (line 179) | static void
  function ge25519_unpack_negative_vartime (line 191) | static int
  function ge25519_double_scalarmult_vartime (line 252) | static void
  function ge25519_windowb_equal (line 298) | static uint32_t
  function ge25519_scalarmult_base_choose_niels (line 303) | static void
  function ge25519_scalarmult_base_niels (line 334) | static void

FILE: src/external/ed25519-donna/ed25519-donna-impl-sse2.h
  function packed64bignum25519 (line 17) | packed64bignum25519 ALIGN(16) zy, xt, xx, zz, ty;
  function bignum25519 (line 121) | bignum25519 ALIGN(16) a,b,c;
  function ge25519_add (line 152) | static void
  function ge25519_double_partial (line 159) | static void
  function bignum25519 (line 210) | bignum25519 ALIGN(16) tx, ty, zi;
  function ge25519_double_scalarmult_vartime (line 283) | static void
  function ge25519_windowb_equal (line 327) | static uint32_t
  function bignum25519 (line 334) | bignum25519 ALIGN(16) neg;

FILE: src/external/ed25519-donna/ed25519-donna-portable.h
  type uint128_t (line 36) | typedef unsigned __int128 uint128_t;
  type uint128_t (line 39) | typedef struct uint128_t {
  type uint128_t (line 54) | typedef unsigned __int128 uint128_t;
  type uint128_t (line 57) | typedef unsigned uint128_t __attribute__((mode(TI)));
  type uint128_t (line 60) | typedef struct uint128_t {
  function U32TO8_LE (line 95) | static inline void U32TO8_LE(unsigned char *p, const uint32_t v) {
  function U8TO32_LE (line 104) | static inline uint32_t U8TO32_LE(const unsigned char *p) {
  function U8TO64_LE (line 112) | static inline uint64_t U8TO64_LE(const unsigned char *p) {
  function U64TO8_LE (line 124) | static inline void U64TO8_LE(unsigned char *p, const uint64_t v) {

FILE: src/external/ed25519-donna/ed25519-donna.h
  function ed25519_verify (line 66) | static int
  type ge25519 (line 81) | typedef struct ge25519_t {
  type ge25519_p1p1 (line 85) | typedef struct ge25519_p1p1_t {
  type ge25519_niels (line 89) | typedef struct ge25519_niels_t {
  type ge25519_pniels (line 93) | typedef struct ge25519_pniels_t {

FILE: src/external/ed25519-donna/ed25519-hash-bcrypt.h
  type ed25519_hash_context (line 4) | typedef struct {
  function ed25519_hash_init (line 11) | static void
  function ed25519_hash_update (line 22) | static void
  function ed25519_hash_final (line 28) | static void
  function ed25519_hash (line 37) | static void

FILE: src/external/ed25519-donna/ed25519-hash-openssl.h
  type SHA512_CTX (line 3) | typedef SHA512_CTX ed25519_hash_context;
  function ed25519_hash_init (line 5) | static void
  function ed25519_hash_update (line 10) | static void
  function ed25519_hash_final (line 15) | static void
  function ed25519_hash (line 20) | static void

FILE: src/external/ed25519-donna/ed25519-hash-ref.h
  type sha512_state (line 6) | typedef struct sha512_state_t {
  type sha512_state (line 13) | typedef sha512_state ed25519_hash_context;
  function sha512_ROTR64 (line 38) | static uint64_t
  function sha512_LOAD64_BE (line 43) | static uint64_t
  function sha512_STORE64_BE (line 56) | static void
  function sha512_blocks (line 88) | static void
  function ed25519_hash_init (line 106) | static void
  function ed25519_hash_update (line 121) | static void
  function ed25519_hash_final (line 151) | static void
  function ed25519_hash (line 178) | static void

FILE: src/external/ed25519-donna/ed25519-randombytes.h
  type isaacp_state (line 8) | typedef struct isaacp_state_t {
  function isaacp_mix (line 23) | static void
  function isaacp_random (line 46) | static void

FILE: src/external/ed25519-donna/ed25519.c
  function DONNA_INLINE (line 26) | DONNA_INLINE static void
  function ed25519_hram (line 34) | static void
  function ge25519 (line 62) | ge25519 ALIGN(16) R;

FILE: src/external/ed25519-donna/ed25519_VALVE.c
  type ulong32 (line 17) | typedef unsigned int ulong32;
  type ulong64 (line 29) | typedef unsigned __int64 ulong64;
  type ulong64 (line 32) | typedef unsigned long long ulong64;
  type sha512_state (line 35) | struct sha512_state {
  type hash_state (line 41) | typedef union Hash_state {
  function sha512_compress (line 203) | static int  sha512_compress(hash_state * md, unsigned char *buf)
  function sha512_compress (line 268) | static int sha512_compress(hash_state * md, unsigned char *buf)
  function sha512_init (line 282) | static int sha512_init(hash_state * md)
  function sha512_done (line 305) | static HASH_PROCESS(sha512_process, sha512_compress, sha512, 128)
  type hash_state (line 366) | typedef hash_state ed25519_hash_context;
  function ed25519_hash_init (line 367) | static void ed25519_hash_init( ed25519_hash_context *ctx ) { sha512_init...
  function ed25519_hash_update (line 368) | static void ed25519_hash_update( ed25519_hash_context *ctx, const uint8_...
  function ed25519_hash_final (line 369) | static void ed25519_hash_final( ed25519_hash_context *ctx, uint8_t *hash...
  function ed25519_hash (line 370) | static void ed25519_hash( uint8_t *hash, const uint8_t *in, size_t inlen...

FILE: src/external/ed25519-donna/fuzz/curve25519-ref10.c
  type crypto_int32 (line 3) | typedef int32_t crypto_int32;
  type crypto_int64 (line 4) | typedef int64_t crypto_int64;
  type crypto_uint64 (line 5) | typedef uint64_t crypto_uint64;
  type crypto_int32 (line 7) | typedef crypto_int32 fe[10];
  function fe_0 (line 13) | void fe_0(fe h)
  function fe_1 (line 31) | void fe_1(fe h)
  function fe_add (line 57) | void fe_add(fe h,fe f,fe g)
  function fe_copy (line 105) | void fe_copy(fe h,fe f)
  function fe_cswap (line 137) | void fe_cswap(fe f,fe g,unsigned int b)
  function crypto_uint64 (line 202) | static crypto_uint64 load_3(const unsigned char *in)
  function crypto_uint64 (line 211) | static crypto_uint64 load_4(const unsigned char *in)
  function fe_frombytes (line 221) | void fe_frombytes(fe h,const unsigned char *s)
  function fe_mul (line 301) | void fe_mul(fe h,fe f,fe g)
  function fe_mul121666 (line 531) | void fe_mul121666(fe h,fe f)
  function fe_sq (line 603) | void fe_sq(fe h,fe f)
  function fe_sub (line 747) | void fe_sub(fe h,fe f,fe g)
  function fe_tobytes (line 816) | void fe_tobytes(unsigned char *s,fe h)
  function fe_invert (line 909) | void fe_invert(fe out,fe z)
  function crypto_scalarmult_ref10 (line 1082) | int crypto_scalarmult_ref10(unsigned char *q,
  function crypto_scalarmult_base_ref10 (line 1268) | int crypto_scalarmult_base_ref10(unsigned char *q,const unsigned char *n)

FILE: src/external/ed25519-donna/fuzz/ed25519-ref10.c
  function crypto_verify_32 (line 5) | static int crypto_verify_32(const unsigned char *x,const unsigned char *y)
  type sha512_state (line 51) | typedef struct sha512_state_t {
  type sha512_state (line 58) | typedef sha512_state ed25519_hash_context;
  function sha512_ROTR64 (line 83) | static uint64_t
  function sha512_LOAD64_BE (line 88) | static uint64_t
  function sha512_STORE64_BE (line 101) | static void
  function sha512_blocks (line 133) | static void
  function ed25519_hash_init (line 151) | static void
  function ed25519_hash_update (line 166) | static void
  function ed25519_hash_final (line 196) | static void
  function crypto_hash_sha512 (line 223) | static void
  function crypto_hash_sha512 (line 235) | static void
  type crypto_int32 (line 245) | typedef int32_t crypto_int32;
  type crypto_uint32 (line 246) | typedef uint32_t crypto_uint32;
  type crypto_int64 (line 247) | typedef int64_t crypto_int64;
  type crypto_uint64 (line 248) | typedef uint64_t crypto_uint64;
  type crypto_int32 (line 250) | typedef crypto_int32 fe[10];
  function fe_0 (line 256) | static void fe_0(fe h)
  function fe_1 (line 274) | static void fe_1(fe h)
  function fe_add (line 300) | static void fe_add(fe h,const fe f,const fe g)
  function fe_cmov (line 352) | static void fe_cmov(fe f,const fe g,unsigned int b)
  function fe_copy (line 412) | static void fe_copy(fe h,const fe f)
  function crypto_uint64 (line 437) | static crypto_uint64 load_3(const unsigned char *in)
  function crypto_uint64 (line 446) | static crypto_uint64 load_4(const unsigned char *in)
  function fe_frombytes (line 460) | static void fe_frombytes(fe h,const unsigned char *s)
  function fe_tobytes (line 532) | static void fe_tobytes(unsigned char *s,const fe h)
  function fe_sub (line 638) | static void fe_sub(fe h,const fe f,const fe g)
  function fe_sq (line 698) | static void fe_sq(fe h,const fe f)
  function fe_sq2 (line 845) | static void fe_sq2(fe h,const fe f)
  function fe_mul (line 1020) | static void fe_mul(fe h,const fe f,const fe g)
  function fe_isnegative (line 1248) | static int fe_isnegative(const fe f)
  function fe_isnonzero (line 1266) | static int fe_isnonzero(const fe f)
  function fe_neg (line 1283) | static void fe_neg(fe h,const fe f)
  function fe_invert (line 1317) | static void fe_invert(fe out,const fe z)
  function fe_pow22523 (line 1490) | static void fe_pow22523(fe out,const fe z)
  type ge_p2 (line 1677) | typedef struct {
  type ge_p3 (line 1683) | typedef struct {
  type ge_p1p1 (line 1690) | typedef struct {
  type ge_precomp (line 1697) | typedef struct {
  type ge_cached (line 1703) | typedef struct {
  function ge_p2_0 (line 3114) | static void ge_p2_0(ge_p2 *h)
  function ge_p3_0 (line 3121) | static void ge_p3_0(ge_p3 *h)
  function ge_precomp_0 (line 3129) | static void ge_precomp_0(ge_precomp *h)
  function ge_p1p1_to_p2 (line 3140) | static void ge_p1p1_to_p2(ge_p2 *r,const ge_p1p1 *p)
  function ge_p1p1_to_p3 (line 3151) | static void ge_p1p1_to_p3(ge_p3 *r,const ge_p1p1 *p)
  function ge_p3_to_p2 (line 3163) | static void ge_p3_to_p2(ge_p2 *r,const ge_p3 *p)
  function ge_p2_dbl (line 3175) | static void ge_p2_dbl(ge_p1p1 *r,const ge_p2 *p)
  function ge_p3_dbl (line 3257) | static void ge_p3_dbl(ge_p1p1 *r,const ge_p3 *p)
  function ge_p3_to_cached (line 3269) | static void ge_p3_to_cached(ge_cached *r,const ge_p3 *p)
  function ge_add (line 3281) | static void ge_add(ge_p1p1 *r,const ge_p3 *p,const ge_cached *q)
  function ge_sub (line 3387) | static void ge_sub(ge_p1p1 *r,const ge_p3 *p,const ge_cached *q)
  function ge_madd (line 3493) | static void ge_madd(ge_p1p1 *r,const ge_p3 *p,const ge_precomp *q)
  function ge_msub (line 3590) | static void ge_msub(ge_p1p1 *r,const ge_p3 *p,const ge_precomp *q)
  function ge_p3_tobytes (line 3683) | static void ge_p3_tobytes(unsigned char *s,const ge_p3 *h)
  function ge_tobytes (line 3696) | static void ge_tobytes(unsigned char *s,const ge_p2 *h)
  function ge_frombytes_negate_vartime (line 3709) | static int ge_frombytes_negate_vartime(ge_p3 *h,const unsigned char *s)
  function slide (line 3751) | static void slide(signed char *r,const unsigned char *a)
  function ge_double_scalarmult_vartime (line 3791) | static void ge_double_scalarmult_vartime(ge_p2 *r,const unsigned char *a...
  function equal (line 3843) | static unsigned char equal(signed char b,signed char c)
  function negative (line 3854) | static unsigned char negative(signed char b)
  function cmov (line 3861) | static void cmov(ge_precomp *t,ge_precomp *u,unsigned char b)
  function select (line 3870) | static void select(ge_precomp *t,int pos,signed char b)
  function ge_scalarmult_base (line 3900) | static void ge_scalarmult_base(ge_p3 *h,const unsigned char *a)
  function sc_reduce (line 3953) | static void sc_reduce(unsigned char *s)
  function sc_muladd (line 4206) | static void sc_muladd(unsigned char *s,const unsigned char *a,const unsi...
  function crypto_sign_pk_ref10 (line 4561) | int crypto_sign_pk_ref10(unsigned char *pk,unsigned char *sk)
  function crypto_sign_ref10 (line 4579) | int crypto_sign_ref10(
  function crypto_sign_open_ref10 (line 4613) | int crypto_sign_open_ref10(

FILE: src/external/ed25519-donna/fuzz/fuzz-curve25519.c
  function print_diff (line 16) | static void
  function print_bytes (line 33) | static void
  function prng (line 47) | void

FILE: src/external/ed25519-donna/fuzz/fuzz-ed25519.c
  function print_diff (line 15) | static void
  function print_bytes (line 32) | static void
  function prng (line 46) | void

FILE: src/external/ed25519-donna/modm-donna-32bit.h
  type bignum256modm_element_t (line 18) | typedef uint32_t bignum256modm_element_t;
  type bignum256modm_element_t (line 19) | typedef bignum256modm_element_t bignum256modm[9];
  function bignum256modm_element_t (line 33) | static bignum256modm_element_t
  function reduce256_modm (line 39) | static void
  function barrett_reduce256_modm (line 74) | static void
  function add256_modm (line 143) | static void
  function mul256_modm (line 161) | static void
  function expand256_modm (line 207) | static void
  function expand_raw256_modm (line 260) | static void
  function contract256_modm (line 284) | static void
  function contract256_window4_modm (line 298) | static void
  function contract256_slidingwindow_modm (line 334) | static void
  function sub256_modm_batch (line 382) | static void
  function lt256_modm_batch (line 402) | static int
  function lte256_modm_batch (line 419) | static int
  function iszero256_modm_batch (line 437) | static int
  function isone256_modm_batch (line 447) | static int
  function isatmost128bits256_modm_batch (line 459) | static int

FILE: src/external/ed25519-donna/modm-donna-64bit.h
  type bignum256modm_element_t (line 18) | typedef uint64_t bignum256modm_element_t;
  type bignum256modm_element_t (line 19) | typedef bignum256modm_element_t bignum256modm[5];
  function bignum256modm_element_t (line 37) | static bignum256modm_element_t
  function reduce256_modm (line 42) | static void
  function barrett_reduce256_modm (line 65) | static void
  function add256_modm (line 110) | static void
  function mul256_modm (line 123) | static void
  function expand256_modm (line 152) | static void
  function expand_raw256_modm (line 189) | static void
  function contract256_modm (line 205) | static void
  function contract256_window4_modm (line 213) | static void
  function contract256_slidingwindow_modm (line 240) | static void
  function sub256_modm_batch (line 287) | static void
  function lt256_modm_batch (line 303) | static int
  function lte256_modm_batch (line 318) | static int
  function iszero256_modm_batch (line 333) | static int
  function isone256_modm_batch (line 343) | static int
  function isatmost128bits256_modm_batch (line 353) | static int

FILE: src/external/ed25519-donna/test-internals.c
  function bignum25519 (line 122) | bignum25519 ALIGN(16) a, b, c;

FILE: src/external/ed25519-donna/test-ticks.h
  function get_ticks (line 4) | static uint64_t

FILE: src/external/ed25519-donna/test.c
  function edassert (line 12) | static void
  function edassert_die (line 20) | static void
  function edassert_equal (line 33) | static void
  function edassert_equal_round (line 40) | static void
  type test_data (line 49) | typedef struct test_data_t {
  type batch_test (line 113) | typedef enum batch_test_t {
  function test_batch_instance (line 120) | static int
  function test_batch (line 178) | static void
  function test_main (line 211) | static void
  function main (line 254) | int

FILE: src/external/sha1-wpa/sha1-internal.c
  type SHA1_CTX (line 12) | typedef struct SHA1Context SHA1_CTX;
  function sha1_vector (line 25) | int sha1_vector(size_t num_elem, const u8 *addr[], const size_t *len, u8...
  function SHAPrintContext (line 151) | void SHAPrintContext(SHA1_CTX *context, char *msg)
  function SHA1Transform (line 166) | void SHA1Transform(u32 state[5], const unsigned char buffer[64])
  function SHA1Init (line 224) | void SHA1Init(SHA1_CTX* context)
  function SHA1Update (line 238) | void SHA1Update(SHA1_CTX* context, const void *_data, u32 len)
  function SHA1Final (line 268) | void SHA1Final(unsigned char digest[20], SHA1_CTX* context)

FILE: src/external/sha1-wpa/sha1.c
  function hmac_sha1_vector (line 21) | int hmac_sha1_vector(const u8 *key, size_t key_len, size_t num_elem,
  function hmac_sha1 (line 95) | int hmac_sha1(const u8 *key, size_t key_len, const u8 *data, size_t data...

FILE: src/external/sha1-wpa/sha1.h
  type u8 (line 21) | typedef uint8_t u8;
  type u32 (line 22) | typedef uint32_t u32;

FILE: src/external/sha1-wpa/sha1_i.h
  type SHA1Context (line 12) | struct SHA1Context {
  type SHA1Context (line 18) | struct SHA1Context
  type SHA1Context (line 19) | struct SHA1Context
  type SHA1Context (line 20) | struct SHA1Context

FILE: src/external/steamwebrtc/ice_session.cpp
  class CICESession (line 53) | class CICESession final : public IICESession, public sigslot::has_slots<...
    method BShuttingDown (line 62) | bool BShuttingDown() const { return m_bShuttingDown; }
    method SetWriteEvent_setsockopt (line 74) | virtual void SetWriteEvent_setsockopt( void (*fn)( int slevel, int sop...
    method SetWriteEvent_send (line 75) | virtual void SetWriteEvent_send( void (*fn)( int length ) ) override {...
    method SetWriteEvent_sendto (line 76) | virtual void SetWriteEvent_sendto( void (*fn)( void *addr, int length ...
  function IICESession (line 128) | IICESession *CreateWebRTCICESession( const ICESessionConfig &cfg, IICESe...
  type sched_param (line 210) | struct sched_param
  function EICECandidateType (line 440) | EICECandidateType GetICECandidateType( const cricket::Candidate &candida...
  function EICECandidateType (line 488) | EICECandidateType CICESession::AddRemoteIceCandidate( const char *pszCan...
  type SendPacktetInGoogleThread (line 509) | struct SendPacktetInGoogleThread : rtc::MessageData

FILE: src/external/steamwebrtc/ice_session.h
  function class (line 24) | class IICESessionDelegate
  function class (line 58) | class IICESession
  type IICESession (line 91) | typedef IICESession *( *CreateICESession_t )( const ICESessionConfig &cf...

FILE: src/external/steamwebrtc/webrtc_sdp.cc
  type cricket (line 106) | namespace cricket {
    class SessionDescription (line 107) | class SessionDescription
  type webrtc (line 112) | namespace webrtc {
    type SsrcInfo (line 263) | struct SsrcInfo {
    function ParseFailed (line 409) | static bool ParseFailed(const std::string& message,
    function ParseFailed (line 436) | static bool ParseFailed(const std::string& line,
    function ParseFailed (line 444) | static bool ParseFailed(const std::string& description, SdpParseError*...
    function ParseFailedExpectFieldNum (line 450) | static bool ParseFailedExpectFieldNum(const std::string& line,
    function ParseFailedExpectMinFieldNum (line 460) | static bool ParseFailedExpectMinFieldNum(const std::string& line,
    function ParseFailedGetValue (line 470) | static bool ParseFailedGetValue(const std::string& line,
    function ParseFailedExpectLine (line 482) | static bool ParseFailedExpectLine(const std::string& message,
    function AddLine (line 493) | static bool AddLine(const std::string& line, std::string* message) {
    function GetLine (line 502) | static bool GetLine(const std::string& message,
    function InitLine (line 541) | static void InitLine(const char type,
    function InitAttrLine (line 549) | static void InitAttrLine(const std::string& attribute, rtc::StringBuil...
    function AddAttributeLine (line 554) | static void AddAttributeLine(const std::string& attribute,
    function IsLineType (line 563) | static bool IsLineType(const std::string& message,
    function IsLineType (line 574) | static bool IsLineType(const std::string& line, const char type) {
    function GetLineWithType (line 578) | static bool GetLineWithType(const std::string& message,
    function HasAttribute (line 592) | static bool HasAttribute(const std::string& line,
    function AddSsrcLine (line 609) | static bool AddSsrcLine(uint32_t ssrc_id,
    function GetValue (line 623) | static bool GetValue(const std::string& message,
    function CaseInsensitiveFind (line 640) | static bool CaseInsensitiveFind(std::string str1, std::string str2) {
    function GetValueFromString (line 647) | static bool GetValueFromString(const std::string& line,
    function GetCandidatePreferenceFromType (line 770) | static int GetCandidatePreferenceFromType(const std::string& type) {
    function GetDefaultDestination (line 791) | static void GetDefaultDestination(const std::vector<Candidate>& candid...
    function GetRtcpLine (line 832) | static std::string GetRtcpLine(const std::vector<Candidate>& candidate...
    function GetCandidatesByMindex (line 853) | static void GetCandidatesByMindex(const SessionDescriptionInterface& d...
    function IsValidPort (line 866) | static bool IsValidPort(int port) {
    function SdpSerializeCandidate (line 966) | std::string SdpSerializeCandidate(const IceCandidateInterface& candida...
    function SdpSerializeCandidate (line 971) | std::string SdpSerializeCandidate(const cricket::Candidate& candidate) {
    function SdpDeserializeCandidate (line 1020) | bool SdpDeserializeCandidate(const std::string& message,
    function SdpDeserializeCandidate (line 1032) | bool SdpDeserializeCandidate(const std::string& transport_name,
    function ParseCandidate (line 1044) | bool ParseCandidate(const std::string& message,
    function ParseIceOptions (line 1246) | bool ParseIceOptions(const std::string& line,
    function ParseSctpPort (line 1261) | bool ParseSctpPort(const std::string& line,
    function ParseSctpMaxMessageSize (line 1282) | bool ParseSctpMaxMessageSize(const std::string& line,
    function GetMinValue (line 1876) | bool GetMinValue(const std::vector<int>& values, int* value) {
    function GetParameter (line 1885) | bool GetParameter(const std::string& name,
    function BuildCandidate (line 1985) | void BuildCandidate(const std::vector<Candidate>& candidates,
    function BuildIceOptions (line 2057) | void BuildIceOptions(const std::vector<std::string>& transport_options,

FILE: src/public/minbase/minbase_endian.h
  function T (line 24) | T WordSwapC( T w )
  function T (line 39) | T DWordSwapC( T dw )
  function T (line 57) | T QWordSwapC( T dw )
  function BigInt16 (line 112) | inline short BigInt16( int16 val )		{ int test = 1; return ( *(char *)&t...
  function uint16 (line 113) | inline uint16 BigWord( uint16 val )		{ int test = 1; return ( *(char *)&...
  function int32 (line 114) | inline int32 BigInt32( int32 val )		{ int test = 1; return ( *(char *)&t...
  function uint32 (line 115) | inline uint32 BigDWord( uint32 val )	{ int test = 1; return ( *(char *)&...
  function uint64 (line 116) | inline uint64 BigQWord( uint64 val )	{ int test = 1; return ( *(char *)&...
  function BigFloat (line 117) | inline float BigFloat( float val )		{ int test = 1; return ( *(char *)&t...
  function LittleInt16 (line 118) | inline short LittleInt16( int16 val )	{ int test = 1; return ( *(char *)...
  function uint16 (line 119) | inline uint16 LittleWord( uint16 val )	{ int test = 1; return ( *(char *...
  function LittleInt32 (line 120) | inline long LittleInt32( int32 val )		{ int test = 1; return ( *(char *)...
  function uint32 (line 121) | inline uint32 LittleDWord( uint32 val )	{ int test = 1; return ( *(char ...
  function uint64 (line 122) | inline uint64 LittleQWord( uint64 val )	{ int test = 1; return ( *(char ...
  function LittleFloat (line 123) | inline float LittleFloat( float val )	{ int test = 1; return ( *(char *)...

FILE: src/public/minbase/minbase_macros.h
  function PLAT_CPU_TIME (line 133) | inline __attribute__ ((always_inline)) unsigned long long PLAT_CPU_TIME()
  function PLAT_CPU_TIME (line 148) | FORCEINLINE unsigned __int64 PLAT_CPU_TIME()
  function PLAT_CPU_TIME (line 158) | FORCEINLINE unsigned long long PLAT_CPU_TIME()
  type ErrorIfIsPointerNotArrayGivenToARRAYSIZE (line 287) | struct ErrorIfIsPointerNotArrayGivenToARRAYSIZE

FILE: src/public/minbase/minbase_securezeromemory_impl.h
  function SecureZeroMemory (line 14) | inline void SecureZeroMemory( void* pMemory, size_t nBytes )

FILE: src/public/minbase/minbase_types.h
  type uint8 (line 17) | typedef unsigned char    uint8;
  type int8 (line 18) | typedef signed char      int8;
  type uint (line 21) | typedef unsigned int uint;
  type float32 (line 23) | typedef float  float32;
  type float64 (line 24) | typedef double float64;
  type __int16 (line 28) | typedef __int16 int16;
  type uint16 (line 29) | typedef unsigned __int16 uint16;
  type __int32 (line 30) | typedef __int32 int32;
  type uint32 (line 31) | typedef unsigned __int32 uint32;
  type __int64 (line 32) | typedef __int64 int64;
  type uint64 (line 33) | typedef unsigned __int64 uint64;
  type socklen_t (line 35) | typedef int socklen_t;
  type int16 (line 39) | typedef short int16;
  type uint16 (line 40) | typedef unsigned short uint16;
  type int32 (line 41) | typedef int int32;
  type uint32 (line 42) | typedef unsigned int uint32;
  type int64 (line 52) | typedef long long int int64;
  type uint64 (line 53) | typedef unsigned long long int uint64;
  type int64 (line 58) | typedef int64 intp;
  type uint64 (line 59) | typedef uint64 uintp;
  type intp (line 61) | typedef int intp;
  type uint (line 62) | typedef uint uintp;
  type int8 (line 69) | typedef int8 int8_t;
  type uint8 (line 70) | typedef uint8 uint8_t;
  type int16 (line 71) | typedef int16 int16_t;
  type uint16 (line 72) | typedef uint16 uint16_t;
  type int32 (line 73) | typedef int32 int32_t;
  type uint32 (line 74) | typedef uint32 uint32_t;
  type int64 (line 83) | typedef int64 int64_t;
  type uint64 (line 84) | typedef uint64 uint64_t;

FILE: src/public/tier0/basetypes.h
  type byte (line 19) | typedef unsigned char byte;
  type word (line 20) | typedef unsigned short word;
  function FORCEINLINE (line 25) | FORCEINLINE T const & Min( T const &val1, T const &val2 )
  function FORCEINLINE (line 33) | FORCEINLINE T const & Max( T const &val1, T const &val2 )
  function FORCEINLINE (line 39) | FORCEINLINE T const & Clamp( T const &val, T const &minVal, T const &max...
  function namespace (line 57) | namespace basetypes
  function FindMostSignificantBit (line 108) | inline int FindMostSignificantBit( uint32 n )
  function FindMostSignificantBit64 (line 125) | inline int FindMostSignificantBit64( uint64 n )
  function FindLeastSignificantBit (line 146) | inline int FindLeastSignificantBit( uint32 n )
  function FindLeastSignificantBit64 (line 162) | inline int FindLeastSignificantBit64( uint64 n )

FILE: src/public/tier0/dbg.h
  function DEST_POINTER_TYPE (line 154) | DEST_POINTER_TYPE assert_cast(SOURCE_POINTER_TYPE* pSource)

FILE: src/public/tier0/platform.h
  type SOCKET (line 34) | typedef int SOCKET;
  type uintp (line 37) | typedef uintp SOCKET;
  function GetLastError (line 70) | inline int GetLastError() { return errno; }
  function Construct (line 85) | void Construct( T* pMemory )
  function T (line 94) | T* ValueInitializeConstruct( T* pMemory )
  function Destruct (line 108) | void Destruct( T* pMemory )

FILE: src/public/tier0/platform_sockets.h
  function SetSocketNonBlocking (line 49) | inline bool SetSocketNonBlocking( SOCKET s )
  type HANDLE (line 56) | typedef HANDLE ThreadWakeEvent;
  function SetWakeThreadEvent (line 58) | inline void SetWakeThreadEvent( ThreadWakeEvent hEvent )
  function GetLastSocketError (line 63) | inline int GetLastSocketError()
  function SetSocketNonBlocking (line 102) | inline bool SetSocketNonBlocking( SOCKET s )
  function GetLastSocketError (line 108) | inline int GetLastSocketError()
  type EPollHandle (line 126) | typedef int EPollHandle;
  function EPollHandle (line 128) | inline EPollHandle EPollCreate( SteamNetworkingErrMsg &errMsg )

FILE: src/public/tier0/valve_tracelogging.h
  function ULONG (line 117) | inline ULONG EVNTAPI EventRegister( LPCGUID ProviderId, PENABLECALLBACK ...
  function ULONG (line 123) | inline ULONG EVNTAPI EventUnregister( REGHANDLE RegHandle )
  function ULONG (line 135) | inline ULONG EVNTAPI EventWriteTransfer( REGHANDLE RegHandle, PCEVENT_DE...
  function ULONG (line 141) | inline ULONG EVNTAPI EventActivityIdControl( ULONG ControlCode, LPGUID A...
  type _tlgProvider_t (line 179) | struct _tlgProvider_t
  type _tlgProvider_t (line 180) | struct _tlgProvider_t

FILE: src/public/tier0/wchartypes.h
  type char8 (line 25) | typedef char char8;
  type uint8 (line 30) | typedef unsigned char uint8;
  type BYTE (line 31) | typedef unsigned char BYTE;
  type byte (line 32) | typedef unsigned char byte;
  type wchar_t (line 72) | typedef wchar_t tchar;
  type tchar (line 77) | typedef char tchar;
  type wchar_t (line 89) | typedef wchar_t	uchar16;
  type uchar32 (line 90) | typedef unsigned int uchar32;
  type uchar16 (line 92) | typedef unsigned short uchar16;
  type wchar_t (line 93) | typedef wchar_t uchar32;

FILE: src/public/tier1/fmtstr.h
  function class (line 63) | class CNumStr
  function operator (line 210) | operator const char *() const				{ return BaseClass::m_szBuf; }
  function Clear (line 235) | void Clear()
  function AppendFormat (line 241) | void AppendFormat( PRINTF_FORMAT_STRING const char *pchFormat, ... ) FMT...
  function Append (line 250) | void Append( const char *pchValue )
  type CFmtStrN (line 330) | typedef CFmtStrN< FMTSTR_STD_LEN > CFmtStr;
  type CFmtStrN (line 331) | typedef CFmtStrN< FMTSTR_STD_LEN, true > CFmtStrQuietTruncation;
  type CFmtStrN (line 332) | typedef CFmtStrN<32> CFmtStr32;
  type CFmtStrN (line 333) | typedef CFmtStrN<1024> CFmtStr1024;
  type CFmtStrN (line 334) | typedef CFmtStrN<8192> CFmtStrMax;

FILE: src/public/tier1/netadr.h
  function class (line 49) | class CIPAddress
  function SetIPV4Loopback (line 97) | void	SetIPV4Loopback() { SetIPv4( 0x7f000001 ); }
  function SetIPV6Loopback (line 101) | void	SetIPV6Loopback() { SetIPV6( k_ipv6Bytes_Loopback, 0 ); }
  function SetIPV4Any (line 104) | void	SetIPV4Any() { SetIPv4( 0 ); }
  function SetIPV6Any (line 107) | void	SetIPV6Any() { SetIPV6( k_ipv6Bytes_Any, 0 ); }
  function uint (line 112) | uint	GetIPv4() const;
  function CIPAddress (line 176) | static CIPAddress CreateIPv6Loopback() { CIPAddress ret; ret.SetIPV6Loop...
  type Hash (line 183) | struct Hash
  function class (line 226) | class CIPAndPort : public CIPAddress
  function SetFromString (line 247) | bool    SetFromString( const char *psz )
  function SetIPAndPort (line 256) | void    SetIPAndPort( CIPAddress ipAddress, unsigned short usPort ) { *t...
  function SetIPAndPort (line 259) | void    SetIPAndPort( uint unIP, unsigned short usPort ) { SetIPv4( unIP...
  function SetFromSockadr (line 292) | bool SetFromSockadr(const void *addr, size_t addr_size )
  type Hash (line 313) | struct Hash
  function class (line 331) | class CUtlNetAdrRender
  function SetIPv4 (line 367) | inline void CIPAddress::SetIPv4(uint8 b1, uint8 b2, uint8 b3, uint8 b4)
  function SetIPv4 (line 373) | inline void CIPAddress::SetIPv4(uint unIP)
  function SetType (line 379) | inline void CIPAddress::SetType(ipadrtype_t newtype)
  function byte (line 393) | inline const byte *CIPAddress::GetIPV6Bytes() const
  function SetIPV6 (line 399) | inline void CIPAddress::SetIPV6( const byte *bytes, uint32 nScope )
  function uint32 (line 406) | inline uint32 CIPAddress::GetIPV6Scope() const
  function SetPort (line 418) | inline void CIPAndPort::SetPort(unsigned short newport)

FILE: src/public/tier1/utlbuffer.h
  function BEGIN_TIER1_NAMESPACE (line 21) | BEGIN_TIER1_NAMESPACE
  function Clear (line 766) | inline void CUtlBuffer::Clear()
  function Purge (line 778) | inline void CUtlBuffer::Purge()
  function CopyBuffer (line 787) | inline void CUtlBuffer::CopyBuffer( const CUtlBuffer &buffer )
  function CopyBuffer (line 792) | inline void	CUtlBuffer::CopyBuffer( const void *pubData, int cubData )
  function class (line 808) | class CAutoWipeBuffer : public CUtlBuffer

FILE: src/public/tier1/utlhashmap.h
  type ReplaceExisting (line 36) | enum ReplaceExisting
  function CopyFullHashMap (line 76) | void CopyFullHashMap( CUtlHashMap< K, T, L, H > &target ) const
  function ElemType_t (line 87) | const ElemType_t &	Element( IndexType_t i ) const		{ return m_memNodes.E...
  function ElemType_t (line 89) | const ElemType_t &	operator[]( IndexType_t i ) const	{ return m_memNodes...
  function KeyType_t (line 90) | const KeyType_t &	Key( IndexType_t i ) const			{ return m_memNodes.Eleme...
  function IsValidIndex (line 103) | bool  IsValidIndex( IndexType_t i ) const				{ return /* i >= 0 && i < m...
  function IndexType_t (line 106) | static constexpr IndexType_t InvalidIndex()						{ return -1; }
  function IndexType_t (line 109) | IndexType_t  Insert( const KeyType_t &key )								{ return FindOrInsert...
  function IndexType_t (line 110) | IndexType_t  Insert( KeyType_t &&key )									{ return FindOrInsert_Int...
  function IndexType_t (line 113) | IndexType_t  Insert( const KeyType_t &key, const ElemType_t &insert )	{ ...
  function IndexType_t (line 114) | IndexType_t  Insert( const KeyType_t &key, ElemType_t &&insert )		{ retu...
  function IndexType_t (line 115) | IndexType_t  Insert( KeyType_t &&key, const ElemType_t &insert )		{ retu...
  function IndexType_t (line 116) | IndexType_t  Insert( KeyType_t &&key, ElemType_t &&insert )				{ return ...
  function IndexType_t (line 119) | IndexType_t  InsertOrReplace( const KeyType_t &key, const ElemType_t &in...
  function IndexType_t (line 120) | IndexType_t  InsertOrReplace( const KeyType_t &key, ElemType_t &&insert ...
  function IndexType_t (line 121) | IndexType_t  InsertOrReplace( KeyType_t &&key, const ElemType_t &insert ...
  function IndexType_t (line 122) | IndexType_t  InsertOrReplace( KeyType_t &&key, ElemType_t &&insert )			{...
  function IndexType_t (line 125) | IndexType_t  InsertWithDupes( const KeyType_t &key, const ElemType_t &in...
  function IndexType_t (line 126) | IndexType_t  InsertWithDupes( const KeyType_t &key, ElemType_t &&insert ...
  function IndexType_t (line 127) | IndexType_t  InsertWithDupes( KeyType_t &&key, const ElemType_t &insert ...
  function IndexType_t (line 128) | IndexType_t  InsertWithDupes( KeyType_t &&key, ElemType_t &&insert )			{...
  function IndexType_t (line 132) | IndexType_t  FindOrInsert( const KeyType_t &key )						{ return FindOrIn...
  function IndexType_t (line 133) | IndexType_t  FindOrInsert( KeyType_t &&key )							{ return FindOrInsert...
  function IndexType_t (line 137) | IndexType_t  FindOrInsert( const KeyType_t &key, const ElemType_t &inser...
  function IndexType_t (line 138) | IndexType_t  FindOrInsert( const KeyType_t &key, ElemType_t &&insert )		...
  function IndexType_t (line 139) | IndexType_t  FindOrInsert( KeyType_t &&key, const ElemType_t &insert )		...
  function IndexType_t (line 140) | IndexType_t  FindOrInsert( KeyType_t &&key, ElemType_t &&insert )			{ re...
  function ElemType_t (line 144) | ElemType_t *FindOrInsertGetPtr( const KeyType_t &key )
  function ElemType_t (line 159) | ElemType_t *FindGetPtr( const KeyType_t &key )
  function ElemType_t (line 164) | const ElemType_t *FindGetPtr( const KeyType_t &key ) const
  function HasElement (line 173) | bool HasElement( const KeyType_t &key ) const { return Find( key ) != kI...
  function ElemType_t (line 187) | const ElemType_t &FindElement( const KeyType_t &key, const ElemType_t &d...
  function Remove (line 196) | bool Remove( const KeyType_t &key )
  function PurgeAndDeleteElements (line 210) | void PurgeAndDeleteElements()
  function IndexType_t (line 232) | inline IndexType_t FreeNodeIDToIndex( IndexType_t i ) const	{ return (0-...
  function IndexType_t (line 233) | inline IndexType_t FreeNodeIndexToID( IndexType_t i ) const	{ return (-3...
  type HashBucket_t (line 242) | struct HashBucket_t
  type Node_t (line 248) | struct Node_t
  function ItemRef (line 313) | struct MutableItemRef : ItemRef
  function class (line 322) | class Iterator

FILE: src/public/tier1/utliterator.h
  function namespace (line 17) | namespace std
  type IfTrue_t (line 31) | typedef IfTrue_t type;
  type typename (line 49) | typedef typename Container::IndexType_t IndexType_t;
  type std (line 52) | typedef std::forward_iterator_tag iterator_category;
  type typename (line 53) | typedef typename CUtlIteratorBase_SelectIf< bConstIterator, const
  type value_type (line 54) | typedef value_type * pointer;
  type value_type (line 55) | typedef value_type & reference;
  type intp (line 56) | typedef intp difference_type;
  function Base (line 121) | Base( copy_or_requalify_to_const ) { }
  function namespace (line 159) | namespace std
  type typename (line 175) | typedef typename CUtlBidirectionalIteratorImplT< Container, bConst >::va...
  type intp (line 176) | typedef intp difference_type;
  type value_type (line 177) | typedef const value_type * pointer;
  type value_type (line 178) | typedef const value_type & reference;

FILE: src/public/tier1/utllinkedlist.h
  type I (line 47) | typedef I IndexType_t;
  function I (line 111) | inline static I  InvalidIndex()  { return INVALID_LLIST_IDX; }
  function ElementSize (line 112) | inline static size_t ElementSize() { return sizeof(ListElem_t); }
  function Count (line 115) | int	Count() const;
  type CUtlBidirectionalIteratorImplT (line 136) | typedef CUtlBidirectionalIteratorImplT< CUtlLinkedList< T, I >, false > ...
  type CUtlBidirectionalIteratorImplT (line 137) | typedef CUtlBidirectionalIteratorImplT< CUtlLinkedList< T, I >, true > c...
  function iterator (line 140) | iterator begin() { return iterator( this, Head() ); }
  function iterator (line 141) | iterator end() { return iterator( this, INVALID_LLIST_IDX ); }
  function I (line 142) | I IteratorNext( I i ) const { return Next( i ); }
  function I (line 143) | I IteratorPrev( I i ) const { return i == INVALID_LLIST_IDX ? Tail() : P...
  type ListElem_t (line 164) | struct ListElem_t
  function ListElem_t (line 181) | ListElem_t const& InternalElement( I i ) const { return m_Memory[i]; }
  function ResetDbgInfo (line 183) | void ResetDbgInfo()

FILE: src/public/tier1/utlmemory.h
  function BEGIN_TIER1_NAMESPACE (line 37) | BEGIN_TIER1_NAMESPACE
  function EnsureCapacity (line 181) | void EnsureCapacity( int num )							{ Assert( num <= SIZE ); }
  function Purge (line 184) | void Purge()											{}
  function SetGrowSize (line 193) | void SetGrowSize( int size )							{}

FILE: src/public/tier1/utlpriorityqueue.h
  type T (line 34) | typedef T ElemType_t;
  function IsValidIndex (line 43) | inline bool IsValidIndex(int index) { return m_heap.IsValidIndex(index); }
  function RemoveAll (line 59) | void		RemoveAll() { m_heap.RemoveAll(); }
  function Purge (line 62) | void		Purge() { m_heap.Purge(); }
  function T (line 66) | inline const T &	Element( int index ) const { return m_heap.Element(inde...
  function T (line 68) | inline T &ElementMutable( int index ) { return m_heap.Element( index ); }
  function SetSetIndexContext (line 70) | void SetSetIndexContext( void *pContext ) { m_pSetIndexContext = pContex...

FILE: src/public/tier1/utlvector.h
  type T (line 53) | typedef T* iterator;
  type T (line 54) | typedef const T* const_iterator;
  function T (line 78) | const T& Tail() const;
  function iterator (line 84) | iterator end()							{ return Base() + Count(); }
  function T (line 88) | T* Base()								{ return m_Memory.Base(); }
  function T (line 89) | const T* Base() const					{ return m_Memory.Base(); }
  function Count (line 92) | int Count() const;
  function SetGrowSize (line 169) | void SetGrowSize( int size )			{ m_Memory.SetGrowSize( size ); }
  function Sort (line 201) | void Sort() { SortPredicate( std::less<T>{} ); }
  function BaseClass (line 261) | CCopyableUtlVectorFixed( CCopyableUtlVectorFixed const& vec ) : BaseClas...
  function BaseClass (line 278) | CCopyableUtlVector( CCopyableUtlVector const& vec ) : BaseClass(0,0) { t...

FILE: src/public/vstdlib/random.h
  function WeakRandomSeed (line 8) | inline void WeakRandomSeed( int x ) { srand(x); }
  function WeakRandomFloat (line 9) | inline float WeakRandomFloat( float flMin, float flMax )
  function WeakRandomInt (line 13) | inline int WeakRandomInt( int nMin, int nMax )

FILE: src/public/vstdlib/strtools.h
  type str_size (line 37) | typedef unsigned int str_size;
  type str_size (line 39) | typedef size_t str_size;
  function V_strlen (line 42) | inline int V_strlen(const char *str) { return static_cast<int>( strlen (...
  function V_strcmp (line 43) | inline int V_strcmp(const char *s1, const char *s2) { return strcmp( s1,...
  function V_memcmp (line 44) | inline int V_memcmp (const void *m1, const void *m2, size_t count){ retu...
  function V_memmove (line 45) | inline void V_memmove (OUT_BYTECAP(count) void *dest, IN_BYTECAP(count) ...
  function V_memset (line 46) | inline void V_memset (OUT_BYTECAP(count) void *dest, int fill, size_t co...
  function V_memcpy (line 47) | inline void V_memcpy( OUT_BYTECAP( count ) void *dest, IN_BYTECAP( count...
  function V_stricmp (line 56) | inline int V_stricmp( const char *s1, const char *s2 ) { return V_strnic...
  function V_isempty (line 89) | inline bool V_isempty( const char* pszString ) { return !pszString || !p...
  function V_isspace (line 92) | inline bool V_isspace(char c) { return isspace((unsigned char)c) != 0; }

FILE: src/steamnetworkingsockets/certtool/steamnetworkingsockets_certtool.cpp
  function FatalError (line 46) | static void FatalError( const char *fmt, ... )
  function LoadFileIntoBuffer (line 58) | static void LoadFileIntoBuffer( const char *pszFilename, CUtlBuffer &buf )
  function PrintUsage (line 111) | static void PrintUsage()
  function Printf (line 178) | void Printf( const char *pszFmt, ... )
  function KeyIDAsString (line 188) | static std::string KeyIDAsString( uint64 nKeyID )
  function PublicKeyAsAuthorizedKeys (line 195) | static std::string PublicKeyAsAuthorizedKeys( const CECSigningPublicKey ...
  function PublicKeyAsAuthorizedKeys (line 203) | static std::string PublicKeyAsAuthorizedKeys()
  function PublicKeyIDAsString (line 208) | static std::string PublicKeyIDAsString()
  function CompressWhitespace (line 215) | static std::string CompressWhitespace( const char *s )
  function Base64EncodeBuffer (line 240) | std::string Base64EncodeBuffer( const void *pBuf, size_t cbBuf, const ch...
  function Base64EncodeProtobuf (line 249) | std::string Base64EncodeProtobuf( const google::protobuf::Message &msg, ...
  function AddPublicKeyInfoToJSON (line 261) | static void AddPublicKeyInfoToJSON()
  function GenKeyPair (line 270) | void GenKeyPair()
  function PrintCertInfo (line 335) | void PrintCertInfo( const CMsgSteamDatagramCertificateSigned &msgSigned,...
  function CertToPEM (line 415) | std::string CertToPEM( const CMsgSteamDatagramCertificateSigned &msgCert )
  function CreateCert (line 421) | void CreateCert()
  function PrintDHKey (line 467) | void PrintDHKey( const TCryptoKey &key, const char *pszPlainTextHeader, ...
  function GenDHKeyPair (line 489) | void GenDHKeyPair()
  function CreateHostedServerTicket (line 508) | void CreateHostedServerTicket()
  function main (line 555) | int main( int argc, char **argv )
  function WinMain (line 784) | int APIENTRY WinMain( HINSTANCE hInstance,

FILE: src/steamnetworkingsockets/clientlib/csteamnetworkingmessages.cpp
  type P2PMessageHeader (line 14) | struct P2PMessageHeader
  type SteamNetworkingSocketsLib (line 30) | namespace SteamNetworkingSocketsLib {
    function CSteamNetworkingMessages (line 48) | CSteamNetworkingMessages *CSteamNetworkingSockets::GetSteamNetworkingM...
    function FOR_EACH_HASHMAP (line 387) | FOR_EACH_HASHMAP( m_mapSessions, i )
    function EResult (line 417) | EResult CSteamNetworkingMessages::SendMessageToUser( const SteamNetwor...
    function ESteamNetworkingConnectionState (line 600) | ESteamNetworkingConnectionState CSteamNetworkingMessages::GetSessionCo...
    function SteamNetworkingMessagesSession (line 623) | SteamNetworkingMessagesSession *CSteamNetworkingMessages::FindSession(...
    function SteamNetworkingMessagesSession (line 639) | SteamNetworkingMessagesSession *CSteamNetworkingMessages::FindOrCreate...
    function FreeMessageDataWithP2PMessageHeader (line 900) | static void FreeMessageDataWithP2PMessageHeader( SteamNetworkingMessag...

FILE: src/steamnetworkingsockets/clientlib/csteamnetworkingmessages.h
  type ISteamNetworkingMessages (line 17) | typedef ISteamNetworkingMessages IClientNetworkingMessages;
  type SteamNetworkingMessagesSession (line 29) | struct SteamNetworkingMessagesSession
  function class (line 38) | class CMessagesEndPoint
  function class (line 68) | class CMessagesEndPointSession : public ILockableThinker<ConnectionLock>
  type Channel (line 158) | struct Channel
  function virtual (line 180) | virtual void FreeResources() override;

FILE: src/steamnetworkingsockets/clientlib/csteamnetworkingsockets.cpp
  type SteamNetworkingSocketsLib (line 35) | namespace SteamNetworkingSocketsLib {
  function ESteamNetworkingAvailability (line 856) | ESteamNetworkingAvailability CSteamNetworkingSockets::InitAuthentication()
  function ESteamNetworkingAvailability (line 1067) | ESteamNetworkingAvailability CSteamNetworkingSockets::GetAuthenticationS...
  function HSteamListenSocket (line 1079) | HSteamListenSocket CSteamNetworkingSockets::CreateListenSocketIP( const ...
  function CSteamNetworkListenSocketBase (line 1091) | CSteamNetworkListenSocketBase *CSteamNetworkingSockets::InternalCreateLi...
  function HSteamNetConnection (line 1109) | HSteamNetConnection CSteamNetworkingSockets::ConnectByIPAddress( const S...
  function EResult (line 1153) | EResult CSteamNetworkingSockets::AcceptConnection( HSteamNetConnection h...
  function int64 (line 1205) | int64 CSteamNetworkingSockets::GetConnectionUserData( HSteamNetConnectio...
  function EResult (line 1236) | EResult CSteamNetworkingSockets::ConfigureConnectionLanes( HSteamNetConn...
  function EResult (line 1248) | EResult CSteamNetworkingSockets::SendMessageToConnection( HSteamNetConne...
  type SortMsg_t (line 1264) | struct SortMsg_t
  function EResult (line 1368) | EResult CSteamNetworkingSockets::FlushMessagesOnConnection( HSteamNetCon...
  function HSteamNetPollGroup (line 1388) | HSteamNetPollGroup CSteamNetworkingSockets::CreatePollGroup()
  function CSteamNetworkPollGroup (line 1396) | CSteamNetworkPollGroup *CSteamNetworkingSockets::InternalCreatePollGroup...
  function EResult (line 1489) | EResult CSteamNetworkingSockets::GetConnectionRealTimeStatus(
  function ISteamNetworkingFakeUDPPort (line 1765) | ISteamNetworkingFakeUDPPort *CSteamNetworkingSockets::CreateFakeUDPPort(...
  function EResult (line 1772) | EResult CSteamNetworkingSockets::GetRemoteFakeIPForConnection( HSteamNet...
  function SteamNetworkingMessage_t (line 1808) | SteamNetworkingMessage_t *CSteamNetworkingUtils::AllocateMessage( int cb...
  function SteamNetworkingMicroseconds (line 1813) | SteamNetworkingMicroseconds CSteamNetworkingUtils::GetLocalTimestamp()
  function AssignConfigValueTyped (line 1896) | static bool AssignConfigValueTyped( int32 *pVal, ESteamNetworkingConfigD...
  function AssignConfigValueTyped (line 1933) | static bool AssignConfigValueTyped( int64 *pVal, ESteamNetworkingConfigD...
  function AssignConfigValueTyped (line 1967) | static bool AssignConfigValueTyped( float *pVal, ESteamNetworkingConfigD...
  function AssignConfigValueTyped (line 2001) | static bool AssignConfigValueTyped( std::string *pVal, ESteamNetworkingC...
  function AssignConfigValueTyped (line 2033) | static bool AssignConfigValueTyped( void **pVal, ESteamNetworkingConfigD...
  function SetConfigValueTyped (line 2049) | bool SetConfigValueTyped(
  function ESteamNetworkingGetConfigValueResult (line 2104) | ESteamNetworkingGetConfigValueResult ReturnConfigValueTyped( const T &da...
  function ESteamNetworkingGetConfigValueResult (line 2121) | ESteamNetworkingGetConfigValueResult ReturnConfigValueTyped<std::string>...
  function ESteamNetworkingGetConfigValueResult (line 2139) | ESteamNetworkingGetConfigValueResult GetConfigValueTyped(
  function ESteamNetworkingGetConfigValueResult (line 2226) | ESteamNetworkingGetConfigValueResult CSteamNetworkingUtils::GetConfigValue(
  function BEnumerateConfigValue (line 2269) | static bool BEnumerateConfigValue( const GlobalConfigValueEntry *pVal, b...
  function ESteamNetworkingConfigValue (line 2307) | ESteamNetworkingConfigValue CSteamNetworkingUtils::IterateGenericEditabl...
  function ESteamNetworkingFakeIPType (line 2351) | ESteamNetworkingFakeIPType CSteamNetworkingUtils::GetIPv4FakeIPType( uin...
  function EResult (line 2356) | EResult CSteamNetworkingUtils::GetRealIdentityForFakeIP( const SteamNetw...
  function ESteamNetworkingFakeIPType (line 2362) | ESteamNetworkingFakeIPType CSteamNetworkingUtils::SteamNetworkingIPAddr_...
  function AppId_t (line 2371) | AppId_t CSteamNetworkingUtils::GetAppID()
  function time_t (line 2381) | time_t CSteamNetworkingUtils::GetTimeSecure()
  function STEAMNETWORKINGSOCKETS_INTERFACE (line 2461) | STEAMNETWORKINGSOCKETS_INTERFACE bool GameNetworkingSockets_Init( const ...
  function STEAMNETWORKINGSOCKETS_INTERFACE (line 2484) | STEAMNETWORKINGSOCKETS_INTERFACE void GameNetworkingSockets_Kill()
  function STEAMNETWORKINGSOCKETS_INTERFACE (line 2494) | STEAMNETWORKINGSOCKETS_INTERFACE ISteamNetworkingSockets *SteamNetworkin...
  function STEAMNETWORKINGSOCKETS_INTERFACE (line 2499) | STEAMNETWORKINGSOCKETS_INTERFACE ISteamNetworkingUtils *SteamNetworkingU...
  function STEAMNETWORKINGSOCKETS_INTERFACE (line 2507) | STEAMNETWORKINGSOCKETS_INTERFACE ISteamNetworkingMessages* SteamNetworki...

FILE: src/steamnetworkingsockets/clientlib/csteamnetworkingsockets.h
  type ISteamNetworkingSockets (line 17) | typedef ISteamNetworkingSockets IClientNetworkingSockets;
  type ISteamNetworkingUtils (line 18) | typedef ISteamNetworkingUtils IClientNetworkingUtils;
  function namespace (line 24) | namespace SteamNetworkingSocketsLib {

FILE: src/steamnetworkingsockets/clientlib/ice_client_types.h
  type EICERole (line 11) | enum EICERole
  type EICECandidateType (line 18) | enum EICECandidateType : int
  type EProtocolType (line 43) | enum EProtocolType {
  type ICESessionConfig (line 50) | struct ICESessionConfig

FILE: src/steamnetworkingsockets/clientlib/steamnetworkingsockets_connections.cpp
  type SteamNetworkingSocketsLib (line 40) | namespace SteamNetworkingSocketsLib {
    function BCheckGlobalSpamReplyRateLimit (line 51) | bool BCheckGlobalSpamReplyRateLimit( SteamNetworkingMicroseconds usecN...
    function CSteamNetworkingMessage (line 111) | CSteamNetworkingMessage *CSteamNetworkingMessage::New( uint32 cbSize )
    function FOR_EACH_VEC_BACK (line 231) | FOR_EACH_VEC_BACK( m_vecConnections, i )
    function FOR_EACH_HASHMAP (line 429) | FOR_EACH_HASHMAP( m_mapChildConnections, h )
    function FOR_EACH_HASHMAP (line 535) | FOR_EACH_HASHMAP( m_mapChildConnections, h )
    function FOR_EACH_HASHMAP (line 609) | FOR_EACH_HASHMAP( g_mapConnections, i )
    function ESteamNetConnectionEnd (line 1359) | ESteamNetConnectionEnd CSteamNetworkConnectionBase::RecvCryptoHandshake(
    function ESteamNetConnectionEnd (line 1577) | ESteamNetConnectionEnd CSteamNetworkConnectionBase::FinishCryptoHandsh...
    function EUnsignedCert (line 1783) | EUnsignedCert CSteamNetworkConnectionBase::AllowLocalUnsignedCert()
    function EUnsignedCert (line 1793) | EUnsignedCert CSteamNetworkConnectionBase::AllowRemoteUnsignedCert()
    function ESteamNetConnectionEnd (line 1803) | ESteamNetConnectionEnd CSteamNetworkConnectionBase::CheckRemoteCert( c...
    function EResult (line 1902) | EResult CSteamNetworkConnectionBase::APIGetRealTimeStatus( SteamNetCon...
    function EResult (line 1984) | EResult CSteamNetworkConnectionBase::APISendMessageToConnection( const...
    function int64 (line 2039) | int64 CSteamNetworkConnectionBase::APISendMessageToConnection( CSteamN...
    function int64 (line 2076) | int64 CSteamNetworkConnectionBase::_APISendMessageToConnection( CSteam...
    function EResult (line 2092) | EResult CSteamNetworkConnectionBase::APIFlushMessageOnConnection()
    function EResult (line 2245) | EResult CSteamNetworkConnectionBase::APIAcceptConnection()
    function EResult (line 2307) | EResult CSteamNetworkConnectionBase::AcceptConnection( SteamNetworking...
    function CSteamNetworkingMessage (line 2629) | CSteamNetworkingMessage *CSteamNetworkConnectionBase::AllocateNewRecvM...
  function SteamNetworkingMicroseconds (line 3650) | SteamNetworkingMicroseconds CSteamNetworkConnectionBase::ThinkConnection...
  function SteamNetworkingMicroseconds (line 3655) | SteamNetworkingMicroseconds CSteamNetworkConnectionBase::ThinkConnection...
  function CSteamNetworkConnectionP2P (line 3786) | CSteamNetworkConnectionP2P *CSteamNetworkConnectionBase::AsSteamNetworkC...
  function CSteamNetworkConnectionPipe (line 3870) | CSteamNetworkConnectionPipe *CSteamNetworkConnectionPipe::CreateLoopback...
  function EUnsignedCert (line 3987) | EUnsignedCert CSteamNetworkConnectionPipe::AllowRemoteUnsignedCert()
  function EUnsignedCert (line 3993) | EUnsignedCert CSteamNetworkConnectionPipe::AllowLocalUnsignedCert()
  function int64 (line 3999) | int64 CSteamNetworkConnectionPipe::_APISendMessageToConnection( CSteamNe...
  function EResult (line 4164) | EResult CSteamNetworkConnectionPipe::AcceptConnection( SteamNetworkingMi...
  function uint16 (line 4216) | uint16 CSteamNetworkConnectionPipe::FakeSendStats( SteamNetworkingMicros...

FILE: src/steamnetworkingsockets/clientlib/steamnetworkingsockets_connections.h
  type SteamNetConnectionStatusChangedCallback_t (line 25) | struct SteamNetConnectionStatusChangedCallback_t
  function namespace (line 29) | namespace SteamNetworkingSocketsLib {
  type SendPacketContext_t (line 95) | struct SendPacketContext_t
  type RecvPacketContext_t (line 104) | struct RecvPacketContext_t
  function SlamFlagsAndCalcSize (line 152) | void SlamFlagsAndCalcSize()
  function Serialize (line 164) | bool Serialize( byte *&p )
  function ESteamNetworkingConnectionState (line 193) | inline ESteamNetworkingConnectionState CollapseConnectionStateToAPIState...
  type FakeIPKey (line 207) | struct FakeIPKey
  function RecursiveTimedMutexImpl (line 250) | struct PollGroupLock : Lock<RecursiveTimedMutexImpl> {
  function class (line 952) | class CConnectionTransport
  function TryLock (line 1020) | bool TryLock() { return m_connection.TryLock(); }
  function Unlock (line 1021) | void Unlock() { m_connection.Unlock(); }
  function virtual (line 1066) | virtual EUnsignedCert AllowRemoteUnsignedCert() override;
  function RecursiveTimedMutexImpl (line 1117) | struct TableLock : Lock<RecursiveTimedMutexImpl> {

FILE: src/steamnetworkingsockets/clientlib/steamnetworkingsockets_flat.cpp
  function STEAMNETWORKINGSOCKETS_INTERFACE (line 16) | STEAMNETWORKINGSOCKETS_INTERFACE ISteamNetworkingSockets *SteamAPI_Steam...
  function STEAMNETWORKINGSOCKETS_INTERFACE (line 20) | STEAMNETWORKINGSOCKETS_INTERFACE HSteamListenSocket SteamAPI_ISteamNetwo...
  function STEAMNETWORKINGSOCKETS_INTERFACE (line 24) | STEAMNETWORKINGSOCKETS_INTERFACE HSteamNetConnection SteamAPI_ISteamNetw...
  function STEAMNETWORKINGSOCKETS_INTERFACE (line 28) | STEAMNETWORKINGSOCKETS_INTERFACE HSteamListenSocket SteamAPI_ISteamNetwo...
  function STEAMNETWORKINGSOCKETS_INTERFACE (line 32) | STEAMNETWORKINGSOCKETS_INTERFACE HSteamNetConnection SteamAPI_ISteamNetw...
  function STEAMNETWORKINGSOCKETS_INTERFACE (line 36) | STEAMNETWORKINGSOCKETS_INTERFACE EResult SteamAPI_ISteamNetworkingSocket...
  function STEAMNETWORKINGSOCKETS_INTERFACE (line 40) | STEAMNETWORKINGSOCKETS_INTERFACE bool SteamAPI_ISteamNetworkingSockets_C...
  function STEAMNETWORKINGSOCKETS_INTERFACE (line 44) | STEAMNETWORKINGSOCKETS_INTERFACE bool SteamAPI_ISteamNetworkingSockets_C...
  function STEAMNETWORKINGSOCKETS_INTERFACE (line 48) | STEAMNETWORKINGSOCKETS_INTERFACE bool SteamAPI_ISteamNetworkingSockets_S...
  function STEAMNETWORKINGSOCKETS_INTERFACE (line 52) | STEAMNETWORKINGSOCKETS_INTERFACE int64 SteamAPI_ISteamNetworkingSockets_...
  function STEAMNETWORKINGSOCKETS_INTERFACE (line 56) | STEAMNETWORKINGSOCKETS_INTERFACE void SteamAPI_ISteamNetworkingSockets_S...
  function STEAMNETWORKINGSOCKETS_INTERFACE (line 60) | STEAMNETWORKINGSOCKETS_INTERFACE bool SteamAPI_ISteamNetworkingSockets_G...
  function STEAMNETWORKINGSOCKETS_INTERFACE (line 64) | STEAMNETWORKINGSOCKETS_INTERFACE EResult SteamAPI_ISteamNetworkingSocket...
  function STEAMNETWORKINGSOCKETS_INTERFACE (line 68) | STEAMNETWORKINGSOCKETS_INTERFACE void SteamAPI_ISteamNetworkingSockets_S...
  function STEAMNETWORKINGSOCKETS_INTERFACE (line 72) | STEAMNETWORKINGSOCKETS_INTERFACE EResult SteamAPI_ISteamNetworkingSocket...
  function STEAMNETWORKINGSOCKETS_INTERFACE (line 76) | STEAMNETWORKINGSOCKETS_INTERFACE int SteamAPI_ISteamNetworkingSockets_Re...
  function STEAMNETWORKINGSOCKETS_INTERFACE (line 80) | STEAMNETWORKINGSOCKETS_INTERFACE bool SteamAPI_ISteamNetworkingSockets_G...
  function STEAMNETWORKINGSOCKETS_INTERFACE (line 84) | STEAMNETWORKINGSOCKETS_INTERFACE EResult SteamAPI_ISteamNetworkingSocket...
  function STEAMNETWORKINGSOCKETS_INTERFACE (line 88) | STEAMNETWORKINGSOCKETS_INTERFACE int SteamAPI_ISteamNetworkingSockets_Ge...
  function STEAMNETWORKINGSOCKETS_INTERFACE (line 92) | STEAMNETWORKINGSOCKETS_INTERFACE bool SteamAPI_ISteamNetworkingSockets_G...
  function STEAMNETWORKINGSOCKETS_INTERFACE (line 96) | STEAMNETWORKINGSOCKETS_INTERFACE bool SteamAPI_ISteamNetworkingSockets_C...
  function STEAMNETWORKINGSOCKETS_INTERFACE (line 100) | STEAMNETWORKINGSOCKETS_INTERFACE EResult SteamAPI_ISteamNetworkingSocket...
  function STEAMNETWORKINGSOCKETS_INTERFACE (line 104) | STEAMNETWORKINGSOCKETS_INTERFACE bool SteamAPI_ISteamNetworkingSockets_G...
  function STEAMNETWORKINGSOCKETS_INTERFACE (line 108) | STEAMNETWORKINGSOCKETS_INTERFACE ESteamNetworkingAvailability SteamAPI_I...
  function STEAMNETWORKINGSOCKETS_INTERFACE (line 112) | STEAMNETWORKINGSOCKETS_INTERFACE ESteamNetworkingAvailability SteamAPI_I...
  function STEAMNETWORKINGSOCKETS_INTERFACE (line 116) | STEAMNETWORKINGSOCKETS_INTERFACE HSteamNetPollGroup SteamAPI_ISteamNetwo...
  function STEAMNETWORKINGSOCKETS_INTERFACE (line 120) | STEAMNETWORKINGSOCKETS_INTERFACE bool SteamAPI_ISteamNetworkingSockets_D...
  function STEAMNETWORKINGSOCKETS_INTERFACE (line 124) | STEAMNETWORKINGSOCKETS_INTERFACE bool SteamAPI_ISteamNetworkingSockets_S...
  function STEAMNETWORKINGSOCKETS_INTERFACE (line 128) | STEAMNETWORKINGSOCKETS_INTERFACE int SteamAPI_ISteamNetworkingSockets_Re...
  function STEAMNETWORKINGSOCKETS_INTERFACE (line 133) | STEAMNETWORKINGSOCKETS_INTERFACE bool SteamAPI_ISteamNetworkingSockets_R...
  function STEAMNETWORKINGSOCKETS_INTERFACE (line 137) | STEAMNETWORKINGSOCKETS_INTERFACE int SteamAPI_ISteamNetworkingSockets_Fi...
  function STEAMNETWORKINGSOCKETS_INTERFACE (line 141) | STEAMNETWORKINGSOCKETS_INTERFACE HSteamNetConnection SteamAPI_ISteamNetw...
  function STEAMNETWORKINGSOCKETS_INTERFACE (line 145) | STEAMNETWORKINGSOCKETS_INTERFACE uint16 SteamAPI_ISteamNetworkingSockets...
  function STEAMNETWORKINGSOCKETS_INTERFACE (line 149) | STEAMNETWORKINGSOCKETS_INTERFACE SteamNetworkingPOPID SteamAPI_ISteamNet...
  function STEAMNETWORKINGSOCKETS_INTERFACE (line 153) | STEAMNETWORKINGSOCKETS_INTERFACE EResult SteamAPI_ISteamNetworkingSocket...
  function STEAMNETWORKINGSOCKETS_INTERFACE (line 157) | STEAMNETWORKINGSOCKETS_INTERFACE HSteamListenSocket SteamAPI_ISteamNetwo...
  function STEAMNETWORKINGSOCKETS_INTERFACE (line 161) | STEAMNETWORKINGSOCKETS_INTERFACE EResult SteamAPI_ISteamNetworkingSocket...
  function STEAMNETWORKINGSOCKETS_INTERFACE (line 166) | STEAMNETWORKINGSOCKETS_INTERFACE HSteamNetConnection SteamAPI_ISteamNetw...
  function STEAMNETWORKINGSOCKETS_INTERFACE (line 170) | STEAMNETWORKINGSOCKETS_INTERFACE bool SteamAPI_ISteamNetworkingSockets_R...
  function STEAMNETWORKINGSOCKETS_INTERFACE (line 175) | STEAMNETWORKINGSOCKETS_INTERFACE bool SteamAPI_ISteamNetworkingSockets_G...
  function STEAMNETWORKINGSOCKETS_INTERFACE (line 179) | STEAMNETWORKINGSOCKETS_INTERFACE bool SteamAPI_ISteamNetworkingSockets_S...
  function STEAMNETWORKINGSOCKETS_INTERFACE (line 183) | STEAMNETWORKINGSOCKETS_INTERFACE void SteamAPI_ISteamNetworkingSockets_R...
  function STEAMNETWORKINGSOCKETS_INTERFACE (line 190) | STEAMNETWORKINGSOCKETS_INTERFACE ISteamNetworkingUtils *SteamAPI_SteamNe...
  function STEAMNETWORKINGSOCKETS_INTERFACE (line 194) | STEAMNETWORKINGSOCKETS_INTERFACE SteamNetworkingMessage_t * SteamAPI_ISt...
  function STEAMNETWORKINGSOCKETS_INTERFACE (line 199) | STEAMNETWORKINGSOCKETS_INTERFACE void SteamAPI_ISteamNetworkingUtils_Ini...
  function STEAMNETWORKINGSOCKETS_INTERFACE (line 203) | STEAMNETWORKINGSOCKETS_INTERFACE ESteamNetworkingAvailability SteamAPI_I...
  function STEAMNETWORKINGSOCKETS_INTERFACE (line 207) | STEAMNETWORKINGSOCKETS_INTERFACE float SteamAPI_ISteamNetworkingUtils_Ge...
  function STEAMNETWORKINGSOCKETS_INTERFACE (line 211) | STEAMNETWORKINGSOCKETS_INTERFACE int SteamAPI_ISteamNetworkingUtils_Esti...
  function STEAMNETWORKINGSOCKETS_INTERFACE (line 215) | STEAMNETWORKINGSOCKETS_INTERFACE int SteamAPI_ISteamNetworkingUtils_Esti...
  function STEAMNETWORKINGSOCKETS_INTERFACE (line 219) | STEAMNETWORKINGSOCKETS_INTERFACE void SteamAPI_ISteamNetworkingUtils_Con...
  function STEAMNETWORKINGSOCKETS_INTERFACE (line 223) | STEAMNETWORKINGSOCKETS_INTERFACE bool SteamAPI_ISteamNetworkingUtils_Par...
  function STEAMNETWORKINGSOCKETS_INTERFACE (line 227) | STEAMNETWORKINGSOCKETS_INTERFACE bool SteamAPI_ISteamNetworkingUtils_Che...
  function STEAMNETWORKINGSOCKETS_INTERFACE (line 231) | STEAMNETWORKINGSOCKETS_INTERFACE int SteamAPI_ISteamNetworkingUtils_GetP...
  function STEAMNETWORKINGSOCKETS_INTERFACE (line 235) | STEAMNETWORKINGSOCKETS_INTERFACE int SteamAPI_ISteamNetworkingUtils_GetD...
  function STEAMNETWORKINGSOCKETS_INTERFACE (line 239) | STEAMNETWORKINGSOCKETS_INTERFACE int SteamAPI_ISteamNetworkingUtils_GetP...
  function STEAMNETWORKINGSOCKETS_INTERFACE (line 243) | STEAMNETWORKINGSOCKETS_INTERFACE int SteamAPI_ISteamNetworkingUtils_GetP...
  function STEAMNETWORKINGSOCKETS_INTERFACE (line 249) | STEAMNETWORKINGSOCKETS_INTERFACE SteamNetworkingMicroseconds SteamAPI_IS...
  function STEAMNETWORKINGSOCKETS_INTERFACE (line 253) | STEAMNETWORKINGSOCKETS_INTERFACE void SteamAPI_ISteamNetworkingUtils_Set...
  function STEAMNETWORKINGSOCKETS_INTERFACE (line 257) | STEAMNETWORKINGSOCKETS_INTERFACE bool SteamAPI_ISteamNetworkingUtils_Set...
  function STEAMNETWORKINGSOCKETS_INTERFACE (line 261) | STEAMNETWORKINGSOCKETS_INTERFACE bool SteamAPI_ISteamNetworkingUtils_Set...
  function STEAMNETWORKINGSOCKETS_INTERFACE (line 265) | STEAMNETWORKINGSOCKETS_INTERFACE bool SteamAPI_ISteamNetworkingUtils_Set...
  function STEAMNETWORKINGSOCKETS_INTERFACE (line 269) | STEAMNETWORKINGSOCKETS_INTERFACE bool SteamAPI_ISteamNetworkingUtils_Set...
  function STEAMNETWORKINGSOCKETS_INTERFACE (line 273) | STEAMNETWORKINGSOCKETS_INTERFACE bool SteamAPI_ISteamNetworkingUtils_Set...
  function STEAMNETWORKINGSOCKETS_INTERFACE (line 277) | STEAMNETWORKINGSOCKETS_INTERFACE bool SteamAPI_ISteamNetworkingUtils_Set...
  function STEAMNETWORKINGSOCKETS_INTERFACE (line 281) | STEAMNETWORKINGSOCKETS_INTERFACE bool SteamAPI_ISteamNetworkingUtils_Set...
  function STEAMNETWORKINGSOCKETS_INTERFACE (line 285) | STEAMNETWORKINGSOCKETS_INTERFACE bool SteamAPI_ISteamNetworkingUtils_Set...
  function STEAMNETWORKINGSOCKETS_INTERFACE (line 289) | STEAMNETWORKINGSOCKETS_INTERFACE bool SteamAPI_ISteamNetworkingUtils_Set...
  function STEAMNETWORKINGSOCKETS_INTERFACE (line 293) | STEAMNETWORKINGSOCKETS_INTERFACE bool SteamAPI_ISteamNetworkingUtils_Set...
  function STEAMNETWORKINGSOCKETS_INTERFACE (line 297) | STEAMNETWORKINGSOCKETS_INTERFACE bool SteamAPI_ISteamNetworkingUtils_Set...
  function STEAMNETWORKINGSOCKETS_INTERFACE (line 301) | STEAMNETWORKINGSOCKETS_INTERFACE bool SteamAPI_ISteamNetworkingUtils_Set...
  function STEAMNETWORKINGSOCKETS_INTERFACE (line 305) | STEAMNETWORKINGSOCKETS_INTERFACE ESteamNetworkingGetConfigValueResult St...
  function STEAMNETWORKINGSOCKETS_INTERFACE (line 309) | STEAMNETWORKINGSOCKETS_INTERFACE const char * SteamAPI_ISteamNetworkingU...
  function STEAMNETWORKINGSOCKETS_INTERFACE (line 313) | STEAMNETWORKINGSOCKETS_INTERFACE ESteamNetworkingConfigValue SteamAPI_IS...
  function STEAMNETWORKINGSOCKETS_INTERFACE (line 320) | STEAMNETWORKINGSOCKETS_INTERFACE void SteamAPI_SteamNetworkingIPAddr_Cle...
  function STEAMNETWORKINGSOCKETS_INTERFACE (line 324) | STEAMNETWORKINGSOCKETS_INTERFACE bool SteamAPI_SteamNetworkingIPAddr_IsI...
  function STEAMNETWORKINGSOCKETS_INTERFACE (line 328) | STEAMNETWORKINGSOCKETS_INTERFACE void SteamAPI_SteamNetworkingIPAddr_Set...
  function STEAMNETWORKINGSOCKETS_INTERFACE (line 332) | STEAMNETWORKINGSOCKETS_INTERFACE void SteamAPI_SteamNetworkingIPAddr_Set...
  function STEAMNETWORKINGSOCKETS_INTERFACE (line 336) | STEAMNETWORKINGSOCKETS_INTERFACE bool SteamAPI_SteamNetworkingIPAddr_IsI...
  function STEAMNETWORKINGSOCKETS_INTERFACE (line 340) | STEAMNETWORKINGSOCKETS_INTERFACE uint32 SteamAPI_SteamNetworkingIPAddr_G...
  function STEAMNETWORKINGSOCKETS_INTERFACE (line 344) | STEAMNETWORKINGSOCKETS_INTERFACE void SteamAPI_SteamNetworkingIPAddr_Set...
  function STEAMNETWORKINGSOCKETS_INTERFACE (line 348) | STEAMNETWORKINGSOCKETS_INTERFACE bool SteamAPI_SteamNetworkingIPAddr_IsL...
  function STEAMNETWORKINGSOCKETS_INTERFACE (line 352) | STEAMNETWORKINGSOCKETS_INTERFACE bool SteamAPI_SteamNetworkingIPAddr_IsE...
  function STEAMNETWORKINGSOCKETS_INTERFACE (line 357) | STEAMNETWORKINGSOCKETS_INTERFACE void SteamAPI_SteamNetworkingIPAddr_ToS...
  function STEAMNETWORKINGSOCKETS_INTERFACE (line 361) | STEAMNETWORKINGSOCKETS_INTERFACE bool SteamAPI_SteamNetworkingIPAddr_Par...
  function STEAMNETWORKINGSOCKETS_INTERFACE (line 368) | STEAMNETWORKINGSOCKETS_INTERFACE void SteamAPI_SteamNetworkingIdentity_C...
  function STEAMNETWORKINGSOCKETS_INTERFACE (line 372) | STEAMNETWORKINGSOCKETS_INTERFACE bool SteamAPI_SteamNetworkingIdentity_I...
  function STEAMNETWORKINGSOCKETS_INTERFACE (line 376) | STEAMNETWORKINGSOCKETS_INTERFACE void SteamAPI_SteamNetworkingIdentity_S...
  function STEAMNETWORKINGSOCKETS_INTERFACE (line 380) | STEAMNETWORKINGSOCKETS_INTERFACE uint64_steamid SteamAPI_SteamNetworking...
  function STEAMNETWORKINGSOCKETS_INTERFACE (line 384) | STEAMNETWORKINGSOCKETS_INTERFACE void SteamAPI_SteamNetworkingIdentity_S...
  function STEAMNETWORKINGSOCKETS_INTERFACE (line 388) | STEAMNETWORKINGSOCKETS_INTERFACE uint64 SteamAPI_SteamNetworkingIdentity...
  function STEAMNETWORKINGSOCKETS_INTERFACE (line 392) | STEAMNETWORKINGSOCKETS_INTERFACE bool SteamAPI_SteamNetworkingIdentity_S...
  function STEAMNETWORKINGSOCKETS_INTERFACE (line 396) | STEAMNETWORKINGSOCKETS_INTERFACE const char * SteamAPI_SteamNetworkingId...
  function STEAMNETWORKINGSOCKETS_INTERFACE (line 400) | STEAMNETWORKINGSOCKETS_INTERFACE void SteamAPI_SteamNetworkingIdentity_S...
  function STEAMNETWORKINGSOCKETS_INTERFACE (line 404) | STEAMNETWORKINGSOCKETS_INTERFACE const SteamNetworkingIPAddr * SteamAPI_...
  function STEAMNETWORKINGSOCKETS_INTERFACE (line 408) | STEAMNETWORKINGSOCKETS_INTERFACE void SteamAPI_SteamNetworkingIdentity_S...
  function STEAMNETWORKINGSOCKETS_INTERFACE (line 412) | STEAMNETWORKINGSOCKETS_INTERFACE bool SteamAPI_SteamNetworkingIdentity_I...
  function STEAMNETWORKINGSOCKETS_INTERFACE (line 416) | STEAMNETWORKINGSOCKETS_INTERFACE bool SteamAPI_SteamNetworkingIdentity_S...
  function STEAMNETWORKINGSOCKETS_INTERFACE (line 420) | STEAMNETWORKINGSOCKETS_INTERFACE const char * SteamAPI_SteamNetworkingId...
  function STEAMNETWORKINGSOCKETS_INTERFACE (line 424) | STEAMNETWORKINGSOCKETS_INTERFACE bool SteamAPI_SteamNetworkingIdentity_S...
  function STEAMNETWORKINGSOCKETS_INTERFACE (line 428) | STEAMNETWORKINGSOCKETS_INTERFACE const uint8 * SteamAPI_SteamNetworkingI...
  function STEAMNETWORKINGSOCKETS_INTERFACE (line 432) | STEAMNETWORKINGSOCKETS_INTERFACE bool SteamAPI_SteamNetworkingIdentity_I...
  function STEAMNETWORKINGSOCKETS_INTERFACE (line 436) | STEAMNETWORKINGSOCKETS_INTERFACE void SteamAPI_SteamNetworkingIdentity_T...
  function STEAMNETWORKINGSOCKETS_INTERFACE (line 440) | STEAMNETWORKINGSOCKETS_INTERFACE bool SteamAPI_SteamNetworkingIdentity_P...
  function STEAMNETWORKINGSOCKETS_INTERFACE (line 447) | STEAMNETWORKINGSOCKETS_INTERFACE void SteamAPI_SteamNetworkingMessage_t_...
  function STEAMNETWORKINGSOCKETS_INTERFACE (line 456) | STEAMNETWORKINGSOCKETS_INTERFACE void SteamAPI_SteamDatagramHostedAddres...
  function STEAMNETWORKINGSOCKETS_INTERFACE (line 460) | STEAMNETWORKINGSOCKETS_INTERFACE SteamNetworkingPOPID SteamAPI_SteamData...
  function STEAMNETWORKINGSOCKETS_INTERFACE (line 464) | STEAMNETWORKINGSOCKETS_INTERFACE void SteamAPI_SteamDatagramHostedAddres...
  function STEAMNETWORKINGSOCKETS_INTERFACE (line 473) | STEAMNETWORKINGSOCKETS_INTERFACE ISteamNetworkingConnectionSignaling *St...
  function STEAMNETWORKINGSOCKETS_INTERFACE (line 512) | STEAMNETWORKINGSOCKETS_INTERFACE bool SteamAPI_ISteamNetworkingSockets_R...

FILE: src/steamnetworkingsockets/clientlib/steamnetworkingsockets_lowlevel.cpp
  type SteamNetworkingSocketsLib (line 77) | namespace SteamNetworkingSocketsLib {
    function ETW_LongOp (line 79) | inline void ETW_LongOp( const char *opName, SteamNetworkingMicrosecond...
    type ThreadLockDebugInfo (line 112) | struct ThreadLockDebugInfo
      type Tag_t (line 125) | struct Tag_t
    function ThreadLockDebugInfo (line 140) | static ThreadLockDebugInfo &GetThreadDebugInfo()
      type Tag_t (line 125) | struct Tag_t
    function SeedWeakRandomGenerator (line 473) | static void SeedWeakRandomGenerator()
    function IsRouteToAddressProbablyLocal (line 789) | bool IsRouteToAddressProbablyLocal( netadr_t addr )
    function InitFakeRateLimit (line 917) | static void InitFakeRateLimit()
    function UpdateFakeRateLimitTokenBuckets (line 924) | static void UpdateFakeRateLimitTokenBuckets( SteamNetworkingMicrosecon...
    function sendto_gather (line 956) | bool sendto_gather( int sockfd, int nChunks, const iovec *pChunks, soc...
    class CRawUDPSocketImpl (line 980) | class CRawUDPSocketImpl final : public IRawUDPSocket
      method STEAMNETWORKINGSOCKETS_DECLARE_CLASS_OPERATOR_NEW (line 983) | STEAMNETWORKINGSOCKETS_DECLARE_CLASS_OPERATOR_NEW
      method BReallySendRawPacket (line 1009) | inline bool BReallySendRawPacket( int nChunks, const iovec *pChunks,...
      method TracePkt (line 1193) | void TracePkt( bool bSend, const netadr_t &adrRemote, int nChunks, c...
      method SetCallbackRecvPacket (line 1245) | virtual void SetCallbackRecvPacket( CRecvPacketCallback callback ) o...
    class CPacketLagger (line 1268) | class CPacketLagger
      method LagPacket (line 1335) | void LagPacket( CRawUDPSocketImpl *pSock, const netadr_t &adr, Steam...
      method Think (line 1421) | virtual void Think( SteamNetworkingMicroseconds usecNow ) override
      method Clear (line 1457) | void Clear()
      method AboutToDestroySocket (line 1469) | void AboutToDestroySocket( const CRawUDPSocketImpl *pSock )
      method QueueNearFront (line 1488) | void QueueNearFront( CLaggedPacket *pkt )
    type CLaggedPacket (line 1269) | struct CLaggedPacket final : public CPossibleOutOfOrderPacket
      method CLaggedPacket (line 1289) | CLaggedPacket( CRawUDPSocketImpl *pSockOwner, const netadr_t &adrRem...
      method CLaggedPacket (line 1298) | CLaggedPacket( const RecvPktInfo_t &ctx, SteamNetworkingMicroseconds...
      method CRawUDPSocketImpl (line 1308) | CRawUDPSocketImpl *SockOwner() const { return assert_cast<CRawUDPSoc...
      method Detach (line 1310) | void Detach()
      method DoDestroy (line 1322) | virtual void DoDestroy() override
    class CPacketLagger (line 1330) | class CPacketLagger : private IThinker
      method LagPacket (line 1335) | void LagPacket( CRawUDPSocketImpl *pSock, const netadr_t &adr, Steam...
      method Think (line 1421) | virtual void Think( SteamNetworkingMicroseconds usecNow ) override
      method Clear (line 1457) | void Clear()
      method AboutToDestroySocket (line 1469) | void AboutToDestroySocket( const CRawUDPSocketImpl *pSock )
      method QueueNearFront (line 1488) | void QueueNearFront( CLaggedPacket *pkt )
    class CPacketLaggerSend (line 1585) | class CPacketLaggerSend final : public CPacketLagger
      method ProcessPacket (line 1588) | virtual void ProcessPacket( const CLaggedPacket &pkt ) override
    class CPacketLaggerRecv (line 1598) | class CPacketLaggerRecv final : public CPacketLagger
      method ProcessPacket (line 1601) | virtual void ProcessPacket( const CLaggedPacket &pkt ) override
    function EHandleOutOfOrder (line 1610) | EHandleOutOfOrder HandleOutOfOrderPacket( uint16 nWireSeqNum, LinkStat...
    function AddFDToEPoll (line 1737) | static bool AddFDToEPoll( int fd, CRawUDPSocketImpl *pSock, SteamNetwo...
    function IsServiceThreadRunning (line 1756) | bool IsServiceThreadRunning()
    function WakeServiceThread (line 1761) | void WakeServiceThread()
    function SteamNetworkingMicroseconds (line 1779) | inline SteamNetworkingMicroseconds RandomJitter( const GlobalConfigVal...
    function SOCKET (line 1957) | static SOCKET OpenUDPSocketBoundToSockAddr( const void *pSockaddr, siz...
    function CRawUDPSocketImpl (line 2111) | static CRawUDPSocketImpl *OpenRawUDPSocketInternal( CRecvPacketCallbac...
      method STEAMNETWORKINGSOCKETS_DECLARE_CLASS_OPERATOR_NEW (line 983) | STEAMNETWORKINGSOCKETS_DECLARE_CLASS_OPERATOR_NEW
      method BReallySendRawPacket (line 1009) | inline bool BReallySendRawPacket( int nChunks, const iovec *pChunks,...
      method TracePkt (line 1193) | void TracePkt( bool bSend, const netadr_t &adrRemote, int nChunks, c...
      method SetCallbackRecvPacket (line 1245) | virtual void SetCallbackRecvPacket( CRecvPacketCallback callback ) o...
  function IRawUDPSocket (line 2313) | IRawUDPSocket *OpenRawUDPSocket( CRecvPacketCallback callback, SteamNetw...
  function AssertGlobalLockHeldExactlyOnce (line 2318) | static inline void AssertGlobalLockHeldExactlyOnce()
  function DrainSocket (line 2328) | static bool DrainSocket( CRawUDPSocketImpl *pSock )
  function PollRawUDPSockets (line 2602) | static bool PollRawUDPSockets( int nMaxTimeoutMS, bool bManualPoll )
  function ProcessPendingDestroyClosedRawUDPSockets (line 2825) | void ProcessPendingDestroyClosedRawUDPSockets()
  function ProcessDeferredOperations (line 2849) | static void ProcessDeferredOperations()
  type wlan_new (line 2940) | namespace wlan_new
    type _WLAN_INTF_OPCODE (line 2946) | enum _WLAN_INTF_OPCODE {
    function DualWifiInitFailed (line 2982) | static void DualWifiInitFailed( const char *fmt, ... )
    function ConvertInterfaceGuidToIndex (line 2993) | static int ConvertInterfaceGuidToIndex(const GUID& interfaceGuid)
    class RenderGUID (line 3041) | class RenderGUID
      method RenderGUID (line 3045) | RenderGUID( const GUID &guid )
    function MyGetProcAddress (line 3057) | bool MyGetProcAddress( F& fn, HMODULE hm, const char *pszName )
    function GetDualWifiSecondaryInterfaceIndex (line 3066) | static int GetDualWifiSecondaryInterfaceIndex( int nSimulateMode )
    function IRawUDPSocket (line 3187) | IRawUDPSocket *CRawUDPSocketImpl::GetDualWifiSecondarySocket( int nEna...
    function DualWifiShutdown (line 3260) | void DualWifiShutdown() {}
    function SteamNetworkingSockets_InternalPoll (line 3276) | static bool SteamNetworkingSockets_InternalPoll( int msWait, bool bMan...
    function SteamNetworkingThreadProc (line 3348) | static void SteamNetworkingThreadProc()
    function StopServiceThread (line 3456) | static void StopServiceThread()
    class CDedicatedBoundSocket (line 3478) | class CDedicatedBoundSocket : public IBoundUDPSocket
      method CDedicatedBoundSocket (line 3483) | CDedicatedBoundSocket( IRawUDPSocket *pRawSock, const netadr_t &adr )
    function DedicatedBoundSocketCallback (line 3496) | static void DedicatedBoundSocketCallback( const RecvPktInfo_t &info, C...
    function IBoundUDPSocket (line 3519) | IBoundUDPSocket *OpenUDPSocketBoundToHost( const netadr_t &adrRemote, ...
    function CreateBoundSocketPair (line 3542) | bool CreateBoundSocketPair( CRecvPacketCallback callback1, CRecvPacket...
    function FOR_EACH_HASHMAP (line 3628) | FOR_EACH_HASHMAP( m_mapRemoteHosts, idx )
    function IBoundUDPSocket (line 3643) | IBoundUDPSocket *CSharedSocket::AddRemoteHost( const netadr_t &adrRemo...
    function InitSpew (line 3700) | static void InitSpew()
    function KillSpew (line 3764) | static void KillSpew()
    function FlushSystemSpewLocked (line 3783) | static void FlushSystemSpewLocked()
    function FlushSystemSpew (line 3795) | static void FlushSystemSpew()
    function ReallySpewTypeFmt (line 3807) | void ReallySpewTypeFmt( int eType, const char *pMsg, ... )
    function BSteamNetworkingSocketsLowLevelAddRef (line 3815) | bool BSteamNetworkingSocketsLowLevelAddRef( SteamNetworkingErrMsg &err...
    function SteamNetworkingSocketsLowLevelDecRef (line 3994) | void SteamNetworkingSocketsLowLevelDecRef()
    function SteamNetworkingSocketsLowLevelValidate (line 4098) | void SteamNetworkingSocketsLowLevelValidate( CValidator &validator )
    function SteamNetworkingSockets_SetDebugOutputFunction (line 4104) | void SteamNetworkingSockets_SetDebugOutputFunction( ESteamNetworkingSo...
    function SteamNetworkingMicroseconds (line 4120) | SteamNetworkingMicroseconds SteamNetworkingSockets_GetLocalTimestamp()
    function ResolveHostname (line 4174) | bool ResolveHostname( const char* pszHostname, CUtlVector< SteamNetwor...
    function GetLocalAddresses_IsReserved (line 4241) | inline bool GetLocalAddresses_IsReserved( const SteamNetworkingIPAddr ...
    function GetLocalAddresses (line 4267) | bool GetLocalAddresses( CUtlVector< SteamNetworkingIPAddr >* pAddrs )
    function GetLocalAddresses (line 4343) | bool GetLocalAddresses( CUtlVector< SteamNetworkingIPAddr >* pAddrs )
    function GetLocalAddresses (line 4383) | bool GetLocalAddresses( CUtlVector< SteamNetworkingIPAddr >* pAddrs )
  function STEAMNETWORKINGSOCKETS_INTERFACE (line 4395) | STEAMNETWORKINGSOCKETS_INTERFACE void SteamNetworkingSockets_SetManualPo...
  function STEAMNETWORKINGSOCKETS_INTERFACE (line 4423) | STEAMNETWORKINGSOCKETS_INTERFACE void SteamNetworkingSockets_Poll( int m...
  function STEAMNETWORKINGSOCKETS_INTERFACE (line 4443) | STEAMNETWORKINGSOCKETS_INTERFACE void SteamNetworkingSockets_SetLockWait...
  function STEAMNETWORKINGSOCKETS_INTERFACE (line 4452) | STEAMNETWORKINGSOCKETS_INTERFACE void SteamNetworkingSockets_SetLockAcqu...
  function STEAMNETWORKINGSOCKETS_INTERFACE (line 4461) | STEAMNETWORKINGSOCKETS_INTERFACE void SteamNetworkingSockets_SetLockHeld...
  function STEAMNETWORKINGSOCKETS_INTERFACE (line 4470) | STEAMNETWORKINGSOCKETS_INTERFACE void SteamNetworkingSockets_SetPreForma...
  function STEAMNETWORKINGSOCKETS_INTERFACE (line 4479) | STEAMNETWORKINGSOCKETS_INTERFACE void SteamNetworkingSockets_DefaultPreF...
  function STEAMNETWORKINGSOCKETS_INTERFACE (line 4585) | STEAMNETWORKINGSOCKETS_INTERFACE void SteamNetworkingSockets_SetServiceT...
  function SteamNetworkingSockets_Free (line 4619) | void SteamNetworkingSockets_Free( void *p )
  function STEAMNETWORKINGSOCKETS_INTERFACE (line 4624) | STEAMNETWORKINGSOCKETS_INTERFACE void SteamNetworkingSockets_SetCustomMe...

FILE: src/steamnetworkingsockets/clientlib/steamnetworkingsockets_lowlevel.h
  type iovec (line 27) | struct iovec
  function namespace (line 29) | namespace SteamNetworkingSocketsLib {
  type EDualWifiStatus (line 134) | enum EDualWifiStatus
  function IRawUDPSocket (line 145) | inline IRawUDPSocket *GetDualWifiSecondarySocket( int nEnableSetting ) {...
  function class (line 196) | class IBoundUDPSocket
  function IRawUDPSocket (line 219) | IRawUDPSocket *GetRawSock() const { return m_pRawSock; }
  function class (line 240) | class CSharedSocket
  function BRateLimitSpew (line 339) | inline bool BRateLimitSpew( SteamNetworkingMicroseconds usecNow )
  type LockDebugInfo (line 449) | struct LockDebugInfo
  function unlock (line 514) | inline void unlock()
  function m_pLock (line 543) | m_pLock( nullptr ) {}
  function BHoldsLock (line 547) | bool BHoldsLock( const TLock &lock ) const { return m_pLock == &lock; }
  function TryLock (line 559) | bool TryLock( TLock &lock, int msTimeout, const char *pszTag )
  function Unlock (line 573) | void Unlock() { if ( !m_pLock ) return; m_pLock->unlock(); m_pLock = nul...
  function Abandon (line 576) | void Abandon() { m_pLock = nullptr; }
  function ShortDurationMutexImpl (line 601) | struct ShortDurationLock : Lock<ShortDurationMutexImpl>
  function class (line 652) | class CTaskTarget
  function class (line 680) | class CQueuedTask
  function SetTarget (line 769) | void SetTarget( TTarget *pTarget ) { CQueuedTask::SetTarget( pTarget ); }
  function TTarget (line 770) | TTarget *Target() const { return static_cast<TTarget*>( m_pTarget ); }
  function class (line 774) | class CTaskList

FILE: src/steamnetworkingsockets/clientlib/steamnetworkingsockets_p2p.cpp
  type SteamNetworkingSocketsLib (line 38) | namespace SteamNetworkingSocketsLib {
    function CSteamNetworkConnectionP2P (line 600) | CSteamNetworkConnectionP2P *CSteamNetworkConnectionP2P::AsSteamNetwork...
    function CSteamNetworkConnectionP2P (line 685) | CSteamNetworkConnectionP2P *CSteamNetworkConnectionP2P::FindDuplicateC...
    function EResult (line 762) | EResult CSteamNetworkConnectionP2P::AcceptConnection( SteamNetworkingM...
    function EResult (line 784) | EResult CSteamNetworkConnectionP2P::P2PInternalAcceptConnection( Steam...
    function int64 (line 840) | int64 CSteamNetworkConnectionP2P::_APISendMessageToConnection( CSteamN...
    function SteamNetworkingMicroseconds (line 1001) | SteamNetworkingMicroseconds CSteamNetworkConnectionP2P::GetSignalRelia...
  function SteamNetworkingMicroseconds (line 1413) | SteamNetworkingMicroseconds CSteamNetworkConnectionP2P::ThinkConnection_...
  function SteamNetworkingMicroseconds (line 1466) | SteamNetworkingMicroseconds CSteamNetworkConnectionP2P::CheckWaitForInit...
  function SteamNetworkingMicroseconds (line 1545) | SteamNetworkingMicroseconds CSteamNetworkConnectionP2P::ThinkConnection_...
  function ESteamNetConnectionEnd (line 2073) | ESteamNetConnectionEnd CSteamNetworkConnectionP2P::CheckRemoteCert( cons...
  function SteamNetworkingMicroseconds (line 2357) | SteamNetworkingMicroseconds CConnectionTransportP2PBase::CalcTotalTimeSe...
  function HSteamListenSocket (line 2377) | HSteamListenSocket CSteamNetworkingSockets::CreateListenSocketP2P( int n...
  function HSteamListenSocket (line 2394) | HSteamListenSocket CSteamNetworkingSockets::CreateListenSocketP2PFakeIP(...
  function CSteamNetworkListenSocketP2P (line 2416) | CSteamNetworkListenSocketP2P *CSteamNetworkingSockets::InternalCreateLis...
  function HSteamNetConnection (line 2474) | HSteamNetConnection CSteamNetworkingSockets::ConnectP2P( const SteamNetw...
  function CSteamNetworkConnectionBase (line 2516) | CSteamNetworkConnectionBase *CSteamNetworkingSockets::InternalConnectP2P...
  function HSteamNetConnection (line 2697) | HSteamNetConnection CSteamNetworkingSockets::ConnectP2PCustomSignaling( ...
  function CSteamNetworkConnectionBase (line 2710) | CSteamNetworkConnectionBase *CSteamNetworkingSockets::InternalConnectP2P(
  function SendP2PRejection (line 2795) | static void SendP2PRejection( ISteamNetworkingSignalingRecvContext *pCon...
  function CompareSymmetricConnections (line 2842) | static int CompareSymmetricConnections( uint32 nConnectionIDA, const std...

FILE: src/steamnetworkingsockets/clientlib/steamnetworkingsockets_p2p.h
  function namespace (line 17) | namespace SteamNetworkingSocketsLib {
  function class (line 74) | class CSteamNetworkListenSocketP2P : public CSteamNetworkListenSocketBase
  type EHostedDedicatedServer (line 94) | enum EHostedDedicatedServer
  function class (line 108) | class CConnectionTransportP2PBase
  function class (line 198) | class CSteamNetworkConnectionP2P : public CSteamNetworkConnectionBase

FILE: src/steamnetworkingsockets/clientlib/steamnetworkingsockets_p2p_ice.cpp
  type SteamNetworkingSocketsLib (line 34) | namespace SteamNetworkingSocketsLib {
    function Base64EncodeLower30Bits (line 637) | std::string Base64EncodeLower30Bits( uint32 nNum )

FILE: src/steamnetworkingsockets/clientlib/steamnetworkingsockets_p2p_ice.h
  function namespace (line 14) | namespace SteamNetworkingSocketsLib {
  function ISteamNetworkingConnectionSignaling (line 31) | inline ISteamNetworkingConnectionSignaling *Signaling() const { return C...

FILE: src/steamnetworkingsockets/clientlib/steamnetworkingsockets_p2p_webrtc.cpp
  type SteamNetworkingSocketsLib (line 15) | namespace SteamNetworkingSocketsLib {
    class IConnectionTransportP2PICERunWithLock (line 255) | class IConnectionTransportP2PICERunWithLock : private CQueuedTaskOnTar...
      method Queue (line 262) | inline void Queue( CConnectionTransportP2PICE_WebRTC *pTransport, co...
      method RunOrQueue (line 268) | inline void RunOrQueue( CConnectionTransportP2PICE_WebRTC *pTranspor...
      method Setup (line 275) | inline bool Setup( CConnectionTransportP2PICE_WebRTC *pTransport )
      method Run (line 288) | virtual void Run()
    type RunIceCandidateAdded (line 334) | struct RunIceCandidateAdded : IConnectionTransportP2PICERunWithLock
      method RunTransportP2PICE (line 338) | virtual void RunTransportP2PICE( CConnectionTransportP2PICE_WebRTC *...
    type RunWritableStateChanged (line 389) | struct RunWritableStateChanged : IConnectionTransportP2PICERunWithLock
      method RunTransportP2PICE (line 391) | virtual void RunTransportP2PICE( CConnectionTransportP2PICE_WebRTC *...
    type RunRouteStateChanged (line 428) | struct RunRouteStateChanged : IConnectionTransportP2PICERunWithLock
      method RunTransportP2PICE (line 430) | virtual void RunTransportP2PICE( CConnectionTransportP2PICE_WebRTC *...
    type RunDrainQueue (line 499) | struct RunDrainQueue : IConnectionTransportP2PICERunWithLock
      method RunTransportP2PICE (line 501) | virtual void RunTransportP2PICE( CConnectionTransportP2PICE_WebRTC *...

FILE: src/steamnetworkingsockets/clientlib/steamnetworkingsockets_p2p_webrtc.h
  type ICESessionConfig (line 16) | struct ICESessionConfig
  type IICESession (line 17) | typedef IICESession *( *CreateICESession_t )( const ICESessionConfig &cf...
  function namespace (line 20) | namespace SteamNetworkingSocketsLib {

FILE: src/steamnetworkingsockets/clientlib/steamnetworkingsockets_snp.cpp
  type SteamNetworkingSocketsLib (line 14) | namespace SteamNetworkingSocketsLib {
    type SNPAckSerializerHelper (line 16) | struct SNPAckSerializerHelper
      type Block (line 18) | struct Block
      method uint16 (line 40) | static uint16 EncodeTimeSince( SteamNetworkingMicroseconds usecNow, ...
    function SteamNetworkingMicroseconds (line 57) | inline SteamNetworkingMicroseconds GetUsecPingWithFallback( CSteamNetw...
    type LaneDebug (line 133) | struct LaneDebug
    function FOR_EACH_LL (line 144) | FOR_EACH_LL( m_listSentReliableSegments, hSeg )
    function int64 (line 300) | int64 CSteamNetworkConnectionBase::SNP_SendMessage( CSteamNetworkingMe...
    function EResult (line 535) | EResult CSteamNetworkConnectionBase::SNP_ConfigureLanes( int nLanes, c...
    function EResult (line 662) | EResult CSteamNetworkConnectionBase::SNP_FlushMessage( SteamNetworking...
    function SteamNetworkingMicroseconds (line 1547) | SteamNetworkingMicroseconds CSteamNetworkConnectionBase::SNP_SenderChe...
    type SNPEncodedSegment (line 1650) | struct SNPEncodedSegment
      method SetupReliable (line 1660) | inline void SetupReliable( CSteamNetworkingMessage *pMsg, int64 nBeg...
      method SetupUnreliable (line 1719) | inline void SetupUnreliable( CSteamNetworkingMessage *pMsg, int nOff...
    type SNPPacketSerializeHelper (line 1774) | struct SNPPacketSerializeHelper
      method SNPInFlightPacket_t (line 1781) | inline SNPInFlightPacket_t &InFlightPkt() { return m_insertInflightP...
      method SteamNetworkingMicroseconds (line 1782) | inline SteamNetworkingMicroseconds UsecNow() const { return m_insert...
    type SNPSegmentCollectorLaneBase (line 1941) | struct SNPSegmentCollectorLaneBase
      method SNPEncodedSegment (line 1946) | SNPEncodedSegment *AddUnreliable( CSteamNetworkingMessage *pMsg, int...
    type SNPSegmentCollectorLane (line 1958) | struct SNPSegmentCollectorLane
    type SNPSegmentCollectorLane<true> (line 1961) | struct SNPSegmentCollectorLane<true> : SNPSegmentCollectorLaneBase
      method SNPEncodedSegment (line 1964) | SNPEncodedSegment *AddReliableRetry( uint16 hRelSeg, const SNPSendRe...
      method SNPEncodedSegment (line 1972) | SNPEncodedSegment *AddReliable( CSteamNetworkingMessage *pMsg, int64...
    type SNPSegmentCollectorLane<false> (line 1982) | struct SNPSegmentCollectorLane<false> : SNPSegmentCollectorLaneBase
      method SNPEncodedSegment (line 1985) | SNPEncodedSegment *AddReliableRetry( uint16 hRelSeg, const SNPSendRe...
      method SNPEncodedSegment (line 1997) | SNPEncodedSegment *AddReliable( CSteamNetworkingMessage *pMsg, int64...
    type SegmentCollectorBase (line 2012) | struct SegmentCollectorBase
    type SNPSegmentCollector<k_bUnreliableOnly,true> (line 2018) | struct SNPSegmentCollector<k_bUnreliableOnly,true> : SegmentCollectorBase
      method Lane (line 2024) | inline Lane *GetLane( int idxLane )
      method IsEmpty (line 2030) | inline bool IsEmpty() { return m_singleLane.m_vecSegments.empty(); }
      method UndoLast (line 2032) | void UndoLast( Lane *pLane )
    type SNPSegmentCollector<k_bUnreliableOnly,false> (line 2040) | struct SNPSegmentCollector<k_bUnreliableOnly,false> : SegmentCollector...
      type TaggedLane (line 2045) | struct TaggedLane : Lane
      method Lane (line 2060) | inline Lane *GetLane( int nLaneID )
      method IsEmpty (line 2097) | inline bool IsEmpty() { return m_vecLanes.empty(); }
      method UndoLast (line 2099) | void UndoLast( Lane *pLane )
    function uint8 (line 2115) | inline uint8 *CSteamNetworkConnectionBase::SNP_SerializeSegmentArray( ...
    function uint8 (line 2282) | uint8 *CSteamNetworkConnectionBase::SNP_SerializeSegments_MultiLane( u...
    function uint8 (line 2322) | uint8 *CSteamNetworkConnectionBase::SNP_SerializeSegments<true, true>(...
    function uint8 (line 2328) | uint8 *CSteamNetworkConnectionBase::SNP_SerializeSegments<false, true>...
    function uint8 (line 2334) | uint8 *CSteamNetworkConnectionBase::SNP_SerializeSegments<true, false>...
    function uint8 (line 2340) | uint8 *CSteamNetworkConnectionBase::SNP_SerializeSegments<false, false...
    function uint8 (line 2900) | uint8 *CSteamNetworkConnectionBase::SNP_SerializeAckBlocks( const SNPP...
    function uint8 (line 3149) | inline uint8 *CSteamNetworkConnectionBase::SNP_SerializeStopWaitingFra...
    function SteamNetworkingMicroseconds (line 4214) | SteamNetworkingMicroseconds CSteamNetworkConnectionBase::SNP_ThinkSend...
    function SteamNetworkingMicroseconds (line 4398) | SteamNetworkingMicroseconds CSteamNetworkConnectionBase::SNP_TimeWhenW...
    function SteamNetworkingMicroseconds (line 4445) | SteamNetworkingMicroseconds CSteamNetworkConnectionBase::SNP_GetNextTh...
    type LaneSort_t (line 4590) | struct LaneSort_t

FILE: src/steamnetworkingsockets/clientlib/steamnetworkingsockets_snp.h
  type P2PSessionState_t (line 11) | struct P2PSessionState_t
  function namespace (line 13) | namespace SteamNetworkingSocketsLib {
  type SteamNetworkingMessageQueue (line 180) | struct SteamNetworkingMessageQueue
  type SNPSendReliableSegment_t (line 218) | struct SNPSendReliableSegment_t
  type SNPInFlightPacket_t (line 254) | struct SNPInFlightPacket_t
  type SSendRateData (line 279) | struct SSendRateData
  type SSNPSenderState (line 320) | struct SSNPSenderState
  type PriorityClass (line 336) | struct PriorityClass
  type Lane (line 349) | struct Lane
  function ClearNagleTimers (line 398) | void ClearNagleTimers()
  function RemoveReliableSegmentFromRetryList (line 450) | void RemoveReliableSegmentFromRetryList( uint16 hSeg, uint16 nNewStatus )
  function DebugCheckInFlightPacketMap (line 465) | inline void DebugCheckInFlightPacketMap() const {}
  function MaybeCheckInFlightPacketMap (line 475) | inline void MaybeCheckInFlightPacketMap() const {}
  type SSNPRecvUnreliableSegmentData (line 493) | struct SSNPRecvUnreliableSegmentData
  type SSNPPacketGap (line 500) | struct SSNPPacketGap
  type SSNPReceiverState (line 508) | struct SSNPReceiverState
  type Lane (line 517) | struct Lane
  function DebugCheckPacketGapMap (line 637) | void DebugCheckPacketGapMap() const;
  function LinkToQueueTail (line 699) | inline void CSteamNetworkingMessage::LinkToQueueTail( CSteamNetworkingMe...
  function UnlinkFromQueue (line 737) | inline void CSteamNetworkingMessage::UnlinkFromQueue( CSteamNetworkingMe...

FILE: src/steamnetworkingsockets/clientlib/steamnetworkingsockets_stun.cpp
  type SteamNetworkingSocketsLib (line 15) | namespace SteamNetworkingSocketsLib {
    function UnpackSTUNHeader (line 25) | static void UnpackSTUNHeader( const uint32 *pHeader, STUNHeader* pUnpa...
    function IsValidSTUNHeader (line 58) | bool IsValidSTUNHeader( STUNHeader* pHeader, uint32 uPacketSize, uint3...
    function uint32 (line 108) | static const uint32* DecodeSTUNAttribute( const uint32 *pData, const u...
    function uint32 (line 127) | static uint32* WriteGenericSTUNAttribute( uint32 *pData, STUNAttribute...
    function ReadMappedAddress (line 142) | static bool ReadMappedAddress( const STUNAttribute *pAttr, SteamNetwor...
    function uint32 (line 187) | static uint32* WriteMappedAddress( uint32* pBuffer, const SteamNetwork...
    function ReadXORMappedAddress (line 217) | static bool ReadXORMappedAddress( const STUNAttribute *pAttr, const ST...
    function uint32 (line 264) | static uint32* WriteXORMappedAddress( uint32* pBuffer, const SteamNetw...
    function ReadAnyMappedAddress (line 299) | static bool ReadAnyMappedAddress( const STUNAttribute *pAttrs, uint32 ...
    function STUNAttribute (line 319) | static const STUNAttribute* FindAttributeOfType( const STUNAttribute *...
    function ReadFingerprintAttribute (line 333) | static bool ReadFingerprintAttribute( const STUNAttribute *pAttr, cons...
    function uint32 (line 353) | static uint32* ReserveFingerprintAttribute( uint32 *pBuffer )
    function uint32 (line 359) | static uint32* WriteFingerprintAttribute( uint32 *pBuffer, uint32 *pMe...
    function ReadMessageIntegritySHA256Attribute (line 366) | static bool ReadMessageIntegritySHA256Attribute( const STUNAttribute *...
    function uint32 (line 390) | static uint32* ReserveMessageIntegritySHA256Attribute( uint32 *pBuffer )
    function uint32 (line 396) | static uint32* WriteMessageIntegritySHA256Attribute( uint32 *pBuffer, ...
    function ReadMessageIntegrityAttribute (line 406) | static bool ReadMessageIntegrityAttribute( const STUNAttribute *pAttr,...
    function uint32 (line 436) | static uint32* ReserveMessageIntegrityAttribute( uint32 *pBuffer )
    function uint32 (line 442) | static uint32* WriteMessageIntegrityAttribute( uint32 *pBuffer, uint32...
    function DecodeSTUNPacket (line 455) | static bool DecodeSTUNPacket( const void *pPkt, uint32 cbPkt, uint32* ...
    function uint32 (line 511) | static uint32 EncodeSTUNPacket( uint32* messageBuffer, uint16 nMessage...
    function SendSTUNResponsePacket (line 608) | static bool SendSTUNResponsePacket( IRawUDPSocket* pSocket, int nEncod...
    function ConvertNetAddr_tToSteamNetworkingIPAddr (line 625) | static void ConvertNetAddr_tToSteamNetworkingIPAddr( const netadr_t& i...
    function ConvertSteamNetworkingIPAddrToNetAdr_t (line 640) | static void ConvertSteamNetworkingIPAddrToNetAdr_t( const SteamNetwork...
    function make_crc_table (line 666) | void make_crc_table(void)
    function uint32 (line 696) | uint32 update_crc( uint32 crc, const unsigned char *buf, int len)
    function uint32 (line 710) | static uint32 CRC32( const unsigned char *buf, int len )
    type RFC5245CandidateAttr (line 717) | struct RFC5245CandidateAttr {
    function ParseRFC5245CandidateAttribute (line 728) | bool ParseRFC5245CandidateAttribute( const char *pszAttr, RFC5245Candi...
    function CSteamNetworkingSocketsSTUNRequest (line 934) | CSteamNetworkingSocketsSTUNRequest *CSteamNetworkingSocketsSTUNRequest...
    function CSteamNetworkingSocketsSTUNRequest (line 951) | CSteamNetworkingSocketsSTUNRequest *CSteamNetworkingSocketsSTUNRequest...
    function CSteamNetworkingSocketsSTUNRequest (line 979) | CSteamNetworkingSocketsSTUNRequest *CSteamNetworkingSocketsSTUNRequest...
    function SteamNetworkingIPAddr (line 1171) | SteamNetworkingIPAddr CSteamNetworkingICESession::GetSelectedDestinati...
    function CSharedSocket (line 1290) | CSharedSocket* CSteamNetworkingICESession::FindSharedSocketForCandidat...
    function uint32 (line 2113) | uint32 CSteamNetworkingICESession::ICECandidate::CalcPriority( uint32 ...
    function IsPrivateIPv4 (line 2175) | static bool IsPrivateIPv4( const uint8 m_ip[ 4 ] )
    function EICECandidateType (line 2189) | EICECandidateType CSteamNetworkingICESession::ICECandidate::CalcType()...

FILE: src/steamnetworkingsockets/clientlib/steamnetworkingsockets_stun.h
  function namespace (line 13) | namespace SteamNetworkingSocketsLib {
  type STUNPacketEncodingFlags (line 88) | enum STUNPacketEncodingFlags
  function class (line 101) | class CSteamNetworkingSocketsSTUNRequest : private IThinker
  function class (line 148) | class CSteamNetworkingICESession : private IThinker

FILE: src/steamnetworkingsockets/clientlib/steamnetworkingsockets_udp.cpp
  type SteamNetworkingSocketsLib (line 11) | namespace SteamNetworkingSocketsLib {
    function BCheckRateLimitReportBadPacket (line 19) | bool BCheckRateLimitReportBadPacket( SteamNetworkingMicroseconds usecN...
    function ReallyReportBadUDPPacket (line 28) | void ReallyReportBadUDPPacket( const char *pszFrom, const char *pszMsg...
    function GetIPAllowWithoutAuth (line 79) | static int GetIPAllowWithoutAuth( const ConnectionConfig &cfg, bool bI...
    function uint64 (line 250) | uint64 CSteamNetworkListenSocketDirectUDP::GenerateChallenge( uint16 n...
    function uint16 (line 267) | inline uint16 GetChallengeTime( SteamNetworkingMicroseconds usecNow )
    function DescribeStatsContents (line 602) | std::string DescribeStatsContents( const CMsgSteamSockets_UDP_Stats &m...
    function EResult (line 1318) | EResult CSteamNetworkConnectionUDP::AcceptConnection( SteamNetworkingM...
    function EUnsignedCert (line 1824) | EUnsignedCert CSteamNetworkConnectionUDP::AllowRemoteUnsignedCert()
    function EUnsignedCert (line 1838) | EUnsignedCert CSteamNetworkConnectionUDP::AllowLocalUnsignedCert()
    function EUnsignedCert (line 1856) | EUnsignedCert CSteamNetworkConnectionlocalhostLoopback::AllowRemoteUns...
    function EUnsignedCert (line 1861) | EUnsignedCert CSteamNetworkConnectionlocalhostLoopback::AllowLocalUnsi...

FILE: src/steamnetworkingsockets/clientlib/steamnetworkingsockets_udp.h
  type UDPPaddedMessageHdr (line 19) | struct UDPPaddedMessageHdr
  type UDPDataMsgHdr (line 25) | struct UDPDataMsgHdr
  function CMsgSteamSockets_UDP_Stats (line 50) | struct UDPSendPacketContext_t : SendPacketContext<CMsgSteamSockets_UDP_S...
  function RecvPacketContext_t (line 60) | struct UDPRecvPacketContext_t : RecvPacketContext_t
  function class (line 81) | class CSteamNetworkListenSocketDirectUDP : public CSteamNetworkListenSoc...
  function class (line 127) | class CConnectionTransportUDPBase : public CConnectionTransport
  function virtual (line 166) | virtual void TransportFreeResources() override;
  function CConnectionTransportUDP (line 206) | inline CConnectionTransportUDP *Transport() const { return assert_cast<C...
  function virtual (line 211) | virtual EUnsignedCert AllowRemoteUnsignedCert() override;

FILE: src/steamnetworkingsockets/steamnetworking_stats.h
  function namespace (line 21) | namespace SteamNetworkingSocketsLib {
  function N100 (line 125) | struct QualityHistogram
  type JitterHistogram (line 170) | struct JitterHistogram
  function AddSample (line 181) | void AddSample( SteamNetworkingMicroseconds usecJitter )
  type SteamDatagramLinkLifetimeStats (line 207) | struct SteamDatagramLinkLifetimeStats
  type SteamDatagramLinkStats (line 334) | struct SteamDatagramLinkStats
  type SteamNetworkingDetailedConnectionStatus (line 366) | struct SteamNetworkingDetailedConnectionStatus

FILE: src/steamnetworkingsockets/steamnetworking_statsutils.h
  function namespace (line 26) | namespace SteamNetworkingSocketsLib {
  type PacketRate_t (line 100) | struct PacketRate_t
  function ProcessPacket (line 107) | inline void ProcessPacket( int sz )
  function UpdateInterval (line 113) | void UpdateInterval( float flIntervalDuration )
  function x (line 119) | inline void operator+=( const PacketRate_t &x )
  function WorstPingInRecentSample (line 127) | struct PingTracker
  function ReceivedPing (line 191) | void ReceivedPing( int nPingMS, SteamNetworkingMicroseconds usecNow )
  function GetLifetimeStats (line 206) | void GetLifetimeStats( SteamDatagramLinkLifetimeStats &s ) const
  type TimeBucket (line 231) | struct TimeBucket
  function Reset (line 243) | void Reset()
  function ReceivedPing (line 256) | void ReceivedPing( int nPingMS, SteamNetworkingMicroseconds usecNow )
  function SetPingOverride (line 301) | void SetPingOverride( int nPing )
  function GetPingRangeFromRecentBuckets (line 322) | int GetPingRangeFromRecentBuckets( int &nOutMin, int &nOutMax, SteamNetw...
  function Accumulate (line 428) | struct SequencedPacketCounters
  function CalculateQuality (line 462) | static inline float CalculateQuality( int nRecv, int nDropped, int nWeird )
  function OnRecv (line 476) | inline void OnRecv()
  function OnDropped (line 480) | inline void OnDropped( int nDropped )
  function OnDuplicate (line 484) | inline void OnDuplicate()
  function OnLurch (line 488) | inline void OnLurch()
  function OnOutOfOrder (line 492) | inline void OnOutOfOrder()
  function OnOutOfOrderCorrected (line 500) | inline void OnOutOfOrderCorrected()
  function ELinkActivityLevel (line 512) | enum class ELinkActivityLevel

FILE: src/steamnetworkingsockets/steamnetworkingsockets_certs.cpp
  type SteamNetworkingSocketsLib (line 10) | namespace SteamNetworkingSocketsLib {
    function uint64 (line 12) | uint64 CalculatePublicKeyID_Ed25519( const void *pPubKey, size_t cbPub...
    function uint64 (line 24) | uint64 CalculatePublicKeyID( const CECSigningPublicKey &pubKey )
    function SteamNetworkingIdentityFromLegacyBinaryProtobufMsg (line 40) | static int SteamNetworkingIdentityFromLegacyBinaryProtobufMsg( SteamNe...
    function BSteamNetworkingIdentityFromLegacyBinaryProtobuf (line 90) | bool BSteamNetworkingIdentityFromLegacyBinaryProtobuf( SteamNetworking...
    function BSteamNetworkingIdentityFromLegacySteamID (line 120) | bool BSteamNetworkingIdentityFromLegacySteamID( SteamNetworkingIdentit...
    function BSteamNetworkingIdentityFromLegacyBinaryProtobuf (line 132) | bool BSteamNetworkingIdentityFromLegacyBinaryProtobuf( SteamNetworking...
    function SteamNetworkingIdentityFromSignedCert (line 173) | int SteamNetworkingIdentityFromSignedCert( SteamNetworkingIdentity &re...
    function BSteamNetworkingIdentityToProtobufInternal (line 187) | bool BSteamNetworkingIdentityToProtobufInternal( const SteamNetworking...
    function BSteamNetworkingIdentityToProtobufInternal (line 242) | bool BSteamNetworkingIdentityToProtobufInternal( const SteamNetworking...
    function BCheckSignature (line 259) | bool BCheckSignature( const std::string &signed_data, CMsgSteamDatagra...
    function ParseCertFromBase64 (line 307) | bool ParseCertFromBase64( const char *pBase64Data, size_t cbBase64Data...
    function ParseCertFromPEM (line 333) | bool ParseCertFromPEM( const void *pCert, size_t cbCert, CMsgSteamData...

FILE: src/steamnetworkingsockets/steamnetworkingsockets_certstore.cpp
  type SteamNetworkingSocketsLib (line 26) | namespace SteamNetworkingSocketsLib {
    type ETrust (line 127) | enum ETrust
    type Cert (line 141) | struct Cert
      method Setup (line 151) | bool Setup( const CMsgSteamDatagramCertificateSigned &msgCertSigned,...
      method Print (line 222) | void Print( std::ostream &out, const char *pszIndent ) const
    type PublicKey (line 231) | struct PublicKey
      method uint64 (line 240) | uint64 CalculateKeyID() const { Assert( m_keyPublic.IsValid() ); ret...
      method IsTrusted (line 242) | inline bool IsTrusted() const
      method SlamHardcodedRootCA (line 252) | void SlamHardcodedRootCA()
      method Validate (line 263) | void Validate( CValidator &validator, const char *pchName ) const
    function PublicKey (line 275) | static PublicKey *FindPublicKey( uint64 nKeyID )
      method uint64 (line 240) | uint64 CalculateKeyID() const { Assert( m_keyPublic.IsValid() ); ret...
      method IsTrusted (line 242) | inline bool IsTrusted() const
      method SlamHardcodedRootCA (line 252) | void SlamHardcodedRootCA()
      method Validate (line 263) | void Validate( CValidator &validator, const char *pchName ) const
    function CertStore_OneTimeInit (line 283) | static void CertStore_OneTimeInit()
    function CertStore_Reset (line 302) | void CertStore_Reset()
    function CertStore_AddKeyRevocation (line 308) | void CertStore_AddKeyRevocation( uint64 key_id )
    function CertStore_AddCertFromBase64 (line 336) | bool CertStore_AddCertFromBase64( const char *pszBase64, SteamNetworki...
    function V_sprintf_stdstring (line 401) | std::string V_sprintf_stdstring( const char *pszFmt, ... )
    function RecursiveEvaluateKeyTrust (line 411) | static void RecursiveEvaluateKeyTrust( PublicKey *pKey )
    function CertStore_EnsureTrustValid (line 566) | static void CertStore_EnsureTrustValid()
    function CertAuthScope (line 589) | const CertAuthScope *CertStore_CheckCASignature( const std::string &si...
    function CertAuthScope (line 652) | const CertAuthScope *CertStore_CheckCert( const CMsgSteamDatagramCerti...
    function CertAuthScope (line 706) | const CertAuthScope *CertStore_CheckPublicKey( uint64 nKeyID, time_t t...
    function CheckCertAppID (line 733) | bool CheckCertAppID( const CMsgSteamDatagramCertificate &msgCert, cons...
    function CheckCertPOPID (line 769) | bool CheckCertPOPID( const CMsgSteamDatagramCertificate &msgCert, cons...
    function CertStore_Check (line 806) | void CertStore_Check()
    function CertStore_Print (line 819) | void CertStore_Print( std::ostream &out )
    function CertStore_ValidateStatics (line 847) | void CertStore_ValidateStatics( CValidator &validator )

FILE: src/steamnetworkingsockets/steamnetworkingsockets_certstore.h
  function namespace (line 24) | namespace SteamNetworkingSocketsLib {

FILE: src/steamnetworkingsockets/steamnetworkingsockets_internal.h
  type EDualWifiEnable (line 134) | enum EDualWifiEnable {
  type ESteamNetTransportKind (line 145) | enum ESteamNetTransportKind
  function T (line 166) | T LittleWord( T x )
  function T (line 174) | T LittleDWord( T x )
  function T (line 182) | T LittleQWord( T x )
  type iovec (line 192) | struct iovec
  function namespace (line 220) | namespace SteamNetworkingSocketsLib {
  function std (line 555) | inline std::string Indent( const std::string &s ) { return Indent( s.c_s...
  function IsPrivateIP (line 575) | inline bool IsPrivateIP( uint32 unIP )
  function SteamNetworkingIPAddrToNetAdr (line 589) | inline void SteamNetworkingIPAddrToNetAdr( netadr_t &netadr, const Steam...
  function NetAdrToSteamNetworkingIPAddr (line 599) | inline void NetAdrToSteamNetworkingIPAddr( SteamNetworkingIPAddr &addr, ...
  function AddrEqual (line 605) | inline bool AddrEqual( const SteamNetworkingIPAddr &s, const netadr_t &n )
  function int64 (line 622) | int64 NearestWithSameLowerBits( T nLowerBits, int64 nReference )
  type SteamNetworkingIdentityHash (line 631) | struct SteamNetworkingIdentityHash
  type SteamNetworkingIPAddrHash (line 647) | struct SteamNetworkingIPAddrHash
  function IsValidSteamIDForIdentity (line 657) | inline bool IsValidSteamIDForIdentity( CSteamID steamID )
  function IsValidSteamIDForIdentity (line 662) | inline bool IsValidSteamIDForIdentity( uint64 steamid64 ) { return IsVal...
  function SteamNetworkingIdentityFromCert (line 695) | inline int SteamNetworkingIdentityFromCert( SteamNetworkingIdentity &res...
  function IsSet (line 703) | struct ConfigValueBase
  function explicit (line 734) | inline explicit ConfigValue( const T &defaultValue ) : m_data(defaultVal...
  function T (line 739) | inline const T &Get() const
  function Set (line 752) | inline void Set( const T &value )
  function Lock (line 760) | inline void Lock()
  function int32 (line 769) | struct ConfigDataTypeTraits<int32> { const static ESteamNetworkingConfig...
  function int64 (line 770) | struct ConfigDataTypeTraits<int64> { const static ESteamNetworkingConfig...
  function float (line 771) | struct ConfigDataTypeTraits<float> { const static ESteamNetworkingConfig...
  function string (line 772) | struct ConfigDataTypeTraits<std::string> { const static ESteamNetworking...
  function void (line 773) | struct ConfigDataTypeTraits<void*> { const static ESteamNetworkingConfig...
  type GlobalConfigValueEntry (line 775) | struct GlobalConfigValueEntry
  function val (line 810) | float &val ) { val = std::max( m_floatmin, std::min( m_floatmax, val ) ); }
  type Value (line 835) | struct Value
  type ConnectionConfig (line 852) | struct ConnectionConfig
  function namespace (line 916) | namespace GlobalConfig
  function RandomBoolWithOdds (line 977) | inline bool RandomBoolWithOdds( float odds )
  function ESteamNetworkingFakeIPType (line 986) | inline ESteamNetworkingFakeIPType GetIPv4FakeIPType( uint32 nIPv4 )
  function ESteamNetworkingFakeIPType (line 998) | inline ESteamNetworkingFakeIPType GetIPv4FakeIPType( uint32 nIPv4 ) { re...
  function class (line 1003) | class CPossibleOutOfOrderPacket
  function PutUint16 (line 1030) | struct DataPacketSerializerBase
  function Finish (line 1071) | int Finish()
  function uint8 (line 1089) | inline uint8 IPv4_TOS_make( uint8 dscp, uint8 ecn )
  function uint8 (line 1097) | inline uint8 IPv4_TOS_ECN( uint8 tos )
  function uint8 (line 1103) | inline uint8 IPv4_TOS_DSCP( uint8 tos )
  function uint8 (line 1122) | inline uint8 ResolveECNSendGlobal()
  function uint8 (line 1130) | inline uint8 ResolveECNSendGlobal() { return 0; }
  function namespace (line 1160) | namespace SteamNetworkingSocketsLib

FILE: src/steamnetworkingsockets/steamnetworkingsockets_shared.cpp
  type SteamNetworkingSocketsLib (line 11) | namespace SteamNetworkingSocketsLib
    function Indent (line 15) | std::string Indent( const char *s )
    function uint32 (line 70) | uint32 Murmorhash32( const void *data, size_t len )
  function STEAMNETWORKINGSOCKETS_INTERFACE (line 119) | STEAMNETWORKINGSOCKETS_INTERFACE void SteamNetworkingIPAddr_ToString( co...
  function STEAMNETWORKINGSOCKETS_INTERFACE (line 144) | STEAMNETWORKINGSOCKETS_INTERFACE bool SteamNetworkingIPAddr_ParseString(...
  function STEAMNETWORKINGSOCKETS_INTERFACE (line 194) | STEAMNETWORKINGSOCKETS_INTERFACE ESteamNetworkingFakeIPType SteamNetwork...
  function STEAMNETWORKINGSOCKETS_INTERFACE (line 204) | STEAMNETWORKINGSOCKETS_INTERFACE void SteamNetworkingIdentity_ToString( ...
  function STEAMNETWORKINGSOCKETS_INTERFACE (line 260) | STEAMNETWORKINGSOCKETS_INTERFACE bool SteamNetworkingIdentity_ParseStrin...

FILE: src/steamnetworkingsockets/steamnetworkingsockets_stats.cpp
  type SteamNetworkingSocketsLib (line 894) | namespace SteamNetworkingSocketsLib
    function LinkStatsInstantaneousStructToMsg (line 897) | void LinkStatsInstantaneousStructToMsg( const SteamDatagramLinkInstant...
    function LinkStatsInstantaneousMsgToStruct (line 913) | void LinkStatsInstantaneousMsgToStruct( const CMsgSteamDatagramLinkIns...
    function LinkStatsLifetimeStructToMsg (line 941) | void LinkStatsLifetimeStructToMsg( const SteamDatagramLinkLifetimeStat...
    function LinkStatsLifetimeMsgToStruct (line 1048) | void LinkStatsLifetimeMsgToStruct( const CMsgSteamDatagramLinkLifetime...
    function PrintPct (line 1147) | static void PrintPct( char (&szBuf)[32], float flPct )
    function LinkStatsPrintInstantaneousToBuf (line 1160) | void LinkStatsPrintInstantaneousToBuf( const char *pszLeader, const St...
    function LinkStatsPrintLifetimeToBuf (line 1201) | void LinkStatsPrintLifetimeToBuf( const char *pszLeader, const SteamDa...
    function LinkStatsPrintToBuf (line 1449) | void LinkStatsPrintToBuf( const char *pszLeader, const SteamDatagramLi...

FILE: src/steamnetworkingsockets/steamnetworkingsockets_thinker.cpp
  type SteamNetworkingSocketsLib (line 22) | namespace SteamNetworkingSocketsLib {
    type ThinkerLess (line 30) | struct ThinkerLess
    class ThinkerSetIndex (line 37) | class ThinkerSetIndex
      method SetIndex (line 40) | static void SetIndex( IThinker *p, int idx, void *pContext ) { p->m_...
    type ShortDurationLock (line 62) | struct ShortDurationLock { inline void lock() {}; inline void unlock()...
    function SteamNetworkingMicroseconds (line 158) | SteamNetworkingMicroseconds IThinker::Thinker_GetNextScheduledThinkTime()
    function Thinker_ValidateStatics (line 247) | void Thinker_ValidateStatics( CValidator &validator )

FILE: src/steamnetworkingsockets/steamnetworkingsockets_thinker.h
  function namespace (line 9) | namespace SteamNetworkingSocketsLib {

FILE: src/tier0/dbg.cpp
  function Plat_IsInDebugSession (line 44) | bool Plat_IsInDebugSession()
  function AssertMsgImplementationV (line 96) | void AssertMsgImplementationV( bool _bFatal, bool bFmt, const char* pstr...

FILE: src/tier0/platformtime.cpp
  function uint64 (line 47) | static uint64 InitTicks()
  function uint64 (line 86) | uint64 Plat_RelativeTicks()
  function Plat_FloatTime (line 121) | double Plat_FloatTime()
  function uint64 (line 129) | uint64 Plat_USTime()

FILE: src/tier0/valve_tracelogging.cpp
  function ULONG (line 25) | static ULONG __stdcall Dummy_EventWriteTransfer( REGHANDLE RegHandle, PC...
  function ULONG (line 29) | static ULONG __stdcall Dummy_EventActivityIdControl( ULONG ControlCode, ...
  function PLATFORM_INTERFACE (line 32) | PLATFORM_INTERFACE ULONG Plat_EventRegister( LPCGUID ProviderId, PENABLE...
  function PLATFORM_INTERFACE (line 67) | PLATFORM_INTERFACE ULONG Plat_EventUnregister( REGHANDLE RegHandle )
  function PLATFORM_INTERFACE (line 84) | PLATFORM_INTERFACE ULONG __stdcall Plat_EventWriteTransfer( REGHANDLE Re...
  function PLATFORM_INTERFACE (line 88) | PLATFORM_INTERFACE ULONG __stdcall Plat_EventActivityIdControl( ULONG Co...

FILE: src/tier1/ipv6text.c
  function IPv6IPToString (line 11) | void IPv6IPToString( char *pszOutText, const unsigned char *ip )
  function IPv6AddrToString (line 95) | void IPv6AddrToString( char *pszOutText, const unsigned char *ip, uint16...
  function ParseIPv6Addr_HexDigitVal (line 123) | static inline int ParseIPv6Addr_HexDigitVal( char c )
  function ParseIPv6Addr_DecimalDigitVal (line 130) | static inline int ParseIPv6Addr_DecimalDigitVal( char c )
  function ParseIPv6Addr_IsSpace (line 135) | bool ParseIPv6Addr_IsSpace( char c )
  function ParseIPv6Addr (line 140) | bool ParseIPv6Addr( const char *pszText, unsigned char *pOutIP, int *pOu...

FILE: src/tier1/netadr.cpp
  type sockaddr_in (line 646) | struct sockaddr_in
  type sockaddr_in (line 661) | struct sockaddr_in
  type sockaddr_in (line 676) | struct sockaddr_in
  type sockaddr_in6 (line 692) | struct sockaddr_in6
  type sockaddr_in6 (line 722) | struct sockaddr_in6

FILE: src/tier1/utlbuffer.cpp
  function BEGIN_TIER1_NAMESPACE (line 20) | BEGIN_TIER1_NAMESPACE
  class CUtlNoEscConversion (line 41) | class CUtlNoEscConversion : public CUtlCharConversion
    method CUtlNoEscConversion (line 44) | CUtlNoEscConversion( const char nEscapeChar, const char *pDelimiter, i...
    method FindConversion (line 48) | virtual char FindConversion( const char *pString, int *pLength ) { *pL...
  function CUtlCharConversion (line 78) | CUtlCharConversion *GetNoEscCharConversion()
  function uint8 (line 1729) | uint8 CUtlBuffer::GetUint8()
  function uint64 (line 1737) | uint64 CUtlBuffer::GetUnsignedInt64()
  function int64 (line 1744) | int64 CUtlBuffer::GetInt64()
  function int16 (line 1751) | int16 CUtlBuffer::GetInt16()

FILE: src/tier1/utlmemory.cpp
  function UtlMemory_CalcNewAllocationCount (line 198) | int UtlMemory_CalcNewAllocationCount( int nAllocationCount, int nGrowSiz...

FILE: src/vstdlib/strtools.cpp
  function BEGIN_TIER0_NAMESPACE (line 24) | BEGIN_TIER0_NAMESPACE
  function V_strncmp (line 39) | int V_strncmp( const char *s1, const char *s2, int count )
  function V_strnicmp (line 129) | int V_strnicmp( const char *s1, const char *s2, int n )
  function V_strncpy (line 243) | void V_strncpy( char *pDest, char const *pSrc, size_t maxLen )
  function V_snprintf (line 259) | int V_snprintf( char *pDest, size_t bufferLen, char const *pFormat, ... )
  function V_vsnprintf (line 282) | int V_vsnprintf( char *pDest, int bufferLen, char const *pFormat, va_lis...
  function V_vsnprintfRet (line 300) | int V_vsnprintfRet( char *pDest, int bufferLen, const char *pFormat, va_...
  function V_SplitString2 (line 369) | void V_SplitString2( const char *pString, const char * const *pSeparator...
  function V_AllocAndSplitString (line 414) | void V_AllocAndSplitString( const char *pString, const char *pSeparator,...
  function V_StripTrailingWhitespaceASCII (line 420) | void V_StripTrailingWhitespaceASCII( char *pch )
  function V_StrTrim (line 443) | int V_StrTrim( char *pStr )

FILE: tests/make_test_certs.py
  function run_cert_tool (line 5) | def run_cert_tool( args ):
  function create_keypair (line 11) | def create_keypair():
  function compress_whitespace (line 14) | def compress_whitespace( s ):
  function remove_all_whitespace (line 16) | def remove_all_whitespace( s ):
  function get_pem_body (line 19) | def get_pem_body( s ):
  function run_cert_tool_with_ca_key (line 24) | def run_cert_tool_with_ca_key( ca_key, args ):
  function create_keypair_and_cert (line 28) | def create_keypair_and_cert( ca_key, args ):
  function EmitKey (line 32) | def EmitKey( info, key_name, comment ):
  function EmitAddCert (line 41) | def EmitAddCert( cert, key_name, comment ):

FILE: tests/test_common.cpp
  function DebugOutput (line 22) | static void DebugOutput( ESteamNetworkingSocketsDebugOutputType eType, c...
  function TEST_Printf (line 54) | void TEST_Printf( const char *fmt, ... )
  function TEST_Fatal (line 67) | void TEST_Fatal( const char *fmt, ... )
  function TEST_InitLog (line 79) | void TEST_InitLog( const char *pszFilename )
  function TEST_Init (line 96) | void TEST_Init( const SteamNetworkingIdentity *pIdentity )
  function TEST_Kill (line 129) | void TEST_Kill()
  function TEST_PumpCallbacks (line 139) | void TEST_PumpCallbacks()

FILE: tests/test_common.h
  type SteamNetworkingIdentity (line 20) | struct SteamNetworkingIdentity

FILE: tests/test_connection.cpp
  type TestMsg (line 32) | struct TestMsg
  type SFakePeer (line 42) | struct SFakePeer
    method SFakePeer (line 44) | SFakePeer( const char *pName )
    method Reset (line 66) | void Reset()
    method Close (line 84) | void Close()
    method UpdateInterval (line 94) | inline void UpdateInterval( float flElapsed )
    method UpdateStats (line 103) | inline void UpdateStats()
    method SetConnectionConfig (line 108) | void SetConnectionConfig()
    method GetQueuedSendBytes (line 113) | inline int GetQueuedSendBytes()
    method SendRandomMessage (line 118) | void SendRandomMessage( bool bReliable, int cbMaxSize )
    method Send (line 165) | void Send()
  function CloseConnections (line 175) | static void CloseConnections()
  function Recv (line 186) | static void Recv( ISteamNetworkingSockets *pSteamSocketNetworking )
  function OnSteamNetConnectionStatusChanged (line 240) | void OnSteamNetConnectionStatusChanged( SteamNetConnectionStatusChangedC...
  function PumpCallbacksAndMakeSureStillConnected (line 311) | static void PumpCallbacksAndMakeSureStillConnected()
  function FormatQuality (line 320) | inline std::string FormatQuality( float q )
  function PrintStatus (line 328) | static void PrintStatus( const SFakePeer &p1, const SFakePeer &p2 )
  function ClearConfig (line 349) | static void ClearConfig()
  function TestNetworkConditions (line 362) | static void TestNetworkConditions( int rate, float loss, int lag, float ...
  function Test_Connection (line 486) | static void Test_Connection( bool bQuickTest )
  function Test_quick (line 566) | static void Test_quick() { Test_Connection( true ); }
  function Test_soak (line 567) | static void Test_soak() { Test_Connection( false ); }
  function Test_identity (line 571) | void Test_identity()
  function Test_lane_quick_queueanddrain (line 613) | void Test_lane_quick_queueanddrain()
  function Test_lane_quick_priority_and_background (line 814) | void Test_lane_quick_priority_and_background()
  function Test_netloopback_throughput (line 1015) | void Test_netloopback_throughput()
  function main (line 1196) | int main( int argc, const char **argv  )
  function nnMain (line 1304) | void nnMain() { main( 0, nullptr ); }

FILE: tests/test_crypto.cpp
  function Q_nibble (line 22) | static unsigned char Q_nibble( char c )
  function V_hextobinary (line 50) | static void V_hextobinary( char const *in, int numchars, byte *out, int ...
  function TestCryptoEncoding (line 75) | void TestCryptoEncoding()
  class NISTTestVectorFile (line 176) | class NISTTestVectorFile
    method NISTTestVectorFile (line 180) | NISTTestVectorFile( const char *pszFilename )
    method FindNextTest (line 187) | bool FindNextTest()
    method GetBinaryBlob (line 200) | bool GetBinaryBlob( const char *pszTag, std::string &blob )
  function TestSymmetricAuthCrypto_EncryptTestVectorFile (line 222) | void TestSymmetricAuthCrypto_EncryptTestVectorFile( const char *pszFilen...
  function TestSymmetricAuthCryptoVectors (line 305) | void TestSymmetricAuthCryptoVectors()
  function TestEllipticCrypto (line 318) | void TestEllipticCrypto()
  function TestOpenSSHEd25519 (line 442) | void TestOpenSSHEd25519()
  function TestEllipticPerf (line 509) | void TestEllipticPerf()
  function SymmetricAuthEncryptRepeatedly (line 597) | void SymmetricAuthEncryptRepeatedly( int cIterations, AES_GCM_EncryptCon...
  function SymmetricAuthDecryptRepeatedly (line 620) | void SymmetricAuthDecryptRepeatedly( int cIterations, AES_GCM_DecryptCon...
  function TestSymmetricAuthCryptoPerf (line 643) | void TestSymmetricAuthCryptoPerf()
  function chdir_to_bindir (line 727) | bool chdir_to_bindir()
  function main (line 747) | int main()

FILE: tests/test_flat.c
  function main (line 3) | int main(int argc, char **argv)

FILE: tests/test_p2p.cpp
  type ETestRole (line 18) | enum ETestRole
  function Quit (line 30) | void Quit( int rc )
  function SendMessageToPeer (line 55) | void SendMessageToPeer( const char *pszMsg )
  function OnSteamNetConnectionStatusChanged (line 64) | void OnSteamNetConnectionStatusChanged( SteamNetConnectionStatusChangedC...
  function main (line 150) | int main( int argc, const char **argv )

FILE: tests/test_p2p.py
  class RunProcessInThread (line 18) | class RunProcessInThread(threading.Thread):
    method __init__ (line 20) | def __init__( self, tag, cmdline, env, **popen_kwargs ):
    method WriteLn (line 32) | def WriteLn( self, ln ):
    method run (line 37) | def run( self ):
    method join (line 63) | def join( self, timeout ):
    method term (line 72) | def term( self ):
  function StartProcessInThread (line 77) | def StartProcessInThread( tag, cmdline, env=None, **popen_kwargs ):
  function StartClientInThread (line 82) | def StartClientInThread( role, local, remote ):
  function ClientServerTest (line 104) | def ClientServerTest():
  function SymmetricTest (line 114) | def SymmetricTest():

FILE: tests/test_pki.cpp
  function GenerateCert (line 15) | void GenerateCert( CMsgSteamDatagramCertificateSigned &msgOut, const cha...
  function main (line 42) | int main()
Copy disabled (too large) Download .json
Condensed preview — 255 files, each showing path, character count, and a content snippet. Download the .json file for the full structured content (24,881K chars).
[
  {
    "path": ".editorconfig",
    "chars": 170,
    "preview": "root = true\n\n[*]\nend_of_line = lf\ninsert_final_newline = true\n\n[*.py]\nindent_style = space\nindent_size = 4\n\n[CMakeLists."
  },
  {
    "path": ".github/action.sh",
    "chars": 519,
    "preview": "#!/bin/bash\n\nset -e\nset -o pipefail\n\nACTION=\"$(basename \"$0\")\"\nACTION=\"${ACTION%.sh}\"\n\nSCRIPT_CANDIDATES=(\n\t\"$PWD/.githu"
  },
  {
    "path": ".github/build.sh",
    "chars": 1793,
    "preview": "#!/bin/bash\n#\n# This is a distribution-agnostic build script. Do not use \"apt-get\", \"dnf\", or\n# similar in here. Add any"
  },
  {
    "path": ".github/install/alpine.sh",
    "chars": 311,
    "preview": "#!/bin/bash\n#\n# This is an install script for Alpine-specific packages.\n#\nset -ex\n\n# Base build packages\nPACKAGES=(\n\tcla"
  },
  {
    "path": ".github/install/archlinux.sh",
    "chars": 285,
    "preview": "#!/bin/bash\n#\n# This is an install script for Arch Linux-specific packages.\n#\nset -ex\n\n# Base build packages\nPACKAGES=(\n"
  },
  {
    "path": ".github/install/fedora.sh",
    "chars": 361,
    "preview": "#!/bin/bash\n#\n# This is an install script for Fedora-specific packages.\n#\nset -ex\n\n# Base build packages\nPACKAGES=(\n\tgcc"
  },
  {
    "path": ".github/install/opensuse.sh",
    "chars": 322,
    "preview": "#!/bin/bash\n#\n# This is an install script for OpenSuSE-specific packages.\n#\nset -ex\n\n# Base build packages\nPACKAGES=(\n\tg"
  },
  {
    "path": ".github/install/ubuntu.sh",
    "chars": 470,
    "preview": "#!/bin/bash\n#\n# This is an install script for Ubuntu-specific packages.\n#\nset -ex\n\nAPT_FLAGS=(-q -oDpkg::Use-Pty=0)\n\nexp"
  },
  {
    "path": ".github/install-post.sh",
    "chars": 393,
    "preview": "#!/bin/bash\n#\n# This is a post-install script common to all Docker images.\n#\n\ncmake --version\ng++ --version\nclang++ --ve"
  },
  {
    "path": ".github/preinstall.sh",
    "chars": 80,
    "preview": "#!/bin/sh\n\nif [ \"$IMAGE\" = \"alpine\" ]\nthen\n\tapk update\n\tapk add bash\nfi\n\nexit 0\n"
  },
  {
    "path": ".github/update-packages/alpine.sh",
    "chars": 109,
    "preview": "#!/bin/bash\n#\n# This is an install script for Alpine-specific package updates.\n#\nset -ex\n\napk update\n\nexit 0\n"
  },
  {
    "path": ".github/update-packages/archlinux.sh",
    "chars": 126,
    "preview": "#!/bin/bash\n#\n# This is an install script for Arch Linux-specific package updates.\n#\nset -ex\n\npacman --noconfirm -Syu\n\ne"
  },
  {
    "path": ".github/update-packages/fedora.sh",
    "chars": 226,
    "preview": "#!/bin/bash\n#\n# This is an install script for Fedora-specific package updates.\n#\nset -ex\n\nif ! grep '^fastestmirror' /et"
  },
  {
    "path": ".github/update-packages/opensuse.sh",
    "chars": 117,
    "preview": "#!/bin/bash\n#\n# This is an install script for OpenSuSE-specific package updates.\n#\nset -ex\n\nzypper update -y\n\nexit 0\n"
  },
  {
    "path": ".github/update-packages/ubuntu.sh",
    "chars": 249,
    "preview": "#!/bin/bash\n#\n# This is an install script for Debian/Ubuntu-specific package updates.\n#\nset -ex\n\nAPT_FLAGS=(-q -oDpkg::U"
  },
  {
    "path": ".github/workflows/build.yml",
    "chars": 3545,
    "preview": "name: CI\non: [push, pull_request]\n\njobs:\n\n  build-and-test-ubuntu:\n    #if: false  # Temporarily disable\n    name: Build"
  },
  {
    "path": ".github/workflows/linux-flavors.yml",
    "chars": 2713,
    "preview": "# We put all of the different linux flavors in a separate workflow,\n# so that we can have a different status badge for t"
  },
  {
    "path": ".github/workflows/macos.yml",
    "chars": 1569,
    "preview": "name: MacOS\non: [push, pull_request]\n\njobs:\n\n  build-and-test-macos:\n    name: Build And Test MacOS\n    runs-on: macos-l"
  },
  {
    "path": ".gitignore",
    "chars": 1095,
    "preview": "# Prerequisites\n*.d\n\n# Compiled Object files\n*.slo\n*.lo\n*.o\n*.obj\nobj\n\n# Precompiled Headers\n*.gch\n*.pch\n\n/bin\n\n# Ignore"
  },
  {
    "path": ".gitmodules",
    "chars": 348,
    "preview": "[submodule \"src/external/abseil\"]\n\tpath = src/external/abseil\n\turl = https://github.com/abseil/abseil-cpp\n\tbranch = lts_"
  },
  {
    "path": ".travis-run-local.py",
    "chars": 5580,
    "preview": "#!/usr/bin/python\n\"\"\"\nUsage:\n    .travis-run-local.py [--arch=<arch>] [--image=<image> --image-tag=<tag>]\n\nOptions:\n    "
  },
  {
    "path": ".travis.yml",
    "chars": 2216,
    "preview": "language: minimal\n\ndist: bionic\n\nos: linux\n\nservices:\n  - docker\n\narch: amd64\n\nenv:\n  global:\n    - CONTAINER_NAME=githu"
  },
  {
    "path": "BUILDING.md",
    "chars": 6187,
    "preview": "Building\n---\n\n## Dependencies\n\n* CMake 3.10 or later\n* A build tool like Ninja, GNU Make or Visual Studio\n* A C++11-comp"
  },
  {
    "path": "BUILDING_WINDOWS_MANUAL.md",
    "chars": 5356,
    "preview": "Building Windows w/out Using vcpkg\n---\n\nWe recommend using vcpkg to get the dependencies installed.  But if that\ndoesn't"
  },
  {
    "path": "CMakeLists.txt",
    "chars": 9276,
    "preview": "cmake_minimum_required(VERSION 3.9)\n\n# If vcpkg present as submodule, bring in the toolchain\nif( EXISTS ${CMAKE_SOURCE_D"
  },
  {
    "path": "GameNetworkingSockets.code-workspace",
    "chars": 267,
    "preview": "{\n\t\"folders\": [\n\t\t{\n\t\t\t\"path\": \".\"\n\t\t}\n\t],\n\t\"settings\": {\n\t\t\"cmake.buildDirectory\": \"${workspaceFolder}/build\",\n\t\t\"C_Cpp"
  },
  {
    "path": "LICENSE",
    "chars": 1488,
    "preview": "Copyright (c) 2018, Valve Corporation\nAll rights reserved.\n\nRedistribution and use in source and binary forms, with or w"
  },
  {
    "path": "README.md",
    "chars": 7235,
    "preview": "# GameNetworkingSockets\n[![Windows, Ubuntu](https://github.com/ValveSoftware/GameNetworkingSockets/actions/workflows/bui"
  },
  {
    "path": "README_P2P.md",
    "chars": 8200,
    "preview": "# About that P2P support....\n\nSteamNetworkingSockets supports peer-to-peer connections.  A \"peer-to-peer\"\nconnection in "
  },
  {
    "path": "SECURITY.md",
    "chars": 459,
    "preview": "# Security Policy\n\nIf you believe you have found a security vulnerability, please do not file a\npublic issue or pull req"
  },
  {
    "path": "cmake/DefaultBuildType.cmake",
    "chars": 575,
    "preview": "# Set a default build type if none was specified\nset(default_build_type \"RelWithDebInfo\")\n\nif(NOT CMAKE_BUILD_TYPE AND N"
  },
  {
    "path": "cmake/FindASan.cmake",
    "chars": 2144,
    "preview": "# The MIT License (MIT)\n#\n# Copyright (c)\n#   2013 Matthew Arsenault\n#   2015-2016 RWTH Aachen University, Federal Repub"
  },
  {
    "path": "cmake/FindMSan.cmake",
    "chars": 2292,
    "preview": "# The MIT License (MIT)\n#\n# Copyright (c)\n#   2013 Matthew Arsenault\n#   2015-2016 RWTH Aachen University, Federal Repub"
  },
  {
    "path": "cmake/FindSanitizers.cmake",
    "chars": 3737,
    "preview": "# The MIT License (MIT)\n#\n# Copyright (c)\n#   2013 Matthew Arsenault\n#   2015-2016 RWTH Aachen University, Federal Repub"
  },
  {
    "path": "cmake/FindTSan.cmake",
    "chars": 2555,
    "preview": "# The MIT License (MIT)\n#\n# Copyright (c)\n#   2013 Matthew Arsenault\n#   2015-2016 RWTH Aachen University, Federal Repub"
  },
  {
    "path": "cmake/FindUBSan.cmake",
    "chars": 1720,
    "preview": "# The MIT License (MIT)\n#\n# Copyright (c)\n#   2013 Matthew Arsenault\n#   2015-2016 RWTH Aachen University, Federal Repub"
  },
  {
    "path": "cmake/Findsodium.cmake",
    "chars": 10468,
    "preview": "# Written in 2016 by Henrik Steffen Gaßmann <henrik@gassmann.onl>\n#\n# To the extent possible under law, the author(s) ha"
  },
  {
    "path": "cmake/FlagsMSVC.cmake",
    "chars": 1558,
    "preview": "macro(configure_msvc_runtime)\n\tif(MSVC)\n\t\t# Set compiler options.\n\t\tset(variables\n\t\t\tCMAKE_C_FLAGS_DEBUG\n\t\t\tCMAKE_C_FLAG"
  },
  {
    "path": "cmake/GameNetworkingSocketsConfig.cmake.in",
    "chars": 1931,
    "preview": "@PACKAGE_INIT@\n\ninclude(CMakeFindDependencyMacro)\n\nfind_dependency(Threads)\nfind_dependency(Protobuf)\n\nif(@USE_CRYPTO@ S"
  },
  {
    "path": "cmake/asan-wrapper",
    "chars": 2011,
    "preview": "#!/bin/sh\n\n# The MIT License (MIT)\n#\n# Copyright (c)\n#   2013 Matthew Arsenault\n#   2015-2016 RWTH Aachen University, Fe"
  },
  {
    "path": "cmake/sanitize-helpers.cmake",
    "chars": 7684,
    "preview": "# The MIT License (MIT)\n#\n# Copyright (c)\n#   2013 Matthew Arsenault\n#   2015-2016 RWTH Aachen University, Federal Repub"
  },
  {
    "path": "cmake/tryCompileTestBCrypt.cpp",
    "chars": 120,
    "preview": "#include <Windows.h>\n#include <bcrypt.h>\n#include <cstdio>\n\nint main(int, char **)\n{\n\tprintf(\"%p\\n\", &BCryptEncrypt);\n}\n"
  },
  {
    "path": "examples/CMakeLists.txt",
    "chars": 1197,
    "preview": "#\n# Trivial signaling server, written in go\n#\nif( ENABLE_ICE AND ( BUILD_EXAMPLES OR BUILD_TESTS ) )\n\tfind_program( GO g"
  },
  {
    "path": "examples/example_chat.cpp",
    "chars": 23747,
    "preview": "//====== Copyright Valve Corporation, All rights reserved. ====================\n//\n// Example client/server chat applica"
  },
  {
    "path": "examples/trivial_signaling_client.cpp",
    "chars": 12683,
    "preview": "// Client of our dummy trivial signaling server service.\n// Serves as an example of you how to hook up signaling server\n"
  },
  {
    "path": "examples/trivial_signaling_client.h",
    "chars": 1173,
    "preview": "// Client of our dummy trivial signaling server service.\n// Serves as an example of you how to hook up signaling server\n"
  },
  {
    "path": "examples/trivial_signaling_server.go",
    "chars": 4669,
    "preview": "// Really simple P2P signaling server.\n//\n// When establishing peer-to-peer connections, the peers\n// need some sort of "
  },
  {
    "path": "examples/vcpkg_example_chat/CMakeLists.txt",
    "chars": 527,
    "preview": "#\n# Example porject that uses GameNetworkingSockets, obtaining\n# dependencies, etc entirely through vcpkg.\n#\ncmake_minim"
  },
  {
    "path": "examples/vcpkg_example_chat/README.md",
    "chars": 2045,
    "preview": "The purpose of this project is to demonstrate/test a project that pulls in\nGameNetworkingSockets and its dependencies en"
  },
  {
    "path": "examples/vcpkg_example_chat/vcpkg.json",
    "chars": 324,
    "preview": "{\n\t\"$schema\": \"https://raw.githubusercontent.com/microsoft/vcpkg/master/scripts/vcpkg.schema.json\",\n\t\"name\": \"gamenetwor"
  },
  {
    "path": "include/steam/isteamnetworkingmessages.h",
    "chars": 11089,
    "preview": "//====== Copyright Valve Corporation, All rights reserved. ====================\n\n#ifndef ISTEAMNETWORKINGMESSAGES\n#defin"
  },
  {
    "path": "include/steam/isteamnetworkingsockets.h",
    "chars": 58661,
    "preview": "//====== Copyright Valve Corporation, All rights reserved. ====================\n\n#ifndef ISTEAMNETWORKINGSOCKETS\n#define"
  },
  {
    "path": "include/steam/isteamnetworkingutils.h",
    "chars": 29287,
    "preview": "//====== Copyright Valve Corporation, All rights reserved. ====================\n//\n// Purpose: misc networking utilities"
  },
  {
    "path": "include/steam/steam_api_common.h",
    "chars": 1923,
    "preview": "#ifndef STEAM_API_COMMON\n#define STEAM_API_COMMON\n#pragma once\n\n// When using the SteamWorks SDK, this header contains d"
  },
  {
    "path": "include/steam/steamclientpublic.h",
    "chars": 53361,
    "preview": "//========= Copyright � 1996-2008, Valve LLC, All rights reserved. ============\n//\n// Declare common types used by the S"
  },
  {
    "path": "include/steam/steamnetworkingcustomsignaling.h",
    "chars": 5472,
    "preview": "//====== Copyright Valve Corporation, All rights reserved. ====================\n//\n// Interfaces needed to implement you"
  },
  {
    "path": "include/steam/steamnetworkingsockets.h",
    "chars": 2272,
    "preview": "//====== Copyright Valve Corporation, All rights reserved. ====================\n//\n// High level interface to GameNetwor"
  },
  {
    "path": "include/steam/steamnetworkingsockets_flat.h",
    "chars": 21972,
    "preview": "//====== Copyright Valve Corporation, All rights reserved. ====================\n//\n// \"Flat\" interface to SteamNetworkin"
  },
  {
    "path": "include/steam/steamnetworkingtypes.h",
    "chars": 97606,
    "preview": "//====== Copyright Valve Corporation, All rights reserved. ====================\n//\n// Purpose: misc networking utilities"
  },
  {
    "path": "include/steam/steamtypes.h",
    "chars": 4138,
    "preview": "//========= Copyright 1996-2022, Valve LLC, All rights reserved. ============\n\n#ifndef STEAMTYPES_H\n#define STEAMTYPES_H"
  },
  {
    "path": "include/steam/steamuniverse.h",
    "chars": 570,
    "preview": "//========= Copyright � 1996-2008, Valve LLC, All rights reserved. ============\n//\n// Purpose:\n//\n//===================="
  },
  {
    "path": "src/CMakeLists.txt",
    "chars": 12732,
    "preview": "include(CheckCCompilerFlag)\ninclude(CheckCXXCompilerFlag)\ninclude(CheckSymbolExists)\ninclude(CMakePushCheckState)\ninclud"
  },
  {
    "path": "src/common/crypto.cpp",
    "chars": 2773,
    "preview": "//========= Copyright Valve LLC, All rights reserved. ========================\n\n#include \"crypto.h\"\n\n///////////////////"
  },
  {
    "path": "src/common/crypto.h",
    "chars": 8025,
    "preview": "//========= Copyright Valve LLC, All rights reserved. =========================\n\n#ifndef CRYPTO_H\n#define CRYPTO_H\n\n#inc"
  },
  {
    "path": "src/common/crypto_25519.h",
    "chars": 7763,
    "preview": "//========= Copyright Valve LLC, All rights reserved. =========================\n\n#ifndef CRYPTO_25519_H\n#define CRYPTO_2"
  },
  {
    "path": "src/common/crypto_25519_donna.cpp",
    "chars": 6817,
    "preview": "//========= Copyright Valve LLC, All rights reserved. ========================\n\n#include \"crypto.h\"\n#include \"crypto_255"
  },
  {
    "path": "src/common/crypto_25519_libsodium.cpp",
    "chars": 4443,
    "preview": "#include \"crypto.h\"\n#include \"crypto_25519.h\"\n\n#include <tier0/dbg.h>\n\n#ifdef VALVE_CRYPTO_25519_LIBSODIUM\n\n#include <so"
  },
  {
    "path": "src/common/crypto_25519_openssl.cpp",
    "chars": 5664,
    "preview": "//========= Copyright Valve LLC, All rights reserved. ========================\n#include \"crypto.h\"\n#include \"crypto_2551"
  },
  {
    "path": "src/common/crypto_bcrypt.cpp",
    "chars": 11133,
    "preview": "//========= Copyright Valve LLC, All rights reserved. ========================\n#include \"crypto.h\"\n\n#ifdef VALVE_CRYPTO_"
  },
  {
    "path": "src/common/crypto_constants.h",
    "chars": 2195,
    "preview": "//========= Copyright Valve LLC, All rights reserved. =========================\n\n#ifndef CRYPTO_CONSTANTS_H\n#define CRYP"
  },
  {
    "path": "src/common/crypto_digest_opensslevp.cpp",
    "chars": 3290,
    "preview": "//========= Copyright Valve LLC, All rights reserved. ========================\n\n#include \"crypto.h\"\n#ifdef VALVE_CRYPTO_"
  },
  {
    "path": "src/common/crypto_libsodium.cpp",
    "chars": 5331,
    "preview": "#include \"crypto.h\"\n\n#include <tier0/vprof.h>\n#include <tier0/dbg.h>\n\n#include \"tier0/memdbgoff.h\"\n#include <sodium/core"
  },
  {
    "path": "src/common/crypto_openssl.cpp",
    "chars": 3182,
    "preview": "//========= Copyright Valve LLC, All rights reserved. ========================\n\n#include \"crypto.h\"\n#ifdef VALVE_CRYPTO_"
  },
  {
    "path": "src/common/crypto_sha1_wpa.cpp",
    "chars": 1089,
    "preview": "#include \"crypto.h\"\n#include <tier0/dbg.h>\n#include <tier0/vprof.h>\n\n#ifdef VALVE_CRYPTO_SHA1_WPA\n\nextern \"C\" {\n// exter"
  },
  {
    "path": "src/common/crypto_symmetric_opensslevp.cpp",
    "chars": 8900,
    "preview": "//========= Copyright Valve LLC, All rights reserved. ========================\n\n#include <tier0/dbg.h>\n#include \"crypto."
  },
  {
    "path": "src/common/crypto_textencode.cpp",
    "chars": 19015,
    "preview": "//========= Copyright Valve LLC, All rights reserved. ========================\n\n// Note: not using precompiled headers! "
  },
  {
    "path": "src/common/keypair.cpp",
    "chars": 21212,
    "preview": "//========= Copyright Valve LLC, All rights reserved. ========================\n\n// Note: not using precompiled headers! "
  },
  {
    "path": "src/common/keypair.h",
    "chars": 6230,
    "preview": "//========= Copyright Valve Corporation, All rights reserved. =========================\n\n#ifndef KEYPAIR_H\n#define KEYPA"
  },
  {
    "path": "src/common/opensslwrapper.cpp",
    "chars": 6936,
    "preview": "//====== Copyright 1996-2010, Valve Corporation, All rights reserved. =======\n//\n// Purpose: Code for dealing with OpenS"
  },
  {
    "path": "src/common/opensslwrapper.h",
    "chars": 2102,
    "preview": "//====== Copyright 1996-2010, Valve Corporation, All rights reserved. =======\n//\n// Purpose: Code for dealing with OpenS"
  },
  {
    "path": "src/common/percentile_generator.h",
    "chars": 4296,
    "preview": "//====== Copyright Valve Corporation, All rights reserved. ====================\n\n#ifndef PERCENTILE_GENERATOR_H\n#define "
  },
  {
    "path": "src/common/steamid.cpp",
    "chars": 19822,
    "preview": "//========= Copyright Valve LLC, All rights reserved. ============\n\n\n#include <stdint.h>\n#include <stdlib.h>\n#include <s"
  },
  {
    "path": "src/common/steamid.h",
    "chars": 291,
    "preview": "//========= Copyright 1996-2022, Valve LLC, All rights reserved. ============\n\n#ifndef STEAMID_H\n#define STEAMID_H\n#prag"
  },
  {
    "path": "src/common/steamnetworkingsockets_messages.proto",
    "chars": 14904,
    "preview": "//====== Copyright Valve Corporation, All rights reserved. ====================\n//\n// Wire format messages for Steam net"
  },
  {
    "path": "src/common/steamnetworkingsockets_messages_certs.proto",
    "chars": 4018,
    "preview": "//====== Copyright Valve Corporation, All rights reserved. ====================\n//\n// Wire format messages for Steam net"
  },
  {
    "path": "src/common/steamnetworkingsockets_messages_udp.proto",
    "chars": 5526,
    "preview": "//====== Copyright Valve Corporation, All rights reserved. ====================\n//\n// Wire format messages for Steam Net"
  },
  {
    "path": "src/external/curve25519-donna/README.md",
    "chars": 3320,
    "preview": "[curve25519](http://cr.yp.to/ecdh.html) is an elliptic curve, developed by \n[Dan Bernstein](http://cr.yp.to/djb.html), f"
  },
  {
    "path": "src/external/curve25519-donna/curve25519-donna-32bit.h",
    "chars": 17602,
    "preview": "typedef uint32_t bignum25519[10];\n\nstatic const uint32_t reduce_mask_26 = (1 << 26) - 1;\nstatic const uint32_t reduce_ma"
  },
  {
    "path": "src/external/curve25519-donna/curve25519-donna-64bit.h",
    "chars": 12557,
    "preview": "typedef uint64_t bignum25519[5];\n\nstatic const uint64_t reduce_mask_51 = ((uint64_t)1 << 51) - 1;\nstatic const uint64_t "
  },
  {
    "path": "src/external/curve25519-donna/curve25519-donna-common.h",
    "chars": 1450,
    "preview": "/*\n * In:  b =   2^5 - 2^0\n * Out: b = 2^250 - 2^0\n */\nstatic void\ncurve25519_pow_two5mtwo0_two250mtwo0(bignum25519 b) {"
  },
  {
    "path": "src/external/curve25519-donna/curve25519-donna-portable-identify.h",
    "chars": 2910,
    "preview": "/* os */\n#if defined(_WIN32)\t|| defined(_WIN64) || defined(__TOS_WIN__) || defined(__WINDOWS__)\n\t#define OS_WINDOWS\n#eli"
  },
  {
    "path": "src/external/curve25519-donna/curve25519-donna-portable.h",
    "chars": 3667,
    "preview": "#include \"curve25519-donna-portable-identify.h\"\n\n#define mul32x32_64(a,b) (((uint64_t)(a))*(b))\n\n#ifdef ALIGN\n#undef ALI"
  },
  {
    "path": "src/external/curve25519-donna/curve25519-donna-scalarmult-base.h",
    "chars": 2107,
    "preview": "/* Calculates nQ where Q is the x-coordinate of a point on the curve\n *\n *   mypublic: the packed little endian x coordi"
  },
  {
    "path": "src/external/curve25519-donna/curve25519-donna-scalarmult-sse2.h",
    "chars": 2882,
    "preview": "\n/* Calculates nQ where Q is the x-coordinate of a point on the curve\n *\n *   mypublic: the packed little endian x coord"
  },
  {
    "path": "src/external/curve25519-donna/curve25519-donna-sse2.h",
    "chars": 55420,
    "preview": "#include <emmintrin.h>\ntypedef __m128i xmmi;\n\ntypedef union packedelem8_t {\n\tunsigned char u[16];\n\txmmi v;\n} packedelem8"
  },
  {
    "path": "src/external/curve25519-donna/curve25519-donna.h",
    "chars": 647,
    "preview": "#include \"curve25519.h\"\n#include \"curve25519-donna-portable.h\"\n\n#if defined(CURVE25519_SSE2)\n#else\n\t#if defined(HAVE_UIN"
  },
  {
    "path": "src/external/curve25519-donna/curve25519-optimizations-32bit.md",
    "chars": 3485,
    "preview": "Partial Reductions for multiplications\n--------------------------------------\n\nIt is possible to get away with partial r"
  },
  {
    "path": "src/external/curve25519-donna/curve25519.c",
    "chars": 793,
    "preview": "#include \"curve25519-donna.h\"\n\n#if !defined(CURVE25519_SUFFIX)\n#define CURVE25519_SUFFIX \n#endif\n\n#define CURVE25519_FN3"
  },
  {
    "path": "src/external/curve25519-donna/curve25519.h",
    "chars": 379,
    "preview": "#ifndef CURVE25519_H\n#define CURVE25519_H\n\ntypedef unsigned char curve25519_key[32];\n\n#ifdef __cplusplus\nextern \"C\" {\n#e"
  },
  {
    "path": "src/external/curve25519-donna/curve25519_VALVE_sse2.c",
    "chars": 412,
    "preview": "/* The code for curve25519-donna comes from https://github.com/floodyberry/curve25519-donna\n   where it is explicitly pl"
  },
  {
    "path": "src/external/curve25519-donna/readme_VALVE.txt",
    "chars": 475,
    "preview": "curve25519-donna is an implementation of the Curve25519 ECDH key-exchange algorithm by Dan J Bernstein.\n\ncurve25519 is a"
  },
  {
    "path": "src/external/curve25519-donna/test-ticks.h",
    "chars": 1316,
    "preview": "#include \"curve25519-donna-portable-identify.h\"\n\n/* ticks - not tested on anything other than x86 */\nstatic uint64_t\nget"
  },
  {
    "path": "src/external/curve25519-donna/test.c",
    "chars": 3172,
    "preview": "/*\n*/\n\n#include <stdio.h>\n#include <string.h>\n#include <stdlib.h>\n\n#include \"curve25519.h\"\n\n#include \"test-ticks.h\"\n\nsta"
  },
  {
    "path": "src/external/ed25519-donna/README.md",
    "chars": 8154,
    "preview": "[ed25519](http://ed25519.cr.yp.to/) is an \n[Elliptic Curve Digital Signature Algortithm](http://en.wikipedia.org/wiki/El"
  },
  {
    "path": "src/external/ed25519-donna/curve25519-donna-32bit.h",
    "chars": 22614,
    "preview": "/*\n\tPublic domain by Andrew M. <liquidsun@gmail.com>\n\tSee: https://github.com/floodyberry/curve25519-donna\n\n\t32 bit inte"
  },
  {
    "path": "src/external/ed25519-donna/curve25519-donna-64bit.h",
    "chars": 14869,
    "preview": "/*\n\tPublic domain by Adam Langley <agl@imperialviolet.org> &\n\t                 Andrew M. <liquidsun@gmail.com>\n\tSee: htt"
  },
  {
    "path": "src/external/ed25519-donna/curve25519-donna-helpers.h",
    "chars": 2374,
    "preview": "/*\n\tPublic domain by Andrew M. <liquidsun@gmail.com>\n\tSee: https://github.com/floodyberry/curve25519-donna\n\n\tCurve25519 "
  },
  {
    "path": "src/external/ed25519-donna/curve25519-donna-sse2.h",
    "chars": 58626,
    "preview": "/*\n\tPublic domain by Andrew M. <liquidsun@gmail.com>\n\tSee: https://github.com/floodyberry/curve25519-donna\n\n\tSSE2 curve2"
  },
  {
    "path": "src/external/ed25519-donna/ed25519-donna-32bit-sse2.h",
    "chars": 18640,
    "preview": "#if defined(ED25519_GCC_32BIT_SSE_CHOOSE)\n\n#define HAVE_GE25519_SCALARMULT_BASE_CHOOSE_NIELS\n\nDONNA_NOINLINE static void"
  },
  {
    "path": "src/external/ed25519-donna/ed25519-donna-32bit-tables.h",
    "chars": 12002,
    "preview": "static const ge25519 ALIGN(16) ge25519_basepoint = {\n\t{0x0325d51a,0x018b5823,0x00f6592a,0x0104a92d,0x01a4b31d,0x01d6dc5c"
  },
  {
    "path": "src/external/ed25519-donna/ed25519-donna-64bit-sse2.h",
    "chars": 16318,
    "preview": "#if defined(ED25519_GCC_64BIT_SSE_CHOOSE)\n\n#define HAVE_GE25519_SCALARMULT_BASE_CHOOSE_NIELS\n\nDONNA_NOINLINE static void"
  },
  {
    "path": "src/external/ed25519-donna/ed25519-donna-64bit-tables.h",
    "chars": 10380,
    "preview": "static const ge25519 ge25519_basepoint = {\n\t{0x00062d608f25d51a,0x000412a4b4f6592a,0x00075b7171a4b31d,0x0001ff60527118fe"
  },
  {
    "path": "src/external/ed25519-donna/ed25519-donna-64bit-x86-32bit.h",
    "chars": 16281,
    "preview": "#if defined(ED25519_GCC_64BIT_32BIT_CHOOSE)\n\n#define HAVE_GE25519_SCALARMULT_BASE_CHOOSE_NIELS\n\nDONNA_NOINLINE static vo"
  },
  {
    "path": "src/external/ed25519-donna/ed25519-donna-64bit-x86.h",
    "chars": 12962,
    "preview": "#if defined(ED25519_GCC_64BIT_X86_CHOOSE)\n\n#define HAVE_GE25519_SCALARMULT_BASE_CHOOSE_NIELS\n\nDONNA_NOINLINE static void"
  },
  {
    "path": "src/external/ed25519-donna/ed25519-donna-basepoint-table.h",
    "chars": 124048,
    "preview": "/* multiples of the base point in packed {ysubx, xaddy, t2d} form */\nstatic const uint8_t ALIGN(16) ge25519_niels_base_m"
  },
  {
    "path": "src/external/ed25519-donna/ed25519-donna-batchverify.h",
    "chars": 7886,
    "preview": "/*\n\tEd25519 batch verification\n*/\n\n#define max_batch_size 64\n#define heap_batch_size ((max_batch_size * 2) + 1)\n\n/* whic"
  },
  {
    "path": "src/external/ed25519-donna/ed25519-donna-impl-base.h",
    "chars": 10220,
    "preview": "/*\n\tconversions\n*/\n\nDONNA_INLINE static void\nge25519_p1p1_to_partial(ge25519 *r, const ge25519_p1p1 *p) {\n\tcurve25519_mu"
  },
  {
    "path": "src/external/ed25519-donna/ed25519-donna-impl-sse2.h",
    "chars": 11815,
    "preview": "/*\n\tconversions\n*/\n\nstatic void\nge25519_p1p1_to_partial(ge25519 *r, const ge25519_p1p1 *p) {\n\tpacked64bignum25519 ALIGN("
  },
  {
    "path": "src/external/ed25519-donna/ed25519-donna-portable-identify.h",
    "chars": 2910,
    "preview": "/* os */\n#if defined(_WIN32)\t|| defined(_WIN64) || defined(__TOS_WIN__) || defined(__WINDOWS__)\n\t#define OS_WINDOWS\n#eli"
  },
  {
    "path": "src/external/ed25519-donna/ed25519-donna-portable.h",
    "chars": 4795,
    "preview": "#include \"ed25519-donna-portable-identify.h\"\n\n#define mul32x32_64(a,b) (((uint64_t)(a))*(b))\n\n#ifdef ALIGN\n#undef ALIGN\n"
  },
  {
    "path": "src/external/ed25519-donna/ed25519-donna.h",
    "chars": 2762,
    "preview": "/*\n\tPublic domain by Andrew M. <liquidsun@gmail.com>\n\tModified from the amd64-51-30k implementation by\n\t\tDaniel J. Berns"
  },
  {
    "path": "src/external/ed25519-donna/ed25519-hash-bcrypt.h",
    "chars": 1285,
    "preview": "#include <windows.h>\n#include <bcrypt.h>\n\ntypedef struct {\n\tBCRYPT_ALG_HANDLE algorithm;\n\tBCRYPT_HASH_HANDLE hash;\n\tPUCH"
  },
  {
    "path": "src/external/ed25519-donna/ed25519-hash-custom.h",
    "chars": 370,
    "preview": "/*\n\ta custom hash must have a 512bit digest and implement:\n\n\tstruct ed25519_hash_context;\n\n\tvoid ed25519_hash_init(ed255"
  },
  {
    "path": "src/external/ed25519-donna/ed25519-hash-openssl.h",
    "chars": 484,
    "preview": "#include <openssl/sha.h>\n\ntypedef SHA512_CTX ed25519_hash_context;\n\nstatic void\ned25519_hash_init(ed25519_hash_context *"
  },
  {
    "path": "src/external/ed25519-donna/ed25519-hash-ref.h",
    "chars": 6264,
    "preview": "/* reference/slow SHA-512. really, do not use this */\n\n#define HASH_BLOCK_SIZE 128\n#define HASH_DIGEST_SIZE 64\n\ntypedef "
  },
  {
    "path": "src/external/ed25519-donna/ed25519-hash.h",
    "chars": 241,
    "preview": "#if defined(ED25519_REFHASH)\n#include \"ed25519-hash-ref.h\"\n#elif defined(ED25519_CUSTOMHASH)\n#include \"ed25519-hash-cust"
  },
  {
    "path": "src/external/ed25519-donna/ed25519-randombytes-custom.h",
    "chars": 211,
    "preview": "/*\n\ta custom randombytes must implement:\n\n\tvoid ED25519_FN(ed25519_randombytes_unsafe) (void *p, size_t len);\n\n\ted25519_"
  },
  {
    "path": "src/external/ed25519-donna/ed25519-randombytes.h",
    "chars": 1844,
    "preview": "#if defined(ED25519_TEST)\n/*\n\tISAAC+ \"variant\", the paper is not clear on operator precedence and other\n\tthings. This is"
  },
  {
    "path": "src/external/ed25519-donna/ed25519.c",
    "chars": 3687,
    "preview": "/*\n\tPublic domain by Andrew M. <liquidsun@gmail.com>\n\n\tEd25519 reference implementation using Ed25519-donna\n*/\n\n\n/* defi"
  },
  {
    "path": "src/external/ed25519-donna/ed25519.h",
    "chars": 948,
    "preview": "#ifndef ED25519_H\n#define ED25519_H\n\n#include <stdlib.h>\n\ntypedef unsigned char ed25519_signature[64];\ntypedef unsigned "
  },
  {
    "path": "src/external/ed25519-donna/ed25519_VALVE.c",
    "chars": 15838,
    "preview": "/*========= Copyright Valve Corporation, All rights reserved =======================*/\n\n\n#include <stdlib.h> /* for size"
  },
  {
    "path": "src/external/ed25519-donna/ed25519_VALVE_sse2.c",
    "chars": 519,
    "preview": "/*========= Copyright  Valve Corporation, All rights reserved =======================*/\n\n#if defined( _M_IX86 ) || defin"
  },
  {
    "path": "src/external/ed25519-donna/fuzz/README.md",
    "chars": 5761,
    "preview": "This code fuzzes ed25519-donna (and optionally ed25519-donna-sse2) against the ref10 implementations of\n[curve25519](htt"
  },
  {
    "path": "src/external/ed25519-donna/fuzz/curve25519-ref10.c",
    "chars": 38169,
    "preview": "#include <stdint.h>\n\ntypedef int32_t crypto_int32;\ntypedef int64_t crypto_int64;\ntypedef uint64_t crypto_uint64;\n\ntypede"
  },
  {
    "path": "src/external/ed25519-donna/fuzz/curve25519-ref10.h",
    "chars": 259,
    "preview": "#ifndef CURVE25519_REF10_H\n#define CURVE25519_REF10_H\n\nint crypto_scalarmult_base_ref10(unsigned char *q,const unsigned "
  },
  {
    "path": "src/external/ed25519-donna/fuzz/ed25519-donna-sse2.c",
    "chars": 74,
    "preview": "#define ED25519_SUFFIX _sse2\n#define ED25519_SSE2\n#include \"../ed25519.c\"\n"
  },
  {
    "path": "src/external/ed25519-donna/fuzz/ed25519-donna.c",
    "chars": 24,
    "preview": "#include \"../ed25519.c\"\n"
  },
  {
    "path": "src/external/ed25519-donna/fuzz/ed25519-donna.h",
    "chars": 1561,
    "preview": "#ifndef ED25519_H\n#define ED25519_H\n\n#include <stdlib.h>\n\ntypedef unsigned char ed25519_signature[64];\ntypedef unsigned "
  },
  {
    "path": "src/external/ed25519-donna/fuzz/ed25519-ref10.c",
    "chars": 171009,
    "preview": "#include <stdint.h>\n#include <stddef.h>\n#include <string.h>\n\nstatic int crypto_verify_32(const unsigned char *x,const un"
  },
  {
    "path": "src/external/ed25519-donna/fuzz/ed25519-ref10.h",
    "chars": 426,
    "preview": "#ifndef ED25519_REF10_H\n#define ED25519_REF10_H\n\nint crypto_sign_pk_ref10(unsigned char *pk,unsigned char *sk);\nint cryp"
  },
  {
    "path": "src/external/ed25519-donna/fuzz/fuzz-curve25519.c",
    "chars": 3686,
    "preview": "#if defined(_WIN32)\n\t#include <windows.h>\n\t#include <wincrypt.h>\n\ttypedef unsigned int uint32_t;\n\ttypedef unsigned __int"
  },
  {
    "path": "src/external/ed25519-donna/fuzz/fuzz-ed25519.c",
    "chars": 5412,
    "preview": "#if defined(_WIN32)\n\t#include <windows.h>\n\t#include <wincrypt.h>\n\ttypedef unsigned int uint32_t;\n#else\n\t#include <stdint"
  },
  {
    "path": "src/external/ed25519-donna/modm-donna-32bit.h",
    "chars": 21134,
    "preview": "/*\n\tPublic domain by Andrew M. <liquidsun@gmail.com>\n*/\n\n\n/*\n\tArithmetic modulo the group order n = 2^252 +  27742317777"
  },
  {
    "path": "src/external/ed25519-donna/modm-donna-64bit.h",
    "chars": 13354,
    "preview": "/*\n\tPublic domain by Andrew M. <liquidsun@gmail.com>\n*/\n\n\n/*\n\tArithmetic modulo the group order n = 2^252 +  27742317777"
  },
  {
    "path": "src/external/ed25519-donna/readme_VALVE.txt",
    "chars": 461,
    "preview": "ed25519-donna is an implementation of the Ed25519 public-key signature algorithm by Dan J Bernstein.\n\nEd25519 is a 256-b"
  },
  {
    "path": "src/external/ed25519-donna/regression.h",
    "chars": 2765824,
    "preview": "{{0x9d,0x61,0xb1,0x9d,0xef,0xfd,0x5a,0x60,0xba,0x84,0x4a,0xf4,0x92,0xec,0x2c,0xc4,0x44,0x49,0xc5,0x69,0x7b,0x32,0x69,0x1"
  },
  {
    "path": "src/external/ed25519-donna/test-internals.c",
    "chars": 6019,
    "preview": "#include <stdio.h>\n#include \"ed25519-donna.h\"\n\nstatic int\ntest_adds() {\n#if defined(HAVE_UINT128) && !defined(ED25519_SS"
  },
  {
    "path": "src/external/ed25519-donna/test-ticks.h",
    "chars": 1313,
    "preview": "#include \"ed25519-donna-portable-identify.h\"\n\n/* ticks - not tested on anything other than x86 */\nstatic uint64_t\nget_ti"
  },
  {
    "path": "src/external/ed25519-donna/test.c",
    "chars": 8151,
    "preview": "/*\n\tValidate ed25519 implementation against the official test vectors from \n\thttp://ed25519.cr.yp.to/software.html\n*/\n\n#"
  },
  {
    "path": "src/external/sha1-wpa/README",
    "chars": 2351,
    "preview": "wpa_supplicant and hostapd\n--------------------------\n\nCopyright (c) 2002-2012, Jouni Malinen <j@w1.fi> and contributors"
  },
  {
    "path": "src/external/sha1-wpa/sha1-internal.c",
    "chars": 8953,
    "preview": "/*\n * SHA1 hash implementation and interface functions\n * Copyright (c) 2003-2005, Jouni Malinen <j@w1.fi>\n *\n * This so"
  },
  {
    "path": "src/external/sha1-wpa/sha1.c",
    "chars": 2593,
    "preview": "/*\n * SHA1 hash implementation and interface functions\n * Copyright (c) 2003-2005, Jouni Malinen <j@w1.fi>\n *\n * This so"
  },
  {
    "path": "src/external/sha1-wpa/sha1.h",
    "chars": 1000,
    "preview": "/*\n * SHA1 hash implementation and interface functions\n * Copyright (c) 2003-2009, Jouni Malinen <j@w1.fi>\n *\n * This so"
  },
  {
    "path": "src/external/sha1-wpa/sha1_i.h",
    "chars": 590,
    "preview": "/*\n * SHA1 internal definitions\n * Copyright (c) 2003-2005, Jouni Malinen <j@w1.fi>\n *\n * This software may be distribut"
  },
  {
    "path": "src/external/steamwebrtc/CMakeLists.txt",
    "chars": 38765,
    "preview": "#include(FetchContent)\ninclude(TestBigEndian)\ninclude(CheckSymbolExists)\n\nfind_package(OpenSSL REQUIRED)\n#find_package(P"
  },
  {
    "path": "src/external/steamwebrtc/ice_session.cpp",
    "chars": 24302,
    "preview": "//===================== Copyright (c) Valve Corporation. All Rights Reserved. ======================\n#include \"ice_sessi"
  },
  {
    "path": "src/external/steamwebrtc/ice_session.h",
    "chars": 3338,
    "preview": "//===================== Copyright (c) Valve Corporation. All Rights Reserved. ======================\n//\n// Simplified in"
  },
  {
    "path": "src/external/steamwebrtc/steamwebrtc_internal.h",
    "chars": 795,
    "preview": "//===================== Copyright (c) Valve Corporation. All Rights Reserved. ======================\n#pragma once\n\n#if d"
  },
  {
    "path": "src/external/steamwebrtc/webrtc_sdp.cc",
    "chars": 143705,
    "preview": "/*\n *  Copyright 2011 The WebRTC project authors. All Rights Reserved.\n *\n *  Use of this source code is governed by a B"
  },
  {
    "path": "src/public/minbase/minbase_annotations.h",
    "chars": 8882,
    "preview": "//====== Copyright 1996-2012, Valve Corporation, All rights reserved. ======//\n//\n// Static compilation analysis annotat"
  },
  {
    "path": "src/public/minbase/minbase_decls.h",
    "chars": 6014,
    "preview": "//====== Copyright 1996-2012, Valve Corporation, All rights reserved. ======//\n//\n// Portable declaration decorations.\n/"
  },
  {
    "path": "src/public/minbase/minbase_endian.h",
    "chars": 4734,
    "preview": "//====== Copyright 1996-2012, Valve Corporation, All rights reserved. ======//\n//\n// Endianness handling.\n//\n//========="
  },
  {
    "path": "src/public/minbase/minbase_identify.h",
    "chars": 7357,
    "preview": "//====== Copyright 1996-2012, Valve Corporation, All rights reserved. ======//\n//\n// Compiler/platform identification to"
  },
  {
    "path": "src/public/minbase/minbase_limits.h",
    "chars": 1607,
    "preview": "//====== Copyright 1996-2012, Valve Corporation, All rights reserved. ======//\n//\n// Limit values for portable types.\n//"
  },
  {
    "path": "src/public/minbase/minbase_macros.h",
    "chars": 10498,
    "preview": "//====== Copyright 1996-2013, Valve Corporation, All rights reserved. ======//\n//\n// Fundamental macros and defines.\n//\n"
  },
  {
    "path": "src/public/minbase/minbase_securezeromemory_impl.h",
    "chars": 794,
    "preview": "//======== Copyright 2013, Valve Corporation, All rights reserved. ============//\n//\n// Purpose: Implementation of Secur"
  },
  {
    "path": "src/public/minbase/minbase_types.h",
    "chars": 2653,
    "preview": "//====== Copyright 1996-2012, Valve Corporation, All rights reserved. ======//\n//\n// Portable type definitions.\n//\n//==="
  },
  {
    "path": "src/public/minbase/minbase_warnings.h",
    "chars": 4503,
    "preview": "//====== Copyright 1996-2012, Valve Corporation, All rights reserved. ======//\n//\n// Enable and disable specific warning"
  },
  {
    "path": "src/public/tier0/basetypes.h",
    "chars": 4470,
    "preview": "//========= Copyright 1996-2005, Valve Corporation, All rights reserved. ============//\n//\n// Purpose: \n//\n// $NoKeyword"
  },
  {
    "path": "src/public/tier0/dbg.h",
    "chars": 7268,
    "preview": "//===== Copyright 1996-2005, Valve Corporation, All rights reserved. ========//\n//\n// Assert implementation.\n//\n// This "
  },
  {
    "path": "src/public/tier0/memdbgoff.h",
    "chars": 680,
    "preview": "//========= Copyright  1996-2005, Valve Corporation, All rights reserved. ============//\n//\n// Purpose: This header, whi"
  },
  {
    "path": "src/public/tier0/memdbgon.h",
    "chars": 1389,
    "preview": "//========= Copyright 1996-2005, Valve Corporation, All rights reserved. ============//\n\n// This file should be included"
  },
  {
    "path": "src/public/tier0/platform.h",
    "chars": 3077,
    "preview": "//========= Copyright Valve Corporation, All rights reserved. ============//\n//\n// Misc platform compatibility wrappers."
  },
  {
    "path": "src/public/tier0/platform_sockets.h",
    "chars": 3659,
    "preview": "//====== Copyright Valve Corporation, All rights reserved. ====================\n//\n// Include the relevant platform-spec"
  },
  {
    "path": "src/public/tier0/platformtime.h",
    "chars": 710,
    "preview": "//========= Copyright Valve Corporation, All rights reserved. ============//\n#ifndef PLATFORMTIME_H\n#define PLATFORMTIME"
  },
  {
    "path": "src/public/tier0/t0constants.h",
    "chars": 1381,
    "preview": "//========= Copyright , Valve LLC, All rights reserved. ============\n//\n// Purpose: declares a variety of constants \n//\n"
  },
  {
    "path": "src/public/tier0/valve_off.h",
    "chars": 7,
    "preview": "// Stub"
  },
  {
    "path": "src/public/tier0/valve_on.h",
    "chars": 8,
    "preview": "// Stub\n"
  },
  {
    "path": "src/public/tier0/valve_tracelogging.h",
    "chars": 8763,
    "preview": "//====== Copyright Valve Corporation, All rights reserved. ====================\n//\n// Define a very thin wrapper around "
  },
  {
    "path": "src/public/tier0/vprof.h",
    "chars": 570,
    "preview": "#ifndef VPROF_H\n#define VPROF_H\n\n#define\tVPROF( name )\t\t\t\t\t\t\t\t\t((void)0)\n#define\tVPROF_ASSERT_ACCOUNTED( name )\t\t\t\t\t((vo"
  },
  {
    "path": "src/public/tier0/wchartypes.h",
    "chars": 2317,
    "preview": "//========= Copyright 1996-2005, Valve Corporation, All rights reserved. ============//\n//\n// Purpose:\tAll of our code i"
  },
  {
    "path": "src/public/tier1/fmtstr.h",
    "chars": 12380,
    "preview": "//========= Copyright � 1996-2005, Valve Corporation, All rights reserved. ============//\n//\n// Purpose: A simple class "
  },
  {
    "path": "src/public/tier1/netadr.h",
    "chars": 13553,
    "preview": "//========= Copyright  Valve Corporation, All rights reserved. ============//\n#ifndef NETADR_H\n#define NETADR_H\n#ifdef _"
  },
  {
    "path": "src/public/tier1/utlbuffer.h",
    "chars": 26055,
    "preview": "//====== Copyright 1996-2005, Valve Corporation, All rights reserved. =======//\n//\n// Purpose: \n//\n// $NoKeywords: $\n//\n"
  },
  {
    "path": "src/public/tier1/utlhashmap.h",
    "chars": 35535,
    "preview": "//========= Copyright Valve Corporation, All rights reserved. =================//\n//\n// Purpose: index-based hash map co"
  },
  {
    "path": "src/public/tier1/utliterator.h",
    "chars": 6197,
    "preview": "//========= Copyright (c) 1996-2016, Valve Corporation, All rights reserved. ============//\n//\n// Purpose: class for imp"
  },
  {
    "path": "src/public/tier1/utllinkedlist.h",
    "chars": 20868,
    "preview": "//========= Copyright 1996-2005, Valve Corporation, All rights reserved. ============//\n//\n// Purpose: Linked list conta"
  },
  {
    "path": "src/public/tier1/utlmemory.h",
    "chars": 8514,
    "preview": "//===== Copyright (C) 1996-2005, Valve Corporation, All rights reserved. ======//\n//\n// Purpose: \n//\n// $NoKeywords: $\n/"
  },
  {
    "path": "src/public/tier1/utlpriorityqueue.h",
    "chars": 7784,
    "preview": "//========= Copyright  1996-2005, Valve Corporation, All rights reserved. ============//\n//\n// Purpose: \n//\n// $NoKeywor"
  },
  {
    "path": "src/public/tier1/utlvector.h",
    "chars": 43184,
    "preview": "//========= Copyright � 1996-2005, Valve Corporation, All rights reserved. ============//\n//\n// Purpose:\n//\n// $NoKeywor"
  },
  {
    "path": "src/public/vstdlib/random.h",
    "chars": 412,
    "preview": "// Stub for just what we need\n\n#ifndef VSTDLIB_RANDOM_H\n#define VSTDLIB_RANDOM_H\n\n#include <stdlib.h>\n\ninline void WeakR"
  },
  {
    "path": "src/public/vstdlib/strtools.h",
    "chars": 5866,
    "preview": "//========= Copyright Valve Corporation, All rights reserved. ============//\n//\n// Misc string functions.  This is just "
  },
  {
    "path": "src/public/winlite.h",
    "chars": 1713,
    "preview": "//========= Copyright  1996-2005, Valve Corporation, All rights reserved. ============//\n//\n// Purpose: includes windows"
  },
  {
    "path": "src/steamnetworkingsockets/certtool/steamnetworkingsockets_certtool.cpp",
    "chars": 22221,
    "preview": "//====== Copyright Valve Corporation, All rights reserved. ====================\n//\n// Steam datagram routing server\n//\n/"
  },
  {
    "path": "src/steamnetworkingsockets/clientlib/SNP_WIRE_FORMAT.md",
    "chars": 11807,
    "preview": "# SNP wire format\n\nThis document describes the encoding of an SNP data payload.  The data payload\nincludes stuff that is"
  },
  {
    "path": "src/steamnetworkingsockets/clientlib/csteamnetworkingmessages.cpp",
    "chars": 35519,
    "preview": "//====== Copyright Valve Corporation, All rights reserved. ====================\n\n#include \"csteamnetworkingmessages.h\"\n#"
  },
  {
    "path": "src/steamnetworkingsockets/clientlib/csteamnetworkingmessages.h",
    "chars": 8753,
    "preview": "//====== Copyright Valve Corporation, All rights reserved. ====================\n\n#ifndef CSTEAMNETWORKINGMESSAGES_H\n#def"
  },
  {
    "path": "src/steamnetworkingsockets/clientlib/csteamnetworkingsockets.cpp",
    "chars": 85419,
    "preview": "//====== Copyright Valve Corporation, All rights reserved. ====================\n\n#include \"csteamnetworkingsockets.h\"\n#i"
  },
  {
    "path": "src/steamnetworkingsockets/clientlib/csteamnetworkingsockets.h",
    "chars": 20223,
    "preview": "//====== Copyright Valve Corporation, All rights reserved. ====================\n\n#ifndef CSTEAMNETWORKINGSOCKETS_H\n#defi"
  },
  {
    "path": "src/steamnetworkingsockets/clientlib/ice_client_types.h",
    "chars": 2353,
    "preview": "//===================== Copyright (c) Valve Corporation. All Rights Reserved. ======================\n//\n// Some types us"
  }
]

// ... and 55 more files (download for full content)

About this extraction

This page contains the full source code of the ValveSoftware/GameNetworkingSockets GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 255 files (22.6 MB), approximately 5.9M tokens, and a symbol index with 1775 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.

Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.

Copied to clipboard!