From 9ccec9446e92bcf0cccb7c27df8b3ec3bfcd4457 Mon Sep 17 00:00:00 2001 From: Segfault <5221072+Segfaultd@users.noreply.github.com> Date: Wed, 7 Oct 2026 23:05:38 +0200 Subject: [PATCH 1/7] refactor(core): drop dead platforms, add CMake plugin selection (#50 stages 1 and 4) Remove the Xbox 360, PS3, PS4, Vita and Native Client remnants: the empty *Includes.h/.cpp stubs, Samples/nacl_sdk, the pre-RakNetSocket2 socket.h / RakNetSocket.cpp (no consumers, only commented-out console code), and every __native_client__ / _PS3 / _PS4 / SN_TARGET_* preprocessor island. The PS3/Native Client fields on SocketDescriptor and RNS2_BerkleyBindParameters go with them; RNS2_Windows_Linux_360 becomes RNS2_Windows_Linux. ID_XBOX_* message identifiers stay as reserved values so wire values do not shift. Add MAFIANET_DISABLED_FEATURES and MAFIANET_MINIMAL so the _RAKNET_SUPPORT_ flags from NativeFeatureIncludes.h can be set from CMake (PUBLIC on the library targets, unknown names rejected), document them in building.rst, and add a linux-minimal CI job that builds the all-plugins-off configuration. --- .github/workflows/build.yml | 28 + CLAUDE.md | 536 +++++++++--------- CMakeLists.txt | 12 + .../MySQLInterface/MySQLInterface.cpp | 2 - Samples/CMakeLists.txt | 1 - Samples/Encryption/Encryption.cpp | 4 +- Samples/RakVoiceFMOD/main.cpp | 4 - .../ChatClient.xcodeproj/project.pbxproj | 10 - .../RakNet_NativeClient/HowToSetup.txt | 36 -- Samples/nacl_sdk/RakNet_NativeClient/blob.nmf | 32 -- Samples/nacl_sdk/RakNet_NativeClient/httpd.py | 305 ---------- .../nacl_sdk/RakNet_NativeClient/icon_128.png | Bin 14890 -> 0 bytes .../nacl_sdk/RakNet_NativeClient/icon_16.png | Bin 682 -> 0 bytes .../nacl_sdk/RakNet_NativeClient/icon_32.png | Bin 1595 -> 0 bytes .../nacl_sdk/RakNet_NativeClient/index.htm | 33 -- Samples/nacl_sdk/RakNet_NativeClient/js1.js | 65 --- Samples/nacl_sdk/RakNet_NativeClient/js2.js | 12 - .../RakNet_NativeClient/main_ppapi.cpp | 131 ----- .../RakNet_NativeClient/manifest.json | 19 - Source/CMakeLists.txt | 81 ++- Source/include/mafianet/LinuxStrings.h | 8 - Source/include/mafianet/MessageIdentifiers.h | 4 +- .../include/mafianet/NatTypeDetectionCommon.h | 5 - .../include/mafianet/NatTypeDetectionServer.h | 3 - Source/include/mafianet/PS3Includes.h | 79 --- Source/include/mafianet/PS4Includes.h | 50 -- Source/include/mafianet/ReliabilityLayer.h | 1 - Source/include/mafianet/SendToThread.h | 1 - Source/include/mafianet/SocketDefines.h | 4 - Source/include/mafianet/SocketIncludes.h | 54 -- Source/include/mafianet/SocketLayer.h | 26 - Source/include/mafianet/ThreadPool.h | 10 - Source/include/mafianet/VitaIncludes.h | 62 -- Source/include/mafianet/XBox360Includes.h | 61 -- Source/include/mafianet/defines.h | 10 +- Source/include/mafianet/peer.h | 9 +- Source/include/mafianet/peerinterface.h | 6 +- Source/include/mafianet/socket.h | 199 ------- Source/include/mafianet/socket2.h | 9 +- Source/include/mafianet/types.h | 8 +- Source/src/NatTypeDetectionClient.cpp | 7 - Source/src/NatTypeDetectionCommon.cpp | 62 -- Source/src/NatTypeDetectionServer.cpp | 19 - Source/src/PS4Includes.cpp | 59 -- Source/src/PacketOutputWindowLogger.cpp | 4 - Source/src/RakNetSocket.cpp | 155 ----- Source/src/RakNetSocket2.cpp | 6 +- Source/src/RakNetSocket2_Berkley.cpp | 2 +- Source/src/RakNetSocket2_Windows_Linux.cpp | 50 ++ .../src/RakNetSocket2_Windows_Linux_360.cpp | 78 --- Source/src/RakNetTypes.cpp | 10 - Source/src/RakPeer.cpp | 181 +----- Source/src/ReliabilityLayer.cpp | 6 +- Source/src/SocketLayer.cpp | 18 +- Source/src/TCPInterface.cpp | 20 +- Source/src/UDPForwarder.cpp | 11 - Source/src/VitaIncludes.cpp | 175 ------ docs/changelog.rst | 19 + docs/getting-started/building.rst | 43 ++ 59 files changed, 520 insertions(+), 2325 deletions(-) delete mode 100644 Samples/nacl_sdk/RakNet_NativeClient/HowToSetup.txt delete mode 100644 Samples/nacl_sdk/RakNet_NativeClient/blob.nmf delete mode 100644 Samples/nacl_sdk/RakNet_NativeClient/httpd.py delete mode 100644 Samples/nacl_sdk/RakNet_NativeClient/icon_128.png delete mode 100644 Samples/nacl_sdk/RakNet_NativeClient/icon_16.png delete mode 100644 Samples/nacl_sdk/RakNet_NativeClient/icon_32.png delete mode 100644 Samples/nacl_sdk/RakNet_NativeClient/index.htm delete mode 100644 Samples/nacl_sdk/RakNet_NativeClient/js1.js delete mode 100644 Samples/nacl_sdk/RakNet_NativeClient/js2.js delete mode 100644 Samples/nacl_sdk/RakNet_NativeClient/main_ppapi.cpp delete mode 100644 Samples/nacl_sdk/RakNet_NativeClient/manifest.json delete mode 100644 Source/include/mafianet/PS3Includes.h delete mode 100644 Source/include/mafianet/PS4Includes.h delete mode 100644 Source/include/mafianet/VitaIncludes.h delete mode 100644 Source/include/mafianet/XBox360Includes.h delete mode 100644 Source/include/mafianet/socket.h delete mode 100644 Source/src/PS4Includes.cpp delete mode 100644 Source/src/RakNetSocket.cpp delete mode 100644 Source/src/RakNetSocket2_Windows_Linux_360.cpp delete mode 100644 Source/src/VitaIncludes.cpp diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 0a3640412..26c83d425 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -99,6 +99,34 @@ jobs: path: build/junit-*.xml if-no-files-found: ignore + # Minimal configuration: every optional plugin compiled out through + # MAFIANET_MINIMAL (see docs/getting-started/building.rst, "Minimal builds"). + # Proves the core transport builds without the plugins and that no plugin + # header leaks into the core. The test suites use the plugins, so this job + # builds both library targets and nothing else. + linux-minimal: + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v4 + with: + persist-credentials: false + + - name: Install OpenSSL + run: sudo apt-get update && sudo apt-get install -y libssl-dev + + - name: Configure CMake (minimal) + run: | + cmake -B build \ + -DCMAKE_BUILD_TYPE=Release \ + -DMAFIANET_MINIMAL=ON + + - name: Build + run: cmake --build build --parallel 4 + + - name: Report library size + run: ls -l build/Source/libMafiaNetStatic.a build/Source/libmafianet.so* + # macOS: Build and run both suites (unit + integration). macos: runs-on: macos-latest diff --git a/CLAUDE.md b/CLAUDE.md index 1c9709880..553907071 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -1,263 +1,273 @@ -# CLAUDE.md - -This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository. - -## Project Overview - -MafiaNet is a cross-platform network engine written in C++ for multiplayer games. It's a fork of SLikeNet, which itself continued RakNet. The project provides reliable UDP messaging, NAT traversal, peer-to-peer networking, and various game-specific networking features. - -## Build Commands - -### Linux / macOS - -```bash -# Configure (from repository root) -mkdir build && cd build -cmake .. - -# Build -cmake --build . # All platforms -cmake --build . --config Release # Release build - -# Build with samples and tests -cmake -DMAFIANET_BUILD_SAMPLES=ON .. - -# Quick rebuild after changes (from repository root) -cmake --build build -j$(nproc) # Linux -cmake --build build -j$(sysctl -n hw.ncpu) # macOS - -# Build options -cmake -DMAFIANET_BUILD_SHARED=ON .. # Build shared library (default: ON) -cmake -DMAFIANET_BUILD_STATIC=ON .. # Build static library (default: ON) -cmake -DMAFIANET_BUILD_TESTS=ON .. # Build test suite -``` - -### Windows (Visual Studio) - -CMake generates Visual Studio solutions automatically. No pre-built `.sln` or `.vcxproj` files are included in the repository. - -```powershell -# Generate Visual Studio 2022 solution -cmake -G "Visual Studio 17 2022" -A x64 -B build - -# Generate Visual Studio 2019 solution -cmake -G "Visual Studio 16 2019" -A x64 -B build - -# Build from command line -cmake --build build --config Release - -# Or open build/MafiaNet.sln in Visual Studio -``` - -Available generators (run `cmake --help` for full list): -- `"Visual Studio 17 2022"` - VS 2022 -- `"Visual Studio 16 2019"` - VS 2019 -- `"Ninja"` - Fast builds with Ninja - -### Build Options - -| Option | Default | Description | -|--------|---------|-------------| -| `MAFIANET_BUILD_SHARED` | ON | Build shared library (.dll/.so/.dylib) | -| `MAFIANET_BUILD_STATIC` | ON | Build static library (.lib/.a) | -| `MAFIANET_BUILD_SAMPLES` | OFF | Build sample applications | -| `MAFIANET_BUILD_TESTS` | OFF | Build test suite | - -### Batched Datagram I/O (recvmmsg / sendmmsg) - -Always on where the syscalls exist. **There is no build option and no macro** — the -paths are guarded by a plain `#if defined(__linux__)`. Do not reintroduce a flag or a -capability macro for this; a CMake option here was removed deliberately because it -left the shipping path uncompiled on most machines. - -The portable helpers in `MmsgBatch.h` (`DriveBatchedSend`, `ClassifySendmmsgErrno`, -`SockaddrToSystemAddress`, `CompactRecvSlots`, `RNS2SendBatch`) compile and are unit -tested on **every** platform; only the syscall glue is gated. Keep it that way — new -logic belongs in a portable helper with a unit test, not inside the `#if`. - -When changing `Source/src/MmsgBatch.cpp`, `RakNetSocket2*.cpp`, or the send path in -`ReliabilityLayer.cpp`, a macOS/Windows build proves nothing about the batched paths. -Verify on Linux, in **both** `Debug` and `Release` (`RakAssert` only fires in Debug; -Release is what ships and exercises the backstops the asserts hide): - -```bash -docker run --rm -v "$PWD":/src:ro ubuntu:24.04 bash -c ' - apt-get update -qq && apt-get install -y -qq build-essential cmake libssl-dev git ca-certificates - cp -r /src /work && cd /work - for cfg in Debug Release; do - cmake -B /b-$cfg -S . -DCMAKE_BUILD_TYPE=$cfg -DMAFIANET_BUILD_TESTS=ON - cmake --build /b-$cfg --parallel "$(nproc)" - ctest --test-dir /b-$cfg --output-on-failure --timeout 600 || exit 1 - done' -``` - -`Tests/Integration/MmsgBatchLiveTests.cpp` is the suite that actually fills batches -(the rest of the suite sends ~1 datagram per tick and never crosses `MMSG_BATCH_MAX`). -Keep its message counts above `MMSG_BATCH_MAX` or that coverage silently disappears. - -**Requirements:** -- CMake 3.21+ -- C++17 compiler -- OpenSSL 3.0+ -- Platform libs: ws2_32 (Windows), pthread (Unix) -- Internet connection (first configure fetches dependencies via FetchContent) - -## Running Tests - -All tests are GoogleTest, built with `MAFIANET_BUILD_TESTS=ON` (requires `MAFIANET_BUILD_STATIC=ON`) and driven by CTest. Two binaries under `Tests/`: - -- **`UnitTests`** (`Tests/Unit/`, label `unit`): hermetic and deterministic — no loopback networking, no wall-clock timing. A started-but-unconnected peer with synchronous assertions is acceptable. New tests for pure logic go here. -- **`IntegrationTests`** (`Tests/Integration/`, label `integration`): real UDP over loopback. Discovered tests get `RUN_SERIAL` (several bind fixed ports) and a 600s timeout. Shared polling/connect helpers live in `Tests/Support/`. - -Under ctest, every `TEST()` runs in its own process — never write tests that depend on state from a previous `TEST()`. Long sequential networking scenarios belong in a single `TEST_F`. - -```bash -cmake -B build -DMAFIANET_BUILD_TESTS=ON -cmake --build build - -ctest --test-dir build --output-on-failure # everything -ctest --test-dir build -L unit # hermetic unit suite only -ctest --test-dir build -L integration # loopback integration suite only -ctest --test-dir build -R "DispatcherLive" # by name pattern -``` - -For debugging, run a binary directly with a filter: `./build/Tests/IntegrationTests --gtest_filter='DispatcherLive.*'`; reproduce flakes with `--gtest_repeat=100 --gtest_break_on_failure`. - -## Writing Tests - -**Every change to library code in `Source/` needs tests, written in the new paradigm.** Do not create new test harnesses, `main()` functions, standalone test executables, or sample apps that act as tests — add GoogleTest cases to the existing suites. New `.cpp` files under `Tests/Unit/` and `Tests/Integration/` are picked up automatically by the build (glob); no CMake edits are needed unless you add a new directory. - -**Default to Unit; escalate to Integration only when the behavior under test genuinely requires traffic.** Ask: can this be tested by calling the API synchronously? Serialization, containers, builders, dispatch tables, ID assignment, string/GUID utilities, replica-visibility queries — all Unit. Only reliability, connection lifecycle, and anything that must cross the network thread belongs in Integration. - -**Unit tests** (`Tests/Unit/Tests.cpp`): -- Hermetic and deterministic: no `Connect()`, no `RakSleep`-with-deadline polling, no dependence on wall-clock time or packet arrival. A started-but-unconnected peer with purely synchronous assertions is acceptable (see `GuidUtilTests.cpp`, `VirtualWorldTests.cpp`). -- Split independent checks into separate `TEST()`/`TEST_F()` cases with descriptive names (`TEST(Dispatcher, AutoAssignedIdsFollowRegistrationOrder)`) — under ctest each case is reported, filtered, and retried individually. See `PointGridSectorizerTests.cpp` for the pattern. -- Deterministic pseudo-randomness is fine and encouraged for stress tests (fixed-seed LCG differential testing against a reference model). - -**Integration tests** (`Tests/Integration/Tests.cpp`): -- One `TEST_F` per sequential scenario. Never split phases that share connection state into separate `TEST`s — each `TEST` runs in its own process under ctest. -- Ports: use OS-assigned ephemeral ports (`SocketDescriptor(0, "127.0.0.1")`, then `peer->GetInternalID().GetPort()`), never a new fixed port. (Some ported legacy tests still bind fixed ports; that is why the suite is `RUN_SERIAL` — do not add to the problem.) -- Waiting: always poll for a condition with a deadline (`while (GetTimeMS() - start < N && !condition) { pump; RakSleep(30); }`), never assert immediately after a state change — packets surface asynchronously from each peer's network thread, and both sides of a handshake must be pumped until *each* has observed the event. -- Never use a bare `RakSleep(N)` as a synchronization primitive; sleep only as the polling interval inside a deadline loop. -- Cleanup must survive a failed `ASSERT_`: destroy peers in fixture `TearDown()` (`Shutdown(100)` then `DestroyInstance` for every peer created) or use RAII `Peer`/`PacketPtr` handles from `mafianet/PeerHandle.h`. Never rely on code after the assertions to clean up. -- Write correctness assertions so a real regression fails on every attempt: CI retries transient integration failures (`ctest --repeat until-pass:3`), which must only absorb timing misses, never actual bugs. Do not add retry loops inside tests. -- Reusable connect/wait helpers live in `Tests/Support/` (`CommonFunctions.h`, `TestHelpers.h`); extend those rather than duplicating polling loops. - -**Before claiming a change is done**, build with `-DMAFIANET_BUILD_TESTS=ON` and run at minimum `ctest --test-dir build -L unit` plus the integration tests touching the changed subsystem (`ctest -R `); run the full suite for changes to the reliability layer, peer lifecycle, or message routing. For a new integration test, prove it is not flaky: `./build/Tests/IntegrationTests --gtest_filter='.*' --gtest_repeat=10 --gtest_break_on_failure`. - -## Architecture - -### Namespaces -- Primary namespace: `MafiaNet` (e.g., `MafiaNet::RakPeerInterface`, `MafiaNet::BitStream`) — used exclusively throughout the library -- Short-hand alias: the `MNet` preprocessor macro (defined in `mafianet/defines.h`) expands to `MafiaNet` as a convenience shorthand - -### Key Components - -**Networking Core** (`Source/include/mafianet/`): -- `RakPeerInterface` - Main entry point. Use `MafiaNet::RakPeerInterface::GetInstance()` to create -- `BitStream` - Binary serialization for packets -- `Packet` - Received network data container -- `SystemAddress` - Network endpoint identifier -- `MessageIdentifiers.h` - Packet type IDs (extend with `ID_USER_PACKET_ENUM`) - -**Plugin System** (`PluginInterface2`): -- Extend functionality by attaching plugins to RakPeerInterface -- Examples: `FileListTransfer`, `FullyConnectedMesh2`, `NatPunchthroughClient` - -**Data Structures** (`DS_*` headers): -- Custom containers: `DS_List`, `DS_Queue`, `DS_Map`, `DS_OrderedList` -- Memory pools: `DS_MemoryPool` - -### Directory Structure - -``` -Source/ -├── include/mafianet/ # Public API headers (include as "mafianet/...") -└── src/ # Implementation files - -Samples/ # 80+ examples demonstrating features -DependentExtensions/ # Optional integrations (database, voice, patching) -cmake/ # CMake modules including FetchDependencies.cmake -``` - -### DependentExtensions - -Optional integrations built when `MAFIANET_BUILD_SAMPLES=ON`: -- **Database**: `MySQLInterface`, `PostgreSQLInterface` - Database connectivity -- **Autopatcher**: Delta patching system for game updates (uses bzip2) -- **RakVoice**: Voice compression and transmission (uses Opus, RNNoise) -- **Lobby2**: Matchmaking and lobby system - -Dependencies (bzip2, miniupnpc, Opus, RNNoise) are automatically fetched via CMake FetchContent at configure time. - -### Basic Usage Pattern - -```cpp -#include "mafianet/peerinterface.h" -#include "mafianet/BitStream.h" -#include "mafianet/MessageIdentifiers.h" - -// Create peer -MafiaNet::RakPeerInterface* peer = MafiaNet::RakPeerInterface::GetInstance(); - -// Start (server) -MafiaNet::SocketDescriptor sd(60000, 0); -peer->Startup(maxConnections, &sd, 1); -peer->SetMaximumIncomingConnections(maxConnections); - -// Or connect (client) -peer->Connect("127.0.0.1", 60000, nullptr, 0); - -// Process packets -MafiaNet::Packet* packet; -while ((packet = peer->Receive()) != nullptr) { - switch (packet->data[0]) { - case ID_NEW_INCOMING_CONNECTION: - // Handle new connection - break; - // ... handle other message types - } - peer->DeallocatePacket(packet); -} - -// Cleanup -MafiaNet::RakPeerInterface::DestroyInstance(peer); -``` - -## Key Samples - -- `Samples/Ping/` - Basic UDP ping (beginner) -- `Samples/ChatExample/` - Simple chat application -- `Samples/ReplicaManager3/` - Object replication system -- `Samples/NATCompleteServer/` - NAT traversal demonstration -- `Tests/` - GoogleTest suites (`Unit/`, `Integration/`, shared helpers in `Support/`) - -## Releasing (Version Bump Procedure) - -MafiaNet uses [Semantic Versioning](https://semver.org/) (`MAJOR.MINOR.PATCH`). -The version string lives in **several** places that must all be kept in sync. When -cutting a release, bump **every** location below to the new version: - -| File | What to change | -|------|----------------| -| `CMakeLists.txt` | `project(MafiaNet VERSION X.Y.Z ...)` — the canonical source of truth | -| `Source/include/mafianet/version.h` | `MAFIANET_VERSION`, `MAFIANET_VERSION_NUMBER_INT`, and the `MAJOR`/`MINOR`/`PATCH` defines (leave the deprecated `RAKNET_*` / `SLIKENET_*` defines untouched) | -| `docs/conf.py` | `version` and `release` | -| `docs/Doxyfile` | `PROJECT_NUMBER` | -| `docs/changelog.rst` | Add a new `Version X.Y.Z` section at the top | -| `README.md` | Add a new `### Version X.Y.Z (Latest)` entry under Changelog and drop `(Latest)` from the previous one | - -### Steps - -1. Determine the previous release boundary (e.g. `git log --reverse ..HEAD`, - or the last `Version` entry in `docs/changelog.rst` if no tag exists). -2. Summarize the changes since then from the commit history and write changelog - entries in `docs/changelog.rst` and `README.md`. -3. Bump the version in **all** files in the table above. -4. Commit: `git commit -am "chore(release): vX.Y.Z"`. -5. Tag: `git tag -a vX.Y.Z -m "MafiaNet vX.Y.Z"`. -6. Push: `git push origin --follow-tags`. -7. Create the GitHub release: `gh release create vX.Y.Z --title "vX.Y.Z" --notes "..."`. - -> Note: releases are tagged `vX.Y.Z` (with the `v` prefix); the in-code/CMake -> version strings are `X.Y.Z` (no prefix). +# CLAUDE.md + +This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository. + +## Project Overview + +MafiaNet is a cross-platform network engine written in C++ for multiplayer games. It's a fork of SLikeNet, which itself continued RakNet. The project provides reliable UDP messaging, NAT traversal, peer-to-peer networking, and various game-specific networking features. + +## Build Commands + +### Linux / macOS + +```bash +# Configure (from repository root) +mkdir build && cd build +cmake .. + +# Build +cmake --build . # All platforms +cmake --build . --config Release # Release build + +# Build with samples and tests +cmake -DMAFIANET_BUILD_SAMPLES=ON .. + +# Quick rebuild after changes (from repository root) +cmake --build build -j$(nproc) # Linux +cmake --build build -j$(sysctl -n hw.ncpu) # macOS + +# Build options +cmake -DMAFIANET_BUILD_SHARED=ON .. # Build shared library (default: ON) +cmake -DMAFIANET_BUILD_STATIC=ON .. # Build static library (default: ON) +cmake -DMAFIANET_BUILD_TESTS=ON .. # Build test suite +``` + +### Windows (Visual Studio) + +CMake generates Visual Studio solutions automatically. No pre-built `.sln` or `.vcxproj` files are included in the repository. + +```powershell +# Generate Visual Studio 2022 solution +cmake -G "Visual Studio 17 2022" -A x64 -B build + +# Generate Visual Studio 2019 solution +cmake -G "Visual Studio 16 2019" -A x64 -B build + +# Build from command line +cmake --build build --config Release + +# Or open build/MafiaNet.sln in Visual Studio +``` + +Available generators (run `cmake --help` for full list): +- `"Visual Studio 17 2022"` - VS 2022 +- `"Visual Studio 16 2019"` - VS 2019 +- `"Ninja"` - Fast builds with Ninja + +### Build Options + +| Option | Default | Description | +|--------|---------|-------------| +| `MAFIANET_BUILD_SHARED` | ON | Build shared library (.dll/.so/.dylib) | +| `MAFIANET_BUILD_STATIC` | ON | Build static library (.lib/.a) | +| `MAFIANET_BUILD_SAMPLES` | OFF | Build sample applications | +| `MAFIANET_BUILD_TESTS` | OFF | Build test suite | +| `MAFIANET_DISABLED_FEATURES` | (empty) | Semicolon list of plugins to compile out (`_RAKNET_SUPPORT_=0`); names validated against `MAFIANET_OPTIONAL_FEATURES` in `Source/CMakeLists.txt` | +| `MAFIANET_MINIMAL` | OFF | Compile out every optional plugin (core transport only); built by the `linux-minimal` CI job | + +When adding or removing a plugin guarded by a `_RAKNET_SUPPORT_` flag, update +`MAFIANET_OPTIONAL_FEATURES` in `Source/CMakeLists.txt` as well, or the CMake +plugin selection silently drifts from `NativeFeatureIncludes.h`. + +Dead platforms (Xbox 360, PS3, PS4, Vita, Native Client) were removed on purpose. +Do not reintroduce `__native_client__`, `_PS3`, `_PS4`, `SN_TARGET_*` or Xbox +preprocessor islands; MafiaNet targets Windows, Linux, macOS and the BSDs. + +### Batched Datagram I/O (recvmmsg / sendmmsg) + +Always on where the syscalls exist. **There is no build option and no macro** — the +paths are guarded by a plain `#if defined(__linux__)`. Do not reintroduce a flag or a +capability macro for this; a CMake option here was removed deliberately because it +left the shipping path uncompiled on most machines. + +The portable helpers in `MmsgBatch.h` (`DriveBatchedSend`, `ClassifySendmmsgErrno`, +`SockaddrToSystemAddress`, `CompactRecvSlots`, `RNS2SendBatch`) compile and are unit +tested on **every** platform; only the syscall glue is gated. Keep it that way — new +logic belongs in a portable helper with a unit test, not inside the `#if`. + +When changing `Source/src/MmsgBatch.cpp`, `RakNetSocket2*.cpp`, or the send path in +`ReliabilityLayer.cpp`, a macOS/Windows build proves nothing about the batched paths. +Verify on Linux, in **both** `Debug` and `Release` (`RakAssert` only fires in Debug; +Release is what ships and exercises the backstops the asserts hide): + +```bash +docker run --rm -v "$PWD":/src:ro ubuntu:24.04 bash -c ' + apt-get update -qq && apt-get install -y -qq build-essential cmake libssl-dev git ca-certificates + cp -r /src /work && cd /work + for cfg in Debug Release; do + cmake -B /b-$cfg -S . -DCMAKE_BUILD_TYPE=$cfg -DMAFIANET_BUILD_TESTS=ON + cmake --build /b-$cfg --parallel "$(nproc)" + ctest --test-dir /b-$cfg --output-on-failure --timeout 600 || exit 1 + done' +``` + +`Tests/Integration/MmsgBatchLiveTests.cpp` is the suite that actually fills batches +(the rest of the suite sends ~1 datagram per tick and never crosses `MMSG_BATCH_MAX`). +Keep its message counts above `MMSG_BATCH_MAX` or that coverage silently disappears. + +**Requirements:** +- CMake 3.21+ +- C++17 compiler +- OpenSSL 3.0+ +- Platform libs: ws2_32 (Windows), pthread (Unix) +- Internet connection (first configure fetches dependencies via FetchContent) + +## Running Tests + +All tests are GoogleTest, built with `MAFIANET_BUILD_TESTS=ON` (requires `MAFIANET_BUILD_STATIC=ON`) and driven by CTest. Two binaries under `Tests/`: + +- **`UnitTests`** (`Tests/Unit/`, label `unit`): hermetic and deterministic — no loopback networking, no wall-clock timing. A started-but-unconnected peer with synchronous assertions is acceptable. New tests for pure logic go here. +- **`IntegrationTests`** (`Tests/Integration/`, label `integration`): real UDP over loopback. Discovered tests get `RUN_SERIAL` (several bind fixed ports) and a 600s timeout. Shared polling/connect helpers live in `Tests/Support/`. + +Under ctest, every `TEST()` runs in its own process — never write tests that depend on state from a previous `TEST()`. Long sequential networking scenarios belong in a single `TEST_F`. + +```bash +cmake -B build -DMAFIANET_BUILD_TESTS=ON +cmake --build build + +ctest --test-dir build --output-on-failure # everything +ctest --test-dir build -L unit # hermetic unit suite only +ctest --test-dir build -L integration # loopback integration suite only +ctest --test-dir build -R "DispatcherLive" # by name pattern +``` + +For debugging, run a binary directly with a filter: `./build/Tests/IntegrationTests --gtest_filter='DispatcherLive.*'`; reproduce flakes with `--gtest_repeat=100 --gtest_break_on_failure`. + +## Writing Tests + +**Every change to library code in `Source/` needs tests, written in the new paradigm.** Do not create new test harnesses, `main()` functions, standalone test executables, or sample apps that act as tests — add GoogleTest cases to the existing suites. New `.cpp` files under `Tests/Unit/` and `Tests/Integration/` are picked up automatically by the build (glob); no CMake edits are needed unless you add a new directory. + +**Default to Unit; escalate to Integration only when the behavior under test genuinely requires traffic.** Ask: can this be tested by calling the API synchronously? Serialization, containers, builders, dispatch tables, ID assignment, string/GUID utilities, replica-visibility queries — all Unit. Only reliability, connection lifecycle, and anything that must cross the network thread belongs in Integration. + +**Unit tests** (`Tests/Unit/Tests.cpp`): +- Hermetic and deterministic: no `Connect()`, no `RakSleep`-with-deadline polling, no dependence on wall-clock time or packet arrival. A started-but-unconnected peer with purely synchronous assertions is acceptable (see `GuidUtilTests.cpp`, `VirtualWorldTests.cpp`). +- Split independent checks into separate `TEST()`/`TEST_F()` cases with descriptive names (`TEST(Dispatcher, AutoAssignedIdsFollowRegistrationOrder)`) — under ctest each case is reported, filtered, and retried individually. See `PointGridSectorizerTests.cpp` for the pattern. +- Deterministic pseudo-randomness is fine and encouraged for stress tests (fixed-seed LCG differential testing against a reference model). + +**Integration tests** (`Tests/Integration/Tests.cpp`): +- One `TEST_F` per sequential scenario. Never split phases that share connection state into separate `TEST`s — each `TEST` runs in its own process under ctest. +- Ports: use OS-assigned ephemeral ports (`SocketDescriptor(0, "127.0.0.1")`, then `peer->GetInternalID().GetPort()`), never a new fixed port. (Some ported legacy tests still bind fixed ports; that is why the suite is `RUN_SERIAL` — do not add to the problem.) +- Waiting: always poll for a condition with a deadline (`while (GetTimeMS() - start < N && !condition) { pump; RakSleep(30); }`), never assert immediately after a state change — packets surface asynchronously from each peer's network thread, and both sides of a handshake must be pumped until *each* has observed the event. +- Never use a bare `RakSleep(N)` as a synchronization primitive; sleep only as the polling interval inside a deadline loop. +- Cleanup must survive a failed `ASSERT_`: destroy peers in fixture `TearDown()` (`Shutdown(100)` then `DestroyInstance` for every peer created) or use RAII `Peer`/`PacketPtr` handles from `mafianet/PeerHandle.h`. Never rely on code after the assertions to clean up. +- Write correctness assertions so a real regression fails on every attempt: CI retries transient integration failures (`ctest --repeat until-pass:3`), which must only absorb timing misses, never actual bugs. Do not add retry loops inside tests. +- Reusable connect/wait helpers live in `Tests/Support/` (`CommonFunctions.h`, `TestHelpers.h`); extend those rather than duplicating polling loops. + +**Before claiming a change is done**, build with `-DMAFIANET_BUILD_TESTS=ON` and run at minimum `ctest --test-dir build -L unit` plus the integration tests touching the changed subsystem (`ctest -R `); run the full suite for changes to the reliability layer, peer lifecycle, or message routing. For a new integration test, prove it is not flaky: `./build/Tests/IntegrationTests --gtest_filter='.*' --gtest_repeat=10 --gtest_break_on_failure`. + +## Architecture + +### Namespaces +- Primary namespace: `MafiaNet` (e.g., `MafiaNet::RakPeerInterface`, `MafiaNet::BitStream`) — used exclusively throughout the library +- Short-hand alias: the `MNet` preprocessor macro (defined in `mafianet/defines.h`) expands to `MafiaNet` as a convenience shorthand + +### Key Components + +**Networking Core** (`Source/include/mafianet/`): +- `RakPeerInterface` - Main entry point. Use `MafiaNet::RakPeerInterface::GetInstance()` to create +- `BitStream` - Binary serialization for packets +- `Packet` - Received network data container +- `SystemAddress` - Network endpoint identifier +- `MessageIdentifiers.h` - Packet type IDs (extend with `ID_USER_PACKET_ENUM`) + +**Plugin System** (`PluginInterface2`): +- Extend functionality by attaching plugins to RakPeerInterface +- Examples: `FileListTransfer`, `FullyConnectedMesh2`, `NatPunchthroughClient` + +**Data Structures** (`DS_*` headers): +- Custom containers: `DS_List`, `DS_Queue`, `DS_Map`, `DS_OrderedList` +- Memory pools: `DS_MemoryPool` + +### Directory Structure + +``` +Source/ +├── include/mafianet/ # Public API headers (include as "mafianet/...") +└── src/ # Implementation files + +Samples/ # 80+ examples demonstrating features +DependentExtensions/ # Optional integrations (database, voice, patching) +cmake/ # CMake modules including FetchDependencies.cmake +``` + +### DependentExtensions + +Optional integrations built when `MAFIANET_BUILD_SAMPLES=ON`: +- **Database**: `MySQLInterface`, `PostgreSQLInterface` - Database connectivity +- **Autopatcher**: Delta patching system for game updates (uses bzip2) +- **RakVoice**: Voice compression and transmission (uses Opus, RNNoise) +- **Lobby2**: Matchmaking and lobby system + +Dependencies (bzip2, miniupnpc, Opus, RNNoise) are automatically fetched via CMake FetchContent at configure time. + +### Basic Usage Pattern + +```cpp +#include "mafianet/peerinterface.h" +#include "mafianet/BitStream.h" +#include "mafianet/MessageIdentifiers.h" + +// Create peer +MafiaNet::RakPeerInterface* peer = MafiaNet::RakPeerInterface::GetInstance(); + +// Start (server) +MafiaNet::SocketDescriptor sd(60000, 0); +peer->Startup(maxConnections, &sd, 1); +peer->SetMaximumIncomingConnections(maxConnections); + +// Or connect (client) +peer->Connect("127.0.0.1", 60000, nullptr, 0); + +// Process packets +MafiaNet::Packet* packet; +while ((packet = peer->Receive()) != nullptr) { + switch (packet->data[0]) { + case ID_NEW_INCOMING_CONNECTION: + // Handle new connection + break; + // ... handle other message types + } + peer->DeallocatePacket(packet); +} + +// Cleanup +MafiaNet::RakPeerInterface::DestroyInstance(peer); +``` + +## Key Samples + +- `Samples/Ping/` - Basic UDP ping (beginner) +- `Samples/ChatExample/` - Simple chat application +- `Samples/ReplicaManager3/` - Object replication system +- `Samples/NATCompleteServer/` - NAT traversal demonstration +- `Tests/` - GoogleTest suites (`Unit/`, `Integration/`, shared helpers in `Support/`) + +## Releasing (Version Bump Procedure) + +MafiaNet uses [Semantic Versioning](https://semver.org/) (`MAJOR.MINOR.PATCH`). +The version string lives in **several** places that must all be kept in sync. When +cutting a release, bump **every** location below to the new version: + +| File | What to change | +|------|----------------| +| `CMakeLists.txt` | `project(MafiaNet VERSION X.Y.Z ...)` — the canonical source of truth | +| `Source/include/mafianet/version.h` | `MAFIANET_VERSION`, `MAFIANET_VERSION_NUMBER_INT`, and the `MAJOR`/`MINOR`/`PATCH` defines (leave the deprecated `RAKNET_*` / `SLIKENET_*` defines untouched) | +| `docs/conf.py` | `version` and `release` | +| `docs/Doxyfile` | `PROJECT_NUMBER` | +| `docs/changelog.rst` | Add a new `Version X.Y.Z` section at the top | +| `README.md` | Add a new `### Version X.Y.Z (Latest)` entry under Changelog and drop `(Latest)` from the previous one | + +### Steps + +1. Determine the previous release boundary (e.g. `git log --reverse ..HEAD`, + or the last `Version` entry in `docs/changelog.rst` if no tag exists). +2. Summarize the changes since then from the commit history and write changelog + entries in `docs/changelog.rst` and `README.md`. +3. Bump the version in **all** files in the table above. +4. Commit: `git commit -am "chore(release): vX.Y.Z"`. +5. Tag: `git tag -a vX.Y.Z -m "MafiaNet vX.Y.Z"`. +6. Push: `git push origin --follow-tags`. +7. Create the GitHub release: `gh release create vX.Y.Z --title "vX.Y.Z" --notes "..."`. + +> Note: releases are tagged `vX.Y.Z` (with the `v` prefix); the in-code/CMake +> version strings are `X.Y.Z` (no prefix). diff --git a/CMakeLists.txt b/CMakeLists.txt index aaa1d3148..9df878244 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -32,6 +32,18 @@ option(MAFIANET_BUILD_STATIC "Build static library" ON) option(MAFIANET_BUILD_SAMPLES "Build sample applications" OFF) option(MAFIANET_BUILD_TESTS "Build test suite" OFF) +# Plugin selection. Every optional plugin in the core library is guarded by a +# _RAKNET_SUPPORT_ flag from NativeFeatureIncludes.h. These two settings +# are the supported way to compile plugins out without editing that header: +# -DMAFIANET_DISABLED_FEATURES="ReplicaManager3;RPC4Plugin" drop specific plugins +# -DMAFIANET_MINIMAL=ON drop every optional plugin +# The resulting defines are PUBLIC on the library targets, so consumers see the +# same header configuration the library was built with. See +# docs/getting-started/building.rst ("Minimal builds") and Source/CMakeLists.txt. +set(MAFIANET_DISABLED_FEATURES "" CACHE STRING + "Semicolon-separated plugin names to compile out (see MAFIANET_OPTIONAL_FEATURES in Source/CMakeLists.txt)") +option(MAFIANET_MINIMAL "Compile out every optional plugin (core transport only)" OFF) + # Ensure at least one library type is built if(NOT MAFIANET_BUILD_SHARED AND NOT MAFIANET_BUILD_STATIC) message(FATAL_ERROR "At least one of MAFIANET_BUILD_SHARED or MAFIANET_BUILD_STATIC must be ON") diff --git a/DependentExtensions/MySQLInterface/MySQLInterface.cpp b/DependentExtensions/MySQLInterface/MySQLInterface.cpp index 7607665b6..0251aac8c 100644 --- a/DependentExtensions/MySQLInterface/MySQLInterface.cpp +++ b/DependentExtensions/MySQLInterface/MySQLInterface.cpp @@ -24,8 +24,6 @@ #ifdef _WIN32 -#elif defined(_PS3) || defined(__PS3__) || defined(SN_TARGET_PS3) - #else #include //atoi #endif diff --git a/Samples/CMakeLists.txt b/Samples/CMakeLists.txt index 53eae0985..cc8c6d3a4 100644 --- a/Samples/CMakeLists.txt +++ b/Samples/CMakeLists.txt @@ -85,7 +85,6 @@ add_subdirectory(RakVoice) # - LobbyDB_PostgreSQL (requires PostgreSQL) # - LoopbackPerformanceTest (specialized) # - Marmalade (requires Marmalade SDK) -# - nacl_sdk (requires Native Client SDK) # - RakVoiceDSound (requires DirectSound) # - RakVoiceFMOD (requires FMOD) # - RakVoiceFMODAsDLL (requires FMOD) diff --git a/Samples/Encryption/Encryption.cpp b/Samples/Encryption/Encryption.cpp index ba24b3b95..dc84cb506 100644 --- a/Samples/Encryption/Encryption.cpp +++ b/Samples/Encryption/Encryption.cpp @@ -340,7 +340,7 @@ int main(void) peer1GotMessage=true; printf("Host got: "); PrintPacketHeader(packet); -#if defined(_DEBUG) && !defined(__native_client__) +#if defined(_DEBUG) if (doTwoWayAuthentication) { char client_public_key_copy[cat::EasyHandshake::PUBLIC_KEY_BYTES]; @@ -355,7 +355,7 @@ int main(void) peer2GotMessage=true; printf("Connecting system got: "); PrintPacketHeader(packet); -#if defined(_DEBUG) && !defined(__native_client__) +#if defined(_DEBUG) if (doTwoWayAuthentication) { char client_public_key_copy[cat::EasyHandshake::PUBLIC_KEY_BYTES]; diff --git a/Samples/RakVoiceFMOD/main.cpp b/Samples/RakVoiceFMOD/main.cpp index a25702a73..cc0815618 100644 --- a/Samples/RakVoiceFMOD/main.cpp +++ b/Samples/RakVoiceFMOD/main.cpp @@ -39,10 +39,6 @@ #include "FMODVoiceAdapter.h" -#if defined(_PS3) || defined(__PS3__) -#include "Console2Includes.h" -#include "fmodps3.h" -#endif // Reads and writes per second of the sound data diff --git a/Samples/iOS/ChatClient/ChatClient.xcodeproj/project.pbxproj b/Samples/iOS/ChatClient/ChatClient.xcodeproj/project.pbxproj index db49a17a9..6635c9e09 100644 --- a/Samples/iOS/ChatClient/ChatClient.xcodeproj/project.pbxproj +++ b/Samples/iOS/ChatClient/ChatClient.xcodeproj/project.pbxproj @@ -103,7 +103,6 @@ B23EA420147F5A43002B8C06 /* VariableDeltaSerializer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B23EA3B7147F5A43002B8C06 /* VariableDeltaSerializer.cpp */; }; B23EA421147F5A43002B8C06 /* VariableListDeltaTracker.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B23EA3B9147F5A43002B8C06 /* VariableListDeltaTracker.cpp */; }; B23EA422147F5A43002B8C06 /* VariadicSQLParser.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B23EA3BB147F5A43002B8C06 /* VariadicSQLParser.cpp */; }; - B23EA423147F5A43002B8C06 /* VitaIncludes.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B23EA3BD147F5A43002B8C06 /* VitaIncludes.cpp */; }; B23EA424147F5A43002B8C06 /* WSAStartupSingleton.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B23EA3C0147F5A43002B8C06 /* WSAStartupSingleton.cpp */; }; B24A1D60147EDC330029E45E /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B24A1D5F147EDC330029E45E /* UIKit.framework */; }; B24A1D62147EDC330029E45E /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B24A1D61147EDC330029E45E /* Foundation.framework */; }; @@ -253,7 +252,6 @@ B23EA352147F5A43002B8C06 /* PacketPriority.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PacketPriority.h; path = ../../../Source/PacketPriority.h; sourceTree = ""; }; B23EA353147F5A43002B8C06 /* PluginInterface2.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = PluginInterface2.cpp; path = ../../../Source/PluginInterface2.cpp; sourceTree = ""; }; B23EA354147F5A43002B8C06 /* PluginInterface2.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PluginInterface2.h; path = ../../../Source/PluginInterface2.h; sourceTree = ""; }; - B23EA355147F5A43002B8C06 /* PS3Includes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PS3Includes.h; path = ../../../Source/PS3Includes.h; sourceTree = ""; }; B23EA356147F5A43002B8C06 /* Rackspace.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Rackspace.cpp; path = ../../../Source/Rackspace.cpp; sourceTree = ""; }; B23EA357147F5A43002B8C06 /* Rackspace.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Rackspace.h; path = ../../../Source/Rackspace.h; sourceTree = ""; }; B23EA358147F5A43002B8C06 /* RakAlloca.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RakAlloca.h; path = ../../../Source/RakAlloca.h; sourceTree = ""; }; @@ -357,12 +355,9 @@ B23EA3BA147F5A43002B8C06 /* VariableListDeltaTracker.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = VariableListDeltaTracker.h; path = ../../../Source/VariableListDeltaTracker.h; sourceTree = ""; }; B23EA3BB147F5A43002B8C06 /* VariadicSQLParser.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = VariadicSQLParser.cpp; path = ../../../Source/VariadicSQLParser.cpp; sourceTree = ""; }; B23EA3BC147F5A43002B8C06 /* VariadicSQLParser.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = VariadicSQLParser.h; path = ../../../Source/VariadicSQLParser.h; sourceTree = ""; }; - B23EA3BD147F5A43002B8C06 /* VitaIncludes.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = VitaIncludes.cpp; path = ../../../Source/VitaIncludes.cpp; sourceTree = ""; }; - B23EA3BE147F5A43002B8C06 /* VitaIncludes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = VitaIncludes.h; path = ../../../Source/VitaIncludes.h; sourceTree = ""; }; B23EA3BF147F5A43002B8C06 /* WindowsIncludes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = WindowsIncludes.h; path = ../../../Source/WindowsIncludes.h; sourceTree = ""; }; B23EA3C0147F5A43002B8C06 /* WSAStartupSingleton.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = WSAStartupSingleton.cpp; path = ../../../Source/WSAStartupSingleton.cpp; sourceTree = ""; }; B23EA3C1147F5A43002B8C06 /* WSAStartupSingleton.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = WSAStartupSingleton.h; path = ../../../Source/WSAStartupSingleton.h; sourceTree = ""; }; - B23EA3C2147F5A43002B8C06 /* XBox360Includes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = XBox360Includes.h; path = ../../../Source/XBox360Includes.h; sourceTree = ""; }; B24A1D5B147EDC330029E45E /* ChatClient.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = ChatClient.app; sourceTree = BUILT_PRODUCTS_DIR; }; B24A1D5F147EDC330029E45E /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; B24A1D61147EDC330029E45E /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; @@ -590,7 +585,6 @@ B23EA352147F5A43002B8C06 /* PacketPriority.h */, B23EA353147F5A43002B8C06 /* PluginInterface2.cpp */, B23EA354147F5A43002B8C06 /* PluginInterface2.h */, - B23EA355147F5A43002B8C06 /* PS3Includes.h */, B23EA356147F5A43002B8C06 /* Rackspace.cpp */, B23EA357147F5A43002B8C06 /* Rackspace.h */, B23EA358147F5A43002B8C06 /* RakAlloca.h */, @@ -694,12 +688,9 @@ B23EA3BA147F5A43002B8C06 /* VariableListDeltaTracker.h */, B23EA3BB147F5A43002B8C06 /* VariadicSQLParser.cpp */, B23EA3BC147F5A43002B8C06 /* VariadicSQLParser.h */, - B23EA3BD147F5A43002B8C06 /* VitaIncludes.cpp */, - B23EA3BE147F5A43002B8C06 /* VitaIncludes.h */, B23EA3BF147F5A43002B8C06 /* WindowsIncludes.h */, B23EA3C0147F5A43002B8C06 /* WSAStartupSingleton.cpp */, B23EA3C1147F5A43002B8C06 /* WSAStartupSingleton.h */, - B23EA3C2147F5A43002B8C06 /* XBox360Includes.h */, ); name = RakNet; sourceTree = ""; @@ -867,7 +858,6 @@ B23EA420147F5A43002B8C06 /* VariableDeltaSerializer.cpp in Sources */, B23EA421147F5A43002B8C06 /* VariableListDeltaTracker.cpp in Sources */, B23EA422147F5A43002B8C06 /* VariadicSQLParser.cpp in Sources */, - B23EA423147F5A43002B8C06 /* VitaIncludes.cpp in Sources */, B23EA424147F5A43002B8C06 /* WSAStartupSingleton.cpp in Sources */, ); runOnlyForDeploymentPostprocessing = 0; diff --git a/Samples/nacl_sdk/RakNet_NativeClient/HowToSetup.txt b/Samples/nacl_sdk/RakNet_NativeClient/HowToSetup.txt deleted file mode 100644 index 474b37ae0..000000000 --- a/Samples/nacl_sdk/RakNet_NativeClient/HowToSetup.txt +++ /dev/null @@ -1,36 +0,0 @@ -1. Download the native client SDK and Python if you need it. -https://developers.google.com/native-client/sdk/download -Get pepper_canary, not the recommended versions. -D:\nacl_sdk>naclsdk update pepper_canary - -2. Download chromium -2A. First, get the source tarball as described in "Bootstrap using the tarball" -http://dev.chromium.org/developers/how-tos/get-the-code -2B. Download the depot_tools -http://dev.chromium.org/developers/how-tos/install-depot-tools -2C. After downloading the gclient / depot tools, be sure to start a new command prompt so the addition to your PATH takes effect. -Exectute the section on "Check out the sources" - -3. Copy the private headers from the chromium repo into the SDK repo -mkdir D:\nacl_sdk\pepper_canary\include\ppapi\c\private -mkdir D:\nacl_sdk\pepper_canary\include\ppapi\cpp\private -copy D:\chromiumtrunk\src\ppapi\c\private\*.h D:\nacl_sdk\pepper_canary\include\ppapi\c\private -copy D:\chromiumtrunk\src\ppapi\cpp\private\*.h D:\nacl_sdk\pepper_canary\include\ppapi\cpp\private - -4) Enable the experimental UDP apis in Chrome -go to about:flags and enable "NaCl Socket API" - -5. Install the visual studio update -http://mainroach.blogspot.com/2012/10/official-nacl-vs2010-add-in-available.html -D:\nacl_sdk>naclsdk install vs_addin -D:\nacl_sdk>cd vs_addin -D:\nacl_sdk\vs_addin>install.bat - -Set the enviroment variable NACL_SDK_ROOT to D:\nacl_sdk\pepper_canary -Then see https://developers.google.com/native-client/dev/devguide/devcycle/vs-addin#add-platforms - -6. Build as in make.bat - -7. Run httpd.py - -8. Press F5 to debug. There are these instructions, but I don't believe they are relevant:http://www.chromium.org/nativeclient/how-tos/debugging-documentation/debugging-with-debug-stub-recommended/debugging-nacl-apps-in-visual-studio-with-wingdb-using-debug-stub-experimental \ No newline at end of file diff --git a/Samples/nacl_sdk/RakNet_NativeClient/blob.nmf b/Samples/nacl_sdk/RakNet_NativeClient/blob.nmf deleted file mode 100644 index 2f5a9a851..000000000 --- a/Samples/nacl_sdk/RakNet_NativeClient/blob.nmf +++ /dev/null @@ -1,32 +0,0 @@ -{ - "program": { - "x86-64": {"url": "lib64/runnable-ld.so"}, - "x86-32": {"url": "lib32/runnable-ld.so"} - }, - "files": { - "libc.so.a9de5678" : { - "x86-64": {"url": "lib64/libc.so.a9de5678"}, - "x86-32": {"url": "lib32/libc.so.a9de5678"} - }, - "libgcc_s.so.1" : { - "x86-64": {"url": "lib64/libgcc_s.so.1"}, - "x86-32": {"url": "lib32/libgcc_s.so.1"} - }, - "libm.so.a9de5678" : { - "x86-64": {"url": "lib64/libm.so.a9de5678"}, - "x86-32": {"url": "lib32/libm.so.a9de5678"} - }, - "libpthread.so.a9de5678" : { - "x86-64": {"url": "lib64/libpthread.so.a9de5678"}, - "x86-32": {"url": "lib32/libpthread.so.a9de5678"} - }, - "libstdc++.so.6" : { - "x86-64": {"url": "lib64/libstdc++.so.6"}, - "x86-32": {"url": "lib32/libstdc++.so.6"} - }, - "main.nexe" : { - "x86-64": {"url": "chatexampleclient_x86_64_Debug.nexe"}, - "x86-32": {"url": "chatexampleclient_x86_32_Debug.nexe"} - } - } -} \ No newline at end of file diff --git a/Samples/nacl_sdk/RakNet_NativeClient/httpd.py b/Samples/nacl_sdk/RakNet_NativeClient/httpd.py deleted file mode 100644 index 8735e490d..000000000 --- a/Samples/nacl_sdk/RakNet_NativeClient/httpd.py +++ /dev/null @@ -1,305 +0,0 @@ -#!/usr/bin/env python -# Copyright (c) 2012 The Chromium Authors. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -import BaseHTTPServer -import imp -import logging -import multiprocessing -import optparse -import os -import SimpleHTTPServer # pylint: disable=W0611 -import socket -import sys -import time -import urlparse - - -SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__)) -NACL_SDK_ROOT = os.path.dirname(SCRIPT_DIR) - - -# We only run from the examples directory so that not too much is exposed -# via this HTTP server. Everything in the directory is served, so there should -# never be anything potentially sensitive in the serving directory, especially -# if the machine might be a multi-user machine and not all users are trusted. -# We only serve via the loopback interface. -def SanityCheckDirectory(dirname): - abs_serve_dir = os.path.abspath(dirname) - - # Verify we don't serve anywhere above NACL_SDK_ROOT. - if abs_serve_dir[:len(NACL_SDK_ROOT)] == NACL_SDK_ROOT: - return - logging.error('For security, httpd.py should only be run from within the') - logging.error('example directory tree.') - logging.error('Attempting to serve from %s.' % abs_serve_dir) - logging.error('Run with --no_dir_check to bypass this check.') - sys.exit(1) - - -class PluggableHTTPServer(BaseHTTPServer.HTTPServer): - def __init__(self, *args, **kwargs): - BaseHTTPServer.HTTPServer.__init__(self, *args) - self.serve_dir = kwargs.get('serve_dir', '.') - self.test_mode = kwargs.get('test_mode', False) - self.delegate_map = {} - self.running = True - self.result = 0 - - def Shutdown(self, result=0): - self.running = False - self.result = result - - -class PluggableHTTPRequestHandler(SimpleHTTPServer.SimpleHTTPRequestHandler): - def _FindDelegateAtPath(self, dirname): - # First check the cache... - logging.debug('Looking for cached delegate in %s...' % dirname) - handler_script = os.path.join(dirname, 'handler.py') - - if dirname in self.server.delegate_map: - result = self.server.delegate_map[dirname] - if result is None: - logging.debug('Found None.') - else: - logging.debug('Found delegate.') - return result - - # Don't have one yet, look for one. - delegate = None - logging.debug('Testing file %s for existence...' % handler_script) - if os.path.exists(handler_script): - logging.debug( - 'File %s exists, looking for HTTPRequestHandlerDelegate.' % - handler_script) - - module = imp.load_source('handler', handler_script) - delegate_class = getattr(module, 'HTTPRequestHandlerDelegate', None) - delegate = delegate_class() - if not delegate: - logging.warn( - 'Unable to find symbol HTTPRequestHandlerDelegate in module %s.' % - handler_script) - - return delegate - - def _FindDelegateForURLRecurse(self, cur_dir, abs_root): - delegate = self._FindDelegateAtPath(cur_dir) - if not delegate: - # Didn't find it, try the parent directory, but stop if this is the server - # root. - if cur_dir != abs_root: - parent_dir = os.path.dirname(cur_dir) - delegate = self._FindDelegateForURLRecurse(parent_dir, abs_root) - - logging.debug('Adding delegate to cache for %s.' % cur_dir) - self.server.delegate_map[cur_dir] = delegate - return delegate - - def _FindDelegateForURL(self, url_path): - path = self.translate_path(url_path) - if os.path.isdir(path): - dirname = path - else: - dirname = os.path.dirname(path) - - abs_serve_dir = os.path.abspath(self.server.serve_dir) - delegate = self._FindDelegateForURLRecurse(dirname, abs_serve_dir) - if not delegate: - logging.info('No handler found for path %s. Using default.' % url_path) - return delegate - - def _SendNothingAndDie(self, result=0): - self.send_response(200, 'OK') - self.send_header('Content-type', 'text/html') - self.send_header('Content-length', '0') - self.end_headers() - self.server.Shutdown(result) - - def send_head(self): - delegate = self._FindDelegateForURL(self.path) - if delegate: - return delegate.send_head(self) - return self.base_send_head() - - def base_send_head(self): - return SimpleHTTPServer.SimpleHTTPRequestHandler.send_head(self) - - def do_GET(self): - # TODO(binji): pyauto tests use the ?quit=1 method to kill the server. - # Remove this when we kill the pyauto tests. - _, _, _, query, _ = urlparse.urlsplit(self.path) - if query: - params = urlparse.parse_qs(query) - if '1' in params.get('quit', None): - self._SendNothingAndDie() - return - - delegate = self._FindDelegateForURL(self.path) - if delegate: - return delegate.do_GET(self) - return self.base_do_GET() - - def base_do_GET(self): - return SimpleHTTPServer.SimpleHTTPRequestHandler.do_GET(self) - - def do_POST(self): - delegate = self._FindDelegateForURL(self.path) - if delegate: - return delegate.do_POST(self) - return self.base_do_POST() - - def base_do_POST(self): - if self.server.test_mode: - if self.path == '/ok': - self._SendNothingAndDie(0) - elif self.path == '/fail': - self._SendNothingAndDie(1) - - -class LocalHTTPServer(object): - """Class to start a local HTTP server as a child process.""" - - def __init__(self, dirname, port, test_mode): - parent_conn, child_conn = multiprocessing.Pipe() - self.process = multiprocessing.Process( - target=_HTTPServerProcess, - args=(child_conn, dirname, port, { - 'serve_dir': dirname, - 'test_mode': test_mode, - })) - self.process.start() - if parent_conn.poll(10): # wait 10 seconds - self.port = parent_conn.recv() - else: - raise Exception('Unable to launch HTTP server.') - - self.conn = parent_conn - - def ServeForever(self): - """Serve until the child HTTP process tells us to stop. - - Returns: - The result from the child (as an errorcode), or 0 if the server was - killed not by the child (by KeyboardInterrupt for example). - """ - child_result = 0 - try: - # Block on this pipe, waiting for a response from the child process. - child_result = self.conn.recv() - except KeyboardInterrupt: - pass - finally: - self.Shutdown() - return child_result - - def ServeUntilSubprocessDies(self, process): - """Serve until the child HTTP process tells us to stop or |subprocess| dies. - - Returns: - The result from the child (as an errorcode), or 0 if |subprocess| died, - or the server was killed some other way (by KeyboardInterrupt for - example). - """ - child_result = 0 - try: - while True: - if process.poll() is not None: - child_result = 0 - break - if self.conn.poll(): - child_result = self.conn.recv() - break - time.sleep(0) - except KeyboardInterrupt: - pass - finally: - self.Shutdown() - return child_result - - def Shutdown(self): - """Send a message to the child HTTP server process and wait for it to - finish.""" - self.conn.send(False) - self.process.join() - - def GetURL(self, rel_url): - """Get the full url for a file on the local HTTP server. - - Args: - rel_url: A URL fragment to convert to a full URL. For example, - GetURL('foobar.baz') -> 'http://localhost:1234/foobar.baz' - """ - return 'http://localhost:%d/%s' % (self.port, rel_url) - - -def _HTTPServerProcess(conn, dirname, port, server_kwargs): - """Run a local httpserver with the given port or an ephemeral port. - - This function assumes it is run as a child process using multiprocessing. - - Args: - conn: A connection to the parent process. The child process sends - the local port, and waits for a message from the parent to - stop serving. It also sends a "result" back to the parent -- this can - be used to allow a client-side test to notify the server of results. - dirname: The directory to serve. All files are accessible through - http://localhost:/path/to/filename. - port: The port to serve on. If 0, an ephemeral port will be chosen. - server_kwargs: A dict that will be passed as kwargs to the server. - """ - try: - os.chdir(dirname) - httpd = PluggableHTTPServer(('', port), PluggableHTTPRequestHandler, - **server_kwargs) - except socket.error as e: - sys.stderr.write('Error creating HTTPServer: %s\n' % e) - sys.exit(1) - - try: - conn.send(httpd.server_address[1]) # the chosen port number - httpd.timeout = 0.5 # seconds - while httpd.running: - # Flush output for MSVS Add-In. - sys.stdout.flush() - sys.stderr.flush() - httpd.handle_request() - if conn.poll(): - httpd.running = conn.recv() - except KeyboardInterrupt: - pass - finally: - conn.send(httpd.result) - conn.close() - - -def main(args): - parser = optparse.OptionParser() - parser.add_option('-C', '--serve-dir', - help='Serve files out of this directory.', - dest='serve_dir', default=os.path.abspath('.')) - parser.add_option('-p', '--port', - help='Run server on this port.', - dest='port', default=5103) - parser.add_option('--no_dir_check', - help='No check to ensure serving from safe directory.', - dest='do_safe_check', action='store_false', default=True) - parser.add_option('--test-mode', - help='Listen for posts to /ok or /fail and shut down the server with ' - ' errorcodes 0 and 1 respectively.', - dest='test_mode', action='store_true') - options, args = parser.parse_args(args) - if options.do_safe_check: - SanityCheckDirectory(options.serve_dir) - - server = LocalHTTPServer(options.serve_dir, int(options.port), - options.test_mode) - - # Serve until the client tells us to stop. When it does, it will give us an - # errorcode. - print 'Serving %s on %s...' % (options.serve_dir, server.GetURL('')) - return server.ServeForever() - -if __name__ == '__main__': - sys.exit(main(sys.argv[1:])) diff --git a/Samples/nacl_sdk/RakNet_NativeClient/icon_128.png b/Samples/nacl_sdk/RakNet_NativeClient/icon_128.png deleted file mode 100644 index 3171a73921e140a5a3e39a57ce34a74701b15847..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 14890 zcmV+_I@QIAP)(_`g8%^e{{R4h=>PzAFaQARU;qF*m;eA5Z<1fd zMgRagut`KgRCwC#z3G!A*KsHKbARteto4$kJ%@=e;n%>8mZQbDxGjH4Yw*dwN6ktF%UTt^3p~IGo2n5RS?EXLV zz0Er}elb-eF){*($P8xMEowJw+3rDThhMk8c`J4OF25%45N~tv8E^pG z6g8T+dIK4lw(#ZsT|3L1>DTY{UAq!N)A!1#gK>0B17j^tKydiJ)x8U@#Lg;NTbx0^A*U`L1kz*AI4E zv>OF;cMj-?+5I=4<=vl@t#4CRGr%=sm|6l*Lj$5l1#fHyQUJpx_U;xBwY?w1wk)VUTLA9K?%d5KBF?$)r0$>qc13`E zBUP>Ix~i%f7Te7SyG7=wVdkPJLhx!eGhhXj0X49KV1^j$7|A&(PZYNu5qzN(5}amN zK#7E*WC^AqH7J}Z0p^UTcBmbhDxjXJM`3^-b6-7#8!b&lok^ZjnoK4sB{TEhXFYdM zXMbAGm|0ntA%to3?@qemE(C}%=FdzflUuiLUB7;PZEa0NcK>Ag&C_gNmgQhDTv(Vp zaB$HD=S7?{U@B08NYa=lFV%(EOgm^ZOSD-Y6u^DmmpNWM*|;-@bkO+O=z|tE(xcT@qkMpJkPF<8`yRW|b>IWZuFqup;i;2k2%$1*V zTF&OjDvF}l>+Rpa|Ao)|*1!4M*N#8_=mbgzMOBuVyz|cazy145uf0Bg>s?-12XV|t z-iVDrme`D-#tLQ=Z;4@vkk|mQdVq{c9gVBX1rCF<7|t*3Km6F|UpV}=FVZ8&s&zG# zAp`(#zy0>#{LSC|}j!y-s009I@00RZUKmuZ`60%dBw=e=V z5ItmJKAk*%^8fr_pZ;I|&4GpEDnnKL(?9*-&;R_-UwY}KOP4N9CXeQFN z{N+FX<3Ik)XFfwjSsZO^4*6+@n%1#q7Gpep`t+au*`Iy=>tDauLvh!uiuD_3e)i7) z{muBPdF<9z%lG z1WSaPK>%yXV9_LIy}3bMO)9Bl;U^m2dhM+X|IfE+ZqNSTJuoKs&b#k^{p(-<#y7q( zW7<97MMPCqz4g{x@4x>(fIWNmoH%hJQzgrT*;vqwVUt-wRbz~6Yir;A?ss2$>7~5; zS%!4FD~qWIdRXSM*8lK7UVik6NB-y!|8V}=P5y5`dh+#)zZv_BCIPjBOo&z;nHh`> z-oZkQPC8i}&#;&@tatO@OdQu6(DJ;MKkMFPV{r>3Cr!F5@{_fws z`2FvHf7*o4-sJ-xwT_CD$>clV`Oc${KKdtr@+X7A;7&H-hH)|-u}djcRdwy!wO3ww z<=nY*0E(jMw1tR>$bIa7)&zN--HR8`oqz4M*DhW9;D9<$wvn7)CH}C^hfB<3_|gXQ+uPh66#tfVR$J(?e|YUD_4qZH~TB2#Z)iCDu_UH z^wMi~X>%;Wa_nJ3sMwsr0d6V`k;#@%eU0cz8Ab%BN>=x&^wnhT>XntNSI6V=v=??y z5yrdHpfjb`*Vk{|y4A^ytyYlV>g#qwW-^)7b=`_VUh3<+It7w=1<*#~d?E;J3!`ti4pVEX(O2==7U+DT1covng5v z3g*p_Ai?|9dV=-ai-ln=YE>mdrRK1vUWtdIRg5ujblw^O*)51M-cy9}PH*Up+M*}`)ODRdB_cBfnDx`T zt?vk!|C)7F_qI%!ogZb|*Wdc+O=K7_Af-A=O>Odo*~NsYNI>dB)Mok1#VnbcH8JK+ z>uMA1$#RX^IHt(ZtT}ofhD1z6Bq?jM00aQc_j#{Z1mN z6EB@c>iDsH;>;x-g&yRv2)dgGlhQy!$tbZJ83(Z(#-x@`Ic6Hv3}%oBvo?m!N@XN6 z2%=HSlo8W5vtyhM2QZmaZQRcXPj~M|A534{1mk8@>z$IEGeUniF7aIjl(xE)P@0u$ zrYuGRGY^7J3I3^IbAaW~CTN!sV?!YXKq*S&5;MRGQ;;*5SOCa!u7Nw7BD4GSuXkmF z-Dv6VJ=x~&=zY&g`Crv#=rZg%R6LVg-cB2J(L^T)Sd6unR-~B@U95Z<%B!P z+qS6Y-Q$h!!(ZPBvjCd?;0N;StP3~ItOHweP`mNl@9`wj)}?JvfNkH=h2*B6X=_0A z!O#0NZ2_p7sv6)jYVHB=4`Ouj2H56oQWuq+M*KaL<28M7r*FG0Je{}2_ulpH4_6#z zz&_e2EFO~lp%&t(4LY%XZ3_qFt$A3Bnqj66>9g(LZm)#7y?(_SiJIK+FX7HPLdQ8E zP1r)@hs)gC?)A1(&d(MPZDFEmGU85|#ru59ZJ5jP=IV@xxceRGH=nRORAf9Xe9Fwq zI&kLfS>IOpbUB&nDD>{d)P0GMt#w5Y(X!~aG=z|GiFd-O z^Xy6us>Z}+C2JTaze&dN}-Wco^ z6g6sr8ksQ?xf(1`M)Hu1%@T4Ihs2)24)EXtzJT-Qf_XAm0~2Tu7??UuiLl=1H%fQ< z$l?B{KDlSl-p3v}wRd?5KmiOuJ%u+WxLg3<7UTeMKtbqv6g{91cyeG5@?ZwB1LYEP z$}nyZc!#n8aA5Dgk3ae3fu(+lnthB#tPr;`18*{ z_k|ap51u_6d28yiW(W|21DYKofYk+~Ip{vj1xmvck9_g>e`nQ3uf6?~o40OO6DYoU;;N1Rw`#`iXMUd+_RO(7`Q*|U ze{WQI{@G98UcGUnuA{(UNo7XQB|sFef>g~qWP0}n702qYco;`bh^HZPs(r67Rj?1##w{PFmkNw6A&wu`rrylV`7BT1h2bT7vUO2rl zf9>>pd~?;0Cx{hkBvNs;Pz~)N9%ncWtLj$>u}sP^GpF#%mT@Nn5=DfDUQkx^e*VCL zBTqfyKK*a?_@~LId0JIj|K#&8(1AV6-~Yk+_s_20yj88Pr>bTmgxZ`6lYn6i4L|^* zxv`P;YhQ{}GG!t_*diIsN+V}}=mtmjAAI78r$7C|7fzmf%!T>E-2Tv8DA)yQB=TlY zc(Y2(JZFx$^j>;%b3;`-b^Ju}r7zvMe*N~tF)gZmF0T9{jO#Do4^zc+AP+`6@LZ10{Epa1OospB`^eSdP}CQ_xT2B~r_ zs7wl^BTPZvYT{K!Dn)1$0iXmWV)DM%t5f9*xA)+Iy+@A^4(uB(&-I4k;PN6z8n5ee zDbGCi_);iGpIEtZ<;wc46^+Tvlt#j$%nAo%SO7ebKw~2-B^2U}OkiY4tci??dhETq zh5o|PgGY}ZI}sKahl6rqVK^A}eBcm31WEA4W&-q6+wOuI`iMcv5fx5if6iM~`?NM( zA740qX5sC3b!C+qb()x}I8JWL7TJaX=Djn^h20t9Yef+j=jN7=9`&CMhaNrY_8+cY z7?$M{`#p(I`)jW*U3pDjJumOy+`m$3N~$1IURR9OoX}guj!h^DXJG>sxJ2H_53k!IR3axQmE5ax$yp(f4ua{`StTL#A;8m zPF~2Eyah9`nu~B?@)m-?U`CNlBfG@jV6}rVO5u>)SXdGTS6oND^})M0C*vcBPd;_* zao-E#V1x3~h4;?>_kXzX!=J8P_@G>$gmG;+CVHcM^gvF`}rts+=WMP$!r{iM!N zd7C(8BQ+mTtQR+~-MseGi{}omJ@>@kFC9E~m_i}!Q~(9pEEdi;tpF^$1W=eU!3>%> zrOEs6od3?>zV}yui;LIhSL?lMgNzm|T#9K3HQoWC+D2k6D+A6tAg08ybn|-ug9~f# zy|;E_o&WtG>%qAzRQ=%U|M*Xr|N0gGDh^n0SRyzBoO#Dao{XGAjSWOjn3MqpE6AKF zAsK<#lu;(FP-Ts(L6;(vYd{crzgy>NY5Z7~E& z6011qm!xBubgfwuaUy2ZV2NM}UWgee)flLpP1wi~5(NqsuzDqp-+TA;rE~LI9Uabv zM^14)CiZX+HtREZAY~WJKuS=k0EQ^_IIWM){I?e`fAgDr-#Yt5f8m&fUOgdH23xNr zDLfGF9I~+~ABq8P13UuDrfXPRUAcO7^>+H;;F0D3`Lk!`(l@XF?O!kczxLcpQw3>& zAk+gUfQ%>!$Jhe^L?8u_!V9Ranw%<= z(SQ1{PrrNmIKl#;NHs{9b!Dv&^IZTHSOY4CR}}5KGUzu~>(_*e0Yxx4Pz{SfQOy0* zYd^jzqig&29^AiNggzBLgc2OumN^{()S4)5E*k;?8dIvq<7$2M)3@Kgys~n5aj}YY zJ0=1#c!Ih%xZp$~qC1CSn@lH>T5b^0xVZ{ch7$Vbwd+^@`JX@Y?9sQb{(N+OZMb)^ zR;{7d+*HGh_sOfNA%T>Avn!N5k^_-JK}G@+0wHr7CAh>P^lM29KuM}JUoMuKu6=O* zt)Km3-=R~ly#88w>&C&bkW5!(?2VONP0h&nW(ZiRK_&AS?YUR?@M-Y21G0?2n$m zqP=%-9J?J)swz@#YCv*S2bbzxX@g)L8JYx6WCFlOxh6cph>Q%SfeZvT5W|9{BFRZ| z>Dub#7w67jxVALEzc=iWb8d^p;#(KYT2-v3VxqB**Kgm%%IZ?oB}(2Dkj#~ipbn9& zh)osI-8?Ys`jAb(o~`R(5o@cX%a?CVF0CC}lfE`*DdvqZrDW82t0Zu#ZFSakL205w zoI^hikzouW>BJujj)#AcP&D<3_aC-Tuo?iIMOs;(+)kq?#u~^NO4`xQjB=<@0E2MXY;FU{Zku9u z9m>5;1S_o0!6Z?Mb*xvbQB}tpI)+6u$wg<1kl>Ya*`)wt&AD{8VeIk7*EJpKxG7R2 z1LZb?Svi{kN$V(+D#ki`cJNy`fX(ONVb(0HaAHYhO?X9U7^MIrQ*9`WJ(OT#D056n zo5pST7bsRzhB@=agh%U>>wZ)*JbIc6Rj(wLc^oNw|9RQTWy6PIxd?;6)>KE*RA-wm zZkdfgRhYp^4jzDt*oIKEZlkAVCT$K!+on2^4RUYvdThVg2x_XP z4aaT`#z}5)Gp z+7pPtxk&+FQ^kaAxgr&oJ6{0`Qetxkb7Gb~C?zvBZ^X!Lh>V>&Kk|IrX~n5@s+6pa zDKZdX1q9%VEZ4nGoU!IZA2V}hN2)XkFdRZb|Gx$#9TRAbBL6@iBM7q8JOS<1yDlU&@hY; zDGO~w?nOjoKrjnUPgymP5I|5g-VGTX00YDNz??{3qYyX+R7`}NpHaf?$;vhmK_H1l zA*8B|)bwW1cDbe?X)5I&NEQ(h$P7-+L770N7Gc65A~r(mzGcITVqwY&UI@Xu^CY<~ z1VP(;e(uoPI{F}0m$XRM7m$z|$jB23nL3Cf8qC-LX?43-xD87VMrK9=ij74?Z4AG$ zRxJa}2x4Hy7#KSzjuMkFC4gGu9~9G@J#< zH<-q4w94*fbQChO#6883w9g9DG;uO1;M9s*SRjnrL7PUPVBz6NHPb40 z%wm9{N^Gnd8>$WK2a&RprI8&Rb5DJQV?*C;1gtZ}gM}%1kR?(fIMtyvQX>I1Yt1m@ zWK?ZfzhE=goY-Q5k0fgz6$74c)N-xoh9Ru`Vibaf0$WfHzDZY6m%uV31K>d3c&bZ4 zZd}`zOSeU)WcRNlMJPAgkgRsC3EP=M1TFyzv5i_*Q1((187ZmqCLOzB77|QM#5VXQ zXHHa;L{lL(0IC2q8%;@&1RfSz_?noR+Kg(=Pe{h3O?7haC_9yBHCWSojhrbUYO170 zM%?B)X9?gkqjK~7TqYHj+NE3laSbG3q|DA(k;|QpkW6!L$Okc25~(n1op_xDml!Hh zwIVfG}!CL>091EV*Hy zM$0V)AMfsCMP`%Xq8yU|D1(5EBd}IV9z+c1bBR1Im`hpj+@t z$!TZn7+~Ja!xUHt2pAL9#2zSByyd7*b_j^tu4n{Mb`&WGpPD`kAVpXw8aYiN!TW6p z(Dp*54ONqk6la{w5?X$ovVOIJu{;opKgV4al*~BC>O?gOq9K7qpavFjW5G3YMiW5N z9M&!$r?8mQwbB{t0yW)eAV&$3G)Yd7HeYUPs;PzKbOO(&OnX%`QiW#6ST_`p5gH*$ zx$%CMV7XfD_80h zllVk_&HFWA9hTVTCi)6eb3|~aO`BvG0TV}&*(()BWQai{8yiA$3@Dk95zrII#<@i= z2_kp`6)HjsK6#(K6VJl4IpMn;Qqu%PRYvaq1%~AwK2UWJhL3A=3E9dvKuwZHu^JF) z5~wuLAa2cnGf-+kwwnl$O-IW%MQh2!026~67z$02M8(Jy5Q9JklC(jQHdrppy;(Li za8gUA$lWu6s1|eN)0A^d6Kd=O>e?+Etl<}BfQ<;m+qGKr*5m?6O_clr)NlkQ z8846JMs_U`Ck$)&-dbP-ufXYo|!$gCb;N4Z+8R3Bw!ZE_%WcXJm-VY-~^?Bt~Sq zDJBKiMA38Yxnf`|0q%m`%zctnVcNpnHln-_p_tJGNZAX7saZnSy=taOl(p@?y#XCY z0!S>WO%otn(q@*_G#N<)^UDr~Wq2}4OeRK3p#1uDn-+BFHrpI_G?+}iVxTP6au`g} z%}8nA-GF;?V;pM4$@cKmoDU#2un_=Z6{orFzOorL!KfyQxM6|iHru%GE|1jswhC0B zy3l&Au7_0|PbB(=HjUcZ6n!-yX3pzk3=Muwp=JhQm^7W5HXhGN028Y#suGKU1zdwF zY+&KD6=_U@Tqp>qnKK$*tI3=pDEbOD)OpJdEFhrXjMP;S!@N*13Z{i=q3ZPxO1LrU zsSR+o37+ZBJ=&g+?!WTD1jy86f`fUe7tNi}I|iJMmftb>q<~JJ=vj-e(XFB;#;V#V zv#telV_T!i{OQ!v1(0S-0H8DkY@h~g287V+Qf+76Pz$-*w*Jj?%fIHlm zfYerOC4#iuk#pm0cby^9fxa44L|eXV3NVow*HB?*4vqtWm_9}bII6@ED2{rDUDukJn&=7krAi_87J zHwQx{ua+EBowOhXqGZsGybhQ)MVzbyo53^8XU$=j!Ila(xC9Z9cfNA8YM2}Jm*$S)iGy(A0(SO<8!RnT z5yHa!{1c~6;o#xXyH}`+EJmgt@Ma3>w-X<+8yZYm^V(ps!2$*j?^)RM$noKz+&A1a zyf&-YKW-0X9abwRjxP0^c?gzfIW?b^e(+z<~lWlk*OSN+)$KWq+{$(Ej5m zkL{bxKl9k*=T84zK3GRp^;*9z01lLMVWEZJPM3dagCcKP+?sCgod<13DWyq07U;nbK>wYW?Ju6ww03(7SD1xH~qz`jyY}91L+VPR*P?0GdOK>TwOXP%OC3RH~{ophH zQ@=O=JC7{?#;OYc?*4+)`4_))_R=K>Er?4hy!m8W`IK0_Q7PHZVNw>h$lCInI)xV_ zv*b)%J{3gZO6oPMG`#?Jpa~v>ld%#`kKU8JE_Gv$3~@CaYrkt2@@!$=2NID0cG%EIJa=*#Gz+? z^XRi*S~~TVi!t!Z{K?+34PQI+qjzt-cWrevshV-OW-1nxf-~tU5t&*L1Z9;bXqn+4 z=0I!$$KNn7Kk%`S?|t-f-hWU_H(VMJ&>J4&#b*Xbialo+e}3h? zTh*F^l0;PzI5lRIQbB-HP;zEw(t&3g&3FeDBN1lyh4*DqF3c|-K6vERsV9G9{+T(y zFAZ>f!ChZp-*@cz(wD#d#EFw<-aUQe(v``|NTMVe6 zT+jT{-fBFg(aB!_xpZ*-*6OH^qf{#lUW}C$WikR1BQeAgNt`IxnHYh*u{Sg0 zIOzBG6nmHILx-wUlY>i__VpHnJ3JX5?e}g>$`2M6$4@_9&ka}ieXzd1E+Tnmh3&3Y z#dOCK?>#fm&(AL&JEkX3%*`##hoxbEspyF>Y6s7{-3XKETTJ&$@Xl#)b93`a^!>AE z|NHm9|DzxM=<<~-&FBL|5@EjE0Pwc!|MaM{5JIot+rM|;XFvALSHJu_hmJkwijo3R zQIyoXe)-&wUVHuQTklNHUQa7^m9(;Cj^L88vRIjnjgoH(5L*JcL?G6T+4f4TX5?Zh z+}y&#@{z-*Zmga-_SnMyy_k&prVb{Hi)YTAd-3o7?u|FzxO(l{cs!0V?$jP*b03Jt zHL#|&ymQRV{eJ)O;locq_0-q?;Ar%(U#rj`5P-_y{`>FJ^XVvJ|cUpV_$7ifNX@W}B;j~+?uuoJQP zac#K#=)e2-=lk^Yci#Dnzxa!9ed}A(4VA3PD2hAH0QOs(wd6fYDXp!oz4+pbFTecq%vghN+~NIoaM_d)sPOVXeDASiPyHYN z;eWq+>D&)rd+md(SC1?W(n_qgf#K&suR?NC)PXWKHy7olCMeQ^)!NjGlJtF13yTUf z%u_GgFD_o}zxprppZ)CU$i5d}{OW zG3VTHILs!=3^>tmyxbgbyuV1`)vHMdu=?2*7L9p}lO;fI$g}%{vj&SXR zD?fYV$7kPt?$)dSGWz-H<(1I^V4%n&@?F|rLi;h z1XD<~y@PUPTwgr>i=VyzT8}^e%D?=}l`B`W4s*_Rta;Z7rQ0(7*1l)mAh)l6^{ct{ zRausI8Dq79SrZwJMpv(1{osQSx;Z}i^=?vJo`1H>HkTcnZ|)Mc;hKblXvnT^NebLY-ozkYr1-n}tKX72TRcPBs|WtayDcjK5c zpSJ4WO%GkUCqCWa7z1eoyI&twS8uIU*KbQLLt;ld>F|bAc`a(?mTHqgl{Q}AwP$MM ztpw!ASIQx}KpYbsdl9~V?WSG1G8s=grtAv&AAFSI%r%)zR#sN(x*iM$S;}oQLuRIF zS|&hBX*?cx4>T=sa>u(6LKap#Fzn1}njLtSs2R8hzgov?WrT^8#$=j+)E0MAJPPLYQ(3EcXHesmf$LW+HZ+lig*T z4W||m(1oRQe4A|hK4w!vKpR`-kOw?lN+}Ui4vheLc5}Bh=Ug{zvzt}Do8@fVaCBza zU|rWKr5IywOt_5*>IC2P$EN!&b_!s+xB4#keMV4j{KL%UqE2W{T50kUN%QzANcMFJ z3}Ph*1i(Q7X7dcxoFder2`(ui12mfgF-XR!b*Tu2sRKcc>!hPNb$U8?y*t16v9y`h zb^o58m%Z&x{O%d;;rEl>fTWos_w=AmrJxNIBxkbCHTocDYeg9ZQ*E*f%1xi>7UeBj zJy?4y%jFX+illegyNABat?h8PnI-w_x~Qw(LNhQMCe)hqQ$J=vQ%>Df=8&`nT&}B} z)|o7MZY!`cnM@VlphC_*M8m~?y#(lzi;)nWC0OEiHgNM}#s(uys43=EvRtazn<^OT zN(E*jQ*Nq=mjyjD7IS9wE1TeOSBySBtk=wh>^r^TK5qD-y8N$qi(BAk^D_;hC>6oL zhS0V_k)}dGniO6(Pr(_VA=LGb$QjRE{F8FrLMbEHSjm~WU;Tu`dsf1~N&!t+=z=k7A?A9278veUpqE`btlD*KQ&8!m0p z#B|t)r}|`V)&U!hTxe5qn?3-f_(7Rqn*k0V3jJfjEF=`d1+x#FoHjO0*`m)9Tg`Ba z9D}2ceb@FMHbnqyY80nlwC2syf(Jk1fDHjeT_^5oRcX7>x-{GTeLKw7)SKBJthV;P zPW=uxm%rB!{1SLTgG#W(KxO8PO7+?3XX~T~vthU`ErpF~dWhM==wD|1fia%eAyl)Hk6tBjdunHHgrz0~xjLuQgW!^HjAOrqqCg zb07e53ux8M*Dj6C57Uf^7vS%1&(ZljJMsYIPN1;@XHr)}%(c zUaYx71CDkn7fo11H+r5Bp=6Yt)y@F)#7fODUt`#E)M9K!CuNz)3fc#fymRnZlg1XiPu$oYLqg>Va;h=%PlPG-X^9pxh z0XE0xoq50!97DA&pBBc%fsJz0rl1x~2#7>uZ_dy+cx&6awWBn;$sVP_TU#>(No2K` z!1AkD+Wk3V(=zK<_mrCl(eD#ww*-U>^kJipRUr2e#P?k-bBzZfA`6m z10YC+_(EMIC+vm1nK(#eRtlP_7y!Y7p`SAZ>e-xw^$iXp(9}qLR?tQfpP4mH?tDTq zCYjK%pgwILW%zLYfNc--owTvv;bSwy^nMBFo@XL7Z0z7%+ma{OUa@ZI-e%4U;6cfp zhx&Gy(3Dyx-8lPQ*>=M)W-dt{r)OLJriXrYdw357=yI5Ib94QEf0Ng6hl!N;wfkU5 z_Gx>)(Ce3JSk!&2`m~ayBzSGwbt>mpbs3L^3dXQVDVGR3)7&5^Zp?AkE@sz-R}E?o zW33X&V18hO!3;v};nJhKNeH1V%N-!hywz^a?k6rYO$ZZ* z=#bcyl%c`2XPP@2JD9-7eM!DEj-cHqE)?(P{cl(8GToHl%?NwH>4we8aK(uor%7MB(u zJ#}h%VYy)L6=he>M{PeNB5?bYD`_`g#MJ9k`kaZ{9tGsUsjlbxgTsdo?ccv|VPWB^ zr=IGTma%?$MGqo%GtA3-pKo&F#EDOQ;u8xC3(mQ`V_R>&eK0PA==%Ns^Uptj`t<1x z56#b)Q5(~E#ryY!0V;~8KmD0cfBp-D#eF;+?)&&BFI~9w`n&HR@AnrAcvUe{up{;c z2THjy3PDT-d4@@1Lv)BtWK70v%)~HT6`_Jr`Z42novuRpHy%0sTh9zm9qonrPk-uD z=g*$Ka^*@sRcPC`-BteV451K_49x2H`ycz*$DVxh$zHD)Lg=VF1I%)N`lo-2Eko!t z_ARAU6h&E<0M^&n*Vfh^qE7Z9%%a&n=D2NFvrlO{znv$gm6_K?%-iUD$sCWGEqhI;L zW1s)r;__ba`pe6E`u)C$WaQez9VUF@#EIvhfBwr~{_@8^{_*AI<$k}PQCYcGZqq)@ z2=pxCGfQSE^vO?ta$#ZN=+UEZzWL_On>V)tw(fdTI@DMGBIjILmWxYECmwz5i(mZW z6OTV0xCqRl;Kk6JCpxsac=3%l*Dqa4jBRY@~DYH3l zLD}XkIvMoJrNc)KJn_Ww&pp3<{Bef>VFEq-?6ZrDi?6==>U;0Kclq+=s;W9Ev4bY) zWc3WlC%;}4#leFIpM3Jk&wcK5PdxF&^78UTrF@u{ug&MaZ7sv3<(Yinz_ zZr!?Z+n4h1Y zo10r)TwGdODvBac$KF~TfUN}@T@WH$P8mU86h*(^pP!$fOeXp3*Votc&h9LWGLz0= za+$dZMJNN8+@BjR`f_MSE{uYer5`)2JG14b7^}KYbMrKr)6>J(z z*qSDJWbD7>Q zrE?>Q$gyM3JVY@l2PyQbl6{ysQ>GXvlWI-PYDqC_5{^m+43m`tfvT&Fk>Hbg2kVJ2 zkO+y1jEg*mz>x(^(xmFw+NVAh^YA6noL?xor)1jWENSbyuBzNE9(hsu%-z+qnP!nr z#&#SKLdXX{pZ#fZJ;Mi-zppD1*=lAnbCx+pQN$QyjMIF2R{~%PXq|0gBBHEBOAw<( z5v)XZdR2)ONOg>2ssd3KkO4hK5GYh#G=`cJI0g!l+!{qP2M7~bRD^^*$6kt@g86x0 zAf~`Q$7P0;)^(k?tgh=^8{9boyEKPpOvlUw-PP;$^6{OP)mx>|U1Z3%kn8Dks(Ve& z%~)JJ=#QOCFn3cLwXN5Brx5WDg(UYBrtGxw)_mml@4r9ew}ZXkYh3V7;g{_<*EaQM zZy_hG1h{i;#zyY!Ugk?Y6aw5c!9G06x&MD&{LvPCsB^+ImevC%(_`g8%^e{{R4h=>PzAFaQARU;qF*m;eA5Z<1fd zMgRZ;FiAu~RCwB4lg~?(aS+CznSI}VziZ;+f)%SCG9nOalh7iu-5_`AkXF~a6rDZw zC)6L{!8&P|?j3|6yQqf_LSXo<9j27&wfW54gOnGP#&)G(KMKEp7~!;q@t-$(#~ zs)C6e{2va0$;rvt*;!@=(Y{S#>OTlCXgh_;NW07 z;Bsf-1CZuGp^&1Xp&=1r0G{WiYBrZ6lOqrTFgeed6d7ZVSBgYZHI5TwlMECV;_&{Zl1l^;86LTw-fp0$_eI7`0ndS{j45^Zrf8&G77<5PN&osFi9{}v z1OV8D>R%s7_1L%|2vXJBqu5#n2vBQ-W-~>tHiwyOwVJh-h?u!nzLEX9a=5z#rS{_K z@&5j~`2|%Kk!rO{MARyL-v>ZM`Fy@%t!*|5?B%??F^xu}^#UCo9nAb^0J}*OefBO* Q+yDRo07*qoM6N<$f{YU|X#fBK diff --git a/Samples/nacl_sdk/RakNet_NativeClient/icon_32.png b/Samples/nacl_sdk/RakNet_NativeClient/icon_32.png deleted file mode 100644 index 94110c8c6b08d5c5936b2287f1ae030898b9036f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1595 zcmV-B2E_S^P)(_`g8%^e{{R4h=>PzAFaQARU;qF*m;eA5Z<1fd zMgRZ>!AV3xRCwC7R&QusZ7{Hf*@r6uT`cN$$P5_nh~AettMN zF{w8i7<)J$-gD0L_xJpJg(Ls~Bt--($s#kAA|fCr0z^hng%W~DrNZMoNtO((N(2N3 zNbA`8rdSiT?5AluJUo2y;>A1&5h1Cn_wU=k@1X}T93P&axS()?D9nONL%I2myLt`| zjJ`j5^5n_oUXt9obLY^|P?99Acanz>A8u>Evf;WnUwHn{zI+Ba1^fm05I6~(0p9cF zUqAPJxvR6S;E^Loa?Pzk$H&KW$FJe5Rp&o>=MOi=P*8Nhmn89uiWEDb8!a1q_uYkB z?b}iSCMG8GL(4#0CIAo(BB_vsfuyO4Aw$~yqrrCH zdr!yuP9zBukHo|K{Lp>tExR6h_}?41%p+MqQbnbSQWK>b{Pd<9cKz(pt+(FN5=lx( zl3YVaXV>06djJFABg9i4Kk)O}k3Rll>`X`$A~^<1?tS7{`v-@HyJpXQI%?hs?^$oU z1kvuktN+PgJhQH=^wH5{KqG3wF{(+h*t>WCLyta2st9}{(Zqf6{-16?I{aWW&6LW; zkzld;@~fja$%{WcTH9Y2A%%n)M2NBK@3)`Yy#1v&dawMm2nG=Y6rgeT@Bg^;!0xR> zPXSPfq`;NGPTWwhdZvXCiXjw3D1=ZpTX*SSCr%uj>!`*;Ex0<+glnoaSZqvpT^ae{ zozBab%NAi)2v!J^gjh7LtJkML98dEc5Mp4GX#+5G1cD$6q96cGBr%$1CMH4wRHC}* zTnbPch$-kGscH~LVX6q~BH)9|v+whMSa4YcN)neBt^z4wF<8}<0tk#zX&@C6#5XYu zorCyDsu-dp6|4a@->NQeKth=lE&vsZ36~k50a+@zL>Cd2261$12;LBpW|%^BGzA02 zloavC2zbIR^??a8$~@2zg5Pw%Knz5xGK~lW1wx~f2qdIL3!DWN3?cx$3BgDWh$A;qFb3SkxkL*7h)qY5QeIKTr*n&y43RFr^CJGRf1 zih?9M3HjqS6Erqm-_x_Ft5Gp{qUb^*R!}Agetqq_+j{!ajTu3}t-{!e({S`egoA`=*4Ov&;M32Z z>b!aMw{HiSrAN!~N z8-#>8l7IpJ?C~#ey645Wj!u65d7d#45CPda_0`@3k8eG2;G1bWGVXp!7aUao<4or%yLX} z=y&Ycap=&Y{5CE5KQpV>>-Bnl`Sy3tRn~WuTxBk+&ej?lVpJ$a%v&LLRmz=7B@K=F t`DzZx67H2srCctns^phk{6FdI0RV11NCYeuYoq`G002ovPDHLkV1l6z)yx0@ diff --git a/Samples/nacl_sdk/RakNet_NativeClient/index.htm b/Samples/nacl_sdk/RakNet_NativeClient/index.htm deleted file mode 100644 index 8c964c800..000000000 --- a/Samples/nacl_sdk/RakNet_NativeClient/index.htm +++ /dev/null @@ -1,33 +0,0 @@ - - - - Hello, World! - - - - -

Native Client UDP Example

- -
- -
- -
- - - - - - -
- -

Status

-
NO-STATUS
- - - - diff --git a/Samples/nacl_sdk/RakNet_NativeClient/js1.js b/Samples/nacl_sdk/RakNet_NativeClient/js1.js deleted file mode 100644 index ae2878620..000000000 --- a/Samples/nacl_sdk/RakNet_NativeClient/js1.js +++ /dev/null @@ -1,65 +0,0 @@ - -// Check for the various File API support. -if (window.File && window.FileReader && window.FileList && window.Blob) { - // Great success! All the File APIs are supported. -} else { - alert('The File APIs are not fully supported in this browser.'); -} - -helloWorldModule = null; // Global application object. -statusText = 'NO-STATUS'; - -// Indicate success when the NaCl module has loaded. -function moduleDidLoad() { - helloWorldModule = document.getElementById('udp_example'); - updateStatus('moduleDidLoad SUCCESS'); -} - -// Handle a message coming from the NaCl module. -function handleMessage(message_event) -{ - console.log("Got handleMessage"); - console.log(message_event.data); -} - -// If the page loads before the Native Client module loads, then set the -// status message indicating that the module is still loading. Otherwise, -// do not change the status message. -function pageDidLoad() { -if (helloWorldModule == null) { - updateStatus('LOADING...'); -} else { - // It's possible that the Native Client module onload event fired - // before the page's onload event. In this case, the status message - // will reflect 'SUCCESS', but won't be displayed. This call will - // display the current message. - updateStatus(); -} -} - -// Set the global status message. If the element with id 'statusField' -// exists, then set its HTML to the status message as well. -// opt_message The message test. If this is null or undefined, then -// attempt to set the element with id 'statusField' to the value of -// |statusText|. -function updateStatus(opt_message) { - if (opt_message) - statusText = opt_message; - var statusField = document.getElementById('statusField'); - if (statusField) { - statusField.innerHTML = statusText; - } -} - -// Indicate success when the NaCl module has loaded. -function clikedConnect() { - helloWorldModule = document.getElementById('udp_example'); - if (helloWorldModule == null) { - updateStatus('helloWorldModule == null'); - } - else - { - updateStatus('Calling postMessage'); - helloWorldModule.postMessage('connect'); - } -} diff --git a/Samples/nacl_sdk/RakNet_NativeClient/js2.js b/Samples/nacl_sdk/RakNet_NativeClient/js2.js deleted file mode 100644 index ba749c9ef..000000000 --- a/Samples/nacl_sdk/RakNet_NativeClient/js2.js +++ /dev/null @@ -1,12 +0,0 @@ - -var listener = document.getElementById('listener'); -listener.addEventListener('load', moduleDidLoad, true); -listener.addEventListener('message', handleMessage, true); - -var connectButton = document.getElementById('connectButton'); -connectButton.addEventListener('click', clikedConnect, true); - -// Add event listeners once the DOM has fully loaded by listening for the -// `DOMContentLoaded` event on the document, and adding your listeners to -// specific elements when it triggers. -document.body.addEventListener('load', pageDidLoad ); \ No newline at end of file diff --git a/Samples/nacl_sdk/RakNet_NativeClient/main_ppapi.cpp b/Samples/nacl_sdk/RakNet_NativeClient/main_ppapi.cpp deleted file mode 100644 index 914a0139e..000000000 --- a/Samples/nacl_sdk/RakNet_NativeClient/main_ppapi.cpp +++ /dev/null @@ -1,131 +0,0 @@ -/* - * Copyright (c) 2014, Oculus VR, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * RakNet License.txt file in the licenses directory of this source tree. An additional grant - * of patent rights can be found in the RakNet Patents.txt file in the same directory. - * - * - * Modified work: Copyright (c) 2017, SLikeSoft UG (haftungsbeschränkt) - * - * This source code was modified by SLikeSoft. Modifications are licensed under the MIT-style - * license found in the license.txt file in the root directory of this source tree. - */ - -#include -#include -#include "ppapi/cpp/instance.h" -#include "ppapi/cpp/module.h" -#include "ppapi/cpp/var.h" - -// KMJ -#include "ppapi/c/private/ppb_udp_socket_private.h" -#include "mafianet/peerinterface.h" -#include "mafianet/types.h" -#include "mafianet/sleep.h" -using namespace MafiaNet; - -/// The Instance class. One of these exists for each instance of your NaCl -/// module on the web page. The browser will ask the Module object to create -/// a new Instance for each occurence of the tag that has these -/// attributes: -/// type="application/x-nacl" -/// src="hello_tutorial.nmf" -/// To communicate with the browser, you must override HandleMessage() for -/// receiving messages from the browser, and use PostMessage() to send messages -/// back to the browser. Note that this interface is asynchronous. -class ConnectivityTestInstance : public pp::Instance { - RakPeerInterface *rakPeer; - public: - /// The constructor creates the plugin-side instance. - /// @param[in] instance the handle to the browser-side plugin instance. - explicit ConnectivityTestInstance(PP_Instance instance) : pp::Instance(instance) - { - // PostMessage(pp::Var("ConnectivityTestInstance constructor")); - /* - MafiaNet::ConnectionAttemptResult car = rakPeer->Connect("127.0.0.1", 1234, "Rumpelstiltskin", (int) strlen("Rumpelstiltskin")); - RakAssert(car==MafiaNet::CONNECTION_ATTEMPT_STARTED); - RakSleep(100); - MafiaNet::Packet* p; - for (p=rakPeer->Receive(); p; rakPeer->DeallocatePacket(p), p=rakPeer->Receive()) - {} - */ - } - virtual ~ConnectivityTestInstance() {} - - /// Handler for messages coming in from the browser via postMessage(). The - /// @a var_message can contain anything: a JSON string; a string that encodes - /// method names and arguments; etc. For example, you could use - /// JSON.stringify in the browser to create a message that contains a method - /// name and some parameters, something like this: - /// var json_message = JSON.stringify({ "myMethod" : "3.14159" }); - /// nacl_module.postMessage(json_message); - /// On receipt of this message in @a var_message, you could parse the JSON to - /// retrieve the method name, match it to a function call, and then call it - /// with the parameter. - /// @param[in] var_message The message posted by the browser. - virtual void HandleMessage(const pp::Var& var_message) { - /* - if (!var_message.is_string()) - return; - std::string message = var_message.AsString(); - pp::Var var_reply; - if (message == kHelloString) { - var_reply = pp::Var(kReplyString); - PostMessage(var_reply); - } - */ - // Just some do nothing code so I can set a breakpoint; - rakPeer=0; - - /* - rakPeer=MafiaNet::RakPeerInterface::GetInstance(); - MafiaNet::SocketDescriptor socketDescriptor(0,0); - socketDescriptor.socketFamily=AF_INET; - StartupResult sr = rakPeer->Startup(8,&socketDescriptor, 1); - if (sr==MafiaNet::RAKNET_STARTED) - { - PostMessage(pp::Var("RAKNET_STARTED")); - } - else - { - PostMessage(pp::Var("RakNet did not start")); - } - - MafiaNet::ConnectionAttemptResult car = rakPeer->Connect("127.0.0.1", 1234, "Rumpelstiltskin", (int) strlen("Rumpelstiltskin")); - RakAssert(car==MafiaNet::CONNECTION_ATTEMPT_STARTED); - RakSleep(0); - MafiaNet::Packet* p; - for (p=rakPeer->Receive(); p; rakPeer->DeallocatePacket(p), p=rakPeer->Receive()) - {} - */ - } -}; - -/// The Module class. The browser calls the CreateInstance() method to create -/// an instance of your NaCl module on the web page. The browser creates a new -/// instance for each tag with type="application/x-nacl". -class ConnectivityTestModule : public pp::Module { - public: - ConnectivityTestModule() : pp::Module() {} - virtual ~ConnectivityTestModule() {} - - /// Create and return a ConnectivityTestInstance object. - /// @param[in] instance The browser-side instance. - /// @return the plugin-side instance. - virtual pp::Instance* CreateInstance(PP_Instance instance) { - return new ConnectivityTestInstance(instance); - } -}; - -namespace pp { -/// Factory function called by the browser when the module is first loaded. -/// The browser keeps a singleton of this module. It calls the -/// CreateInstance() method on the object you return to make instances. There -/// is one instance per tag on the page. This is the main binding -/// point for your NaCl module with the browser. -Module* CreateModule() { - return new ConnectivityTestModule(); -} -} // namespace pp diff --git a/Samples/nacl_sdk/RakNet_NativeClient/manifest.json b/Samples/nacl_sdk/RakNet_NativeClient/manifest.json deleted file mode 100644 index fc6fc67b7..000000000 --- a/Samples/nacl_sdk/RakNet_NativeClient/manifest.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "name": "NaCl Chat Example Client", - "version": "0.5", - "manifest_version" : 2, - - "description": "NaCl Chat Example Client", - "icons": { - "16": "icon_16.png", - "32": "icon_32.png", - "128": "icon_128.png" - }, - - "app": { - "launch": { - "local_path": "index.htm" - } - } - -} \ No newline at end of file diff --git a/Source/CMakeLists.txt b/Source/CMakeLists.txt index 0648a8965..0cc7bfada 100644 --- a/Source/CMakeLists.txt +++ b/Source/CMakeLists.txt @@ -69,15 +69,12 @@ set(MAFIANET_SOURCES src/PeerHandle.cpp src/PluginInterface2.cpp src/PointGridSectorizer.cpp - src/PS4Includes.cpp src/Rackspace.cpp src/RakMemoryOverride.cpp src/RakNetCommandParser.cpp - src/RakNetSocket.cpp src/RakNetSocket2.cpp src/RakNetSocket2_Berkley.cpp src/RakNetSocket2_Windows_Linux.cpp - src/RakNetSocket2_Windows_Linux_360.cpp src/RakNetStatistics.cpp src/RakNetTransport2.cpp src/RakNetTypes.cpp @@ -118,7 +115,6 @@ set(MAFIANET_SOURCES src/VariableDeltaSerializer.cpp src/VariableListDeltaTracker.cpp src/VariadicSQLParser.cpp - src/VitaIncludes.cpp src/WSAStartupSingleton.cpp ) @@ -232,8 +228,6 @@ set(MAFIANET_HEADERS include/mafianet/peerinterface.h include/mafianet/PluginInterface2.h include/mafianet/PointGridSectorizer.h - include/mafianet/PS3Includes.h - include/mafianet/PS4Includes.h include/mafianet/Rackspace.h include/mafianet/RakVoice.h include/mafianet/Rand.h @@ -255,7 +249,6 @@ set(MAFIANET_HEADERS include/mafianet/sleep.h include/mafianet/mafianet.h include/mafianet/smartptr.h - include/mafianet/socket.h include/mafianet/socket2.h include/mafianet/SocketDefines.h include/mafianet/SocketIncludes.h @@ -290,11 +283,9 @@ set(MAFIANET_HEADERS include/mafianet/version.h include/mafianet/VirtualWorld.h include/mafianet/VirtualWorldReplica3.h - include/mafianet/VitaIncludes.h include/mafianet/WindowsIncludes.h include/mafianet/WSAStartupSingleton.h include/mafianet/wstring.h - include/mafianet/XBox360Includes.h ) set(MAFIANET_CRYPTO_HEADERS @@ -316,6 +307,74 @@ set(MAFIANET_ALL_HEADERS ${MAFIANET_CRYPTO_HEADERS} ) +# Optional plugins, one per _RAKNET_SUPPORT_ flag in NativeFeatureIncludes.h. +# Anything not in this list (BitStream, RakPeer, the reliability layer, the +# socket layer, RakVoice, ...) is the core and always builds. Keep this list in +# sync with the header when adding or removing a plugin. +set(MAFIANET_OPTIONAL_FEATURES + CloudClient + CloudServer + ConnectionGraph2 + ConsoleServer + DirectoryDeltaTransfer + DynDNS + EmailSender + FileListTransfer + FullyConnectedMesh2 + HTTPConnection + HTTPConnection2 + LogCommandParser + MessageFilter + NatPunchthroughClient + NatPunchthroughServer + NatTypeDetectionClient + NatTypeDetectionServer + PacketLogger + PacketizedTCP + Rackspace + RakNetCommandParser + RakNetTransport + ReadyEvent + RelayPlugin + ReplicaManager3 + Router2 + RPC4Plugin + StatisticsHistory + TCPInterface + TeamBalancer + TeamManager + TelnetTransport + TwoWayAuthentication + UDPForwarder + UDPProxyClient + UDPProxyCoordinator + UDPProxyServer +) + +# Resolve MAFIANET_MINIMAL / MAFIANET_DISABLED_FEATURES (set at the top level) +# into the list of _RAKNET_SUPPORT_=0 definitions applied to every +# library target. Unknown names are a configure error rather than a silent +# no-op, since a typo here would otherwise ship the plugin it meant to drop. +set(MAFIANET_FEATURE_DEFINITIONS "") +if(MAFIANET_MINIMAL) + set(_mafianet_disabled ${MAFIANET_OPTIONAL_FEATURES}) +else() + set(_mafianet_disabled ${MAFIANET_DISABLED_FEATURES}) +endif() +foreach(_feature IN LISTS _mafianet_disabled) + if(NOT _feature IN_LIST MAFIANET_OPTIONAL_FEATURES) + message(FATAL_ERROR + "MAFIANET_DISABLED_FEATURES: '${_feature}' is not an optional plugin. " + "Known names: ${MAFIANET_OPTIONAL_FEATURES}") + endif() + list(APPEND MAFIANET_FEATURE_DEFINITIONS "_RAKNET_SUPPORT_${_feature}=0") +endforeach() +if(MAFIANET_FEATURE_DEFINITIONS) + list(LENGTH _mafianet_disabled _mafianet_disabled_count) + message(STATUS "MafiaNet: compiling out ${_mafianet_disabled_count} optional plugin(s): ${_mafianet_disabled}") +endif() +unset(_mafianet_disabled) + # Common target setup function function(mafianet_configure_target target_name) target_include_directories(${target_name} @@ -345,6 +404,10 @@ function(mafianet_configure_target target_name) PRIVATE $<$:_DEBUG> $<$:NDEBUG> + PUBLIC + # Plugins compiled out of this build. PUBLIC so a consumer's view of + # NativeFeatureIncludes.h matches the library it links against. + ${MAFIANET_FEATURE_DEFINITIONS} ) set_target_properties(${target_name} PROPERTIES diff --git a/Source/include/mafianet/LinuxStrings.h b/Source/include/mafianet/LinuxStrings.h index c0fd72bee..09eea0820 100644 --- a/Source/include/mafianet/LinuxStrings.h +++ b/Source/include/mafianet/LinuxStrings.h @@ -16,13 +16,6 @@ #ifndef _GCC_WIN_STRINGS #define _GCC_WIN_STRINGS -#if defined(__native_client__) - #ifndef _stricmp - int _stricmp(const char* s1, const char* s2); - #endif - int _strnicmp(const char* s1, const char* s2, size_t n); - char *_strlwr(char * str ); -#else #if (defined(__GNUC__) || defined(__GCCXML__) || defined(__S3E__) ) && !defined(_WIN32) #ifndef _stricmp int _stricmp(const char* s1, const char* s2); @@ -36,6 +29,5 @@ #endif -#endif #endif // _GCC_WIN_STRINGS diff --git a/Source/include/mafianet/MessageIdentifiers.h b/Source/include/mafianet/MessageIdentifiers.h index b364ec068..a2077b5ab 100644 --- a/Source/include/mafianet/MessageIdentifiers.h +++ b/Source/include/mafianet/MessageIdentifiers.h @@ -34,6 +34,8 @@ enum OutOfBandIdentifiers ID_ROUTER_2_REPLY_TO_SPECIFIED_PORT, ID_ROUTER_2_MINI_PUNCH_REPLY, ID_ROUTER_2_MINI_PUNCH_REPLY_BOUNCE, + // Reserved: formerly Xbox 360 integration. The identifiers stay so the + // wire values of everything after them do not shift. ID_XBOX_360_VOICE, ID_XBOX_360_GET_NETWORK_ROOM, ID_XBOX_360_RETURN_NETWORK_ROOM, @@ -388,7 +390,7 @@ enum DefaultMessageIDTypes /// Gamebryo Lightspeed integration ID_LIGHTSPEED_INTEGRATION, - /// XBOX integration + /// Reserved: formerly Xbox integration. Kept so later wire values do not shift. ID_XBOX_LOBBY, /// The password we used to challenge the other system passed, meaning the other system has called TwoWayAuthentication::AddPassword() with the same password we passed to TwoWayAuthentication::Challenge() diff --git a/Source/include/mafianet/NatTypeDetectionCommon.h b/Source/include/mafianet/NatTypeDetectionCommon.h index d92258f26..e333983af 100644 --- a/Source/include/mafianet/NatTypeDetectionCommon.h +++ b/Source/include/mafianet/NatTypeDetectionCommon.h @@ -69,14 +69,9 @@ namespace MafiaNet /// \internal RAK_DLL_EXPORT RakNetSocket2* CreateNonblockingBoundSocket(const char *bindAddr -#ifdef __native_client__ - ,_PP_Instance_ chromeInstance -#endif , RNS2EventHandler *eventHandler ); - /// \internal - //int NatTypeRecvFrom(char *data, RakNetSocket2* socket, SystemAddress &sender, RNS2EventHandler *eventHandler); } #endif // #if _RAKNET_SUPPORT_NatTypeDetectionServer==1 || _RAKNET_SUPPORT_NatTypeDetectionClient==1 diff --git a/Source/include/mafianet/NatTypeDetectionServer.h b/Source/include/mafianet/NatTypeDetectionServer.h index 3b7748037..92c135089 100644 --- a/Source/include/mafianet/NatTypeDetectionServer.h +++ b/Source/include/mafianet/NatTypeDetectionServer.h @@ -78,9 +78,6 @@ class RAK_DLL_EXPORT NatTypeDetectionServer : public PluginInterface2, public RN const char *nonRakNetIP2, const char *nonRakNetIP3, const char *nonRakNetIP4 -#ifdef __native_client__ - ,_PP_Instance_ chromeInstance -#endif ); // Releases the sockets created in Startup(); diff --git a/Source/include/mafianet/PS3Includes.h b/Source/include/mafianet/PS3Includes.h deleted file mode 100644 index 8c10bf2a8..000000000 --- a/Source/include/mafianet/PS3Includes.h +++ /dev/null @@ -1,79 +0,0 @@ -/* - * This file was taken from RakNet 4.082 without any modifications. - * Please see licenses/RakNet license.txt for the underlying license and related copyright. - */ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Source/include/mafianet/PS4Includes.h b/Source/include/mafianet/PS4Includes.h deleted file mode 100644 index 2fc42cc8c..000000000 --- a/Source/include/mafianet/PS4Includes.h +++ /dev/null @@ -1,50 +0,0 @@ -/* - * This file was taken from RakNet 4.082 without any modifications. - * Please see licenses/RakNet license.txt for the underlying license and related copyright. - */ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Source/include/mafianet/ReliabilityLayer.h b/Source/include/mafianet/ReliabilityLayer.h index 7b1d1fff0..9ccfb0b53 100644 --- a/Source/include/mafianet/ReliabilityLayer.h +++ b/Source/include/mafianet/ReliabilityLayer.h @@ -585,7 +585,6 @@ class ReliabilityLayer// unsigned int length; MafiaNet::TimeMS sendTime; // SystemAddress systemAddress; - unsigned short remotePortRakNetWasStartedOn_PS3; unsigned int extraSocketOptions; }; DataStructures::Queue delayList; diff --git a/Source/include/mafianet/SendToThread.h b/Source/include/mafianet/SendToThread.h index f097fb6ca..a34676955 100644 --- a/Source/include/mafianet/SendToThread.h +++ b/Source/include/mafianet/SendToThread.h @@ -37,7 +37,6 @@ class SendToThread { SOCKET s; SystemAddress systemAddress; - unsigned short remotePortRakNetWasStartedOn_PS3; unsigned int extraSocketOptions; char data[MAXIMUM_MTU_SIZE]; unsigned short dataWriteOffset; diff --git a/Source/include/mafianet/SocketDefines.h b/Source/include/mafianet/SocketDefines.h index 18f09001c..b41e43b9b 100644 --- a/Source/include/mafianet/SocketDefines.h +++ b/Source/include/mafianet/SocketDefines.h @@ -20,10 +20,6 @@ #if defined(_WIN32) #define closesocket__ closesocket #define select__ select - #elif defined(__native_client__) - // namespace MafiaNet { void CloseSocket(SOCKET s); } - // #define closesocket__ MafiaNet::CloseSocket - #define select__ select #else #define closesocket__ close #define select__ select diff --git a/Source/include/mafianet/SocketIncludes.h b/Source/include/mafianet/SocketIncludes.h index 56ecc2469..b6f02da34 100644 --- a/Source/include/mafianet/SocketIncludes.h +++ b/Source/include/mafianet/SocketIncludes.h @@ -13,31 +13,6 @@ // All this crap just to include type SOCKET -#ifdef __native_client__ -#define _PP_Instance_ PP_Instance -#else -#define _PP_Instance_ int -#endif - - - - - - - - - - - - - - - - - - - - #if defined(_WIN32) // IP_DONTFRAGMENT is different between winsock 1 and winsock 2. Therefore, Winsock2.h must be linked againt Ws2_32.lib // winsock.h must be linked against WSock32.lib. If these two are mixed up the flag won't work correctly @@ -57,34 +32,6 @@ #include #include - #ifdef __native_client__ - #include "ppapi/cpp/private/net_address_private.h" - #include "ppapi/c/pp_bool.h" - #include "ppapi/c/pp_errors.h" - #include "ppapi/cpp/completion_callback.h" - #include "ppapi/cpp/instance_handle.h" - #include "ppapi/cpp/module.h" - #include "ppapi/cpp/module_impl.h" - #include "ppapi/c/pp_errors.h" - #include "ppapi/c/pp_module.h" - #include "ppapi/c/pp_var.h" - #include "ppapi/c/pp_resource.h" - #include "ppapi/c/ppb.h" - #include "ppapi/c/ppb_instance.h" - #include "ppapi/c/ppb_messaging.h" - #include "ppapi/c/ppb_var.h" - #include "ppapi/c/ppp.h" - #include "ppapi/c/ppb_core.h" - #include "ppapi/c/ppp_instance.h" - #include "ppapi/c/ppp_messaging.h" - #include "ppapi/c/pp_input_event.h" - #include "ppapi/c/pp_completion_callback.h" - //UDP specific - the 'private' folder was copied from the chromium src/ppapi/c headers folder - #include "ppapi/c/private/ppb_udp_socket_private.h" - #include "ppapi/cpp/private/net_address_private.h" - typedef PP_Resource __UDPSOCKET__; - typedef PP_Resource __TCPSOCKET__; - #else //#include "memoryoverride.h" /// Unix/Linux uses ints for sockets typedef int __UDPSOCKET__; @@ -92,7 +39,6 @@ /// Define SOCKET for cross-platform compatibility with Windows code typedef int SOCKET; #define INVALID_SOCKET -1 -#endif #endif diff --git a/Source/include/mafianet/SocketLayer.h b/Source/include/mafianet/SocketLayer.h index 1ef88e71c..9ab04dd06 100644 --- a/Source/include/mafianet/SocketLayer.h +++ b/Source/include/mafianet/SocketLayer.h @@ -66,20 +66,6 @@ class RAK_DLL_EXPORT SocketLayer // Destructor ~SocketLayer(); - /* - /// Creates a bound socket to listen for incoming connections on the specified port - /// \param[in] port the port number - /// \param[in] blockingSocket - /// \return A new socket used for accepting clients - static RakNetSocket* CreateBoundSocket( RakPeer *peer, unsigned short port, bool blockingSocket, const char *forceHostAddress, unsigned int sleepOn10048, unsigned int extraSocketOptions, unsigned short socketFamily, _PP_Instance_ chromeInstance ); - static RakNetSocket* CreateBoundSocket_IPV4( RakPeer *peer, unsigned short port, bool blockingSocket, const char *forceHostAddress, unsigned int sleepOn10048, unsigned int extraSocketOptions, _PP_Instance_ chromeInstance ); - #if RAKNET_SUPPORT_IPV6==1 - static RakNetSocket* CreateBoundSocket_SupportIPV4And6( RakPeer *peer, unsigned short port, bool blockingSocket, const char *forceHostAddress, unsigned int sleepOn10048, unsigned int extraSocketOptions, unsigned short socketFamily, _PP_Instance_ chromeInstance ); - #endif - static RakNetSocket* CreateBoundSocket_PS3Lobby( unsigned short port, bool blockingSocket, const char *forceHostAddress, unsigned short socketFamily ); - static RakNetSocket* CreateBoundSocket_PSP2( unsigned short port, bool blockingSocket, const char *forceHostAddress, unsigned short socketFamily ); - */ - /* /// Returns if this specified port is in use, for UDP /// \param[in] port the port number @@ -128,15 +114,6 @@ class RAK_DLL_EXPORT SocketLayer static void GetMyIP( SystemAddress addresses[MAXIMUM_NUMBER_OF_INTERNAL_IDS] ); - /// Call sendto (UDP obviously) - /// \param[in] s the socket - /// \param[in] data The byte buffer to send - /// \param[in] length The length of the \a data in bytes - /// \param[in] ip The address of the remote host in dotted notation. - /// \param[in] port The port number to send to. - /// \return 0 on success, nonzero on failure. -// static int SendTo( UDPSOCKET s, const char *data, int length, const char ip[ 16 ], unsigned short port, unsigned short remotePortRakNetWasStartedOn_PS3, unsigned int extraSocketOptions, const char *file, const long line ); - /// Call sendto' (UDP obviously) /// It won't reach the recipient, except on a LAN /// However, this is good for opening routers / firewalls @@ -168,9 +145,6 @@ class RAK_DLL_EXPORT SocketLayer // static void SetSocketLayerOverride(SocketLayerOverride *_slo); // static SocketLayerOverride* GetSocketLayerOverride(void) {return slo;} -// static int SendTo_PS3Lobby( RakNetSocket *s, const char *data, int length, const SystemAddress &systemAddress ); -// static int SendTo_PSP2( RakNetSocket *s, const char *data, int length, const SystemAddress &systemAddress ); -// static int SendTo_360( RakNetSocket *s, const char *data, int length, const char *voiceData, int voiceLength, const SystemAddress &systemAddress ); // static int SendTo_PC( RakNetSocket *s, const char *data, int length, const SystemAddress &systemAddress, const char *file, const long line ); // // static void SetDoNotFragment( RakNetSocket* listenSocket, int opt ); diff --git a/Source/include/mafianet/ThreadPool.h b/Source/include/mafianet/ThreadPool.h index e2f387b3f..dfada3175 100644 --- a/Source/include/mafianet/ThreadPool.h +++ b/Source/include/mafianet/ThreadPool.h @@ -188,9 +188,6 @@ struct RAK_DLL_EXPORT ThreadPool MafiaNet::SignaledEvent quitAndIncomingDataEvents; -// #if defined(SN_TARGET_PSP2) -// MafiaNet::RakThread::UltUlThreadRuntime *runtime; -// #endif }; #include "ThreadPool.h" @@ -335,9 +332,6 @@ bool ThreadPool::StartThreads(int numThreads, int stackSi { (void) stackSize; -// #if defined(SN_TARGET_PSP2) -// runtime = MafiaNet::RakThread::AllocRuntime(numThreads); -// #endif runThreadsMutex.Lock(); if (runThreads==true) @@ -423,10 +417,6 @@ void ThreadPool::StopThreads(void) quitAndIncomingDataEvents.CloseEvent(); -// #if defined(SN_TARGET_PSP2) -// MafiaNet::RakThread::DeallocRuntime(runtime); -// runtime=0; -// #endif } template diff --git a/Source/include/mafianet/VitaIncludes.h b/Source/include/mafianet/VitaIncludes.h deleted file mode 100644 index 60124ffcc..000000000 --- a/Source/include/mafianet/VitaIncludes.h +++ /dev/null @@ -1,62 +0,0 @@ -/* - * This file was taken from RakNet 4.082 without any modifications. - * Please see licenses/RakNet license.txt for the underlying license and related copyright. - */ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Source/include/mafianet/XBox360Includes.h b/Source/include/mafianet/XBox360Includes.h deleted file mode 100644 index fbe8cce8f..000000000 --- a/Source/include/mafianet/XBox360Includes.h +++ /dev/null @@ -1,61 +0,0 @@ -/* - * This file was taken from RakNet 4.082 without any modifications. - * Please see licenses/RakNet license.txt for the underlying license and related copyright. - */ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Source/include/mafianet/defines.h b/Source/include/mafianet/defines.h index 00ae8b101..b4d863e61 100644 --- a/Source/include/mafianet/defines.h +++ b/Source/include/mafianet/defines.h @@ -113,18 +113,14 @@ #endif #ifndef RakAssert -#if defined(__native_client__) -#define RakAssert(x) -#else #if defined(_DEBUG) #define RakAssert(x) assert(x); #else #define RakAssert(x) #endif #endif -#endif -#if !defined(_DEBUG) || defined(__native_client__) +#if !defined(_DEBUG) #define SLNET_VERIFY(x) ((void)(x)) #else #define SLNET_VERIFY(x) RakAssert(x) @@ -189,10 +185,6 @@ #define RPC4_GLOBAL_REGISTRATION_MAX_FUNCTION_NAME_LENGTH 48 #endif -#ifndef XBOX_BYPASS_SECURITY -#define XBOX_BYPASS_SECURITY 1 -#endif - // Controls how many allocations occur at once for the memory pool of incoming datagrams waiting to be transferred between the recvfrom thread and the main update thread // Has large effect on memory usage, per instance of RakPeer. Approximately MAXIMUM_MTU_SIZE*BUFFERED_PACKETS_PAGE_SIZE bytes, once after calling RakPeer::Startup() #ifndef BUFFERED_PACKETS_PAGE_SIZE diff --git a/Source/include/mafianet/peer.h b/Source/include/mafianet/peer.h index af41a5f0c..d8eac5694 100644 --- a/Source/include/mafianet/peer.h +++ b/Source/include/mafianet/peer.h @@ -76,7 +76,7 @@ class RAK_DLL_EXPORT RakPeer : public RakPeerInterface, public RNS2EventHandler /// \note Call SetMaximumIncomingConnections if you want to accept incoming connections. /// \param[in] maxConnections Maximum number of connections between this instance of RakPeer and another instance of RakPeer. Required so that the network can preallocate and for thread safety. A pure client would set this to 1. A pure server would set it to the number of allowed clients.A hybrid would set it to the sum of both types of connections. /// \param[in] localPort The port to listen for connections on. On linux the system may be set up so thast ports under 1024 are restricted for everything but the root user. Use a higher port for maximum compatibility. - /// \param[in] socketDescriptors An array of SocketDescriptor structures to force RakNet to listen on a particular IP address or port (or both). Each SocketDescriptor will represent one unique socket. Do not pass redundant structures. To listen on a specific port, you can pass SocketDescriptor(myPort,0); such as for a server. For a client, it is usually OK to just pass SocketDescriptor(); However, on the XBOX be sure to use IPPROTO_VDP + /// \param[in] socketDescriptors An array of SocketDescriptor structures to force RakNet to listen on a particular IP address or port (or both). Each SocketDescriptor will represent one unique socket. Do not pass redundant structures. To listen on a specific port, you can pass SocketDescriptor(myPort,0); such as for a server. For a client, it is usually OK to just pass SocketDescriptor(); /// \param[in] socketDescriptorCount The size of the \a socketDescriptors array. Pass 1 if you are not sure what to pass. /// \param[in] threadPriority Passed to the thread creation routine. Use THREAD_PRIORITY_NORMAL for Windows. For Linux based systems, you MUST pass something reasonable based on the thread priorities for your application. /// \return RAKNET_STARTED on success, otherwise appropriate failure enumeration. @@ -460,7 +460,6 @@ class RAK_DLL_EXPORT RakPeer : public RakPeerInterface, public RNS2EventHandler //--------------------------------------------------------------------------------------------Network Functions - Functions dealing with the network in general-------------------------------------------------------------------------------------------- /// \brief Returns the unique address identifier that represents you or another system on the the network - /// \note Not supported by the XBOX /// \param[in] systemAddress Use UNASSIGNED_SYSTEM_ADDRESS to get your behind-LAN address. Use a connected system to get their behind-LAN address. This does not return the port. /// \param[in] index When you have multiple internal IDs, which index to return? Currently limited to MAXIMUM_NUMBER_OF_INTERNAL_IDS (so the maximum value of this variable is MAXIMUM_NUMBER_OF_INTERNAL_IDS-1) /// \return Identifier of your system internally, which may not be how other systems see if you if you are behind a NAT or proxy. @@ -695,7 +694,7 @@ class RAK_DLL_EXPORT RakPeer : public RakPeerInterface, public RNS2EventHandler /// \internal // Call manually if RAKPEER_USER_THREADED==1 at least every 30 milliseconds. // Call in a loop until returns false if the socket is non-blocking - // remotePortRakNetWasStartedOn_PS3 and extraSocketOptions are from SocketDescriptor when the socket was created + // extraSocketOptions is from SocketDescriptor when the socket was created // bool RunRecvFromOnce( RakNetSocket *s ); /// \internal @@ -994,7 +993,6 @@ class RAK_DLL_EXPORT RakPeer : public RakPeerInterface, public RNS2EventHandler char *data; bool haveRakNetCloseSocket; unsigned connectionSocketIndex; - unsigned short remotePortRakNetWasStartedOn_PS3; unsigned int extraSocketOptions; RakNetSocket2* socket; unsigned short port; @@ -1173,9 +1171,6 @@ class RAK_DLL_EXPORT RakPeer : public RakPeerInterface, public RNS2EventHandler /// Produce the connection packet that was withheld while the session handshake ran. void ProduceWithheldConnectionPacket(RemoteSystemStruct *remoteSystem, MessageID messageId); } -// #if defined(SN_TARGET_PSP2) -// __attribute__((aligned(8))) -// #endif ; } // namespace MafiaNet diff --git a/Source/include/mafianet/peerinterface.h b/Source/include/mafianet/peerinterface.h index e0727fd56..1a1822414 100644 --- a/Source/include/mafianet/peerinterface.h +++ b/Source/include/mafianet/peerinterface.h @@ -62,7 +62,7 @@ class RAK_DLL_EXPORT RakPeerInterface /// \note Call SetMaximumIncomingConnections if you want to accept incoming connections /// \param[in] maxConnections The maximum number of connections between this instance of RakPeer and another instance of RakPeer. Required so the network can preallocate and for thread safety. A pure client would set this to 1. A pure server would set it to the number of allowed clients.- A hybrid would set it to the sum of both types of connections /// \param[in] localPort The port to listen for connections on. On linux the system may be set up so thast ports under 1024 are restricted for everything but the root user. Use a higher port for maximum compatibility. - /// \param[in] socketDescriptors An array of SocketDescriptor structures to force RakNet to listen on a particular IP address or port (or both). Each SocketDescriptor will represent one unique socket. Do not pass redundant structures. To listen on a specific port, you can pass SocketDescriptor(myPort,0); such as for a server. For a client, it is usually OK to just pass SocketDescriptor(); However, on the XBOX be sure to use IPPROTO_VDP + /// \param[in] socketDescriptors An array of SocketDescriptor structures to force RakNet to listen on a particular IP address or port (or both). Each SocketDescriptor will represent one unique socket. Do not pass redundant structures. To listen on a specific port, you can pass SocketDescriptor(myPort,0); such as for a server. For a client, it is usually OK to just pass SocketDescriptor(); /// \param[in] socketDescriptorCount The size of the \a socketDescriptors array. Pass 1 if you are not sure what to pass. /// \param[in] threadPriority Passed to the thread creation routine. Use THREAD_PRIORITY_NORMAL for Windows. For Linux based systems, you MUST pass something reasonable based on the thread priorities for your application. /// \return RAKNET_STARTED on success, otherwise appropriate failure enumeration. @@ -460,7 +460,6 @@ class RAK_DLL_EXPORT RakPeerInterface //--------------------------------------------------------------------------------------------Network Functions - Functions dealing with the network in general-------------------------------------------------------------------------------------------- /// Return the unique address identifier that represents you or another system on the the network and is based on your local IP / port. - /// \note Not supported by the XBOX /// \param[in] systemAddress Use UNASSIGNED_SYSTEM_ADDRESS to get your behind-LAN address. Use a connected system to get their behind-LAN address /// \param[in] index When you have multiple internal IDs, which index to return? Currently limited to MAXIMUM_NUMBER_OF_INTERNAL_IDS (so the maximum value of this variable is MAXIMUM_NUMBER_OF_INTERNAL_IDS-1) /// \return the identifier of your system internally, which may not be how other systems see if you if you are behind a NAT or proxy @@ -692,9 +691,6 @@ class RAK_DLL_EXPORT RakPeerInterface virtual bool SendOutOfBand(const char *host, unsigned short remotePort, const char *data, BitSize_t dataLength, unsigned connectionSocketIndex=0 )=0; } -// #if defined(SN_TARGET_PSP2) -// __attribute__((aligned(8))) -// #endif ; } // namespace MafiaNet diff --git a/Source/include/mafianet/socket.h b/Source/include/mafianet/socket.h deleted file mode 100644 index f78b3b4dd..000000000 --- a/Source/include/mafianet/socket.h +++ /dev/null @@ -1,199 +0,0 @@ -/* - * Original work: Copyright (c) 2014, Oculus VR, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * RakNet License.txt file in the licenses directory of this source tree. An additional grant - * of patent rights can be found in the RakNet Patents.txt file in the same directory. - * - * - * Modified work: Copyright (c) 2017, SLikeSoft UG (haftungsbeschränkt) - * - * This source code was modified by SLikeSoft. Modifications are licensed under the MIT-style - * license found in the license.txt file in the root directory of this source tree. - */ - -/* -#ifndef __RAKNET_SOCKET_H -#define __RAKNET_SOCKET_H - -#include "types.h" -#include "defines.h" -#include "Export.h" -#include "SocketIncludes.h" -#include "assert.h" -#include "SocketDefines.h" -#include "MTUSize.h" - -namespace MafiaNet -{ - -struct RAK_DLL_EXPORT RakNetSocket -{ -public: - RakNetSocket(); - ~RakNetSocket(); - -// void Accept( -// struct sockaddr *addr, -// int *addrlen); - - inline int Connect( - const struct sockaddr *name, - int namelen) {return connect__(s,name,namelen);} - - static RakNetSocket* Create -#ifdef __native_client__ - (_PP_Instance_ _chromeInstance); -#else - (int af, - int type, - int protocol); -#endif - - int Bind( - const struct sockaddr *addr, - int namelen); - - inline int GetSockName( - struct sockaddr *name, - socklen_t * namelen) {return getsockname__(s,name,namelen);} - - inline int GetSockOpt ( - int level, - int optname, - char * optval, - socklen_t *optlen) {return getsockopt__(s,level,optname,optval,optlen);} - - - int IOCTLSocket( - long cmd, - unsigned long *argp); - - int Listen ( - int backlog); - - inline int Recv( - char * buf, - int len, - int flags) {return recv__(s,buf,len,flags);} - - inline int RecvFrom( - char * buf, - int len, - int flags, - struct sockaddr * from, - socklen_t * fromlen) {return recvfrom__(s,buf,len,flags,from,fromlen);} - -// inline int Select( -// int nfds, -// fd_set *readfds, -// fd_set *writefds, -// fd_set *exceptfds, -// struct timeval *timeout) {return select__(nfds,readfds,writefds,exceptfds,timeout);} - - inline int Send( - const char * buf, - int len, - int flags) {return send__(s,buf,len,flags);} - - inline int SendTo( - const char * buf, - int len, - int flags, - const struct sockaddr *to, - int tolen) {return sendto__(s,buf,len,flags,to,tolen);} - - #ifdef _WIN32 - #elif defined(_PS3) || defined(__PS3__) || defined(SN_TARGET_PS3) || defined(_PS4) || defined(SN_TARGET_PSP2) - #else - inline int Fcntl(int cmd, int arg) {return fcntl(s,cmd,arg);} - #endif - - -#if defined(_WIN32) - inline int _WSASendTo( - LPWSABUF lpBuffers, - DWORD dwBufferCount, - LPDWORD lpNumberOfBytesSent, - DWORD dwFlags, - const struct sockaddr FAR * lpTo, - int iTolen, - LPWSAOVERLAPPED lpOverlapped, - LPWSAOVERLAPPED_COMPLETION_ROUTINE lpCompletionRoutine - ) - { return WSASendTo(s,lpBuffers,dwBufferCount,lpNumberOfBytesSent,dwFlags,lpTo,iTolen,lpOverlapped,lpCompletionRoutine);} - -#endif - - int SetSockOpt( - int level, - int optname, - const char * optval, - int optlen); - - int Shutdown( - int how); - - - inline void SetRemotePortRakNetWasStartedOn(unsigned short i) {remotePortRakNetWasStartedOn_PS3_PSP2=i;} - inline void SetUserConnectionSocketIndex(unsigned int i) {userConnectionSocketIndex=i;} - inline void SetBoundAddress(SystemAddress i) {boundAddress=i;} - inline void SetSocketFamily(unsigned short i) {socketFamily=i;} - inline void SetBlockingSocket(bool i) {blockingSocket=i;} - inline void SetExtraSocketOptions(unsigned int i) {extraSocketOptions=i;} - inline void SetChromeInstance(_PP_Instance_ i) {chromeInstance=i;} - inline void SetBoundAddressToLoopback(unsigned char ipVersion) {boundAddress.SetToLoopback(ipVersion);} - - inline SystemAddress GetBoundAddress(void) const {return boundAddress;} - inline unsigned short GetRemotePortRakNetWasStartedOn(void) const {return remotePortRakNetWasStartedOn_PS3_PSP2;} - inline bool GetBlockingSocket(void) {return blockingSocket;} - inline unsigned int GetExtraSocketOptions(void) const {return extraSocketOptions;} - inline unsigned short GetSocketFamily(void) const {return socketFamily;} - inline _PP_Instance_ GetChromeInstance(void) const {return chromeInstance;} - inline unsigned int GetUserConnectionSocketIndex(void) const { - RakAssert(userConnectionSocketIndex!=(unsigned int)-1); - return userConnectionSocketIndex;} - - -#ifdef __native_client__ - // Flag indicating if a SendTo is currently in progress - bool sendInProgress; - - // Data for next queued packet to send, if nextSendSize > 0 - char nextSendBuffer[MAXIMUM_MTU_SIZE]; - - // Size of next queued packet to send, or 0 if no queued packet - int nextSendSize; - - // Destination address of queued packet - PP_NetAddress_Private nextSendAddr; -#endif - - __UDPSOCKET__ s; - -protected: - -#if defined (_WIN32) && defined(USE_WAIT_FOR_MULTIPLE_EVENTS) - void* recvEvent; -#endif - - #if defined(_PS3) || defined(__PS3__) || defined(SN_TARGET_PS3) || defined(_PS4) || defined(SN_TARGET_PSP2) - /// PS3: Set for the PS3, when using signaling. - /// PS3: Connect with the port returned by signaling. Set this to whatever port RakNet was actually started on - /// PSP2: Set non-zero to use SCE_NET_SOCK_DGRAM_P2P. This should be done for ad-hoc or with - #endif - - unsigned short remotePortRakNetWasStartedOn_PS3_PSP2; - unsigned int userConnectionSocketIndex; - SystemAddress boundAddress; - unsigned short socketFamily; - bool blockingSocket; - unsigned int extraSocketOptions; - _PP_Instance_ chromeInstance; -}; - -} // namespace MafiaNet - -#endif -*/ diff --git a/Source/include/mafianet/socket2.h b/Source/include/mafianet/socket2.h index 25ba6a494..046af477f 100644 --- a/Source/include/mafianet/socket2.h +++ b/Source/include/mafianet/socket2.h @@ -208,7 +208,6 @@ struct RNS2_BerkleyBindParameters int doNotFragment; int pollingThreadPriority; RNS2EventHandler *eventHandler; - unsigned short remotePortRakNetWasStartedOn_PS3_PS4_PSP2; }; // Berkeley sockets interface - base class for all platforms @@ -275,11 +274,11 @@ class RNS2_Berkley : public IRNS2_Berkley }; #if defined(_WIN32) || defined(__GNUC__) || defined(__GCCXML__) || defined(__S3E__) -class RNS2_Windows_Linux_360 +class RNS2_Windows_Linux { public: protected: - static RNS2SendResult Send_Windows_Linux_360NoVDP( RNS2Socket rns2Socket, RNS2_SendParameters *sendParameters, const char *file, unsigned int line ); + static RNS2SendResult Send_Windows_Linux( RNS2Socket rns2Socket, RNS2_SendParameters *sendParameters, const char *file, unsigned int line ); }; #endif @@ -299,7 +298,7 @@ class RAK_DLL_EXPORT SocketLayerOverride virtual int RakNetRecvFrom( char dataOut[ MAXIMUM_MTU_SIZE ], SystemAddress *senderOut, bool calledFromMainThread )=0; }; -class RNS2_Windows : public RNS2_Berkley, public RNS2_Windows_Linux_360 +class RNS2_Windows : public RNS2_Berkley, public RNS2_Windows_Linux { public: RNS2_Windows(); @@ -317,7 +316,7 @@ class RNS2_Windows : public RNS2_Berkley, public RNS2_Windows_Linux_360 }; #else -class RNS2_Linux : public RNS2_Berkley, public RNS2_Windows_Linux_360 +class RNS2_Linux : public RNS2_Berkley, public RNS2_Windows_Linux { public: RNS2BindResult Bind( RNS2_BerkleyBindParameters *bindParameters, const char *file, unsigned int line ); diff --git a/Source/include/mafianet/types.h b/Source/include/mafianet/types.h index 05f3a31ac..2631e66c6 100644 --- a/Source/include/mafianet/types.h +++ b/Source/include/mafianet/types.h @@ -24,7 +24,6 @@ #include "time.h" #include "Export.h" #include "WindowsIncludes.h" -#include "XBox360Includes.h" #include "SocketIncludes.h" namespace MafiaNet { @@ -155,15 +154,10 @@ struct RAK_DLL_EXPORT SocketDescriptor /// \pre RAKNET_SUPPORT_IPV6 must be set to 1 in RakNetDefines.h for AF_INET6 short socketFamily; - unsigned short remotePortRakNetWasStartedOn_PS3_PSP2; - - // Required for Google chrome - _PP_Instance_ chromeInstance; - // Set to true to use a blocking socket (default, do not change unless you have a reason to) bool blockingSocket; - /// XBOX only: set IPPROTO_VDP if you want to use VDP. If enabled, this socket does not support broadcast to 255.255.255.255 + /// Protocol argument passed to socket(). Leave 0 (the default) for plain UDP. unsigned int extraSocketOptions; }; diff --git a/Source/src/NatTypeDetectionClient.cpp b/Source/src/NatTypeDetectionClient.cpp index c650e17d0..580ef4056 100644 --- a/Source/src/NatTypeDetectionClient.cpp +++ b/Source/src/NatTypeDetectionClient.cpp @@ -56,18 +56,13 @@ void NatTypeDetectionClient::DetectNATType(SystemAddress _serverAddress) //sockAddr.ToString(false,str); sockets[0]->GetBoundAddress().ToString(false,str,static_cast(64)); c2=CreateNonblockingBoundSocket(str -#ifdef __native_client__ - , sockets[0]->chromeInstance -#endif ,this ); //c2Port=SocketLayer::GetLocalPort(c2); } -#if !defined(__native_client__) if (c2->IsBerkleySocket()) ((RNS2_Berkley*) c2)->CreateRecvPollingThread(0); -#endif serverAddress=_serverAddress; @@ -214,10 +209,8 @@ void NatTypeDetectionClient::Shutdown(void) serverAddress=UNASSIGNED_SYSTEM_ADDRESS; if (c2!=0) { -#if !defined(__native_client__) if (c2->IsBerkleySocket()) ((RNS2_Berkley *)c2)->BlockOnStopRecvPollingThread(); -#endif MafiaNet::OP_DELETE(c2, _FILE_AND_LINE_); c2=0; diff --git a/Source/src/NatTypeDetectionCommon.cpp b/Source/src/NatTypeDetectionCommon.cpp index 8685858ae..f666fc891 100644 --- a/Source/src/NatTypeDetectionCommon.cpp +++ b/Source/src/NatTypeDetectionCommon.cpp @@ -100,23 +100,10 @@ const char *MafiaNet::NATTypeDetectionResultToStringFriendly(NATTypeDetectionRes RakNetSocket2* MafiaNet::CreateNonblockingBoundSocket(const char *bindAddr -#ifdef __native_client__ - ,_PP_Instance_ chromeInstance -#endif , RNS2EventHandler *eventHandler ) { RakNetSocket2 *r2 = RakNetSocket2Allocator::AllocRNS2(); -#if defined(__native_client__) - NativeClientBindParameters ncbp; - RNS2_NativeClient * nativeClientSocket = (RNS2_NativeClient*) r2; - ncbp.eventHandler=eventHandler; - ncbp.forceHostAddress=(char*) bindAddr; - ncbp.is_ipv6=false; - ncbp.nativeClientInstance=chromeInstance; - ncbp.port=0; - nativeClientSocket->Bind(&ncbp, _FILE_AND_LINE_); -#else if (r2->IsBerkleySocket()) { RNS2_BerkleyBindParameters bbp; @@ -131,7 +118,6 @@ RakNetSocket2* MafiaNet::CreateNonblockingBoundSocket(const char *bindAddr bbp.doNotFragment=false; bbp.pollingThreadPriority=0; bbp.eventHandler=eventHandler; - bbp.remotePortRakNetWasStartedOn_PS3_PS4_PSP2=0; RNS2BindResult br = ((RNS2_Berkley*) r2)->Bind(&bbp, _FILE_AND_LINE_); if (br==BR_FAILED_TO_BIND_SOCKET) @@ -155,56 +141,8 @@ RakNetSocket2* MafiaNet::CreateNonblockingBoundSocket(const char *bindAddr { RakAssert("TODO" && 0); } -#endif return r2; - - /* - #ifdef __native_client__ - RakNetSocket2 *s = SocketLayer::CreateBoundSocket( 0, 0, false, bindAddr, true, 0, AF_INET, chromeInstance ); - #else - RakNetSocket2 *s = SocketLayer::CreateBoundSocket( 0, 0, false, bindAddr, true, 0, AF_INET, 0 ); - #endif - - #ifdef _WIN32 - unsigned long nonblocking = 1; - s->IOCTLSocket( FIONBIO, &nonblocking ); - #elif defined(_PS3) || defined(__PS3__) || defined(SN_TARGET_PS3) || defined(_PS4) || defined(SN_TARGET_PSP2) - int sock_opt=1; - s->SetSockOpt(SOL_SOCKET, SO_NBIO, ( char * ) & sock_opt, sizeof ( sock_opt ) ); - #elif defined(__native_client__) - // Nop - #else - s->Fcntl( F_SETFL, O_NONBLOCK ); - #endif - return s; - */ -} - -/* -int MafiaNet::NatTypeRecvFrom(char *data, RakNetSocket2* socket, SystemAddress &sender, RNS2EventHandler *eventHandler) -{ -#if defined(__native_client__) - RakAssert("TODO" && 0); -#else - if (socket->IsBerkleySocket()) - { - RNS2RecvStruct *recvFromStruct; - recvFromStruct=AllocRNS2RecvStruct(_FILE_AND_LINE_); - if (recvFromStruct != nullptr) - { - recvFromStruct->socket=this; - socket->RecvFromBlocking(recvFromStruct); - } - if (recvFromStruct->bytesRead>0) - { - sender = recvFromStruct->systemAddress; - } - return recvFromStruct->bytesRead; - } - return 0; -#endif } -*/ #endif // #if _RAKNET_SUPPORT_NatTypeDetectionServer==1 || _RAKNET_SUPPORT_NatTypeDetectionClient==1 diff --git a/Source/src/NatTypeDetectionServer.cpp b/Source/src/NatTypeDetectionServer.cpp index 19465d324..639043fca 100644 --- a/Source/src/NatTypeDetectionServer.cpp +++ b/Source/src/NatTypeDetectionServer.cpp @@ -46,9 +46,6 @@ void NatTypeDetectionServer::Startup( const char *nonRakNetIP2, const char *nonRakNetIP3, const char *nonRakNetIP4 -#ifdef __native_client__ - ,_PP_Instance_ chromeInstance -#endif ) { DataStructures::List sockets; @@ -57,40 +54,26 @@ void NatTypeDetectionServer::Startup( sockets[0]->GetBoundAddress().ToString(false,str,static_cast(64)); s1p2= CreateNonblockingBoundSocket(str, -#ifdef __native_client__ - chromeInstance, -#endif this); s2p3= CreateNonblockingBoundSocket(nonRakNetIP2, -#ifdef __native_client__ - chromeInstance, -#endif this); s3p4= CreateNonblockingBoundSocket(nonRakNetIP3, -#ifdef __native_client__ - chromeInstance, -#endif this); s4p5= CreateNonblockingBoundSocket(nonRakNetIP4, -#ifdef __native_client__ - chromeInstance, -#endif this); strcpy_s(s3p4Address, nonRakNetIP3); - #if !defined(__native_client__) if (s3p4->IsBerkleySocket()) ((RNS2_Berkley*) s3p4)->CreateRecvPollingThread(0); - #endif } void NatTypeDetectionServer::Shutdown() { @@ -106,10 +89,8 @@ void NatTypeDetectionServer::Shutdown() } if (s3p4!=0) { -#if !defined(__native_client__) if (s3p4->IsBerkleySocket()) ((RNS2_Berkley *)s3p4)->BlockOnStopRecvPollingThread(); -#endif MafiaNet::OP_DELETE(s3p4,_FILE_AND_LINE_); s3p4=0; diff --git a/Source/src/PS4Includes.cpp b/Source/src/PS4Includes.cpp deleted file mode 100644 index 9a1add790..000000000 --- a/Source/src/PS4Includes.cpp +++ /dev/null @@ -1,59 +0,0 @@ -/* - * This file was taken from RakNet 4.082 without any modifications. - * Please see licenses/RakNet license.txt for the underlying license and related copyright. - */ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Source/src/PacketOutputWindowLogger.cpp b/Source/src/PacketOutputWindowLogger.cpp index 1f82014ea..6a9cd60b9 100644 --- a/Source/src/PacketOutputWindowLogger.cpp +++ b/Source/src/PacketOutputWindowLogger.cpp @@ -47,10 +47,6 @@ void PacketOutputWindowLogger::WriteLog(const char *str) str2+="\n"; OutputDebugString(str2.C_String()); #endif -// DS_APR -#elif defined(__native_client__) - fprintf(stderr, "%s\n", str); -// /DS_APR #endif } diff --git a/Source/src/RakNetSocket.cpp b/Source/src/RakNetSocket.cpp deleted file mode 100644 index 378b6e612..000000000 --- a/Source/src/RakNetSocket.cpp +++ /dev/null @@ -1,155 +0,0 @@ -/* - * Original work: Copyright (c) 2014, Oculus VR, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * RakNet License.txt file in the licenses directory of this source tree. An additional grant - * of patent rights can be found in the RakNet Patents.txt file in the same directory. - * - * - * Modified work: Copyright (c) 2017, SLikeSoft UG (haftungsbeschränkt) - * - * This source code was modified by SLikeSoft. Modifications are licensed under the MIT-style - * license found in the license.txt file in the root directory of this source tree. - */ - -/* -#include "mafianet/socket.h" -#include "mafianet/memoryoverride.h" - -using namespace MafiaNet; - -#if defined(__native_client__) -using namespace pp; -#endif - -RakNetSocket::RakNetSocket() { - s = 0; - remotePortRakNetWasStartedOn_PS3_PSP2 = 0; - userConnectionSocketIndex = (unsigned int) -1; - socketFamily = 0; - blockingSocket = 0; - extraSocketOptions = 0; - chromeInstance = 0; - -#if defined (_WIN32) && defined(USE_WAIT_FOR_MULTIPLE_EVENTS) - recvEvent=INVALID_HANDLE_VALUE; -#endif - - #ifdef __native_client__ - s = 0; - sendInProgress = false; - nextSendSize = 0; - #endif -} -RakNetSocket::~RakNetSocket() -{ - #ifdef __native_client__ - if(s != 0) - ((PPB_UDPSocket_Private_0_4*) pp::Module::Get()->GetBrowserInterface(PPB_UDPSOCKET_PRIVATE_INTERFACE_0_4))->Close(s); - #else - if ((__UDPSOCKET__)s != 0) - closesocket__(s); - #endif - - -#if defined (_WIN32) && defined(USE_WAIT_FOR_MULTIPLE_EVENTS) - if (recvEvent!=INVALID_HANDLE_VALUE) - { - CloseHandle( recvEvent ); - recvEvent = INVALID_HANDLE_VALUE; - } -#endif -} -// -// void RakNetSocket::Accept( -// struct sockaddr *addr, -// int *addrlen) -// { -// accept__(s, addr, addrlen); -// } - -// -// void RakNetSocket::Close( void ) -// { -// closesocket__(s); -// } - -RakNetSocket* RakNetSocket::Create -#ifdef __native_client__ - (_PP_Instance_ _chromeInstance) -#else - (int af, - int type, - int protocol) -#endif -{ - __UDPSOCKET__ sock; - - #ifndef __native_client__ - RakAssert(type==SOCK_DGRAM); - #endif - - #ifdef __native_client__ - sock = ((PPB_UDPSocket_Private_0_4*) Module::Get()->GetBrowserInterface(PPB_UDPSOCKET_PRIVATE_INTERFACE_0_4))->Create(_chromeInstance); - #elif defined(SN_TARGET_PSP2) - sock = sceNetSocket( "RakNetSocket::Create", SCE_NET_AF_INET, SCE_NET_SOCK_DGRAM_P2P, 0 ); - #elif defined(_PS3) || defined(__PS3__) || defined(SN_TARGET_PS3) || defined(_PS4) - sock = socket__( AF_INET, SOCK_DGRAM_P2P, 0 ); - #else - sock = socket__(af, type, protocol); - #endif - - if (sock<0) - return 0; - RakNetSocket *rns = MafiaNet::OP_NEW(_FILE_AND_LINE_); - rns->s = sock; - #ifdef __native_client__ - rns->chromeInstance = _chromeInstance; - #endif - return rns; -} - -int RakNetSocket::Bind( - const struct sockaddr *addr, - int namelen) -{ - return bind__(s,addr,namelen); -} - -int RakNetSocket::IOCTLSocket( - long cmd, - unsigned long *argp) -{ - #if defined(_WIN32) - return ioctlsocket__(s,cmd,argp); - #else - return 0; - #endif -} - -int RakNetSocket::Listen ( - int backlog) -{ - return listen__(s,backlog); -} - -int RakNetSocket::SetSockOpt( - int level, - int optname, - const char * optval, - int optlen) -{ - return setsockopt__(s,level,optname,optval,optlen); -} - -int RakNetSocket::Shutdown( - int how) -{ - #ifndef SN_TARGET_PSP2 - return shutdown__(s,how); - #else - return 0; - #endif -} -*/ diff --git a/Source/src/RakNetSocket2.cpp b/Source/src/RakNetSocket2.cpp index b94873bb7..bbaa19c26 100644 --- a/Source/src/RakNetSocket2.cpp +++ b/Source/src/RakNetSocket2.cpp @@ -44,7 +44,6 @@ using namespace MafiaNet; #define RAKNET_SOCKET_2_INLINE_FUNCTIONS #include "RakNetSocket2_Windows_Linux.cpp" -#include "RakNetSocket2_Windows_Linux_360.cpp" #include "RakNetSocket2_Berkley.cpp" #undef RAKNET_SOCKET_2_INLINE_FUNCTIONS @@ -139,7 +138,6 @@ void RakNetSocket2::DomainNameToIP( const char *domainName, char ip[65] ) { bool IRNS2_Berkley::IsPortInUse(unsigned short port, const char *hostAddress, unsigned short addressFamily, int type ) { RNS2_BerkleyBindParameters bbp; - bbp.remotePortRakNetWasStartedOn_PS3_PS4_PSP2=0; bbp.port=port; bbp.hostAddress=(char*) hostAddress; bbp.addressFamily=addressFamily; bbp.type=type; bbp.protocol=0; bbp.nonBlockingSocket=false; bbp.setBroadcast=false; bbp.doNotFragment=false; bbp.protocol=0; @@ -310,14 +308,14 @@ RNS2SendResult RNS2_Windows::Send( RNS2_SendParameters *sendParameters, const ch if (len>=0) return len; } - return Send_Windows_Linux_360NoVDP(rns2Socket,sendParameters, file, line); + return Send_Windows_Linux(rns2Socket,sendParameters, file, line); } void RNS2_Windows::GetMyIP( SystemAddress addresses[MAXIMUM_NUMBER_OF_INTERNAL_IDS] ) {return GetMyIP_Windows_Linux(addresses);} void RNS2_Windows::SetSocketLayerOverride(SocketLayerOverride *_slo) {slo = _slo;} SocketLayerOverride* RNS2_Windows::GetSocketLayerOverride(void) {return slo;} #else RNS2BindResult RNS2_Linux::Bind( RNS2_BerkleyBindParameters *bindParameters, const char *file, unsigned int line ) {return BindShared(bindParameters, file, line);} -RNS2SendResult RNS2_Linux::Send( RNS2_SendParameters *sendParameters, const char *file, unsigned int line ) {return Send_Windows_Linux_360NoVDP(rns2Socket,sendParameters, file, line);} +RNS2SendResult RNS2_Linux::Send( RNS2_SendParameters *sendParameters, const char *file, unsigned int line ) {return Send_Windows_Linux(rns2Socket,sendParameters, file, line);} // See the declaration in socket2.h for why __linux__ is required here and not // just the build flag. #if defined(__linux__) diff --git a/Source/src/RakNetSocket2_Berkley.cpp b/Source/src/RakNetSocket2_Berkley.cpp index ff3217ebc..06596ea13 100644 --- a/Source/src/RakNetSocket2_Berkley.cpp +++ b/Source/src/RakNetSocket2_Berkley.cpp @@ -122,7 +122,7 @@ void RNS2_Berkley::SetSocketOptions(void) RakAssert(r==0); // Immediate hard close. Don't linger the socket, or recreating the socket quickly on Vista fails. - // Fail with voice and xbox + // Fails on some platforms when the socket protocol is not plain UDP sock_opt=0; r = setsockopt__( rns2Socket, SOL_SOCKET, SO_LINGER, ( char * ) & sock_opt, sizeof ( sock_opt ) ); diff --git a/Source/src/RakNetSocket2_Windows_Linux.cpp b/Source/src/RakNetSocket2_Windows_Linux.cpp index 1c5c74111..e8262b90b 100644 --- a/Source/src/RakNetSocket2_Windows_Linux.cpp +++ b/Source/src/RakNetSocket2_Windows_Linux.cpp @@ -216,6 +216,56 @@ void GetMyIP_Windows_Linux(SystemAddress addresses[MAXIMUM_NUMBER_OF_INTERNAL_ID #endif // RAKNET_SUPPORT_IPV6 == 1 } + +RNS2SendResult RNS2_Windows_Linux::Send_Windows_Linux( RNS2Socket rns2Socket, RNS2_SendParameters *sendParameters, const char *file, unsigned int line ) { + + int len=0; + do + { + (void) file; + (void) line; + + + int oldTTL=-1; + if (sendParameters->ttl>0) + { + socklen_t opLen=sizeof(oldTTL); + // Get the current TTL + if (getsockopt__(rns2Socket, sendParameters->systemAddress.GetIPPROTO(), IP_TTL, ( char * ) & oldTTL, &opLen ) != -1) + { + int newTTL=sendParameters->ttl; + setsockopt__(rns2Socket, sendParameters->systemAddress.GetIPPROTO(), IP_TTL, ( char * ) & newTTL, sizeof ( newTTL ) ); + } + } + + + if (sendParameters->systemAddress.address.addr4.sin_family==AF_INET) + { + len = sendto__( rns2Socket, sendParameters->data, sendParameters->length, 0, ( const sockaddr* ) & sendParameters->systemAddress.address.addr4, sizeof( sockaddr_in ) ); + } + else + { +#if RAKNET_SUPPORT_IPV6==1 + len = sendto__( rns2Socket, sendParameters->data, sendParameters->length, 0, ( const sockaddr* ) & sendParameters->systemAddress.address.addr6, sizeof( sockaddr_in6 ) ); +#endif + } + + if (len<0) + { + RAKNET_DEBUG_PRINTF("sendto failed with code %i for char %i and length %i.\n", len, sendParameters->data[0], sendParameters->length); + } + + + if (oldTTL!=-1) + { + setsockopt__(rns2Socket, sendParameters->systemAddress.GetIPPROTO(), IP_TTL, ( char * ) & oldTTL, sizeof ( oldTTL ) ); + } + + } + while ( len == 0 ); + return len; +} + #endif // RAKNETSOCKET2_WINDOWS_LINUX_CPP #endif // RAKNET_SOCKET_2_INLINE_FUNCTIONS diff --git a/Source/src/RakNetSocket2_Windows_Linux_360.cpp b/Source/src/RakNetSocket2_Windows_Linux_360.cpp deleted file mode 100644 index 6850ab3b8..000000000 --- a/Source/src/RakNetSocket2_Windows_Linux_360.cpp +++ /dev/null @@ -1,78 +0,0 @@ -/* - * Copyright (c) 2014, Oculus VR, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * RakNet License.txt file in the licenses directory of this source tree. An additional grant - * of patent rights can be found in the RakNet Patents.txt file in the same directory. - * - * - * Modified work: Copyright (c) 2017, SLikeSoft UG (haftungsbeschränkt) - * - * This source code was modified by SLikeSoft. Modifications are licensed under the MIT-style - * license found in the license.txt file in the root directory of this source tree. - */ - -#include "mafianet/EmptyHeader.h" - -#ifdef RAKNET_SOCKET_2_INLINE_FUNCTIONS - -#ifndef RAKNETSOCKET2_WINDOWS_LINUX_360_CPP -#define RAKNETSOCKET2_WINDOWS_LINUX_360_CPP - -#if defined(_WIN32) || defined(__GNUC__) || defined(__GCCXML__) || defined(__S3E__) - -RNS2SendResult RNS2_Windows_Linux_360::Send_Windows_Linux_360NoVDP( RNS2Socket rns2Socket, RNS2_SendParameters *sendParameters, const char *file, unsigned int line ) { - - int len=0; - do - { - (void) file; - (void) line; - - - int oldTTL=-1; - if (sendParameters->ttl>0) - { - socklen_t opLen=sizeof(oldTTL); - // Get the current TTL - if (getsockopt__(rns2Socket, sendParameters->systemAddress.GetIPPROTO(), IP_TTL, ( char * ) & oldTTL, &opLen ) != -1) - { - int newTTL=sendParameters->ttl; - setsockopt__(rns2Socket, sendParameters->systemAddress.GetIPPROTO(), IP_TTL, ( char * ) & newTTL, sizeof ( newTTL ) ); - } - } - - - if (sendParameters->systemAddress.address.addr4.sin_family==AF_INET) - { - len = sendto__( rns2Socket, sendParameters->data, sendParameters->length, 0, ( const sockaddr* ) & sendParameters->systemAddress.address.addr4, sizeof( sockaddr_in ) ); - } - else - { -#if RAKNET_SUPPORT_IPV6==1 - len = sendto__( rns2Socket, sendParameters->data, sendParameters->length, 0, ( const sockaddr* ) & sendParameters->systemAddress.address.addr6, sizeof( sockaddr_in6 ) ); -#endif - } - - if (len<0) - { - RAKNET_DEBUG_PRINTF("sendto failed with code %i for char %i and length %i.\n", len, sendParameters->data[0], sendParameters->length); - } - - - if (oldTTL!=-1) - { - setsockopt__(rns2Socket, sendParameters->systemAddress.GetIPPROTO(), IP_TTL, ( char * ) & oldTTL, sizeof ( oldTTL ) ); - } - - } - while ( len == 0 ); - return len; -} - -#endif // Windows, Linux, 360 - -#endif // file header - -#endif // #ifdef RAKNET_SOCKET_2_INLINE_FUNCTIONS diff --git a/Source/src/RakNetTypes.cpp b/Source/src/RakNetTypes.cpp index 46c94aead..9ed7494b8 100644 --- a/Source/src/RakNetTypes.cpp +++ b/Source/src/RakNetTypes.cpp @@ -107,25 +107,15 @@ bool MafiaNet::NonNumericHostString( const char *host ) } SocketDescriptor::SocketDescriptor() { -#ifdef __native_client__ - blockingSocket=false; -#else blockingSocket=true; -#endif port=0; hostAddress[0]=0; - remotePortRakNetWasStartedOn_PS3_PSP2=0; extraSocketOptions=0; socketFamily=AF_INET; } SocketDescriptor::SocketDescriptor(unsigned short _port, const char *_hostAddress) { - #ifdef __native_client__ - blockingSocket=false; - #else blockingSocket=true; - #endif - remotePortRakNetWasStartedOn_PS3_PSP2=0; port=_port; if (_hostAddress) strcpy_s(hostAddress, _hostAddress); diff --git a/Source/src/RakPeer.cpp b/Source/src/RakPeer.cpp index 430f6ae22..1164b4181 100644 --- a/Source/src/RakPeer.cpp +++ b/Source/src/RakPeer.cpp @@ -469,53 +469,8 @@ StartupResult RakPeer::Startup( unsigned int maxConnections, SocketDescriptor *s addrToBind=socketDescriptors[i].hostAddress; */ - - - - - - - - - /* -#if RAKNET_SUPPORT_IPV6==1 - if (SocketLayer::IsSocketFamilySupported(addrToBind, socketDescriptors[i].socketFamily)==false) - return SOCKET_FAMILY_NOT_SUPPORTED; -#endif - - if (socketDescriptors[i].port!=0 && SocketLayer::IsPortInUse(socketDescriptors[i].port, addrToBind, socketDescriptors[i].socketFamily)==true) - { - DerefAllSockets(); - return SOCKET_PORT_ALREADY_IN_USE; - } - - RakNetSocket* rns = 0; - if (socketDescriptors[i].remotePortRakNetWasStartedOn_PS3_PSP2==0) - { - rns = SocketLayer::CreateBoundSocket( this, socketDescriptors[i].port, socketDescriptors[i].blockingSocket, addrToBind, 100, socketDescriptors[i].extraSocketOptions, socketDescriptors[i].socketFamily, socketDescriptors[i].chromeInstance ); - } - else - { -#if defined(_PS3) || defined(__PS3__) || defined(SN_TARGET_PS3) || defined(_PS4) - rns = SocketLayer::CreateBoundSocket_PS3Lobby( socketDescriptors[i].port, socketDescriptors[i].blockingSocket, addrToBind, socketDescriptors[i].socketFamily ); -#elif defined(SN_TARGET_PSP2) - rns = SocketLayer::CreateBoundSocket_PSP2( socketDescriptors[i].port, socketDescriptors[i].blockingSocket, addrToBind, socketDescriptors[i].socketFamily ); -#endif - } - */ - RakNetSocket2 *r2 = RakNetSocket2Allocator::AllocRNS2(); r2->SetUserConnectionSocketIndex(i); - #if defined(__native_client__) - NativeClientBindParameters ncbp; - RNS2_NativeClient * nativeClientSocket = (RNS2_NativeClient*) r2; - ncbp.eventHandler=this; - ncbp.forceHostAddress=(char*) socketDescriptors[i].hostAddress; - ncbp.is_ipv6=socketDescriptors[i].socketFamily==AF_INET6; - ncbp.nativeClientInstance=socketDescriptors[i].chromeInstance; - ncbp.port=socketDescriptors[i].port; - nativeClientSocket->Bind(&ncbp, _FILE_AND_LINE_); - #else if (r2->IsBerkleySocket()) { RNS2_BerkleyBindParameters bbp; @@ -530,7 +485,6 @@ StartupResult RakPeer::Startup( unsigned int maxConnections, SocketDescriptor *s bbp.doNotFragment=false; bbp.pollingThreadPriority=threadPriority; bbp.eventHandler=this; - bbp.remotePortRakNetWasStartedOn_PS3_PS4_PSP2=socketDescriptors[i].remotePortRakNetWasStartedOn_PS3_PSP2; RNS2BindResult br = ((RNS2_Berkley*) r2)->Bind(&bbp, _FILE_AND_LINE_); if ( @@ -564,51 +518,21 @@ StartupResult RakPeer::Startup( unsigned int maxConnections, SocketDescriptor *s { RakAssert("TODO" && 0); } - #endif -/* - - SystemAddress saOut; - SocketLayer::GetSystemAddress( rns, &saOut ); - rns->SetBoundAddress(saOut); - rns->SetRemotePortRakNetWasStartedOn(socketDescriptors[i].remotePortRakNetWasStartedOn_PS3_PSP2); - rns->SetChromeInstance(socketDescriptors[i].chromeInstance); - rns->SetExtraSocketOptions(socketDescriptors[i].extraSocketOptions); - rns->SetUserConnectionSocketIndex(i); - rns->SetBlockingSocket(socketDescriptors[i].blockingSocket); - -#if RAKNET_SUPPORT_IPV6==0 - if (addrToBind==0) - rns->SetBoundAddressToLoopback(4); -#endif - - // GetBoundAddress is asynch, which isn't supported by this architecture -#if !defined(__native_client__) - int zero=0; - if (SocketLayer::SendTo(rns, (const char*) &zero,4, rns->GetBoundAddress(), _FILE_AND_LINE_)!=0) - { - DerefAllSockets(); - return SOCKET_FAILED_TEST_SEND; - } -#endif - */ socketList.Push(r2, _FILE_AND_LINE_ ); } -#if !defined(__native_client__) for (i=0; iIsBerkleySocket()) ((RNS2_Berkley*) socketList[i])->CreateRecvPollingThread(threadPriority); } -#endif for (i=0; i < MAXIMUM_NUMBER_OF_INTERNAL_IDS; i++) { if (ipList[i]==UNASSIGNED_SYSTEM_ADDRESS) break; -#if !defined(__native_client__) // #high - using the 1st socket here is flawed - in cases of having multiple sockets (f.e. different ports and different families (i.e. IPv4/IPv6) we must use the proper // socket for each IP address in the list if (socketList[0]->IsBerkleySocket()) @@ -617,8 +541,6 @@ StartupResult RakPeer::Startup( unsigned int maxConnections, SocketDescriptor *s ipList[i].SetPortHostOrder(port); } -#endif -// ipList[i].SetPort(((RNS2_360_720*)socketList[0])->GetBoundAddress().GetPort()); } if ( maximumNumberOfPeers == 0 ) @@ -724,13 +646,7 @@ StartupResult RakPeer::Startup( unsigned int maxConnections, SocketDescriptor *s #if RAKPEER_USER_THREADED!=1 - #if defined(SN_TARGET_PSP2) - sprintf_s(threadName, "RecvFromLoop_%p", this); - //errorCode = MafiaNet::RakThread::Create(RecvFromLoop, rpai, threadPriority, threadName, 1+i, runtime); - errorCode = MafiaNet::RakThread::Create(RecvFromLoop, rpai, threadPriority, threadName, 1024*1); - #else errorCode = MafiaNet::RakThread::Create(RecvFromLoop, rpai, threadPriority); - #endif if ( errorCode != 0 ) { @@ -1133,7 +1049,6 @@ void RakPeer::Shutdown( unsigned int blockDuration, unsigned char orderingChanne // MafiaNet::TimeMS timeout; #if RAKPEER_USER_THREADED!=1 -#if !defined(__native_client__) for (i=0; i < socketList.Size(); i++) { if (socketList[i]->IsBerkleySocket()) @@ -1141,7 +1056,6 @@ void RakPeer::Shutdown( unsigned int blockDuration, unsigned char orderingChanne ((RNS2_Berkley *)socketList[i])->SignalStopRecvPollingThread(); } } -#endif /* // Get recvfrom to unblock @@ -1173,7 +1087,6 @@ void RakPeer::Shutdown( unsigned int blockDuration, unsigned char orderingChanne } */ -#if !defined(__native_client__) for (i=0; i < socketList.Size(); i++) { if (socketList[i]->IsBerkleySocket()) @@ -1181,7 +1094,6 @@ void RakPeer::Shutdown( unsigned int blockDuration, unsigned char orderingChanne ((RNS2_Berkley *)socketList[i])->BlockOnStopRecvPollingThread(); } } -#endif #endif // RAKPEER_USER_THREADED!=1 @@ -1558,11 +1470,9 @@ Packet* RakPeer::Receive( void ) { recvFromStruct=bufferedPackets.Allocate( _FILE_AND_LINE_ ); recvFromStruct->s=socketList[i]->s; - recvFromStruct->remotePortRakNetWasStartedOn_PS3=socketList[i]->remotePortRakNetWasStartedOn_PS3_PSP2; recvFromStruct->extraSocketOptions=socketList[i]->extraSocketOptions; SocketLayer::RecvFromBlocking( - recvFromStruct->s, this, recvFromStruct->remotePortRakNetWasStartedOn_PS3, - recvFromStruct->extraSocketOptions, recvFromStruct->data, &recvFromStruct->bytesRead, &recvFromStruct->systemAddress, &recvFromStruct->timeRead); + recvFromStruct->s, this, recvFromStruct->extraSocketOptions, recvFromStruct->data, &recvFromStruct->bytesRead, &recvFromStruct->systemAddress, &recvFromStruct->timeRead); if (recvFromStruct->bytesRead<=0) { bufferedPackets.Deallocate(recvFromStruct, _FILE_AND_LINE_); @@ -2925,7 +2835,6 @@ void RakPeer::SetUnreliableTimeout(MafiaNet::TimeMS timeoutMS) // -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- void RakPeer::SendTTL( const char* host, unsigned short remotePort, int ttl, unsigned connectionSocketIndex ) { -#if !defined(__native_client__) char fakeData[2]; fakeData[0]=0; fakeData[1]=1; @@ -2943,7 +2852,6 @@ void RakPeer::SendTTL( const char* host, unsigned short remotePort, int ttl, uns pluginListNTS[i]->OnDirectSocketSend((const char*)bsp.data, BYTES_TO_BITS(bsp.length), bsp.systemAddress); socketList[realIndex]->Send(&bsp, _FILE_AND_LINE_); } -#endif } @@ -4063,58 +3971,6 @@ RakPeer::RemoteSystemStruct * RakPeer::AssignSystemAddressToRemoteSystemList( co //} //else //{ - /* - // Force binding - unsigned int socketListIndex; - for (socketListIndex=0; socketListIndex < socketList.Size(); socketListIndex++) - { - if (socketList[socketListIndex]->GetBoundAddress()==bindingAddress) - { - // Force binding with existing socket - remoteSystem->rakNetSocket=socketList[socketListIndex]; - break; - } - } - - if (socketListIndex==socketList.Size()) - { - char ipListFoundIndexStr[128]; - ipList[foundIndex].ToString(false,str); - - // Force binding with new socket - RakNetSocket* rns(MafiaNet::OP_NEW(_FILE_AND_LINE_)); - if (incomingRakNetSocket->GetRemotePortRakNetWasStartedOn()==0) - rns = SocketLayer::CreateBoundSocket( this, bindingAddress.GetPort(), incomingRakNetSocket->GetBlockingSocket(), ipListFoundIndexStr, 0, incomingRakNetSocket->GetExtraSocketOptions(), incomingRakNetSocket->GetSocketFamily(), incomingRakNetSocket->GetChromeInstance() ); - else - rns = SocketLayer::CreateBoundSocket_PS3Lobby( bindingAddress.GetPort(), incomingRakNetSocket->GetBlockingSocket(), ipListFoundIndexStr, incomingRakNetSocket->GetSocketFamily() ); - - - if (rns==0) - { - // Can't bind. Just use whatever socket it came in on - remoteSystem->rakNetSocket=incomingRakNetSocket; - } - else - { - rns->GetBoundAddress()=bindingAddress; - rns->SetUserConnectionSocketIndex((unsigned int)-1); - socketList.Push(rns, _FILE_AND_LINE_ ); - remoteSystem->rakNetSocket=rns; - - -#ifdef _WIN32 - int highPriority=THREAD_PRIORITY_ABOVE_NORMAL; -#else - int highPriority=-10; -#endif - - highPriority=0; - - - } - } - - */ //} } @@ -6314,10 +6170,8 @@ bool RakPeer::RunUpdateCycle(BitStream &updateBitStream ) socketToUse = rcs->socket; rcs->systemAddress.FixForIPVersion(socketToUse->GetBoundAddress()); -#if !defined(__native_client__) if (socketToUse->IsBerkleySocket()) ((RNS2_Berkley*)socketToUse)->SetDoNotFragment(1); -#endif // SocketLayer::SetDoNotFragment(socketToUse, 1); MafiaNet::Time sendToStart= MafiaNet::GetTime(); @@ -6359,10 +6213,8 @@ bool RakPeer::RunUpdateCycle(BitStream &updateBitStream ) } } // SocketLayer::SetDoNotFragment(socketToUse, 0); -#if !defined(__native_client__) if (socketToUse->IsBerkleySocket()) ((RNS2_Berkley*)socketToUse)->SetDoNotFragment(0); -#endif requestedConnectionQueueIndex++; } @@ -7046,37 +6898,6 @@ void RakPeer::OnRNS2Recv(RNS2RecvStruct *recvStruct) // -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- -/* -RAK_THREAD_DECLARATION(MafiaNet::RecvFromLoop) -{ -#if defined(SN_TARGET_PSP2) - RakPeerAndIndex *rpai = ( RakPeerAndIndex * ) RakThread::GetRealThreadArgument(callGetRealThreadArgument); -#else - RakPeerAndIndex *rpai = ( RakPeerAndIndex * ) arguments; -#endif - RakPeer * rakPeer = rpai->rakPeer; - RakNetSocket *s = rpai->s; - MafiaNet::OP_DELETE(rpai,_FILE_AND_LINE_); - - rakPeer->isRecvFromLoopThreadActive.Increment(); - - while ( rakPeer->endThreads == false ) - { - if (rakPeer->RunRecvFromOnce(s)==false && - s->GetBlockingSocket()==false) - RakSleep(0); - } - rakPeer->isRecvFromLoopThreadActive.Decrement(); - -#if defined(SN_TARGET_PSP2) - return sceKernelExitDeleteThread(0); -#else - return 0; -#endif -} -*/ - -// -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- RAK_THREAD_DECLARATION(MafiaNet::UpdateNetworkLoop) { diff --git a/Source/src/ReliabilityLayer.cpp b/Source/src/ReliabilityLayer.cpp index 8298c4446..f058cd183 100644 --- a/Source/src/ReliabilityLayer.cpp +++ b/Source/src/ReliabilityLayer.cpp @@ -1151,7 +1151,7 @@ bool ReliabilityLayer::HandleSocketReceiveFromConnectedPlayer( // Sequenced internalPacket = BuildPacketFromSplitPacketList( internalPacket->splitPacketId, timeRead, - s, systemAddress, rnr, remotePortRakNetWasStartedOn_PS3, extraSocketOptions); + s, systemAddress, rnr, extraSocketOptions); if (internalPacket) { // Update our index to the newest packet @@ -1193,7 +1193,7 @@ bool ReliabilityLayer::HandleSocketReceiveFromConnectedPlayer( InsertIntoSplitPacketList( internalPacket, timeRead ); internalPacket = BuildPacketFromSplitPacketList( internalPacket->splitPacketId, timeRead, - s, systemAddress, rnr, remotePortRakNetWasStartedOn_PS3, extraSocketOptions); + s, systemAddress, rnr, extraSocketOptions); if ( internalPacket == 0 ) { @@ -2379,7 +2379,6 @@ void ReliabilityLayer::SendBitStream( RakNetSocket2 *s, SystemAddress &systemAdd dat->s=s; dat->length=length; dat->sendTime = 0; - dat->remotePortRakNetWasStartedOn_PS3=remotePortRakNetWasStartedOn_PS3; dat->extraSocketOptions=extraSocketOptions; delayList.PushAtHead(dat, 0, _FILE_AND_LINE_); #else @@ -2432,7 +2431,6 @@ void ReliabilityLayer::SendBitStream( RakNetSocket2 *s, SystemAddress &systemAdd memcpy(block->data, bitStream->GetData(), length); block->dataWriteOffset=length; block->extraSocketOptions=extraSocketOptions; - block->remotePortRakNetWasStartedOn_PS3=remotePortRakNetWasStartedOn_PS3; block->s=s; block->systemAddress=systemAddress; SendToThread::ProcessBlock(block); diff --git a/Source/src/SocketLayer.cpp b/Source/src/SocketLayer.cpp index 44bd2d0eb..ef14b6247 100644 --- a/Source/src/SocketLayer.cpp +++ b/Source/src/SocketLayer.cpp @@ -40,12 +40,6 @@ using namespace MafiaNet; -/* -#if defined(__native_client__) -using namespace pp; -#endif -*/ - #if USE_SLIDING_WINDOW_CONGESTION_CONTROL!=1 #include "mafianet/CCRakNetUDT.h" #else @@ -102,9 +96,6 @@ void PrepareAddrInfoHints(addrinfo *hints) void SocketLayer::SetSocketOptions( __UDPSOCKET__ listenSocket, bool blockingSocket, bool setBroadcast) { -#ifdef __native_client__ - (void) listenSocket; -#else int sock_opt = 1; // This doubles the max throughput rate @@ -112,7 +103,7 @@ void SocketLayer::SetSocketOptions( __UDPSOCKET__ listenSocket, bool blockingSoc setsockopt__(listenSocket, SOL_SOCKET, SO_RCVBUF, ( char * ) & sock_opt, sizeof ( sock_opt ) ); // Immediate hard close. Don't linger the socket, or recreating the socket quickly on Vista fails. - // Fail with voice and xbox + // Fails on some platforms when the socket protocol is not plain UDP sock_opt=0; setsockopt__(listenSocket, SOL_SOCKET, SO_LINGER, ( char * ) & sock_opt, sizeof ( sock_opt ) ); @@ -133,7 +124,7 @@ void SocketLayer::SetSocketOptions( __UDPSOCKET__ listenSocket, bool blockingSoc } if (setBroadcast) { - // Note: Fails with VDP but not xbox + // Note: Fails when the socket protocol is not plain UDP // Set broadcast capable sock_opt=1; if ( setsockopt__(listenSocket, SOL_SOCKET, SO_BROADCAST, ( char * ) & sock_opt, sizeof( sock_opt ) ) == -1 ) @@ -155,7 +146,6 @@ void SocketLayer::SetSocketOptions( __UDPSOCKET__ listenSocket, bool blockingSoc #endif } } -#endif } MafiaNet::RakString SocketLayer::GetSubNetForSocketAndIp(__UDPSOCKET__ inSock, MafiaNet::RakString inIpString) @@ -355,9 +345,6 @@ unsigned short SocketLayer::GetLocalPort(__UDPSOCKET__ s) } void SocketLayer::GetSystemAddress_Old ( __UDPSOCKET__ s, SystemAddress *systemAddressOut ) { -#if defined(__native_client__) - *systemAddressOut = UNASSIGNED_SYSTEM_ADDRESS; -#else sockaddr_in sa; memset(&sa,0,sizeof(sockaddr_in)); socklen_t len = sizeof(sa); @@ -381,7 +368,6 @@ void SocketLayer::GetSystemAddress_Old ( __UDPSOCKET__ s, SystemAddress *systemA systemAddressOut->SetPortNetworkOrder(sa.sin_port); systemAddressOut->address.addr4.sin_addr.s_addr=sa.sin_addr.s_addr; -#endif } /* diff --git a/Source/src/TCPInterface.cpp b/Source/src/TCPInterface.cpp index eeb61bbe4..d54c3c038 100644 --- a/Source/src/TCPInterface.cpp +++ b/Source/src/TCPInterface.cpp @@ -174,9 +174,6 @@ bool TCPInterface::CreateListenSocket(unsigned short port, unsigned short maxInc bool TCPInterface::Start(unsigned short port, unsigned short maxIncomingConnections, unsigned short maxConnections, int _threadPriority, unsigned short socketFamily, const char *bindAddress) { -#ifdef __native_client__ - return false; -#else (void) socketFamily; if (isStarted.GetValue()>0) @@ -234,7 +231,6 @@ bool TCPInterface::Start(unsigned short port, unsigned short maxIncomingConnecti messageHandlerList[i]->OnRakPeerStartup(); return true; -#endif // __native_client__ } void TCPInterface::Stop(void) { @@ -242,7 +238,6 @@ void TCPInterface::Stop(void) for (i=0; i < messageHandlerList.Size(); i++) messageHandlerList[i]->OnRakPeerShutdown(); -#ifndef __native_client__ if (isStarted.GetValue()==0) return; @@ -324,7 +319,6 @@ void TCPInterface::Stop(void) -#endif // __native_client__ } SystemAddress TCPInterface::Connect(const char* host, unsigned short remotePort, bool block, unsigned short socketFamily, const char *bindAddress) { @@ -773,9 +767,6 @@ unsigned int TCPInterface::GetOutgoingDataBufferSize(SystemAddress systemAddress } __TCPSOCKET__ TCPInterface::SocketConnect(const char* host, unsigned short remotePort, unsigned short socketFamily, const char *bindAddress) { -#ifdef __native_client__ - return 0; -#else int connectResult; (void) connectResult; (void) socketFamily; @@ -880,7 +871,6 @@ __TCPSOCKET__ TCPInterface::SocketConnect(const char* host, unsigned short remot } return sockfd; -#endif // __native_client__ } RAK_THREAD_DECLARATION(MafiaNet::ConnectionAttemptLoop) @@ -1278,7 +1268,7 @@ void RemoteClient::SetActive(bool a) void RemoteClient::SendOrBuffer(const char **data, const unsigned int *lengths, const int numParameters) { // True can save memory and buffer copies, but gives worse performance overall - // Do not use true for the XBOX, as it just locks up + // Keep false unless sends from the user thread are known to be safe on the target const bool ALLOW_SEND_FROM_USER_THREAD=false; int parameterIndex; @@ -1417,19 +1407,11 @@ int RemoteClient::Recv(char *data, const int dataSize) #else int RemoteClient::Send(const char *data, unsigned int length) { -#ifdef __native_client__ - return -1; -#else return send__(socket, data, length, 0); -#endif } int RemoteClient::Recv(char *data, const int dataSize) { -#ifdef __native_client__ - return -1; -#else return recv__(socket, data, dataSize, 0); -#endif } #endif diff --git a/Source/src/UDPForwarder.cpp b/Source/src/UDPForwarder.cpp index 03dc1f08f..ceb06ae13 100644 --- a/Source/src/UDPForwarder.cpp +++ b/Source/src/UDPForwarder.cpp @@ -25,7 +25,6 @@ #include "mafianet/DS_OrderedList.h" #include "mafianet/LinuxStrings.h" #include "mafianet/SocketDefines.h" -#include "mafianet/VitaIncludes.h" #include "errno.h" #ifdef _WIN32 @@ -191,7 +190,6 @@ void UDPForwarder::StopForwarding(SystemAddress source, SystemAddress destinatio } void UDPForwarder::RecvFrom(MafiaNet::TimeMS curTime, ForwardEntry *forwardEntry) { -#ifndef __native_client__ char data[ MAXIMUM_MTU_SIZE ]; #if RAKNET_SUPPORT_IPV6==1 @@ -396,18 +394,9 @@ void UDPForwarder::RecvFrom(MafiaNet::TimeMS curTime, ForwardEntry *forwardEntry while ( len == 0 ); forwardEntry->timeLastDatagramForwarded=curTime; -#endif // __native_client__ } void UDPForwarder::UpdateUDPForwarder(void) { - /* -#if !defined(SN_TARGET_PSP2) - timeval tv; - tv.tv_sec=0; - tv.tv_usec=0; -#endif - */ - MafiaNet::TimeMS curTime = MafiaNet::GetTimeMS(); StartForwardingInputStruct *sfis; diff --git a/Source/src/VitaIncludes.cpp b/Source/src/VitaIncludes.cpp deleted file mode 100644 index 610dcab6c..000000000 --- a/Source/src/VitaIncludes.cpp +++ /dev/null @@ -1,175 +0,0 @@ -/* - * This file was taken from RakNet 4.082. - * Please see licenses/RakNet license.txt for the underlying license and related copyright. - * - * Modified work: Copyright (c) 2017, SLikeSoft UG (haftungsbeschränkt) - * - * This source code was modified by SLikeSoft. Modifications are licensed under the MIT-style - * license found in the license.txt file in the root directory of this source tree. - */ - -#include "mafianet/EmptyHeader.h" - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/docs/changelog.rst b/docs/changelog.rst index 96757f3b5..c4097eb5e 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -3,6 +3,25 @@ Changelog All notable changes to MafiaNet are documented here. +Unreleased +---------- + +**Build** + +* **New CMake options: ``MAFIANET_DISABLED_FEATURES`` and ``MAFIANET_MINIMAL``.** The ``_RAKNET_SUPPORT_`` plugin flags from ``NativeFeatureIncludes.h`` can now be set from CMake (``-DMAFIANET_DISABLED_FEATURES="ReplicaManager3;RPC4Plugin"`` or ``-DMAFIANET_MINIMAL=ON`` for the core transport alone). The definitions are ``PUBLIC`` on the library targets so consumers see the same configuration. Unknown names are a configure error. A ``linux-minimal`` CI job builds the ``MAFIANET_MINIMAL`` configuration. See :doc:`/getting-started/building`. + +**Removed: dead platform code.** Xbox 360, PlayStation 3, PlayStation 4, PlayStation Vita and Google Native Client could not be targeted for years; their remaining headers were already empty. Removed in this release: + +* ``XBox360Includes.h``, ``PS3Includes.h``, ``PS4Includes.h``, ``VitaIncludes.h`` and the matching empty source files, plus ``Samples/nacl_sdk``. +* ``socket.h`` / ``RakNetSocket.cpp``, the pre-``RakNetSocket2`` socket class, which had no remaining consumers and survived only as commented-out console code. +* Every ``__native_client__``, ``_PS3`` / ``__PS3__`` / ``SN_TARGET_PS3``, ``_PS4`` and ``SN_TARGET_PSP2`` preprocessor branch. +* ``SocketDescriptor::remotePortRakNetWasStartedOn_PS3_PSP2`` and ``SocketDescriptor::chromeInstance``, and ``RNS2_BerkleyBindParameters::remotePortRakNetWasStartedOn_PS3_PS4_PSP2``. These were only read by the removed console and Native Client paths. Code that initialised them must drop those lines; ``SocketDescriptor`` is now smaller, so code built against 0.22 must be rebuilt. +* The ``RNS2_Windows_Linux_360`` mix-in is now ``RNS2_Windows_Linux`` and its send function ``Send_Windows_Linux``; both are internal to the socket layer. + +The ``ID_XBOX_360_*`` and ``ID_XBOX_LOBBY`` message identifiers are kept as reserved values so the wire values that follow them do not shift. + +**Wire-compatible.** No message changes. + Version 0.22.1 -------------- diff --git a/docs/getting-started/building.rst b/docs/getting-started/building.rst index cea75dc77..dc5825a56 100644 --- a/docs/getting-started/building.rst +++ b/docs/getting-started/building.rst @@ -53,6 +53,12 @@ Configure build options with CMake: * - ``MAFIANET_BUILD_TESTS`` - OFF - Build GoogleTest suite (requires ``MAFIANET_BUILD_STATIC=ON``) + * - ``MAFIANET_DISABLED_FEATURES`` + - (empty) + - Semicolon-separated plugin names to compile out, e.g. ``"ReplicaManager3;RPC4Plugin"``. See `Minimal builds`_. + * - ``MAFIANET_MINIMAL`` + - OFF + - Compile out every optional plugin, leaving the core transport only. See `Minimal builds`_. Example with options: @@ -60,6 +66,43 @@ Example with options: cmake -DMAFIANET_BUILD_SAMPLES=ON -DMAFIANET_BUILD_TESTS=ON .. +Minimal builds +-------------- + +Every optional plugin in the core library (``ReplicaManager3``, ``RPC4Plugin``, +``FileListTransfer``, the NAT traversal plugins, ``TCPInterface`` and its +users, and so on) is guarded by a ``_RAKNET_SUPPORT_`` flag declared in +``mafianet/NativeFeatureIncludes.h``. The transport itself, ``BitStream``, +``RakPeer``, the reliability layer and ``RakVoice`` are always built. + +The supported way to compile plugins out is through CMake, not by editing the +header: + +.. code-block:: bash + + # Drop specific plugins + cmake -B build -DMAFIANET_DISABLED_FEATURES="ReplicaManager3;RPC4Plugin;TeamManager" + + # Core transport only: every optional plugin compiled out + cmake -B build -DMAFIANET_MINIMAL=ON + +The names accepted by ``MAFIANET_DISABLED_FEATURES`` are listed in +``MAFIANET_OPTIONAL_FEATURES`` in ``Source/CMakeLists.txt``; an unknown name +is a configure error. The resulting ``_RAKNET_SUPPORT_=0`` definitions +are ``PUBLIC`` on the library targets, so code that links ``MafiaNet::MafiaNet`` +or ``MafiaNet::MafiaNetStatic`` sees the same header configuration the library +was built with. Plugins that depend on one another are resolved by the header: +disabling ``FileListTransfer`` while keeping ``DirectoryDeltaTransfer`` keeps +``FileListTransfer`` enabled, for instance. + +A minimal build is exercised in CI (the ``linux-minimal`` job), which +configures with ``-DMAFIANET_MINIMAL=ON`` and builds both library targets. +The test suites need the plugins, so they are not built in that configuration. + +Using ``NativeFeatureIncludesOverrides.h`` to set the same flags still works, +but the CMake route keeps the configuration in the build system, where it is +visible to consumers through the exported targets. + Batched Datagram I/O -------------------- From 55cde6d3ce7ef390448294c43e68beb5a3466bf1 Mon Sep 17 00:00:00 2001 From: Segfault <5221072+Segfaultd@users.noreply.github.com> Date: Thu, 8 Oct 2026 09:52:05 +0200 Subject: [PATCH 2/7] refactor(core): extras library, DS_* deprecations, PascalCase headers (#50 stages 2 and 3) Stage 2: move EmailSender, HTTPConnection/HTTPConnection2, TelnetTransport, RakNetTransport2, ConsoleServer, CommandParserInterface, RakNetCommandParser, LogCommandParser and PacketConsoleLogger out of the core into a MafiaNetExtras static library (MAFIANET_BUILD_EXTRAS, forced on by MAFIANET_BUILD_SAMPLES). Headers and include paths are unchanged; samples link the extras target. Stage 3: DS_BinarySearchTree, DS_QueueLinkedList, DS_HuffmanEncodingTreeFactory, DS_OrderedChannelHeap and DS_BytePool have no in-tree consumer; they now emit a deprecation #pragma message and are scheduled for removal. Header naming: every public header now carries the PascalCase name of what it declares, matching its .cpp (peerinterface.h -> RakPeerInterface.h, string.h -> RakString.h, types.h -> RakNetTypes.h, ...). The umbrella mafianet/mafianet.h stays. Old names remain as forwarding headers with a #pragma message for one release cycle, except aliases.h, version.h and gettimeofday.h, whose new names differ only by case. The lowercase .cpp files were renamed to match. --- .github/workflows/build.yml | 3 +- CLAUDE.md | 14 +- CMakeLists.txt | 10 + .../Autopatcher/ApplyPatch.cpp | 10 +- .../Autopatcher/AutopatcherClient.cpp | 8 +- .../Autopatcher/AutopatcherClient.h | 2 +- .../AutopatcherMySQLRepository.cpp | 8 +- .../AutopatcherPostgreRepository.cpp | 4 +- .../Autopatcher/AutopatcherServer.cpp | 4 +- .../Autopatcher/AutopatcherServer.h | 4 +- .../Autopatcher/CreatePatch.cpp | 6 +- DependentExtensions/Lobby2/.DS_Store | Bin 0 -> 8196 bytes DependentExtensions/Lobby2/Lobby2Client.cpp | 2 +- DependentExtensions/Lobby2/Lobby2Message.h | 6 +- DependentExtensions/Lobby2/Lobby2Plugin.h | 2 +- DependentExtensions/Lobby2/Lobby2Presence.h | 2 +- .../Lobby2/Lobby2ResultCode.cpp | 2 +- DependentExtensions/Lobby2/Lobby2ResultCode.h | 2 +- DependentExtensions/Lobby2/Lobby2Server.cpp | 2 +- DependentExtensions/Lobby2/Lobby2Server.h | 2 +- .../Lobby2/PGSQL/Lobby2Message_PGSQL.cpp | 4 +- .../Lobby2/Rooms/IntervalTimer.h | 2 +- .../Lobby2/Rooms/ProfanityFilter.cpp | 6 +- .../Lobby2/Rooms/ProfanityFilter.h | 2 +- .../Lobby2/Rooms/RoomsContainer.cpp | 6 +- .../Lobby2/Rooms/RoomsContainer.h | 2 +- .../Lobby2/Rooms/RoomsErrorCodes.cpp | 2 +- .../Lobby2/Rooms/RoomsErrorCodes.h | 2 +- .../Lobby2/Rooms/RoomsPlugin.cpp | 4 +- .../Lobby2/Rooms/RoomsPlugin.h | 2 +- .../Lobby2/Steam/Lobby2Client_Steam.h | 2 +- .../MySQLInterface/MySQLInterface.cpp | 6 +- .../MySQLInterface/MySQLInterface.h | 2 +- .../PostgreSQLInterface.cpp | 8 +- .../PostgreSQLInterface/PostgreSQLInterface.h | 2 +- DependentExtensions/RPC3/RPC3.cpp | 6 +- DependentExtensions/RPC3/RPC3.h | 4 +- .../SQLiteClientLogger_PacketLogger.cpp | 2 +- .../Optional/SQLiteClientLogger_RNSLogger.cpp | 6 +- .../ClientOnly/SQLiteClientLoggerPlugin.cpp | 4 +- .../Samples/Ogre3D/BspCollision.cpp | 2 +- .../Simple/SQLiteClientLoggerSample.cpp | 6 +- .../Logger/SQLiteLoggerCommon.cpp | 4 +- .../SQLite3Plugin/Logger/SQLiteLoggerCommon.h | 2 +- .../ServerOnly/SQLiteServerLoggerPlugin.cpp | 4 +- .../ServerOnly/SQLiteServerLoggerSample.cpp | 4 +- .../SQLite3Plugin/SQLite3ClientPlugin.h | 4 +- .../SQLite3Plugin/SQLite3PluginCommon.h | 2 +- .../SQLite3Plugin/SQLite3Sample.cpp | 4 +- .../SQLite3Plugin/SQLite3ServerPlugin.h | 4 +- README.md | 6 +- .../AutopatcherServerTest_MySQL.cpp | 6 +- .../AutopatcherClientTest.cpp | 8 +- .../AutopatcherClientGFx3Impl.cpp | 8 +- .../AutopatcherClientGFx3Impl.h | 2 +- Samples/AutopatcherClientRestarter/main.cpp | 4 +- .../AutopatcherClientTest.cpp | 10 +- .../AutopatcherServerTest.cpp | 6 +- .../AutopatcherServer_SelfScaling/main.cpp | 10 +- Samples/BigPacketTest/BigPacketTest.cpp | 10 +- Samples/BurstTest/BurstTest.cpp | 14 +- .../Client/Chat Example Client.cpp | 14 +- .../Server/Chat Example Server.cpp | 14 +- Samples/CloudClient/CloudClientSample.cpp | 4 +- Samples/CloudServer/CloudServerHelper.cpp | 8 +- Samples/CloudServer/CloudServerSample.cpp | 4 +- Samples/CloudTest/CloudTest.cpp | 4 +- Samples/CommandConsoleClient/main.cpp | 6 +- Samples/CommandConsoleServer/main.cpp | 6 +- .../ComprehensivePCGame.cpp | 12 +- .../ComprehensiveTest/ComprehensiveTest.cpp | 8 +- Samples/CrashReporter/CrashReporter.cpp | 4 +- Samples/CrashReporter/CrashReporter.h | 2 +- Samples/CrashReporter/SendFileTo.cpp | 4 +- .../CrossConnectionTest.cpp | 4 +- .../DirectoryDeltaTransfer.cpp | 4 +- .../DirectoryDeltaTransferTest.cpp | 10 +- .../DroppedConnectionTest.cpp | 4 +- Samples/Encryption/Encryption.cpp | 10 +- Samples/FCMHost/FCM2HostTest.cpp | 8 +- .../FCM2HostSimultaneousTest.cpp | 8 +- .../FCM2VerifiedJoinSimultaneousTest.cpp | 8 +- Samples/FileListTransfer/main.cpp | 10 +- Samples/FlowControlTest/FlowControlTest.cpp | 8 +- Samples/FullyConnectedMesh/FCMTest.cpp | 4 +- .../LANServerDiscovery/LANServerDiscovery.cpp | 14 +- Samples/Lobby2Client/Lobby2ClientSample.cpp | 8 +- .../Lobby2ClientGFx3Impl.cpp | 2 +- .../Lobby2ClientGFx3.0/Lobby2ClientGFx3Impl.h | 2 +- .../Lobby2ServerSample_PGSQL.cpp | 8 +- Samples/Lobby3/main.cpp | 8 +- .../LoopbackPerformanceTest.cpp | 4 +- Samples/MasterServer/MasterClient.cpp | 2 +- Samples/MasterServer/MasterClientMain.cpp | 2 +- Samples/MasterServer/MasterCommon.h | 2 +- Samples/MasterServer/MasterServer.cpp | 4 +- Samples/MasterServer/MasterServer.h | 2 +- Samples/MasterServer/MasterServerMain.cpp | 2 +- Samples/MasterServer/mastercommon.cpp | 4 +- Samples/MasterServer2/main.cpp | 4 +- Samples/MessageFilter/MessageFilterTest.cpp | 4 +- Samples/MessageSizeTest/MessageSizeTest.cpp | 8 +- Samples/NATCompleteClient/main.cpp | 12 +- Samples/NATCompleteServer/main.cpp | 12 +- .../OfflineMessagesTest.cpp | 4 +- .../PHPDirectoryServer2.cpp | 8 +- .../PHPDirectoryServer2/PHPDirectoryServer2.h | 4 +- Samples/PHPDirectoryServer2/main.cpp | 8 +- Samples/PacketConsoleLogger/main.cpp | 4 +- Samples/PacketLogger/PacketLoggerTest.cpp | 2 +- Samples/Ping/Ping.cpp | 10 +- Samples/RPC3/RPC3Sample.cpp | 4 +- Samples/RPC4/RPC4Sample.cpp | 8 +- Samples/RackspaceConsole/main.cpp | 6 +- Samples/RakVoice/main.cpp | 10 +- Samples/RakVoiceDSound/DSoundVoiceAdapter.cpp | 4 +- Samples/RakVoiceDSound/main.cpp | 12 +- Samples/RakVoiceFMOD/FMODVoiceAdapter.cpp | 2 +- Samples/RakVoiceFMOD/main.cpp | 12 +- Samples/ReadyEvent/ReadyEventSample.cpp | 10 +- Samples/RelayPluginTest/main.cpp | 8 +- .../ReliableOrderedTest.cpp | 12 +- Samples/ReplicaManager3/main.cpp | 12 +- Samples/ReplicatedLogin/ReplicatedLogin.cpp | 8 +- Samples/Rooms/RoomsSample.cpp | 2 +- .../RakNet/RoomsBrowserGFx3_RakNet.h | 2 +- Samples/RoomsBrowserGFx3/RoomsBrowserGFx3.h | 2 +- Samples/Router2/Router2Sample.cpp | 12 +- Samples/SendEmail/main.cpp | 4 +- .../ServerClientTest2/ServerClientTest2.cpp | 12 +- .../StatisticsHistoryTest.cpp | 4 +- Samples/SteamLobby/main.cpp | 10 +- Samples/TeamManager/TeamManagerTest.cpp | 10 +- Samples/TestDLL/main.cpp | 8 +- Samples/ThreadTest/ThreadTest.cpp | 8 +- Samples/Timestamping/Timestamping.cpp | 8 +- .../TwoWayAuthenticationTest.cpp | 4 +- Samples/UDPForwarder/main.cpp | 6 +- Samples/VirtualWorld/main.cpp | 4 +- .../ChatClient.xcodeproj/project.pbxproj | 8 +- .../ChatClient/ChatClient/ViewController.h | 8 +- Source/CMakeLists.txt | 131 +- .../include/mafianet/{aliases.h => Aliases.h} | 6 +- Source/include/mafianet/BitStream.h | 12 +- .../include/mafianet/CCRakNetSlidingWindow.h | 6 +- Source/include/mafianet/CCRakNetUDT.h | 6 +- Source/include/mafianet/CheckSum.h | 2 +- Source/include/mafianet/CloudClient.h | 2 +- Source/include/mafianet/CloudCommon.h | 4 +- Source/include/mafianet/CloudServer.h | 4 +- .../include/mafianet/CommandParserInterface.h | 4 +- Source/include/mafianet/ConnectionGraph2.h | 4 +- Source/include/mafianet/ConsoleServer.h | 4 +- Source/include/mafianet/DR_SHA1.h | 2 +- Source/include/mafianet/DS_BPlusTree.h | 2 +- Source/include/mafianet/DS_BinarySearchTree.h | 9 +- Source/include/mafianet/DS_BytePool.h | 11 +- Source/include/mafianet/DS_ByteQueue.h | 2 +- Source/include/mafianet/DS_Hash.h | 6 +- Source/include/mafianet/DS_Heap.h | 4 +- .../include/mafianet/DS_HuffmanEncodingTree.h | 2 +- .../mafianet/DS_HuffmanEncodingTreeFactory.h | 9 +- Source/include/mafianet/DS_LinkedList.h | 2 +- Source/include/mafianet/DS_List.h | 4 +- Source/include/mafianet/DS_Map.h | 4 +- Source/include/mafianet/DS_MemoryPool.h | 4 +- Source/include/mafianet/DS_Multilist.h | 4 +- .../include/mafianet/DS_OrderedChannelHeap.h | 9 +- Source/include/mafianet/DS_OrderedList.h | 2 +- Source/include/mafianet/DS_Queue.h | 4 +- Source/include/mafianet/DS_QueueLinkedList.h | 9 +- Source/include/mafianet/DS_RangeList.h | 4 +- Source/include/mafianet/DS_Table.h | 4 +- Source/include/mafianet/DS_Tree.h | 2 +- Source/include/mafianet/DS_WeightedGraph.h | 4 +- Source/include/mafianet/DataCompressor.h | 2 +- .../include/mafianet/DirectoryDeltaTransfer.h | 4 +- Source/include/mafianet/Dispatcher.h | 6 +- Source/include/mafianet/DynDNS.h | 2 +- Source/include/mafianet/EmailSender.h | 4 +- Source/include/mafianet/Export.h | 2 +- Source/include/mafianet/FileList.h | 6 +- Source/include/mafianet/FileListTransfer.h | 6 +- .../mafianet/FileListTransferCBInterface.h | 2 +- Source/include/mafianet/FullyConnectedMesh2.h | 4 +- Source/include/mafianet/GetTime.h | 2 +- .../{gettimeofday.h => GetTimeOfDay.h} | 0 Source/include/mafianet/GridSectorizer.h | 2 +- Source/include/mafianet/GuidUtil.h | 48 + Source/include/mafianet/HTTPConnection.h | 6 +- Source/include/mafianet/HTTPConnection2.h | 6 +- Source/include/mafianet/InternalPacket.h | 8 +- Source/include/mafianet/LinuxAdapter.h | 88 ++ Source/include/mafianet/MessageFilter.h | 2 +- Source/include/mafianet/MmsgBatch.h | 6 +- .../include/mafianet/NatPunchthroughClient.h | 4 +- .../include/mafianet/NatPunchthroughServer.h | 4 +- .../include/mafianet/NatTypeDetectionClient.h | 4 +- .../include/mafianet/NatTypeDetectionCommon.h | 4 +- .../include/mafianet/NatTypeDetectionServer.h | 4 +- Source/include/mafianet/NetworkIDManager.h | 4 +- Source/include/mafianet/NetworkIDObject.h | 4 +- Source/include/mafianet/OsxAdapter.h | 91 ++ Source/include/mafianet/PacketLogger.h | 2 +- Source/include/mafianet/PeerHandle.h | 4 +- Source/include/mafianet/PluginInterface2.h | 2 +- Source/include/mafianet/PointGridSectorizer.h | 2 +- Source/include/mafianet/RPC4Plugin.h | 4 +- Source/include/mafianet/Rackspace.h | 4 +- Source/include/mafianet/RakAlloca.h | 26 + Source/include/mafianet/RakAssert.h | 17 + Source/include/mafianet/RakMemoryOverride.h | 249 ++++ Source/include/mafianet/RakNetCommandParser.h | 75 ++ Source/include/mafianet/RakNetDefines.h | 227 ++++ .../include/mafianet/RakNetDefinesOverrides.h | 12 + Source/include/mafianet/RakNetSmartPtr.h | 188 +++ Source/include/mafianet/RakNetSocket2.h | 342 +++++ Source/include/mafianet/RakNetStatistics.h | 140 ++ Source/include/mafianet/RakNetTime.h | 40 + Source/include/mafianet/RakNetTransport2.h | 115 ++ Source/include/mafianet/RakNetTypes.h | 487 +++++++ Source/include/mafianet/RakPeer.h | 1178 ++++++++++++++++ Source/include/mafianet/RakPeerInterface.h | 698 ++++++++++ Source/include/mafianet/RakSleep.h | 18 + Source/include/mafianet/RakString.h | 354 +++++ Source/include/mafianet/RakThread.h | 57 + Source/include/mafianet/RakVoice.h | 2 +- Source/include/mafianet/RakWString.h | 124 ++ Source/include/mafianet/RefCountedObj.h | 2 +- Source/include/mafianet/RelayPlugin.h | 2 +- Source/include/mafianet/ReliabilityLayer.h | 8 +- Source/include/mafianet/ReplicaManager3.h | 4 +- Source/include/mafianet/Router2.h | 2 +- Source/include/mafianet/SendToThread.h | 2 +- Source/include/mafianet/SimpleMutex.h | 2 +- .../include/mafianet/SingleProducerConsumer.h | 4 +- Source/include/mafianet/SocketIncludes.h | 2 +- Source/include/mafianet/SocketLayer.h | 8 +- Source/include/mafianet/StatisticsHistory.h | 6 +- Source/include/mafianet/StringCompressor.h | 2 +- Source/include/mafianet/StringTable.h | 2 +- Source/include/mafianet/TCPInterface.h | 8 +- Source/include/mafianet/TableSerializer.h | 2 +- Source/include/mafianet/TeamBalancer.h | 4 +- Source/include/mafianet/TeamManager.h | 4 +- Source/include/mafianet/ThreadPool.h | 6 +- Source/include/mafianet/TransportInterface.h | 4 +- .../include/mafianet/TwoWayAuthentication.h | 4 +- Source/include/mafianet/UDPForwarder.h | 6 +- Source/include/mafianet/UDPProxyClient.h | 2 +- Source/include/mafianet/UDPProxyCoordinator.h | 4 +- Source/include/mafianet/UDPProxyServer.h | 4 +- .../mafianet/VariableListDeltaTracker.h | 2 +- .../include/mafianet/{version.h => Version.h} | 0 Source/include/mafianet/_FindFirst.h | 2 +- Source/include/mafianet/alloca.h | 40 +- Source/include/mafianet/assert.h | 31 +- Source/include/mafianet/commandparser.h | 89 +- Source/include/mafianet/defineoverrides.h | 26 +- Source/include/mafianet/defines.h | 241 +--- Source/include/mafianet/guid_util.h | 56 +- Source/include/mafianet/linux_adapter.h | 92 +- Source/include/mafianet/mafianet.h | 10 +- Source/include/mafianet/memoryoverride.h | 263 +--- Source/include/mafianet/osx_adapter.h | 95 +- Source/include/mafianet/peer.h | 1192 +---------------- Source/include/mafianet/peerinterface.h | 712 +--------- Source/include/mafianet/sleep.h | 32 +- Source/include/mafianet/smartptr.h | 202 +-- Source/include/mafianet/socket2.h | 356 +---- Source/include/mafianet/statistics.h | 154 +-- Source/include/mafianet/string.h | 368 +---- Source/include/mafianet/thread.h | 71 +- Source/include/mafianet/time.h | 54 +- Source/include/mafianet/transport2.h | 129 +- Source/include/mafianet/types.h | 501 +------ Source/include/mafianet/wstring.h | 138 +- Source/src/Base64Encoder.cpp | 2 +- Source/src/BitStream.cpp | 6 +- Source/src/CCRakNetSlidingWindow.cpp | 4 +- Source/src/CCRakNetUDT.cpp | 4 +- Source/src/CloudClient.cpp | 2 +- Source/src/CloudServer.cpp | 2 +- Source/src/CommandParserInterface.cpp | 2 +- Source/src/ConnectionGraph2.cpp | 2 +- Source/src/ConsoleServer.cpp | 4 +- Source/src/DS_BytePool.cpp | 4 +- Source/src/DS_HuffmanEncodingTree.cpp | 2 +- Source/src/DS_Table.cpp | 8 +- Source/src/DataCompressor.cpp | 2 +- Source/src/DirectoryDeltaTransfer.cpp | 6 +- Source/src/DynDNS.cpp | 2 +- Source/src/EmailSender.cpp | 6 +- Source/src/EpochTimeToString.cpp | 4 +- Source/src/FileList.cpp | 10 +- Source/src/FileListTransfer.cpp | 10 +- Source/src/FileOperations.cpp | 6 +- Source/src/FormatString.cpp | 4 +- Source/src/FullyConnectedMesh2.cpp | 6 +- .../{gettimeofday.cpp => GetTimeOfDay.cpp} | 2 +- Source/src/GridSectorizer.cpp | 2 +- Source/src/{guid_util.cpp => GuidUtil.cpp} | 2 +- Source/src/HTTPConnection.cpp | 6 +- Source/src/IncrementalReadInterface.cpp | 4 +- .../{linux_adapter.cpp => LinuxAdapter.cpp} | 2 +- Source/src/LogCommandParser.cpp | 4 +- Source/src/MessageFilter.cpp | 6 +- Source/src/NatPunchthroughClient.cpp | 2 +- Source/src/NatPunchthroughServer.cpp | 6 +- Source/src/NatTypeDetectionClient.cpp | 6 +- Source/src/NatTypeDetectionServer.cpp | 8 +- Source/src/NetworkIDManager.cpp | 6 +- Source/src/NetworkIDObject.cpp | 4 +- .../src/{osx_adapter.cpp => OsxAdapter.cpp} | 2 +- Source/src/PacketFileLogger.cpp | 6 +- Source/src/PacketLogger.cpp | 8 +- Source/src/PacketOutputWindowLogger.cpp | 4 +- Source/src/PacketizedTCP.cpp | 2 +- Source/src/PluginInterface2.cpp | 2 +- Source/src/RPC4Plugin.cpp | 10 +- Source/src/Rackspace.cpp | 2 +- Source/src/RakMemoryOverride.cpp | 4 +- Source/src/RakNetCommandParser.cpp | 6 +- Source/src/RakNetSocket2.cpp | 8 +- Source/src/RakNetStatistics.cpp | 8 +- Source/src/RakNetTransport2.cpp | 8 +- Source/src/RakNetTypes.cpp | 12 +- Source/src/RakPeer.cpp | 22 +- Source/src/RakSleep.cpp | 2 +- Source/src/RakString.cpp | 12 +- Source/src/RakThread.cpp | 10 +- Source/src/RakVoice.cpp | 2 +- Source/src/RakWString.cpp | 6 +- Source/src/ReadyEvent.cpp | 4 +- Source/src/RelayPlugin.cpp | 2 +- Source/src/ReliabilityLayer.cpp | 6 +- Source/src/ReplicaManager3.cpp | 2 +- Source/src/Router2.cpp | 4 +- Source/src/SendToThread.cpp | 2 +- Source/src/SignaledEvent.cpp | 4 +- Source/src/SimpleMutex.cpp | 2 +- Source/src/SocketLayer.cpp | 12 +- Source/src/StatisticsHistory.cpp | 4 +- Source/src/StringCompressor.cpp | 4 +- Source/src/StringTable.cpp | 6 +- Source/src/SuperFastHash.cpp | 4 +- Source/src/TCPInterface.cpp | 10 +- Source/src/TableSerializer.cpp | 2 +- Source/src/TeamBalancer.cpp | 2 +- Source/src/TelnetTransport.cpp | 4 +- Source/src/ThreadsafePacketLogger.cpp | 4 +- Source/src/TwoWayAuthentication.cpp | 2 +- Source/src/UDPForwarder.cpp | 2 +- Source/src/UDPProxyClient.cpp | 2 +- Source/src/UDPProxyCoordinator.cpp | 2 +- Source/src/UDPProxyServer.cpp | 2 +- Source/src/WSAStartupSingleton.cpp | 2 +- Source/src/_FindFirst.cpp | 8 +- Source/src/crypto/cryptomanager.cpp | 2 +- Source/src/crypto/fileencrypter.cpp | 6 +- Source/src/crypto/securestring.cpp | 4 +- .../Integration/ComprehensiveConvertTests.cpp | 6 +- Tests/Integration/ConnectWithSocketTests.cpp | 10 +- .../CrossConnectionConvertTests.cpp | 4 +- ...rectoryDeltaTransferStreamingLiveTests.cpp | 6 +- Tests/Integration/DisconnectReasonTests.cpp | 4 +- Tests/Integration/DispatcherLiveTests.cpp | 2 +- .../DroppedConnectionConvertTests.cpp | 4 +- Tests/Integration/EightPeerTests.cpp | 8 +- .../FileListTransferWindowLiveTests.cpp | 6 +- Tests/Integration/LocalIsConnectedTests.cpp | 10 +- Tests/Integration/MTUNegotiationTests.cpp | 6 +- .../ManyClientsOneServerBlockingTests.cpp | 8 +- ...lientsOneServerDeallocateBlockingTests.cpp | 8 +- .../ManyClientsOneServerNonBlockingTests.cpp | 8 +- Tests/Integration/MaximumConnectTests.cpp | 8 +- Tests/Integration/MmsgBatchLiveTests.cpp | 4 +- Tests/Integration/PacketAndLowLevelTests.cpp | 8 +- Tests/Integration/PeerBuilderTests.cpp | 8 +- .../PeerConnectDisconnectTests.cpp | 8 +- ...onnectDisconnectWithCancelPendingTests.cpp | 8 +- Tests/Integration/PeerHandleTests.cpp | 8 +- Tests/Integration/RPC4ContextTests.cpp | 6 +- .../ReliableOrderedConvertedTests.cpp | 6 +- Tests/Integration/SecurityFunctionsTests.cpp | 10 +- Tests/Integration/SessionConfigLiveTests.cpp | 6 +- Tests/Integration/TypedSendLiveTests.cpp | 2 +- Tests/Support/CommonFunctions.h | 10 +- Tests/Support/DebugTools.h | 2 +- Tests/Support/PacketChangerPlugin.h | 2 +- Tests/Support/PacketDropPlugin.h | 2 +- Tests/Support/RakTimer.h | 2 +- Tests/Support/TestHelpers.h | 8 +- Tests/Unit/ArchiveTests.cpp | 2 +- Tests/Unit/BitStreamStringTests.cpp | 2 +- Tests/Unit/GuidUtilTests.cpp | 6 +- Tests/Unit/LocalAddressTests.cpp | 4 +- Tests/Unit/MmsgBatchTests.cpp | 4 +- Tests/Unit/PeerGuidTests.cpp | 2 +- Tests/Unit/RPC4GlobalRegistrationTests.cpp | 2 +- Tests/Unit/RakVoiceRelayTests.cpp | 2 +- Tests/Unit/ReliabilityLayerBlackHoleTests.cpp | 2 +- .../ReplicaManager3SendSerializeTests.cpp | 2 +- Tests/Unit/SessionAdmissionTests.cpp | 4 +- Tests/Unit/SessionConfigTests.cpp | 4 +- Tests/Unit/SocketErrorTests.cpp | 2 +- Tests/Unit/StatisticsHistorySamplingTests.cpp | 2 +- .../Unit/TwoWayAuthenticationTimeoutTests.cpp | 2 +- Tests/Unit/VirtualWorldTests.cpp | 2 +- cmake/MafiaNetHelpers.cmake | 207 +-- docs/advanced/custom-memory-management.rst | 2 +- docs/api/core.rst | 4 +- docs/basics/startup.rst | 2 +- docs/changelog.rst | 12 +- docs/getting-started/building.rst | 30 +- docs/getting-started/quickstart.rst | 4 +- docs/getting-started/system-overview.rst | 2 +- docs/getting-started/tutorial.rst | 8 +- 418 files changed, 6056 insertions(+), 5610 deletions(-) create mode 100644 DependentExtensions/Lobby2/.DS_Store rename Source/include/mafianet/{aliases.h => Aliases.h} (88%) rename Source/include/mafianet/{gettimeofday.h => GetTimeOfDay.h} (100%) create mode 100644 Source/include/mafianet/GuidUtil.h create mode 100644 Source/include/mafianet/LinuxAdapter.h create mode 100644 Source/include/mafianet/OsxAdapter.h create mode 100644 Source/include/mafianet/RakAlloca.h create mode 100644 Source/include/mafianet/RakAssert.h create mode 100644 Source/include/mafianet/RakMemoryOverride.h create mode 100644 Source/include/mafianet/RakNetCommandParser.h create mode 100644 Source/include/mafianet/RakNetDefines.h create mode 100644 Source/include/mafianet/RakNetDefinesOverrides.h create mode 100644 Source/include/mafianet/RakNetSmartPtr.h create mode 100644 Source/include/mafianet/RakNetSocket2.h create mode 100644 Source/include/mafianet/RakNetStatistics.h create mode 100644 Source/include/mafianet/RakNetTime.h create mode 100644 Source/include/mafianet/RakNetTransport2.h create mode 100644 Source/include/mafianet/RakNetTypes.h create mode 100644 Source/include/mafianet/RakPeer.h create mode 100644 Source/include/mafianet/RakPeerInterface.h create mode 100644 Source/include/mafianet/RakSleep.h create mode 100644 Source/include/mafianet/RakString.h create mode 100644 Source/include/mafianet/RakThread.h create mode 100644 Source/include/mafianet/RakWString.h rename Source/include/mafianet/{version.h => Version.h} (100%) rename Source/src/{gettimeofday.cpp => GetTimeOfDay.cpp} (94%) rename Source/src/{guid_util.cpp => GuidUtil.cpp} (96%) rename Source/src/{linux_adapter.cpp => LinuxAdapter.cpp} (99%) rename Source/src/{osx_adapter.cpp => OsxAdapter.cpp} (99%) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 26c83d425..9e1106f29 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -67,7 +67,8 @@ jobs: run: | cmake -B build \ -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} \ - -DMAFIANET_BUILD_TESTS=ON + -DMAFIANET_BUILD_TESTS=ON \ + -DMAFIANET_BUILD_EXTRAS=ON - name: Build run: cmake --build build --parallel 4 diff --git a/CLAUDE.md b/CLAUDE.md index 553907071..27b7ec1cb 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -62,6 +62,7 @@ Available generators (run `cmake --help` for full list): | `MAFIANET_BUILD_STATIC` | ON | Build static library (.lib/.a) | | `MAFIANET_BUILD_SAMPLES` | OFF | Build sample applications | | `MAFIANET_BUILD_TESTS` | OFF | Build test suite | +| `MAFIANET_BUILD_EXTRAS` | OFF | Build `MafiaNetExtras` (EmailSender, HTTPConnection*, Telnet/RakNet transports, ConsoleServer, command parsers, PacketConsoleLogger); forced ON by `MAFIANET_BUILD_SAMPLES` | | `MAFIANET_DISABLED_FEATURES` | (empty) | Semicolon list of plugins to compile out (`_RAKNET_SUPPORT_=0`); names validated against `MAFIANET_OPTIONAL_FEATURES` in `Source/CMakeLists.txt` | | `MAFIANET_MINIMAL` | OFF | Compile out every optional plugin (core transport only); built by the `linux-minimal` CI job | @@ -69,6 +70,13 @@ When adding or removing a plugin guarded by a `_RAKNET_SUPPORT_` flag, upd `MAFIANET_OPTIONAL_FEATURES` in `Source/CMakeLists.txt` as well, or the CMake plugin selection silently drifts from `NativeFeatureIncludes.h`. +Public headers use the PascalCase name of the class they declare, matching the +`.cpp` (`RakPeerInterface.h`, `RakString.h`, `RakNetTypes.h`). The only lowercase +header is the umbrella `mafianet/mafianet.h`. The lowercase names that remain +(`peerinterface.h`, `string.h`, ...) are deprecated forwarding shims listed in +`MAFIANET_DEPRECATED_HEADERS`; never include them from library code and do not add +new lowercase headers. + Dead platforms (Xbox 360, PS3, PS4, Vita, Native Client) were removed on purpose. Do not reintroduce `__native_client__`, `_PS3`, `_PS4`, `SN_TARGET_*` or Xbox preprocessor islands; MafiaNet targets Windows, Linux, macOS and the BSDs. @@ -159,7 +167,7 @@ For debugging, run a binary directly with a filter: `./build/Tests/IntegrationTe ### Namespaces - Primary namespace: `MafiaNet` (e.g., `MafiaNet::RakPeerInterface`, `MafiaNet::BitStream`) — used exclusively throughout the library -- Short-hand alias: the `MNet` preprocessor macro (defined in `mafianet/defines.h`) expands to `MafiaNet` as a convenience shorthand +- Short-hand alias: the `MNet` preprocessor macro (defined in `mafianet/RakNetDefines.h`) expands to `MafiaNet` as a convenience shorthand ### Key Components @@ -203,7 +211,7 @@ Dependencies (bzip2, miniupnpc, Opus, RNNoise) are automatically fetched via CMa ### Basic Usage Pattern ```cpp -#include "mafianet/peerinterface.h" +#include "mafianet/RakPeerInterface.h" #include "mafianet/BitStream.h" #include "mafianet/MessageIdentifiers.h" @@ -251,7 +259,7 @@ cutting a release, bump **every** location below to the new version: | File | What to change | |------|----------------| | `CMakeLists.txt` | `project(MafiaNet VERSION X.Y.Z ...)` — the canonical source of truth | -| `Source/include/mafianet/version.h` | `MAFIANET_VERSION`, `MAFIANET_VERSION_NUMBER_INT`, and the `MAJOR`/`MINOR`/`PATCH` defines (leave the deprecated `RAKNET_*` / `SLIKENET_*` defines untouched) | +| `Source/include/mafianet/Version.h` | `MAFIANET_VERSION`, `MAFIANET_VERSION_NUMBER_INT`, and the `MAJOR`/`MINOR`/`PATCH` defines (leave the deprecated `RAKNET_*` / `SLIKENET_*` defines untouched) | | `docs/conf.py` | `version` and `release` | | `docs/Doxyfile` | `PROJECT_NUMBER` | | `docs/changelog.rst` | Add a new `Version X.Y.Z` section at the top | diff --git a/CMakeLists.txt b/CMakeLists.txt index 9df878244..1dbae55df 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -31,6 +31,16 @@ option(MAFIANET_BUILD_SHARED "Build shared library" ON) option(MAFIANET_BUILD_STATIC "Build static library" ON) option(MAFIANET_BUILD_SAMPLES "Build sample applications" OFF) option(MAFIANET_BUILD_TESTS "Build test suite" OFF) +# Non-networking utilities (EmailSender, HTTPConnection/HTTPConnection2, +# TelnetTransport, RakNetTransport2, ConsoleServer, LogCommandParser, +# RakNetCommandParser, PacketConsoleLogger) live in the separate MafiaNetExtras +# target. Off by default; several samples use them, so MAFIANET_BUILD_SAMPLES +# turns it on. +option(MAFIANET_BUILD_EXTRAS "Build the MafiaNetExtras library (SMTP, HTTP, telnet/console transports)" OFF) +if(MAFIANET_BUILD_SAMPLES AND NOT MAFIANET_BUILD_EXTRAS) + message(STATUS "MafiaNet: MAFIANET_BUILD_SAMPLES requires the extras library; enabling MAFIANET_BUILD_EXTRAS") + set(MAFIANET_BUILD_EXTRAS ON CACHE BOOL "Build the MafiaNetExtras library (SMTP, HTTP, telnet/console transports)" FORCE) +endif() # Plugin selection. Every optional plugin in the core library is guarded by a # _RAKNET_SUPPORT_ flag from NativeFeatureIncludes.h. These two settings diff --git a/DependentExtensions/Autopatcher/ApplyPatch.cpp b/DependentExtensions/Autopatcher/ApplyPatch.cpp index 860cf14fc..4ddbbf121 100644 --- a/DependentExtensions/Autopatcher/ApplyPatch.cpp +++ b/DependentExtensions/Autopatcher/ApplyPatch.cpp @@ -50,8 +50,8 @@ __FBSDID("$FreeBSD: src/usr.bin/bsdiff/bspatch/bspatch.c,v 1.1 2005/08/06 01:59: typedef int ssize_t; #include #include -#include "mafianet/linux_adapter.h" -#include "mafianet/osx_adapter.h" +#include "mafianet/LinuxAdapter.h" +#include "mafianet/OsxAdapter.h" #define fseeko fseek static void err(int i, ...) { @@ -65,15 +65,15 @@ static void errx(int i, ...) // Unix/POSIX includes and Windows API compatibility #include #include -#include "mafianet/linux_adapter.h" -#include "mafianet/osx_adapter.h" +#include "mafianet/LinuxAdapter.h" +#include "mafianet/OsxAdapter.h" // Map Windows API names to POSIX equivalents #define _open open #define _lseek lseek #define _read read #define _write write #define _close close -// fopen_s is provided by osx_adapter.h +// fopen_s is provided by OsxAdapter.h #endif #include diff --git a/DependentExtensions/Autopatcher/AutopatcherClient.cpp b/DependentExtensions/Autopatcher/AutopatcherClient.cpp index 6d25d2433..c8715d8bd 100644 --- a/DependentExtensions/Autopatcher/AutopatcherClient.cpp +++ b/DependentExtensions/Autopatcher/AutopatcherClient.cpp @@ -17,7 +17,7 @@ #include "mafianet/DirectoryDeltaTransfer.h" #include "mafianet/FileList.h" #include "mafianet/StringCompressor.h" -#include "mafianet/peerinterface.h" +#include "mafianet/RakPeerInterface.h" #include "mafianet/FileListTransfer.h" #include "mafianet/FileListTransferCBInterface.h" #include "mafianet/BitStream.h" @@ -28,10 +28,10 @@ //#include "mafianet/DR_SHA1.h" #include #include "mafianet/FileOperations.h" -#include "mafianet/assert.h" +#include "mafianet/RakAssert.h" #include "mafianet/ThreadPool.h" -#include "mafianet/linux_adapter.h" -#include "mafianet/osx_adapter.h" +#include "mafianet/LinuxAdapter.h" +#include "mafianet/OsxAdapter.h" using namespace MafiaNet; diff --git a/DependentExtensions/Autopatcher/AutopatcherClient.h b/DependentExtensions/Autopatcher/AutopatcherClient.h index a39b986a7..cd1f058d2 100644 --- a/DependentExtensions/Autopatcher/AutopatcherClient.h +++ b/DependentExtensions/Autopatcher/AutopatcherClient.h @@ -20,7 +20,7 @@ #ifndef __AUTOPATCHER_CLIENT_H #define __AUTOPATCHER_CLIENT_H -#include "mafianet/types.h" +#include "mafianet/RakNetTypes.h" #include "mafianet/Export.h" #include "mafianet/PluginInterface2.h" #include "mafianet/PacketPriority.h" diff --git a/DependentExtensions/Autopatcher/AutopatcherMySQLRepository/AutopatcherMySQLRepository.cpp b/DependentExtensions/Autopatcher/AutopatcherMySQLRepository/AutopatcherMySQLRepository.cpp index 1f819d83b..2d0c79de8 100644 --- a/DependentExtensions/Autopatcher/AutopatcherMySQLRepository/AutopatcherMySQLRepository.cpp +++ b/DependentExtensions/Autopatcher/AutopatcherMySQLRepository/AutopatcherMySQLRepository.cpp @@ -13,11 +13,11 @@ * license found in the license.txt file in the root directory of this source tree. */ -#include "mafianet/string.h" +#include "mafianet/RakString.h" #include "AutopatcherMySQLRepository.h" #include "mafianet/AutopatcherPatchContext.h" #include "mafianet/FileList.h" -#include "mafianet/assert.h" +#include "mafianet/RakAssert.h" #include "mafianet/DS_List.h" // ntohl #ifdef _WIN32 @@ -33,8 +33,8 @@ // #include "mafianet/DR_SHA1.h" #include #include "mafianet/LinuxStrings.h" -#include "mafianet/linux_adapter.h" -#include "mafianet/osx_adapter.h" +#include "mafianet/LinuxAdapter.h" +#include "mafianet/OsxAdapter.h" using namespace MafiaNet; diff --git a/DependentExtensions/Autopatcher/AutopatcherPostgreRepository/AutopatcherPostgreRepository.cpp b/DependentExtensions/Autopatcher/AutopatcherPostgreRepository/AutopatcherPostgreRepository.cpp index b091c23f6..55f65cd1e 100644 --- a/DependentExtensions/Autopatcher/AutopatcherPostgreRepository/AutopatcherPostgreRepository.cpp +++ b/DependentExtensions/Autopatcher/AutopatcherPostgreRepository/AutopatcherPostgreRepository.cpp @@ -27,8 +27,8 @@ // #include "mafianet/DR_SHA1.h" #include #include "mafianet/LinuxStrings.h" -#include "mafianet/linux_adapter.h" -#include "mafianet/osx_adapter.h" +#include "mafianet/LinuxAdapter.h" +#include "mafianet/OsxAdapter.h" // localtime #include diff --git a/DependentExtensions/Autopatcher/AutopatcherServer.cpp b/DependentExtensions/Autopatcher/AutopatcherServer.cpp index c029cc77a..a03c9be70 100644 --- a/DependentExtensions/Autopatcher/AutopatcherServer.cpp +++ b/DependentExtensions/Autopatcher/AutopatcherServer.cpp @@ -21,13 +21,13 @@ #include "mafianet/DirectoryDeltaTransfer.h" #include "mafianet/FileList.h" #include "mafianet/StringCompressor.h" -#include "mafianet/peerinterface.h" +#include "mafianet/RakPeerInterface.h" #include "mafianet/FileListTransfer.h" #include "mafianet/FileListTransferCBInterface.h" #include "mafianet/BitStream.h" #include "mafianet/MessageIdentifiers.h" #include "mafianet/AutopatcherRepositoryInterface.h" -#include "mafianet/assert.h" +#include "mafianet/RakAssert.h" #include "mafianet/AutopatcherPatchContext.h" #include #include diff --git a/DependentExtensions/Autopatcher/AutopatcherServer.h b/DependentExtensions/Autopatcher/AutopatcherServer.h index 27e9e1317..9cf6d38c9 100644 --- a/DependentExtensions/Autopatcher/AutopatcherServer.h +++ b/DependentExtensions/Autopatcher/AutopatcherServer.h @@ -30,13 +30,13 @@ #ifndef __AUTOPATCHER_SERVER_H #define __AUTOPATCHER_SERVER_H -#include "mafianet/types.h" +#include "mafianet/RakNetTypes.h" #include "mafianet/Export.h" #include "mafianet/PluginInterface2.h" #include "mafianet/PacketPriority.h" #include "mafianet/ThreadPool.h" #include "mafianet/BitStream.h" -#include "mafianet/string.h" +#include "mafianet/RakString.h" #include "mafianet/FileList.h" #include "mafianet/IncrementalReadInterface.h" diff --git a/DependentExtensions/Autopatcher/CreatePatch.cpp b/DependentExtensions/Autopatcher/CreatePatch.cpp index 1d7b154fe..0378f4ca9 100644 --- a/DependentExtensions/Autopatcher/CreatePatch.cpp +++ b/DependentExtensions/Autopatcher/CreatePatch.cpp @@ -66,15 +66,15 @@ static void errx(int i, ...) // Unix/POSIX includes and Windows API compatibility #include #include -#include "mafianet/linux_adapter.h" -#include "mafianet/osx_adapter.h" +#include "mafianet/LinuxAdapter.h" +#include "mafianet/OsxAdapter.h" // Map Windows API names to POSIX equivalents #define _open open #define _lseek lseek #define _read read #define _write write #define _close close -// fopen_s is provided by osx_adapter.h +// fopen_s is provided by OsxAdapter.h #endif #include #include diff --git a/DependentExtensions/Lobby2/.DS_Store b/DependentExtensions/Lobby2/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..31d2b0bc062f17db4068e875bbcfac8d73e10a34 GIT binary patch literal 8196 zcmeHMYfKzf6u#f^=!}eIKx`>?vWw71Dix@xeb~CZ+G0Uape(eC`xs#CFoQd@3pCNt z7^@~G8efUO8lOLj8jTuLt^P9c6%8@5iH%Vc>mPsdrzWkQJ9oC}LiuM5v2&Aqzd7gL zb7t?E@664aWsIRMn{H;TnlUC*=ctv@aFxdAd0*C~KvP5rvS)14a&zrT%SkR<8!EyG zgb@fM5Jn)3Kp2755dk{0d6QQ-_r+{Dh7kxOa7{*lzaOI1ImQB<6X?G>Xz)t_!eUbU zjjpK<@NJ?2#sZuZ=$n#HQ9U3qMNncunA3ceFDHxzI44k;GYE5r;LZpt6!>>1yQsgM zAto>!!w7^CSRMghyO*$j<}rgMuB_jS`jb3U5~XCW08mz1uNmFvpX>-C}d@Q8Xe zZl)Z&-#l)NYUS>PGu=gEU&hFp#`I9iv9go4JE~Qr5>_f}B|M|mviM@smAk2oV_AKU zYkH<*563-Y#>+b@n2L|MPR48ZosDW*)-~=o$d{QjI>;lrs^oX;o#JlX!$!s>tcx{? zJu35S*GKBNZr^d|U9rxtp8FQcwTeo$N?kXUGhH)j8H3Yi+M5_oxGBRq}SXy~MLg^O3CS&1!YBEbdXO*D2cj^3gQ?$Q~!n zJ*NE`y;k2M%SX7rJ!8-))ao|9LD3TOfJ*@qE*jNlMRS#bW2POLwy1Z=T3Q*j5=p}n z-gc>bWbKeLloLA_$}074S&65d$w}IbD|Bsohpc@eKge&~op8P0DZ|eHq&EGaERVPo ziHy-ZZ5x@qMYk;b50>=Yq%&=LPR5VMy|ubN%w4sn(?*&$T~ocGQt#IXW$k;i(M&sM zdi0ct9RyiduFI3IF1Afv)}0v>7k-SDs{Dcg`B9*=&1@&V`Ult;bJz*?3_Hc%W2f0C z>}&P|JI8)wf3gegFLse#LJ?F{Vk7FY9gS#0Gj?MS_F^9nVE}_Tj3kc1f(-{A9>rsr z!wH~A;|08e*YG;t#9Nrh2lx;l;d6Y6uka1N#X0uI1@>s73}UC5)Ms z(otK(Q&(Q#t7~soBU%Y1jSx3)A+eMaMu@jGL?W6*c`C%F=7_2lQ5Gt`?d=UDA`o`% zR#mN-@=?s~(@A83(AG|Fcy`JEHqXCfXW7r}JX>TJP>M2Wh+r#jMGNtIKMoSNyU|13 zj$;Hza1;i{Vd7z8x`!NQFpJ}O98cg$JcXx;=P%+Vyo^(LmAL)}v3(wI;~l(*6nf9J~I|NTYb z5Jn)3!2dG>DDLR*XrsNY^!Dbpc9i-<)Oq9U<^=jCH2CE>p // alloca diff --git a/DependentExtensions/Lobby2/Rooms/ProfanityFilter.h b/DependentExtensions/Lobby2/Rooms/ProfanityFilter.h index 26f0e7c97..2143a570a 100644 --- a/DependentExtensions/Lobby2/Rooms/ProfanityFilter.h +++ b/DependentExtensions/Lobby2/Rooms/ProfanityFilter.h @@ -17,7 +17,7 @@ #define __PROFANITY_FILTER__H__ #include "mafianet/DS_List.h" -#include "mafianet/string.h" +#include "mafianet/RakString.h" namespace MafiaNet { diff --git a/DependentExtensions/Lobby2/Rooms/RoomsContainer.cpp b/DependentExtensions/Lobby2/Rooms/RoomsContainer.cpp index 42d9c2828..3d513017a 100644 --- a/DependentExtensions/Lobby2/Rooms/RoomsContainer.cpp +++ b/DependentExtensions/Lobby2/Rooms/RoomsContainer.cpp @@ -15,12 +15,12 @@ #include "RoomsContainer.h" #include "ProfanityFilter.h" -#include "mafianet/assert.h" +#include "mafianet/RakAssert.h" #include "mafianet/GetTime.h" #include "mafianet/BitStream.h" #include "mafianet/TableSerializer.h" -#include "mafianet/linux_adapter.h" -#include "mafianet/osx_adapter.h" +#include "mafianet/LinuxAdapter.h" +#include "mafianet/OsxAdapter.h" static const MafiaNet::TimeMS MINIMUM_QUICK_JOIN_TIMEOUT=5000; static const MafiaNet::TimeMS MAXIMUM_QUICK_JOIN_TIMEOUT=60000 * 5; diff --git a/DependentExtensions/Lobby2/Rooms/RoomsContainer.h b/DependentExtensions/Lobby2/Rooms/RoomsContainer.h index 7e3465982..717357e57 100644 --- a/DependentExtensions/Lobby2/Rooms/RoomsContainer.h +++ b/DependentExtensions/Lobby2/Rooms/RoomsContainer.h @@ -20,7 +20,7 @@ #include "mafianet/DS_Table.h" #include "RoomsErrorCodes.h" #include "mafianet/DS_List.h" -#include "mafianet/types.h" +#include "mafianet/RakNetTypes.h" #include "IntervalTimer.h" #include "RoomTypes.h" diff --git a/DependentExtensions/Lobby2/Rooms/RoomsErrorCodes.cpp b/DependentExtensions/Lobby2/Rooms/RoomsErrorCodes.cpp index 43f92c933..d2bca148b 100644 --- a/DependentExtensions/Lobby2/Rooms/RoomsErrorCodes.cpp +++ b/DependentExtensions/Lobby2/Rooms/RoomsErrorCodes.cpp @@ -14,7 +14,7 @@ */ #include "RoomsErrorCodes.h" -#include "mafianet/assert.h" +#include "mafianet/RakAssert.h" using namespace MafiaNet; diff --git a/DependentExtensions/Lobby2/Rooms/RoomsErrorCodes.h b/DependentExtensions/Lobby2/Rooms/RoomsErrorCodes.h index 3533c251c..b0a0ef71b 100644 --- a/DependentExtensions/Lobby2/Rooms/RoomsErrorCodes.h +++ b/DependentExtensions/Lobby2/Rooms/RoomsErrorCodes.h @@ -16,7 +16,7 @@ #ifndef __ROOMS_ERROR_CODES_H #define __ROOMS_ERROR_CODES_H -#include "mafianet/defines.h" // provides the MNet short-hand alias for the MafiaNet namespace +#include "mafianet/RakNetDefines.h" // provides the MNet short-hand alias for the MafiaNet namespace namespace MafiaNet { diff --git a/DependentExtensions/Lobby2/Rooms/RoomsPlugin.cpp b/DependentExtensions/Lobby2/Rooms/RoomsPlugin.cpp index f2c844084..294ed44c2 100644 --- a/DependentExtensions/Lobby2/Rooms/RoomsPlugin.cpp +++ b/DependentExtensions/Lobby2/Rooms/RoomsPlugin.cpp @@ -17,9 +17,9 @@ #include "mafianet/BitStream.h" #include "RoomsErrorCodes.h" #include "mafianet/TableSerializer.h" -#include "mafianet/assert.h" +#include "mafianet/RakAssert.h" #include "mafianet/MessageIdentifiers.h" -#include "mafianet/peerinterface.h" +#include "mafianet/RakPeerInterface.h" #include "ProfanityFilter.h" #include "mafianet/GetTime.h" diff --git a/DependentExtensions/Lobby2/Rooms/RoomsPlugin.h b/DependentExtensions/Lobby2/Rooms/RoomsPlugin.h index 6b63d8ea1..e744d1508 100644 --- a/DependentExtensions/Lobby2/Rooms/RoomsPlugin.h +++ b/DependentExtensions/Lobby2/Rooms/RoomsPlugin.h @@ -22,7 +22,7 @@ #ifndef __ROOMS_PLUGIN_H #define __ROOMS_PLUGIN_H -#include "mafianet/types.h" +#include "mafianet/RakNetTypes.h" #include "mafianet/PluginInterface2.h" #include "mafianet/DS_OrderedList.h" #include "mafianet/Export.h" diff --git a/DependentExtensions/Lobby2/Steam/Lobby2Client_Steam.h b/DependentExtensions/Lobby2/Steam/Lobby2Client_Steam.h index 826e34658..738d5b052 100644 --- a/DependentExtensions/Lobby2/Steam/Lobby2Client_Steam.h +++ b/DependentExtensions/Lobby2/Steam/Lobby2Client_Steam.h @@ -18,7 +18,7 @@ #include "Lobby2Plugin.h" #include "mafianet/DS_OrderedList.h" -#include "mafianet/types.h" +#include "mafianet/RakNetTypes.h" namespace MafiaNet { diff --git a/DependentExtensions/MySQLInterface/MySQLInterface.cpp b/DependentExtensions/MySQLInterface/MySQLInterface.cpp index 0251aac8c..53b5deb82 100644 --- a/DependentExtensions/MySQLInterface/MySQLInterface.cpp +++ b/DependentExtensions/MySQLInterface/MySQLInterface.cpp @@ -14,12 +14,12 @@ */ #include "MySQLInterface.h" -#include "mafianet/assert.h" +#include "mafianet/RakAssert.h" #include "mafianet/BitStream.h" #include "mafianet/FormatString.h" #include "mafianet/LinuxStrings.h" -#include "mafianet/linux_adapter.h" -#include "mafianet/osx_adapter.h" +#include "mafianet/LinuxAdapter.h" +#include "mafianet/OsxAdapter.h" #include diff --git a/DependentExtensions/MySQLInterface/MySQLInterface.h b/DependentExtensions/MySQLInterface/MySQLInterface.h index 369df37dd..6e348a9ab 100644 --- a/DependentExtensions/MySQLInterface/MySQLInterface.h +++ b/DependentExtensions/MySQLInterface/MySQLInterface.h @@ -16,7 +16,7 @@ #ifndef __MY_SQL_INTERFACE_H #define __MY_SQL_INTERFACE_H -#include "mafianet/string.h" +#include "mafianet/RakString.h" struct st_mysql_res; struct st_mysql; diff --git a/DependentExtensions/PostgreSQLInterface/PostgreSQLInterface.cpp b/DependentExtensions/PostgreSQLInterface/PostgreSQLInterface.cpp index 51df6fa7d..b44084bee 100644 --- a/DependentExtensions/PostgreSQLInterface/PostgreSQLInterface.cpp +++ b/DependentExtensions/PostgreSQLInterface/PostgreSQLInterface.cpp @@ -37,13 +37,13 @@ //#include #endif -#include "mafianet/string.h" -#include "mafianet/assert.h" +#include "mafianet/RakString.h" +#include "mafianet/RakAssert.h" #include "mafianet/BitStream.h" #include "mafianet/FormatString.h" #include "mafianet/LinuxStrings.h" -#include "mafianet/linux_adapter.h" -#include "mafianet/osx_adapter.h" +#include "mafianet/LinuxAdapter.h" +#include "mafianet/OsxAdapter.h" #define PQEXECPARAM_FORMAT_TEXT 0 #define PQEXECPARAM_FORMAT_BINARY 1 diff --git a/DependentExtensions/PostgreSQLInterface/PostgreSQLInterface.h b/DependentExtensions/PostgreSQLInterface/PostgreSQLInterface.h index b3ac5a5ea..bf2c9c8ed 100644 --- a/DependentExtensions/PostgreSQLInterface/PostgreSQLInterface.h +++ b/DependentExtensions/PostgreSQLInterface/PostgreSQLInterface.h @@ -22,7 +22,7 @@ typedef struct pg_conn PGconn; struct pg_result; typedef struct pg_result PGresult; -#include "mafianet/string.h" +#include "mafianet/RakString.h" #include "mafianet/DS_OrderedList.h" class PostgreSQLInterface diff --git a/DependentExtensions/RPC3/RPC3.cpp b/DependentExtensions/RPC3/RPC3.cpp index 32d8f0ff3..f8fe9cb33 100644 --- a/DependentExtensions/RPC3/RPC3.cpp +++ b/DependentExtensions/RPC3/RPC3.cpp @@ -14,11 +14,11 @@ */ #include "RPC3.h" -#include "mafianet/memoryoverride.h" -#include "mafianet/assert.h" +#include "mafianet/RakMemoryOverride.h" +#include "mafianet/RakAssert.h" #include "mafianet/StringCompressor.h" #include "mafianet/BitStream.h" -#include "mafianet/peerinterface.h" +#include "mafianet/RakPeerInterface.h" #include "mafianet/MessageIdentifiers.h" #include "mafianet/NetworkIDManager.h" #include diff --git a/DependentExtensions/RPC3/RPC3.h b/DependentExtensions/RPC3/RPC3.h index 27045dba0..61ea93f9e 100644 --- a/DependentExtensions/RPC3/RPC3.h +++ b/DependentExtensions/RPC3/RPC3.h @@ -24,9 +24,9 @@ #include "RPC3_Boost.h" #include "mafianet/PluginInterface2.h" #include "mafianet/PacketPriority.h" -#include "mafianet/types.h" +#include "mafianet/RakNetTypes.h" #include "mafianet/BitStream.h" -#include "mafianet/string.h" +#include "mafianet/RakString.h" #include "mafianet/NetworkIDObject.h" #include "mafianet/DS_Hash.h" #include "mafianet/DS_OrderedList.h" diff --git a/DependentExtensions/SQLite3Plugin/Logger/ClientOnly/Optional/SQLiteClientLogger_PacketLogger.cpp b/DependentExtensions/SQLite3Plugin/Logger/ClientOnly/Optional/SQLiteClientLogger_PacketLogger.cpp index 29dd31dca..940fba5e2 100644 --- a/DependentExtensions/SQLite3Plugin/Logger/ClientOnly/Optional/SQLiteClientLogger_PacketLogger.cpp +++ b/DependentExtensions/SQLite3Plugin/Logger/ClientOnly/Optional/SQLiteClientLogger_PacketLogger.cpp @@ -10,7 +10,7 @@ #include "SQLiteClientLogger_PacketLogger.h" #include "SQLiteClientLoggerPlugin.h" -#include "mafianet/peerinterface.h" +#include "mafianet/RakPeerInterface.h" #include "mafianet/InternalPacket.h" #include "mafianet/MessageIdentifiers.h" diff --git a/DependentExtensions/SQLite3Plugin/Logger/ClientOnly/Optional/SQLiteClientLogger_RNSLogger.cpp b/DependentExtensions/SQLite3Plugin/Logger/ClientOnly/Optional/SQLiteClientLogger_RNSLogger.cpp index 77c6362c8..0800cd21a 100644 --- a/DependentExtensions/SQLite3Plugin/Logger/ClientOnly/Optional/SQLiteClientLogger_RNSLogger.cpp +++ b/DependentExtensions/SQLite3Plugin/Logger/ClientOnly/Optional/SQLiteClientLogger_RNSLogger.cpp @@ -9,10 +9,10 @@ */ #include "SQLiteClientLogger_RNSLogger.h" -#include "mafianet/time.h" +#include "mafianet/RakNetTime.h" #include "mafianet/GetTime.h" -#include "mafianet/statistics.h" -#include "mafianet/peerinterface.h" +#include "mafianet/RakNetStatistics.h" +#include "mafianet/RakPeerInterface.h" #include "SQLiteClientLoggerPlugin.h" using namespace MafiaNet; diff --git a/DependentExtensions/SQLite3Plugin/Logger/ClientOnly/SQLiteClientLoggerPlugin.cpp b/DependentExtensions/SQLite3Plugin/Logger/ClientOnly/SQLiteClientLoggerPlugin.cpp index 3c83f8c1a..7df2e1a73 100644 --- a/DependentExtensions/SQLite3Plugin/Logger/ClientOnly/SQLiteClientLoggerPlugin.cpp +++ b/DependentExtensions/SQLite3Plugin/Logger/ClientOnly/SQLiteClientLoggerPlugin.cpp @@ -12,8 +12,8 @@ #include "mafianet/MessageIdentifiers.h" #include "mafianet/PacketizedTCP.h" #include "mafianet/GetTime.h" -#include "mafianet/linux_adapter.h" -#include "mafianet/osx_adapter.h" +#include "mafianet/LinuxAdapter.h" +#include "mafianet/OsxAdapter.h" static const char COLUMN_NAMES_DELIMITER=','; static const int MAX_COLUMN_NAMES_LENGTH=512; diff --git a/DependentExtensions/SQLite3Plugin/Logger/ClientOnly/Samples/Ogre3D/BspCollision.cpp b/DependentExtensions/SQLite3Plugin/Logger/ClientOnly/Samples/Ogre3D/BspCollision.cpp index e53c59a95..d0866e1b5 100644 --- a/DependentExtensions/SQLite3Plugin/Logger/ClientOnly/Samples/Ogre3D/BspCollision.cpp +++ b/DependentExtensions/SQLite3Plugin/Logger/ClientOnly/Samples/Ogre3D/BspCollision.cpp @@ -46,7 +46,7 @@ static const int num_rows = 3; #include "SQLiteClientLoggerPlugin.h" #include "mafianet/PacketizedTCP.h" #include "Ogre3D_DX9_BackbufferGrabber.h" -#include "mafianet/time.h" +#include "mafianet/RakNetTime.h" #include "mafianet/GetTime.h" // Event handler to add ability to alter curvature diff --git a/DependentExtensions/SQLite3Plugin/Logger/ClientOnly/Samples/Simple/SQLiteClientLoggerSample.cpp b/DependentExtensions/SQLite3Plugin/Logger/ClientOnly/Samples/Simple/SQLiteClientLoggerSample.cpp index 6536cc4eb..27bba9e72 100644 --- a/DependentExtensions/SQLite3Plugin/Logger/ClientOnly/Samples/Simple/SQLiteClientLoggerSample.cpp +++ b/DependentExtensions/SQLite3Plugin/Logger/ClientOnly/Samples/Simple/SQLiteClientLoggerSample.cpp @@ -8,15 +8,15 @@ * license found in the license.txt file in the root directory of this source tree. */ -#include "mafianet/peerinterface.h" +#include "mafianet/RakPeerInterface.h" #include "SQLiteClientLoggerPlugin.h" #include "mafianet/BitStream.h" -#include "mafianet/sleep.h" +#include "mafianet/RakSleep.h" #include "mafianet/Kbhit.h" #include "mafianet/GetTime.h" #include "mafianet/PacketizedTCP.h" -#include "mafianet/types.h" +#include "mafianet/RakNetTypes.h" #include "mafianet/rand.h" #define M_PI 3.14159265358979323846 diff --git a/DependentExtensions/SQLite3Plugin/Logger/SQLiteLoggerCommon.cpp b/DependentExtensions/SQLite3Plugin/Logger/SQLiteLoggerCommon.cpp index cda36f80b..c3bef540c 100644 --- a/DependentExtensions/SQLite3Plugin/Logger/SQLiteLoggerCommon.cpp +++ b/DependentExtensions/SQLite3Plugin/Logger/SQLiteLoggerCommon.cpp @@ -10,8 +10,8 @@ #include "SQLiteLoggerCommon.h" #include "mafianet/BitStream.h" -#include "mafianet/linux_adapter.h" -#include "mafianet/osx_adapter.h" +#include "mafianet/LinuxAdapter.h" +#include "mafianet/OsxAdapter.h" using namespace MafiaNet; diff --git a/DependentExtensions/SQLite3Plugin/Logger/SQLiteLoggerCommon.h b/DependentExtensions/SQLite3Plugin/Logger/SQLiteLoggerCommon.h index af2046ab5..efd014c05 100644 --- a/DependentExtensions/SQLite3Plugin/Logger/SQLiteLoggerCommon.h +++ b/DependentExtensions/SQLite3Plugin/Logger/SQLiteLoggerCommon.h @@ -12,7 +12,7 @@ #define _SQLITE_LOGGER_COMMON_H #include -#include "mafianet/defines.h" +#include "mafianet/RakNetDefines.h" #include "mafianet/NativeTypes.h" namespace MafiaNet diff --git a/DependentExtensions/SQLite3Plugin/Logger/ServerOnly/SQLiteServerLoggerPlugin.cpp b/DependentExtensions/SQLite3Plugin/Logger/ServerOnly/SQLiteServerLoggerPlugin.cpp index 29fe1fc46..a96db266e 100644 --- a/DependentExtensions/SQLite3Plugin/Logger/ServerOnly/SQLiteServerLoggerPlugin.cpp +++ b/DependentExtensions/SQLite3Plugin/Logger/ServerOnly/SQLiteServerLoggerPlugin.cpp @@ -9,7 +9,7 @@ */ #include "SQLiteServerLoggerPlugin.h" -#include "mafianet/peerinterface.h" +#include "mafianet/RakPeerInterface.h" #include "mafianet/PacketizedTCP.h" #include "mafianet/MessageIdentifiers.h" #include "SQLiteLoggerCommon.h" @@ -29,7 +29,7 @@ #ifdef _MSC_VER #pragma warning(pop) #endif -#include "mafianet/linux_adapter.h" +#include "mafianet/LinuxAdapter.h" // http://web.utk.edu/~jplyon/sqlite/SQLite_optimization_FAQ.html diff --git a/DependentExtensions/SQLite3Plugin/Logger/ServerOnly/SQLiteServerLoggerSample.cpp b/DependentExtensions/SQLite3Plugin/Logger/ServerOnly/SQLiteServerLoggerSample.cpp index c415421a1..f280c6bce 100644 --- a/DependentExtensions/SQLite3Plugin/Logger/ServerOnly/SQLiteServerLoggerSample.cpp +++ b/DependentExtensions/SQLite3Plugin/Logger/ServerOnly/SQLiteServerLoggerSample.cpp @@ -8,10 +8,10 @@ * license found in the license.txt file in the root directory of this source tree. */ -#include "mafianet/peerinterface.h" +#include "mafianet/RakPeerInterface.h" #include "SQLiteServerLoggerPlugin.h" #include "mafianet/BitStream.h" -#include "mafianet/sleep.h" +#include "mafianet/RakSleep.h" #include "mafianet/Kbhit.h" #include "mafianet/GetTime.h" diff --git a/DependentExtensions/SQLite3Plugin/SQLite3ClientPlugin.h b/DependentExtensions/SQLite3Plugin/SQLite3ClientPlugin.h index ed2e33373..10889a09f 100644 --- a/DependentExtensions/SQLite3Plugin/SQLite3ClientPlugin.h +++ b/DependentExtensions/SQLite3Plugin/SQLite3ClientPlugin.h @@ -22,13 +22,13 @@ #ifndef ___SQLITE_3_CLIENT_PLUGIN_H #define ___SQLITE_3_CLIENT_PLUGIN_H -#include "mafianet/types.h" +#include "mafianet/RakNetTypes.h" #include "mafianet/Export.h" #include "mafianet/PluginInterface2.h" #include "mafianet/PacketPriority.h" #include "mafianet/SocketIncludes.h" #include "mafianet/DS_Multilist.h" -#include "mafianet/string.h" +#include "mafianet/RakString.h" #include "SQLite3PluginCommon.h" class RakPeerInterface; diff --git a/DependentExtensions/SQLite3Plugin/SQLite3PluginCommon.h b/DependentExtensions/SQLite3Plugin/SQLite3PluginCommon.h index ded68ef31..eec2aedf5 100644 --- a/DependentExtensions/SQLite3Plugin/SQLite3PluginCommon.h +++ b/DependentExtensions/SQLite3Plugin/SQLite3PluginCommon.h @@ -17,7 +17,7 @@ #define __SQL_LITE_3_PLUGIN_COMMON_H #include "mafianet/DS_Multilist.h" -#include "mafianet/string.h" +#include "mafianet/RakString.h" #include "mafianet/BitStream.h" /// \defgroup SQL_LITE_3_PLUGIN SQLite3Plugin diff --git a/DependentExtensions/SQLite3Plugin/SQLite3Sample.cpp b/DependentExtensions/SQLite3Plugin/SQLite3Sample.cpp index 93d421f99..3026cc96b 100644 --- a/DependentExtensions/SQLite3Plugin/SQLite3Sample.cpp +++ b/DependentExtensions/SQLite3Plugin/SQLite3Sample.cpp @@ -17,11 +17,11 @@ /// \brief A sample for the SQLite3Plugin, that creates a table to track connections on the server /// The SQLite3Plugin is used with SQLite version 3 to transmit over the network calls to sqlite3_exec -#include "mafianet/peerinterface.h" +#include "mafianet/RakPeerInterface.h" #include "SQLite3ServerPlugin.h" #include "SQLite3ClientPlugin.h" #include "mafianet/BitStream.h" -#include "mafianet/sleep.h" +#include "mafianet/RakSleep.h" #include "mafianet/Gets.h" #include "mafianet/Kbhit.h" #include "mafianet/GetTime.h" diff --git a/DependentExtensions/SQLite3Plugin/SQLite3ServerPlugin.h b/DependentExtensions/SQLite3Plugin/SQLite3ServerPlugin.h index 141677db5..d431dac4b 100644 --- a/DependentExtensions/SQLite3Plugin/SQLite3ServerPlugin.h +++ b/DependentExtensions/SQLite3Plugin/SQLite3ServerPlugin.h @@ -27,13 +27,13 @@ /// \ingroup SQL_LITE_3_PLUGIN #define SQLite3_STATEMENT_EXECUTE_THREADED -#include "mafianet/types.h" +#include "mafianet/RakNetTypes.h" #include "mafianet/Export.h" #include "mafianet/PluginInterface2.h" #include "mafianet/PacketPriority.h" #include "mafianet/SocketIncludes.h" #include "mafianet/DS_Multilist.h" -#include "mafianet/string.h" +#include "mafianet/RakString.h" #include "sqlite3.h" #include "SQLite3PluginCommon.h" diff --git a/README.md b/README.md index dce7edc12..996cd3bcd 100644 --- a/README.md +++ b/README.md @@ -116,7 +116,7 @@ Linux, flip the `#if defined(__linux__)` batching guards in `RakNetSocket2.cpp`, ### Basic Usage ```cpp -#include "mafianet/peerinterface.h" +#include "mafianet/RakPeerInterface.h" #include "mafianet/MessageIdentifiers.h" // Create a peer @@ -408,9 +408,9 @@ To debug a single test, run the binary directly with a filter: ### Version 0.10.0 - **Umbrella header `mafianet/mafianet.h`**: aggregates the core public headers (`RakPeerInterface`, types, message IDs, `PacketPriority`, `BitStream`, `GetTime`, `Statistics`) so the common path only needs `#include "mafianet/mafianet.h"`. Additive — granular headers remain; encryption headers are intentionally omitted (security stays opt-in via `InitializeSecurity()`) -- **Canonical type aliases** (`mafianet/aliases.h`): `PeerInterface` (`RakPeerInterface`), `Guid` (`RakNetGUID`), `Statistics` (`RakNetStatistics`), `UnassignedGuid`. `using` aliases denoting the same types, so old and new names interoperate; legacy names left untouched +- **Canonical type aliases** (`mafianet/Aliases.h`): `PeerInterface` (`RakPeerInterface`), `Guid` (`RakNetGUID`), `Statistics` (`RakNetStatistics`), `UnassignedGuid`. `using` aliases denoting the same types, so old and new names interoperate; legacy names left untouched - **RAII handles `Peer` & `PacketPtr`** (`mafianet/PeerHandle.h`): own a `RakPeerInterface` / received `Packet` and clean up on scope exit, removing manual `DestroyInstance` / `DeallocatePacket` bookkeeping. ChatExample client rewritten to use them -- **Thread-safe GUID value accessors** (`mafianet/guid_util.h`): `MafiaNet::to_string(const RakNetGUID&)` owns its buffer; `connected_address(...)` returns `std::optional` (sentinel → `nullopt`) +- **Thread-safe GUID value accessors** (`mafianet/GuidUtil.h`): `MafiaNet::to_string(const RakNetGUID&)` owns its buffer; `connected_address(...)` returns `std::optional` (sentinel → `nullopt`) - **`PointGridSectorizer`**: uniform point grid with O(1) `RemoveEntry`/`MoveEntry` via per-entry hash + swap-remove (early-out on same-cell moves), upsert add/move semantics, duplicate-free `GetEntries`, and edge-cell clamping. `GridSectorizer` left untouched - **Breaking — scoped enum classes**: the global `PacketPriority` / `PacketReliability` C enums are removed in favour of scoped `MafiaNet::Priority` / `MafiaNet::Reliability`. Enumerator order (and the wire field) is preserved, but call sites must update (`HIGH_PRIORITY` → `MafiaNet::Priority::High`, `RELIABLE_ORDERED` → `MafiaNet::Reliability::ReliableOrdered`); `NUMBER_OF_*` sentinels are now `constexpr` counts in `MafiaNet` - **Breaking — removed non-thread-safe `RakNetGUID::ToString(void)`** (shared static buffer); use `MafiaNet::to_string(g).c_str()` diff --git a/Samples/AutoPatcherServer_MySQL/AutopatcherServerTest_MySQL.cpp b/Samples/AutoPatcherServer_MySQL/AutopatcherServerTest_MySQL.cpp index 66f11ca6b..29d0f494d 100644 --- a/Samples/AutoPatcherServer_MySQL/AutopatcherServerTest_MySQL.cpp +++ b/Samples/AutoPatcherServer_MySQL/AutopatcherServerTest_MySQL.cpp @@ -19,7 +19,7 @@ #include "mafianet/Kbhit.h" #include "mafianet/GetTime.h" -#include "mafianet/peerinterface.h" +#include "mafianet/RakPeerInterface.h" #include "mafianet/MessageIdentifiers.h" #include "mafianet/BitStream.h" #include "mafianet/StringCompressor.h" @@ -29,8 +29,8 @@ #include "AutopatcherMySQLRepository.h" #include "mafianet/PacketizedTCP.h" #include "mafianet/Gets.h" -#include "mafianet/linux_adapter.h" -#include "mafianet/osx_adapter.h" +#include "mafianet/LinuxAdapter.h" +#include "mafianet/OsxAdapter.h" #ifdef _WIN32 #include "mafianet/WindowsIncludes.h" // Sleep diff --git a/Samples/AutopatcherClient/AutopatcherClientTest.cpp b/Samples/AutopatcherClient/AutopatcherClientTest.cpp index 3e2a9eca5..c2f9e2190 100644 --- a/Samples/AutopatcherClient/AutopatcherClientTest.cpp +++ b/Samples/AutopatcherClient/AutopatcherClientTest.cpp @@ -38,7 +38,7 @@ #endif #include "mafianet/GetTime.h" -#include "mafianet/peerinterface.h" +#include "mafianet/RakPeerInterface.h" #include "mafianet/MessageIdentifiers.h" #include "mafianet/BitStream.h" #include "mafianet/StringCompressor.h" @@ -50,9 +50,9 @@ #include "AutopatcherClient.h" #include "mafianet/AutopatcherPatchContext.h" #include "mafianet/Gets.h" -#include "mafianet/sleep.h" -#include "mafianet/linux_adapter.h" -#include "mafianet/osx_adapter.h" +#include "mafianet/RakSleep.h" +#include "mafianet/LinuxAdapter.h" +#include "mafianet/OsxAdapter.h" char WORKING_DIRECTORY[MAX_PATH]; char PATH_TO_XDELTA_EXE[MAX_PATH]; diff --git a/Samples/AutopatcherClientGFx3.0/AutopatcherClientGFx3Impl.cpp b/Samples/AutopatcherClientGFx3.0/AutopatcherClientGFx3Impl.cpp index 7d7882607..d3ded67ce 100644 --- a/Samples/AutopatcherClientGFx3.0/AutopatcherClientGFx3Impl.cpp +++ b/Samples/AutopatcherClientGFx3.0/AutopatcherClientGFx3Impl.cpp @@ -19,7 +19,7 @@ #include "mafianet/Kbhit.h" #include "mafianet/GetTime.h" -#include "mafianet/peerinterface.h" +#include "mafianet/RakPeerInterface.h" #include "mafianet/MessageIdentifiers.h" #include "mafianet/BitStream.h" #include "mafianet/StringCompressor.h" @@ -30,9 +30,9 @@ #include "mafianet/FileListTransfer.h" #include "AutopatcherClient.h" #include "mafianet/AutopatcherPatchContext.h" -#include "mafianet/sleep.h" -#include "mafianet/linux_adapter.h" -#include "mafianet/osx_adapter.h" +#include "mafianet/RakSleep.h" +#include "mafianet/LinuxAdapter.h" +#include "mafianet/OsxAdapter.h" #include "AutopatcherClientGFx3Impl.h" diff --git a/Samples/AutopatcherClientGFx3.0/AutopatcherClientGFx3Impl.h b/Samples/AutopatcherClientGFx3.0/AutopatcherClientGFx3Impl.h index 6ffeed524..cdfc1dff6 100644 --- a/Samples/AutopatcherClientGFx3.0/AutopatcherClientGFx3Impl.h +++ b/Samples/AutopatcherClientGFx3.0/AutopatcherClientGFx3Impl.h @@ -13,7 +13,7 @@ * license found in the license.txt file in the root directory of this source tree. */ -#include "mafianet/types.h" +#include "mafianet/RakNetTypes.h" #include "FxGameDelegate.h" namespace MafiaNet { diff --git a/Samples/AutopatcherClientRestarter/main.cpp b/Samples/AutopatcherClientRestarter/main.cpp index 450c2230d..a39547e51 100644 --- a/Samples/AutopatcherClientRestarter/main.cpp +++ b/Samples/AutopatcherClientRestarter/main.cpp @@ -27,8 +27,8 @@ #endif #include "mafianet/Gets.h" -#include "mafianet/linux_adapter.h" -#include "mafianet/osx_adapter.h" +#include "mafianet/LinuxAdapter.h" +#include "mafianet/OsxAdapter.h" #include diff --git a/Samples/AutopatcherClient_SelfScaling/AutopatcherClientTest.cpp b/Samples/AutopatcherClient_SelfScaling/AutopatcherClientTest.cpp index 43e83652e..2d8c4b938 100644 --- a/Samples/AutopatcherClient_SelfScaling/AutopatcherClientTest.cpp +++ b/Samples/AutopatcherClient_SelfScaling/AutopatcherClientTest.cpp @@ -28,12 +28,12 @@ #include "mafianet/Kbhit.h" #include "mafianet/GetTime.h" -#include "mafianet/peerinterface.h" +#include "mafianet/RakPeerInterface.h" #include "mafianet/MessageIdentifiers.h" #include "mafianet/BitStream.h" #include "mafianet/StringCompressor.h" #include "mafianet/PacketizedTCP.h" -#include "mafianet/socket2.h" +#include "mafianet/RakNetSocket2.h" // Client only includes #include "mafianet/FileListTransferCBInterface.h" @@ -41,10 +41,10 @@ #include "AutopatcherClient.h" #include "mafianet/AutopatcherPatchContext.h" #include "mafianet/Gets.h" -#include "mafianet/sleep.h" +#include "mafianet/RakSleep.h" #include "mafianet/CloudClient.h" -#include "mafianet/linux_adapter.h" -#include "mafianet/osx_adapter.h" +#include "mafianet/LinuxAdapter.h" +#include "mafianet/OsxAdapter.h" void GetServers(MafiaNet::CloudClient *cloudClient, MafiaNet::RakNetGUID serverGuid); void GetClientSubscription(MafiaNet::CloudClient *cloudClient, MafiaNet::RakNetGUID serverGuid); diff --git a/Samples/AutopatcherServer/AutopatcherServerTest.cpp b/Samples/AutopatcherServer/AutopatcherServerTest.cpp index fe29100ad..49f54a066 100644 --- a/Samples/AutopatcherServer/AutopatcherServerTest.cpp +++ b/Samples/AutopatcherServer/AutopatcherServerTest.cpp @@ -35,7 +35,7 @@ #include "mafianet/Kbhit.h" #include "mafianet/GetTime.h" -#include "mafianet/peerinterface.h" +#include "mafianet/RakPeerInterface.h" #include "mafianet/MessageIdentifiers.h" #include "mafianet/BitStream.h" #include "mafianet/StringCompressor.h" @@ -43,8 +43,8 @@ #include "mafianet/FileList.h" // FLP_Printf #include "mafianet/PacketizedTCP.h" #include "mafianet/Gets.h" -#include "mafianet/linux_adapter.h" -#include "mafianet/osx_adapter.h" +#include "mafianet/LinuxAdapter.h" +#include "mafianet/OsxAdapter.h" // Server only includes #include "AutopatcherServer.h" diff --git a/Samples/AutopatcherServer_SelfScaling/main.cpp b/Samples/AutopatcherServer_SelfScaling/main.cpp index f8436cac0..c72825eb8 100644 --- a/Samples/AutopatcherServer_SelfScaling/main.cpp +++ b/Samples/AutopatcherServer_SelfScaling/main.cpp @@ -31,7 +31,7 @@ #include "mafianet/Kbhit.h" #include "mafianet/GetTime.h" -#include "mafianet/peerinterface.h" +#include "mafianet/RakPeerInterface.h" #include "mafianet/MessageIdentifiers.h" #include "mafianet/BitStream.h" #include "mafianet/StringCompressor.h" @@ -44,15 +44,15 @@ #include "mafianet/TwoWayAuthentication.h" #include "mafianet/CloudClient.h" #include "mafianet/DynDNS.h" -#include "mafianet/peerinterface.h" -#include "mafianet/sleep.h" +#include "mafianet/RakPeerInterface.h" +#include "mafianet/RakSleep.h" #include "mafianet/ConnectionGraph2.h" #include "CloudServerHelper.h" #include "mafianet/HTTPConnection2.h" #include "Rackspace2.h" #include "mafianet/GetTime.h" -#include "mafianet/linux_adapter.h" -#include "mafianet/osx_adapter.h" +#include "mafianet/LinuxAdapter.h" +#include "mafianet/OsxAdapter.h" // See http://www.digip.org/jansson/doc/2.4/ // This is used to make it easier to parse the JSON returned from the master server #include "jansson.h" diff --git a/Samples/BigPacketTest/BigPacketTest.cpp b/Samples/BigPacketTest/BigPacketTest.cpp index e7719b4f5..116c7c77f 100644 --- a/Samples/BigPacketTest/BigPacketTest.cpp +++ b/Samples/BigPacketTest/BigPacketTest.cpp @@ -13,20 +13,20 @@ * license found in the license.txt file in the root directory of this source tree. */ -#include "mafianet/peerinterface.h" +#include "mafianet/RakPeerInterface.h" #include "mafianet/BitStream.h" #include // For atoi #include // For strlen -#include "mafianet/statistics.h" +#include "mafianet/RakNetStatistics.h" #include "mafianet/GetTime.h" #include "mafianet/MessageIdentifiers.h" #include "mafianet/MTUSize.h" #include #include "mafianet/Kbhit.h" -#include "mafianet/sleep.h" +#include "mafianet/RakSleep.h" #include "mafianet/Gets.h" -#include "mafianet/linux_adapter.h" -#include "mafianet/osx_adapter.h" +#include "mafianet/LinuxAdapter.h" +#include "mafianet/OsxAdapter.h" bool quit; bool sentPacket=false; diff --git a/Samples/BurstTest/BurstTest.cpp b/Samples/BurstTest/BurstTest.cpp index 618b62d64..86e64e2c2 100644 --- a/Samples/BurstTest/BurstTest.cpp +++ b/Samples/BurstTest/BurstTest.cpp @@ -13,7 +13,7 @@ * license found in the license.txt file in the root directory of this source tree. */ -#include "mafianet/peerinterface.h" +#include "mafianet/RakPeerInterface.h" #include "mafianet/GetTime.h" #include "mafianet/MessageIdentifiers.h" #include "mafianet/BitStream.h" @@ -22,16 +22,16 @@ #include #include #include "mafianet/Rand.h" -#include "mafianet/statistics.h" -#include "mafianet/sleep.h" -#include "mafianet/memoryoverride.h" +#include "mafianet/RakNetStatistics.h" +#include "mafianet/RakSleep.h" +#include "mafianet/RakMemoryOverride.h" #include #include // used for std::numeric_limits #include "mafianet/Gets.h" #include "mafianet/Kbhit.h" -#include "mafianet/sleep.h" -#include "mafianet/linux_adapter.h" -#include "mafianet/osx_adapter.h" +#include "mafianet/RakSleep.h" +#include "mafianet/LinuxAdapter.h" +#include "mafianet/OsxAdapter.h" using namespace MafiaNet; diff --git a/Samples/ChatExample/Client/Chat Example Client.cpp b/Samples/ChatExample/Client/Chat Example Client.cpp index d04119404..49110ca88 100644 --- a/Samples/ChatExample/Client/Chat Example Client.cpp +++ b/Samples/ChatExample/Client/Chat Example Client.cpp @@ -21,10 +21,10 @@ #include "mafianet/MessageIdentifiers.h" -#include "mafianet/peerinterface.h" +#include "mafianet/RakPeerInterface.h" #include "mafianet/PeerHandle.h" -#include "mafianet/statistics.h" -#include "mafianet/types.h" +#include "mafianet/RakNetStatistics.h" +#include "mafianet/RakNetTypes.h" #include "mafianet/BitStream.h" #include "mafianet/PacketLogger.h" #include @@ -32,7 +32,7 @@ #include #include #include // used for std::numeric_limits -#include "mafianet/types.h" +#include "mafianet/RakNetTypes.h" #include "mafianet/Kbhit.h" #ifdef _WIN32 #include "mafianet/WindowsIncludes.h" // Sleep @@ -40,9 +40,9 @@ #include // usleep #endif #include "mafianet/Gets.h" -#include "mafianet/linux_adapter.h" -#include "mafianet/osx_adapter.h" -#include "mafianet/guid_util.h" +#include "mafianet/LinuxAdapter.h" +#include "mafianet/OsxAdapter.h" +#include "mafianet/GuidUtil.h" #if LIBCAT_SECURITY==1 #include "mafianet/SecureHandshake.h" // Include header for secure handshake diff --git a/Samples/ChatExample/Server/Chat Example Server.cpp b/Samples/ChatExample/Server/Chat Example Server.cpp index 5c424f8ba..d2d6f4149 100644 --- a/Samples/ChatExample/Server/Chat Example Server.cpp +++ b/Samples/ChatExample/Server/Chat Example Server.cpp @@ -21,11 +21,11 @@ #include "mafianet/MessageIdentifiers.h" -#include "mafianet/peerinterface.h" -#include "mafianet/statistics.h" -#include "mafianet/types.h" +#include "mafianet/RakPeerInterface.h" +#include "mafianet/RakNetStatistics.h" +#include "mafianet/RakNetTypes.h" #include "mafianet/BitStream.h" -#include "mafianet/sleep.h" +#include "mafianet/RakSleep.h" #include "mafianet/PacketLogger.h" #include #include @@ -36,9 +36,9 @@ #include #include #include "mafianet/Gets.h" -#include "mafianet/linux_adapter.h" -#include "mafianet/osx_adapter.h" -#include "mafianet/guid_util.h" +#include "mafianet/LinuxAdapter.h" +#include "mafianet/OsxAdapter.h" +#include "mafianet/GuidUtil.h" #if LIBCAT_SECURITY==1 #include "mafianet/SecureHandshake.h" // Include header for secure handshake diff --git a/Samples/CloudClient/CloudClientSample.cpp b/Samples/CloudClient/CloudClientSample.cpp index 0eb8fe4d3..19ac9193e 100644 --- a/Samples/CloudClient/CloudClientSample.cpp +++ b/Samples/CloudClient/CloudClientSample.cpp @@ -16,8 +16,8 @@ #include "mafianet/MessageIdentifiers.h" #include "mafianet/BitStream.h" #include "mafianet/CloudClient.h" -#include "mafianet/peerinterface.h" -#include "mafianet/sleep.h" +#include "mafianet/RakPeerInterface.h" +#include "mafianet/RakSleep.h" #include #include // used for std::numeric_limits diff --git a/Samples/CloudServer/CloudServerHelper.cpp b/Samples/CloudServer/CloudServerHelper.cpp index 1ee331a67..90d331771 100644 --- a/Samples/CloudServer/CloudServerHelper.cpp +++ b/Samples/CloudServer/CloudServerHelper.cpp @@ -14,7 +14,7 @@ */ #include "CloudServerHelper.h" -#include "mafianet/sleep.h" +#include "mafianet/RakSleep.h" #include "mafianet/Gets.h" #include "mafianet/MessageIdentifiers.h" @@ -24,12 +24,12 @@ #include "mafianet/CloudClient.h" #include "mafianet/DynDNS.h" #include "mafianet/SocketLayer.h" -#include "mafianet/peerinterface.h" +#include "mafianet/RakPeerInterface.h" #include "mafianet/ConnectionGraph2.h" #include #include // used for std::numeric_limits -#include "mafianet/linux_adapter.h" -#include "mafianet/osx_adapter.h" +#include "mafianet/LinuxAdapter.h" +#include "mafianet/OsxAdapter.h" using namespace MafiaNet; #define CLOUD_SERVER_CONNECTION_COUNT_PRIMARY_KEY "CloudConnCount" diff --git a/Samples/CloudServer/CloudServerSample.cpp b/Samples/CloudServer/CloudServerSample.cpp index cbff08835..668d42d42 100644 --- a/Samples/CloudServer/CloudServerSample.cpp +++ b/Samples/CloudServer/CloudServerSample.cpp @@ -20,8 +20,8 @@ #include "mafianet/TwoWayAuthentication.h" #include "mafianet/CloudClient.h" #include "mafianet/DynDNS.h" -#include "mafianet/peerinterface.h" -#include "mafianet/sleep.h" +#include "mafianet/RakPeerInterface.h" +#include "mafianet/RakSleep.h" #include "mafianet/ConnectionGraph2.h" int main(int argc, char **argv) diff --git a/Samples/CloudTest/CloudTest.cpp b/Samples/CloudTest/CloudTest.cpp index e86db3f7f..9f403e4a4 100644 --- a/Samples/CloudTest/CloudTest.cpp +++ b/Samples/CloudTest/CloudTest.cpp @@ -13,10 +13,10 @@ * license found in the license.txt file in the root directory of this source tree. */ -#include "mafianet/peerinterface.h" +#include "mafianet/RakPeerInterface.h" #include "mafianet/BitStream.h" #include "mafianet/GetTime.h" -#include "mafianet/sleep.h" +#include "mafianet/RakSleep.h" #include "mafianet/Gets.h" #include "mafianet/MessageIdentifiers.h" #include "mafianet/CloudServer.h" diff --git a/Samples/CommandConsoleClient/main.cpp b/Samples/CommandConsoleClient/main.cpp index 6ab352aab..1636b3563 100644 --- a/Samples/CommandConsoleClient/main.cpp +++ b/Samples/CommandConsoleClient/main.cpp @@ -13,7 +13,7 @@ * license found in the license.txt file in the root directory of this source tree. */ -#include "mafianet/peerinterface.h" +#include "mafianet/RakPeerInterface.h" #include "mafianet/MessageIdentifiers.h" #include "mafianet/BitStream.h" @@ -27,9 +27,9 @@ #else #include // usleep #include -#include "mafianet/linux_adapter.h" +#include "mafianet/LinuxAdapter.h" #include "mafianet/LinuxStrings.h" -#include "mafianet/osx_adapter.h" +#include "mafianet/OsxAdapter.h" //linux doesn't have stricmp but strcasecmp is same functionality #define stricmp strcasecmp diff --git a/Samples/CommandConsoleServer/main.cpp b/Samples/CommandConsoleServer/main.cpp index 58d542848..5a9820d50 100644 --- a/Samples/CommandConsoleServer/main.cpp +++ b/Samples/CommandConsoleServer/main.cpp @@ -19,13 +19,13 @@ #include "mafianet/TCPInterface.h" #include "mafianet/ConsoleServer.h" -#include "mafianet/commandparser.h" +#include "mafianet/RakNetCommandParser.h" #include "mafianet/TelnetTransport.h" -#include "mafianet/peerinterface.h" +#include "mafianet/RakPeerInterface.h" #include "mafianet/LogCommandParser.h" #include "mafianet/GetTime.h" -#include "mafianet/transport2.h" +#include "mafianet/RakNetTransport2.h" #include "mafianet/LinuxStrings.h" #include diff --git a/Samples/ComprehensivePCGame/ComprehensivePCGame.cpp b/Samples/ComprehensivePCGame/ComprehensivePCGame.cpp index 1a45af720..7faf8670a 100644 --- a/Samples/ComprehensivePCGame/ComprehensivePCGame.cpp +++ b/Samples/ComprehensivePCGame/ComprehensivePCGame.cpp @@ -19,13 +19,13 @@ #include // used for std::numeric_limits #include "mafianet/GetTime.h" #include "mafianet/Rand.h" -#include "mafianet/peerinterface.h" +#include "mafianet/RakPeerInterface.h" #include "mafianet/MessageIdentifiers.h" #include "mafianet/FullyConnectedMesh2.h" #include "mafianet/TeamManager.h" #include "mafianet/Kbhit.h" -#include "mafianet/sleep.h" -#include "mafianet/types.h" +#include "mafianet/RakSleep.h" +#include "mafianet/RakNetTypes.h" #include "mafianet/BitStream.h" #include "mafianet/SocketLayer.h" #include "mafianet/ReplicaManager3.h" @@ -42,10 +42,10 @@ #include "mafianet/PacketLogger.h" #include "mafianet/RPC4Plugin.h" #include "mafianet/HTTPConnection2.h" -#include "mafianet/linux_adapter.h" -#include "mafianet/osx_adapter.h" +#include "mafianet/LinuxAdapter.h" +#include "mafianet/OsxAdapter.h" #include "mafianet/LinuxStrings.h" -#include "mafianet/guid_util.h" +#include "mafianet/GuidUtil.h" // See http://www.digip.org/jansson/doc/2.4/ // This is used to make it easier to parse the JSON returned from the master server #include "jansson.h" diff --git a/Samples/ComprehensiveTest/ComprehensiveTest.cpp b/Samples/ComprehensiveTest/ComprehensiveTest.cpp index 60fabf9b8..671ee72ec 100644 --- a/Samples/ComprehensiveTest/ComprehensiveTest.cpp +++ b/Samples/ComprehensiveTest/ComprehensiveTest.cpp @@ -13,18 +13,18 @@ * license found in the license.txt file in the root directory of this source tree. */ -#include "mafianet/peerinterface.h" +#include "mafianet/RakPeerInterface.h" #include "mafianet/BitStream.h" #include // For atoi #include // For strlen #include "mafianet/Rand.h" -#include "mafianet/statistics.h" +#include "mafianet/RakNetStatistics.h" #include "mafianet/MessageIdentifiers.h" #include #include "mafianet/GetTime.h" -#include "mafianet/linux_adapter.h" -#include "mafianet/osx_adapter.h" +#include "mafianet/LinuxAdapter.h" +#include "mafianet/OsxAdapter.h" using namespace MafiaNet; #ifdef _WIN32 diff --git a/Samples/CrashReporter/CrashReporter.cpp b/Samples/CrashReporter/CrashReporter.cpp index 193f4a54d..bdd90fffd 100644 --- a/Samples/CrashReporter/CrashReporter.cpp +++ b/Samples/CrashReporter/CrashReporter.cpp @@ -32,8 +32,8 @@ #include "mafianet/FileList.h" #include "mafianet/FileOperations.h" #include "mafianet/SimpleMutex.h" -#include "mafianet/linux_adapter.h" -#include "mafianet/osx_adapter.h" +#include "mafianet/LinuxAdapter.h" +#include "mafianet/OsxAdapter.h" using namespace MafiaNet; diff --git a/Samples/CrashReporter/CrashReporter.h b/Samples/CrashReporter/CrashReporter.h index 0347e91ba..0af9bb9b4 100644 --- a/Samples/CrashReporter/CrashReporter.h +++ b/Samples/CrashReporter/CrashReporter.h @@ -65,7 +65,7 @@ // #include "DbgHelp.h" // Link with Dbghelp.lib ws2_32.lib -#include "mafianet/defines.h" // provides the MNet short-hand alias for the MafiaNet namespace +#include "mafianet/RakNetDefines.h" // provides the MNet short-hand alias for the MafiaNet namespace namespace MafiaNet { // Possible actions to take on a crash. If you want to restart the app as well, see the CrashRelauncher sample. diff --git a/Samples/CrashReporter/SendFileTo.cpp b/Samples/CrashReporter/SendFileTo.cpp index 25cf445ae..8f8bf7426 100644 --- a/Samples/CrashReporter/SendFileTo.cpp +++ b/Samples/CrashReporter/SendFileTo.cpp @@ -19,8 +19,8 @@ #include #include #include -#include "mafianet/linux_adapter.h" -#include "mafianet/osx_adapter.h" +#include "mafianet/LinuxAdapter.h" +#include "mafianet/OsxAdapter.h" bool CSendFileTo::SendMail(HWND hWndParent, const char *strAttachmentFilePath, const char *strAttachmentFileName, const char *strSubject, const char *strBody, const char *strRecipient) { diff --git a/Samples/CrossConnectionTest/CrossConnectionTest.cpp b/Samples/CrossConnectionTest/CrossConnectionTest.cpp index 9c0278d60..0377172d7 100644 --- a/Samples/CrossConnectionTest/CrossConnectionTest.cpp +++ b/Samples/CrossConnectionTest/CrossConnectionTest.cpp @@ -17,13 +17,13 @@ /// \brief Tests connecting two peers at the same time with the internet simulator running. -#include "mafianet/peerinterface.h" +#include "mafianet/RakPeerInterface.h" #include "mafianet/PacketLogger.h" #include "mafianet/Rand.h" #include "mafianet/Kbhit.h" #include // Printf -#include "mafianet/sleep.h" +#include "mafianet/RakSleep.h" #include "mafianet/MessageIdentifiers.h" #include "mafianet/BitStream.h" #include "mafianet/GetTime.h" diff --git a/Samples/DirectoryDeltaTransfer/DirectoryDeltaTransfer.cpp b/Samples/DirectoryDeltaTransfer/DirectoryDeltaTransfer.cpp index 58e992c03..0a0bb5bc3 100644 --- a/Samples/DirectoryDeltaTransfer/DirectoryDeltaTransfer.cpp +++ b/Samples/DirectoryDeltaTransfer/DirectoryDeltaTransfer.cpp @@ -14,9 +14,9 @@ */ #include "mafianet/GetTime.h" -#include "mafianet/peerinterface.h" +#include "mafianet/RakPeerInterface.h" #include "mafianet/MessageIdentifiers.h" -#include "mafianet/statistics.h" +#include "mafianet/RakNetStatistics.h" #include "mafianet/DirectoryDeltaTransfer.h" #include "mafianet/FileListTransfer.h" #include "mafianet/FileList.h" diff --git a/Samples/DirectoryDeltaTransfer/DirectoryDeltaTransferTest.cpp b/Samples/DirectoryDeltaTransfer/DirectoryDeltaTransferTest.cpp index b168c90c1..98a42b745 100644 --- a/Samples/DirectoryDeltaTransfer/DirectoryDeltaTransferTest.cpp +++ b/Samples/DirectoryDeltaTransfer/DirectoryDeltaTransferTest.cpp @@ -14,9 +14,9 @@ */ #include "mafianet/GetTime.h" -#include "mafianet/peerinterface.h" +#include "mafianet/RakPeerInterface.h" #include "mafianet/MessageIdentifiers.h" -#include "mafianet/statistics.h" +#include "mafianet/RakNetStatistics.h" #include "mafianet/DirectoryDeltaTransfer.h" #include "mafianet/FileListTransfer.h" #include @@ -26,12 +26,12 @@ #include "mafianet/FileList.h" #include "mafianet/DataCompressor.h" #include "mafianet/FileListTransferCBInterface.h" -#include "mafianet/sleep.h" +#include "mafianet/RakSleep.h" #include "mafianet/IncrementalReadInterface.h" #include "mafianet/PacketizedTCP.h" #include "mafianet/Gets.h" -#include "mafianet/linux_adapter.h" -#include "mafianet/osx_adapter.h" +#include "mafianet/LinuxAdapter.h" +#include "mafianet/OsxAdapter.h" #ifdef _WIN32 #include "mafianet/WindowsIncludes.h" // Sleep diff --git a/Samples/DroppedConnectionTest/DroppedConnectionTest.cpp b/Samples/DroppedConnectionTest/DroppedConnectionTest.cpp index 7bd6b8f6d..f80af05b3 100644 --- a/Samples/DroppedConnectionTest/DroppedConnectionTest.cpp +++ b/Samples/DroppedConnectionTest/DroppedConnectionTest.cpp @@ -13,10 +13,10 @@ * license found in the license.txt file in the root directory of this source tree. */ -#include "mafianet/peerinterface.h" +#include "mafianet/RakPeerInterface.h" #include "mafianet/Rand.h" // randomMT #include "mafianet/MessageIdentifiers.h" // Enumerations -#include "mafianet/types.h" // SystemAddress +#include "mafianet/RakNetTypes.h" // SystemAddress #include "mafianet/Kbhit.h" #include "mafianet/Gets.h" #include diff --git a/Samples/Encryption/Encryption.cpp b/Samples/Encryption/Encryption.cpp index dc84cb506..7cd36a450 100644 --- a/Samples/Encryption/Encryption.cpp +++ b/Samples/Encryption/Encryption.cpp @@ -19,18 +19,18 @@ #include "mafianet/GetTime.h" #include "mafianet/Rand.h" #include "mafianet/Rand.h" -#include "mafianet/peerinterface.h" +#include "mafianet/RakPeerInterface.h" #include "mafianet/MessageIdentifiers.h" -#include "mafianet/types.h" +#include "mafianet/RakNetTypes.h" #include "mafianet/NativeFeatureIncludes.h" #include -#include "mafianet/sleep.h" +#include "mafianet/RakSleep.h" #include "mafianet/BitStream.h" #include "mafianet/SecureHandshake.h" // Include header for secure handshake #include "mafianet/Gets.h" -#include "mafianet/linux_adapter.h" -#include "mafianet/osx_adapter.h" +#include "mafianet/LinuxAdapter.h" +#include "mafianet/OsxAdapter.h" using namespace MafiaNet; #if LIBCAT_SECURITY!=1 diff --git a/Samples/FCMHost/FCM2HostTest.cpp b/Samples/FCMHost/FCM2HostTest.cpp index 142a8a861..4778cc303 100644 --- a/Samples/FCMHost/FCM2HostTest.cpp +++ b/Samples/FCMHost/FCM2HostTest.cpp @@ -17,10 +17,10 @@ #include #include #include "mafianet/GetTime.h" -#include "mafianet/peerinterface.h" +#include "mafianet/RakPeerInterface.h" #include "mafianet/MessageIdentifiers.h" -#include "mafianet/types.h" -#include "mafianet/sleep.h" +#include "mafianet/RakNetTypes.h" +#include "mafianet/RakSleep.h" #include "mafianet/FullyConnectedMesh2.h" #include "mafianet/ConnectionGraph2.h" #include @@ -28,7 +28,7 @@ #include "mafianet/Kbhit.h" #include "mafianet/PacketLogger.h" #include "mafianet/BitStream.h" -#include "mafianet/guid_util.h" +#include "mafianet/GuidUtil.h" using namespace MafiaNet; diff --git a/Samples/FCMHostSimultaneous/FCM2HostSimultaneousTest.cpp b/Samples/FCMHostSimultaneous/FCM2HostSimultaneousTest.cpp index 5907e5b01..a552542cf 100644 --- a/Samples/FCMHostSimultaneous/FCM2HostSimultaneousTest.cpp +++ b/Samples/FCMHostSimultaneous/FCM2HostSimultaneousTest.cpp @@ -17,11 +17,11 @@ #include #include #include "mafianet/GetTime.h" -#include "mafianet/peerinterface.h" +#include "mafianet/RakPeerInterface.h" #include "mafianet/MessageIdentifiers.h" -#include "mafianet/types.h" -#include "mafianet/sleep.h" +#include "mafianet/RakNetTypes.h" +#include "mafianet/RakSleep.h" #include "mafianet/FullyConnectedMesh2.h" #include "mafianet/ConnectionGraph2.h" #include @@ -29,7 +29,7 @@ #include "mafianet/Kbhit.h" #include "mafianet/PacketLogger.h" #include "mafianet/Gets.h" -#include "mafianet/guid_util.h" +#include "mafianet/GuidUtil.h" using namespace MafiaNet; diff --git a/Samples/FCMVerifiedJoinSimultaneous/FCM2VerifiedJoinSimultaneousTest.cpp b/Samples/FCMVerifiedJoinSimultaneous/FCM2VerifiedJoinSimultaneousTest.cpp index b2c1f0d00..3f450055c 100644 --- a/Samples/FCMVerifiedJoinSimultaneous/FCM2VerifiedJoinSimultaneousTest.cpp +++ b/Samples/FCMVerifiedJoinSimultaneous/FCM2VerifiedJoinSimultaneousTest.cpp @@ -17,10 +17,10 @@ #include #include #include "mafianet/GetTime.h" -#include "mafianet/peerinterface.h" +#include "mafianet/RakPeerInterface.h" #include "mafianet/MessageIdentifiers.h" -#include "mafianet/types.h" -#include "mafianet/sleep.h" +#include "mafianet/RakNetTypes.h" +#include "mafianet/RakSleep.h" #include "mafianet/FullyConnectedMesh2.h" #include "mafianet/ConnectionGraph2.h" #include @@ -29,7 +29,7 @@ #include "mafianet/PacketLogger.h" #include "mafianet/Gets.h" #include "mafianet/BitStream.h" -#include "mafianet/guid_util.h" +#include "mafianet/GuidUtil.h" using namespace MafiaNet; diff --git a/Samples/FileListTransfer/main.cpp b/Samples/FileListTransfer/main.cpp index 7a8ff1531..8b839df21 100644 --- a/Samples/FileListTransfer/main.cpp +++ b/Samples/FileListTransfer/main.cpp @@ -13,23 +13,23 @@ * license found in the license.txt file in the root directory of this source tree. */ -#include "mafianet/peerinterface.h" +#include "mafianet/RakPeerInterface.h" #include "mafianet/FileListTransfer.h" -#include "mafianet/sleep.h" +#include "mafianet/RakSleep.h" #include "mafianet/MessageIdentifiers.h" #include "mafianet/FileListTransferCBInterface.h" #include "mafianet/FileOperations.h" #include "mafianet/SuperFastHash.h" -#include "mafianet/assert.h" +#include "mafianet/RakAssert.h" #include "mafianet/BitStream.h" #include "mafianet/IncrementalReadInterface.h" #include "mafianet/PacketizedTCP.h" #include "mafianet/SocketLayer.h" #include #include "mafianet/Gets.h" -#include "mafianet/linux_adapter.h" -#include "mafianet/osx_adapter.h" +#include "mafianet/LinuxAdapter.h" +#include "mafianet/OsxAdapter.h" MafiaNet::RakString file; MafiaNet::RakString fileCopy; diff --git a/Samples/FlowControlTest/FlowControlTest.cpp b/Samples/FlowControlTest/FlowControlTest.cpp index 446a51d28..05078347e 100644 --- a/Samples/FlowControlTest/FlowControlTest.cpp +++ b/Samples/FlowControlTest/FlowControlTest.cpp @@ -13,10 +13,10 @@ * license found in the license.txt file in the root directory of this source tree. */ -#include "mafianet/peerinterface.h" +#include "mafianet/RakPeerInterface.h" #include "mafianet/GetTime.h" #include "mafianet/MessageIdentifiers.h" -#include "mafianet/statistics.h" +#include "mafianet/RakNetStatistics.h" #include #include #include @@ -24,8 +24,8 @@ #include // used for std::numeric_limits #include "mafianet/Gets.h" #include "mafianet/Kbhit.h" -#include "mafianet/linux_adapter.h" -#include "mafianet/osx_adapter.h" +#include "mafianet/LinuxAdapter.h" +#include "mafianet/OsxAdapter.h" using namespace MafiaNet; diff --git a/Samples/FullyConnectedMesh/FCMTest.cpp b/Samples/FullyConnectedMesh/FCMTest.cpp index 6e382fc96..e7990528d 100644 --- a/Samples/FullyConnectedMesh/FCMTest.cpp +++ b/Samples/FullyConnectedMesh/FCMTest.cpp @@ -18,14 +18,14 @@ #include #include "mafianet/GetTime.h" #include "mafianet/Rand.h" -#include "mafianet/peerinterface.h" +#include "mafianet/RakPeerInterface.h" #include "mafianet/MessageIdentifiers.h" #include "mafianet/FullyConnectedMesh2.h" #include "mafianet/ConnectionGraph2.h" #include #include "mafianet/Kbhit.h" -#include "mafianet/sleep.h" +#include "mafianet/RakSleep.h" static const unsigned short NUM_PEERS=8; MafiaNet::RakPeerInterface *rakPeer[NUM_PEERS]; diff --git a/Samples/LANServerDiscovery/LANServerDiscovery.cpp b/Samples/LANServerDiscovery/LANServerDiscovery.cpp index be0bbba1e..330821f2c 100644 --- a/Samples/LANServerDiscovery/LANServerDiscovery.cpp +++ b/Samples/LANServerDiscovery/LANServerDiscovery.cpp @@ -20,9 +20,9 @@ // ---------------------------------------------------------------------- #include "mafianet/MessageIdentifiers.h" -#include "mafianet/peerinterface.h" -#include "mafianet/peerinterface.h" -#include "mafianet/types.h" +#include "mafianet/RakPeerInterface.h" +#include "mafianet/RakPeerInterface.h" +#include "mafianet/RakNetTypes.h" #include "mafianet/GetTime.h" #include "mafianet/BitStream.h" #include @@ -30,11 +30,11 @@ #include #include #include // used for std::numeric_limits -#include "mafianet/sleep.h" +#include "mafianet/RakSleep.h" #include "mafianet/Gets.h" -#include "mafianet/linux_adapter.h" -#include "mafianet/osx_adapter.h" -#include "mafianet/guid_util.h" +#include "mafianet/LinuxAdapter.h" +#include "mafianet/OsxAdapter.h" +#include "mafianet/GuidUtil.h" int main(void) { diff --git a/Samples/Lobby2Client/Lobby2ClientSample.cpp b/Samples/Lobby2Client/Lobby2ClientSample.cpp index 8aaacd313..44ad98dce 100644 --- a/Samples/Lobby2Client/Lobby2ClientSample.cpp +++ b/Samples/Lobby2Client/Lobby2ClientSample.cpp @@ -14,12 +14,12 @@ */ #include "Lobby2Message.h" -#include "mafianet/peerinterface.h" +#include "mafianet/RakPeerInterface.h" #include "mafianet/MessageIdentifiers.h" #include "Lobby2Client.h" #include "mafianet/Kbhit.h" -#include "mafianet/sleep.h" +#include "mafianet/RakSleep.h" #include "RoomsErrorCodes.h" #include "mafianet/DS_Queue.h" #include @@ -27,8 +27,8 @@ #include // used for std::numeric_limits #include "mafianet/LinuxStrings.h" #include "mafianet/Gets.h" -#include "mafianet/linux_adapter.h" -#include "mafianet/osx_adapter.h" +#include "mafianet/LinuxAdapter.h" +#include "mafianet/OsxAdapter.h" static const int NUM_CONNECTIONS=2; MafiaNet::Lobby2Client lobby2Client[NUM_CONNECTIONS]; diff --git a/Samples/Lobby2ClientGFx3.0/Lobby2ClientGFx3Impl.cpp b/Samples/Lobby2ClientGFx3.0/Lobby2ClientGFx3Impl.cpp index 79146f6cc..6f51c0fb7 100644 --- a/Samples/Lobby2ClientGFx3.0/Lobby2ClientGFx3Impl.cpp +++ b/Samples/Lobby2ClientGFx3.0/Lobby2ClientGFx3Impl.cpp @@ -18,7 +18,7 @@ #include #include "mafianet/GetTime.h" -#include "mafianet/peerinterface.h" +#include "mafianet/RakPeerInterface.h" #include "mafianet/MessageIdentifiers.h" #include "mafianet/BitStream.h" #include "Lobby2ClientGFx3Impl.h" diff --git a/Samples/Lobby2ClientGFx3.0/Lobby2ClientGFx3Impl.h b/Samples/Lobby2ClientGFx3.0/Lobby2ClientGFx3Impl.h index 0a7ce10cb..eca2b17f8 100644 --- a/Samples/Lobby2ClientGFx3.0/Lobby2ClientGFx3Impl.h +++ b/Samples/Lobby2ClientGFx3.0/Lobby2ClientGFx3Impl.h @@ -17,7 +17,7 @@ #define __LOBBY_2_CLIENT_GFX3_IMPL_H #include "mafianet/WindowsIncludes.h" -#include "mafianet/types.h" +#include "mafianet/RakNetTypes.h" #include "FxGameDelegate.h" #include "Lobby2Message.h" #include "mafianet/PluginInterface2.h" diff --git a/Samples/Lobby2Server_PGSQL/Lobby2ServerSample_PGSQL.cpp b/Samples/Lobby2Server_PGSQL/Lobby2ServerSample_PGSQL.cpp index bd2d48481..f28309fd8 100644 --- a/Samples/Lobby2Server_PGSQL/Lobby2ServerSample_PGSQL.cpp +++ b/Samples/Lobby2Server_PGSQL/Lobby2ServerSample_PGSQL.cpp @@ -14,11 +14,11 @@ */ #include "Lobby2Message.h" -#include "mafianet/peerinterface.h" +#include "mafianet/RakPeerInterface.h" #include "mafianet/MessageIdentifiers.h" #include "mafianet/Kbhit.h" -#include "mafianet/sleep.h" +#include "mafianet/RakSleep.h" #include "Lobby2Server_PGSQL.h" #include "Lobby2Message_PGSQL.h" #include "ProfanityFilter.h" @@ -26,8 +26,8 @@ #include #include // used for std::numeric_limits #include "mafianet/Gets.h" -#include "mafianet/linux_adapter.h" -#include "mafianet/osx_adapter.h" +#include "mafianet/LinuxAdapter.h" +#include "mafianet/OsxAdapter.h" #ifdef __INTEGRATE_LOBBY2_WITH_ROOMS_PLUGIN diff --git a/Samples/Lobby3/main.cpp b/Samples/Lobby3/main.cpp index 73ab0456e..bd58c2d23 100644 --- a/Samples/Lobby3/main.cpp +++ b/Samples/Lobby3/main.cpp @@ -20,12 +20,12 @@ #include "mafianet/Gets.h" #include "mafianet/TCPInterface.h" -#include "mafianet/string.h" -#include "mafianet/sleep.h" +#include "mafianet/RakString.h" +#include "mafianet/RakSleep.h" #include "mafianet/DR_SHA1.h" #include "mafianet/BitStream.h" -#include "mafianet/linux_adapter.h" -#include "mafianet/osx_adapter.h" +#include "mafianet/LinuxAdapter.h" +#include "mafianet/OsxAdapter.h" #include "mafianet/Base64Encoder.h" diff --git a/Samples/LoopbackPerformanceTest/LoopbackPerformanceTest.cpp b/Samples/LoopbackPerformanceTest/LoopbackPerformanceTest.cpp index 08a21992d..ef608509c 100644 --- a/Samples/LoopbackPerformanceTest/LoopbackPerformanceTest.cpp +++ b/Samples/LoopbackPerformanceTest/LoopbackPerformanceTest.cpp @@ -13,10 +13,10 @@ * license found in the license.txt file in the root directory of this source tree. */ -#include "mafianet/peerinterface.h" +#include "mafianet/RakPeerInterface.h" #include "mafianet/MessageIdentifiers.h" // Enumerations #include "mafianet/GetTime.h" -#include "mafianet/statistics.h" +#include "mafianet/RakNetStatistics.h" #include #include #include "mafianet/Gets.h" diff --git a/Samples/MasterServer/MasterClient.cpp b/Samples/MasterServer/MasterClient.cpp index be8a0c4fe..c2fcb8803 100644 --- a/Samples/MasterServer/MasterClient.cpp +++ b/Samples/MasterServer/MasterClient.cpp @@ -15,7 +15,7 @@ #include "MasterClient.h" #include "MasterServerMessageIDs.h" -#include "mafianet/peerinterface.h" +#include "mafianet/RakPeerInterface.h" #include "mafianet/MessageIdentifiers.h" #include "mafianet/StringCompressor.h" #include "mafianet/GetTime.h" diff --git a/Samples/MasterServer/MasterClientMain.cpp b/Samples/MasterServer/MasterClientMain.cpp index 21b773ed1..0d086887d 100644 --- a/Samples/MasterServer/MasterClientMain.cpp +++ b/Samples/MasterServer/MasterClientMain.cpp @@ -20,7 +20,7 @@ #include "MasterClient.h" #include "mafianet/StringCompressor.h" #include "mafianet/BitStream.h" -#include "mafianet/peerinterface.h" +#include "mafianet/RakPeerInterface.h" #include "mafianet/MessageIdentifiers.h" #include "mafianet/Gets.h" diff --git a/Samples/MasterServer/MasterCommon.h b/Samples/MasterServer/MasterCommon.h index 304c7b1a0..f8e054b6e 100644 --- a/Samples/MasterServer/MasterCommon.h +++ b/Samples/MasterServer/MasterCommon.h @@ -19,7 +19,7 @@ #define __MASTER_COMMON_H #include "mafianet/DS_List.h" -#include "mafianet/types.h" +#include "mafianet/RakNetTypes.h" #include "mafianet/BitStream.h" #include "mafianet/PluginInterface2.h" using namespace MafiaNet; diff --git a/Samples/MasterServer/MasterServer.cpp b/Samples/MasterServer/MasterServer.cpp index 62b29f0e1..01b7efd55 100644 --- a/Samples/MasterServer/MasterServer.cpp +++ b/Samples/MasterServer/MasterServer.cpp @@ -15,12 +15,12 @@ #include "MasterServer.h" #include "MasterServerMessageIDs.h" -#include "mafianet/peerinterface.h" +#include "mafianet/RakPeerInterface.h" #include "mafianet/BitStream.h" #include "mafianet/MessageIdentifiers.h" #include "mafianet/StringCompressor.h" #include "mafianet/GetTime.h" -#include "mafianet/statistics.h" +#include "mafianet/RakNetStatistics.h" #include "mafianet/PacketPriority.h" using namespace MafiaNet; diff --git a/Samples/MasterServer/MasterServer.h b/Samples/MasterServer/MasterServer.h index 6480c5e02..8410da206 100644 --- a/Samples/MasterServer/MasterServer.h +++ b/Samples/MasterServer/MasterServer.h @@ -21,7 +21,7 @@ #define __MASTER_SERVER_H #include "MasterCommon.h" -#include "mafianet/types.h" +#include "mafianet/RakNetTypes.h" /// \ingroup MASTER_SERVER_GROUP /// \brief implements the master server diff --git a/Samples/MasterServer/MasterServerMain.cpp b/Samples/MasterServer/MasterServerMain.cpp index 58e7cb9f8..078bfd9cd 100644 --- a/Samples/MasterServer/MasterServerMain.cpp +++ b/Samples/MasterServer/MasterServerMain.cpp @@ -17,7 +17,7 @@ #include "MasterCommon.h" #include "MasterServer.h" -#include "mafianet/peerinterface.h" +#include "mafianet/RakPeerInterface.h" #include "mafianet/Gets.h" #include #include diff --git a/Samples/MasterServer/mastercommon.cpp b/Samples/MasterServer/mastercommon.cpp index 4fa16e982..575b33e14 100644 --- a/Samples/MasterServer/mastercommon.cpp +++ b/Samples/MasterServer/mastercommon.cpp @@ -14,8 +14,8 @@ */ #include "MasterCommon.h" -#include "mafianet/peerinterface.h" -#include "mafianet/defines.h" +#include "mafianet/RakPeerInterface.h" +#include "mafianet/RakNetDefines.h" #include #include "mafianet/GetTime.h" #include "mafianet/StringCompressor.h" diff --git a/Samples/MasterServer2/main.cpp b/Samples/MasterServer2/main.cpp index 965281c7c..e4d20eb65 100644 --- a/Samples/MasterServer2/main.cpp +++ b/Samples/MasterServer2/main.cpp @@ -62,8 +62,8 @@ void main_sockets(void) } #include "mafianet/TCPInterface.h" -#include "mafianet/string.h" -#include "mafianet/sleep.h" +#include "mafianet/RakString.h" +#include "mafianet/RakSleep.h" #include "jansson.h" #include "mafianet/GetTime.h" diff --git a/Samples/MessageFilter/MessageFilterTest.cpp b/Samples/MessageFilter/MessageFilterTest.cpp index 7b9db6b44..16fadcec9 100644 --- a/Samples/MessageFilter/MessageFilterTest.cpp +++ b/Samples/MessageFilter/MessageFilterTest.cpp @@ -13,11 +13,11 @@ * license found in the license.txt file in the root directory of this source tree. */ -#include "mafianet/peerinterface.h" +#include "mafianet/RakPeerInterface.h" #include "mafianet/MessageFilter.h" #include "mafianet/MessageIdentifiers.h" -#include "mafianet/sleep.h" +#include "mafianet/RakSleep.h" #include int main() diff --git a/Samples/MessageSizeTest/MessageSizeTest.cpp b/Samples/MessageSizeTest/MessageSizeTest.cpp index 36a8965fa..bf2afa841 100644 --- a/Samples/MessageSizeTest/MessageSizeTest.cpp +++ b/Samples/MessageSizeTest/MessageSizeTest.cpp @@ -13,7 +13,7 @@ * license found in the license.txt file in the root directory of this source tree. */ -#include "mafianet/peerinterface.h" +#include "mafianet/RakPeerInterface.h" #include "mafianet/GetTime.h" #include "mafianet/MessageIdentifiers.h" #include "mafianet/BitStream.h" @@ -22,9 +22,9 @@ #include #include #include "mafianet/Rand.h" -#include "mafianet/statistics.h" -#include "mafianet/sleep.h" -#include "mafianet/memoryoverride.h" +#include "mafianet/RakNetStatistics.h" +#include "mafianet/RakSleep.h" +#include "mafianet/RakMemoryOverride.h" using namespace MafiaNet; diff --git a/Samples/NATCompleteClient/main.cpp b/Samples/NATCompleteClient/main.cpp index f987a5bb0..dfa678f4e 100644 --- a/Samples/NATCompleteClient/main.cpp +++ b/Samples/NATCompleteClient/main.cpp @@ -13,8 +13,8 @@ * license found in the license.txt file in the root directory of this source tree. */ -#include "mafianet/peerinterface.h" -#include "mafianet/sleep.h" +#include "mafianet/RakPeerInterface.h" +#include "mafianet/RakSleep.h" #include #include #include @@ -22,7 +22,7 @@ #include "mafianet/Kbhit.h" #include "mafianet/MessageIdentifiers.h" #include "mafianet/BitStream.h" -#include "mafianet/sleep.h" +#include "mafianet/RakSleep.h" #include "mafianet/NatPunchthroughClient.h" #include "mafianet/NatTypeDetectionClient.h" #include "mafianet/Getche.h" @@ -31,9 +31,9 @@ #include "mafianet/UDPProxyClient.h" #include "mafianet/Gets.h" #include "mafianet/Itoa.h" -#include "mafianet/linux_adapter.h" -#include "mafianet/osx_adapter.h" -#include "mafianet/guid_util.h" +#include "mafianet/LinuxAdapter.h" +#include "mafianet/OsxAdapter.h" +#include "mafianet/GuidUtil.h" // To include miniupnp, see Samples\NATCompleteClient\readme.txt #include "miniupnpc.h" diff --git a/Samples/NATCompleteServer/main.cpp b/Samples/NATCompleteServer/main.cpp index e7c34b051..28ed36b3f 100644 --- a/Samples/NATCompleteServer/main.cpp +++ b/Samples/NATCompleteServer/main.cpp @@ -13,8 +13,8 @@ * license found in the license.txt file in the root directory of this source tree. */ -#include "mafianet/peerinterface.h" -#include "mafianet/sleep.h" +#include "mafianet/RakPeerInterface.h" +#include "mafianet/RakSleep.h" #include #include #include @@ -22,7 +22,7 @@ #include "mafianet/Kbhit.h" #include "mafianet/MessageIdentifiers.h" #include "mafianet/BitStream.h" -#include "mafianet/sleep.h" +#include "mafianet/RakSleep.h" #include "mafianet/UDPProxyServer.h" #include "mafianet/UDPProxyCoordinator.h" #include "mafianet/NatPunchthroughServer.h" @@ -32,10 +32,10 @@ #include "mafianet/Gets.h" #include "CloudServerHelper.h" #include "mafianet/CloudClient.h" -#include "mafianet/statistics.h" +#include "mafianet/RakNetStatistics.h" #include "mafianet/RelayPlugin.h" -#include "mafianet/linux_adapter.h" -#include "mafianet/osx_adapter.h" +#include "mafianet/LinuxAdapter.h" +#include "mafianet/OsxAdapter.h" //#define VERBOSE_LOGGING diff --git a/Samples/OfflineMessagesTest/OfflineMessagesTest.cpp b/Samples/OfflineMessagesTest/OfflineMessagesTest.cpp index 056a47563..5ff3a7e89 100644 --- a/Samples/OfflineMessagesTest/OfflineMessagesTest.cpp +++ b/Samples/OfflineMessagesTest/OfflineMessagesTest.cpp @@ -13,7 +13,7 @@ * license found in the license.txt file in the root directory of this source tree. */ -#include "mafianet/peerinterface.h" +#include "mafianet/RakPeerInterface.h" #include "mafianet/BitStream.h" #include // For atoi @@ -22,7 +22,7 @@ #include "mafianet/MessageIdentifiers.h" #include "mafianet/GetTime.h" #include "mafianet/Gets.h" -#include "mafianet/guid_util.h" +#include "mafianet/GuidUtil.h" #ifdef _WIN32 #include "mafianet/WindowsIncludes.h" // Sleep diff --git a/Samples/PHPDirectoryServer2/PHPDirectoryServer2.cpp b/Samples/PHPDirectoryServer2/PHPDirectoryServer2.cpp index 2382b5526..69d6d5b9b 100644 --- a/Samples/PHPDirectoryServer2/PHPDirectoryServer2.cpp +++ b/Samples/PHPDirectoryServer2/PHPDirectoryServer2.cpp @@ -27,11 +27,11 @@ #include "PHPDirectoryServer2.h" #include "mafianet/HTTPConnection.h" -#include "mafianet/sleep.h" -#include "mafianet/string.h" -#include "mafianet/types.h" +#include "mafianet/RakSleep.h" +#include "mafianet/RakString.h" +#include "mafianet/RakNetTypes.h" #include "mafianet/GetTime.h" -#include "mafianet/assert.h" +#include "mafianet/RakAssert.h" #include #include #include diff --git a/Samples/PHPDirectoryServer2/PHPDirectoryServer2.h b/Samples/PHPDirectoryServer2/PHPDirectoryServer2.h index efda21fd2..21d8726ab 100644 --- a/Samples/PHPDirectoryServer2/PHPDirectoryServer2.h +++ b/Samples/PHPDirectoryServer2/PHPDirectoryServer2.h @@ -31,9 +31,9 @@ #define __PHP_DIRECTORY_SERVER_2 #include "mafianet/Export.h" -#include "mafianet/string.h" +#include "mafianet/RakString.h" #include "mafianet/HTTPConnection.h" -#include "mafianet/types.h" +#include "mafianet/RakNetTypes.h" #include "mafianet/DS_Queue.h" #include "mafianet/DS_Table.h" #include "mafianet/DS_Map.h" diff --git a/Samples/PHPDirectoryServer2/main.cpp b/Samples/PHPDirectoryServer2/main.cpp index 4a7fa04b1..e31ea7da1 100644 --- a/Samples/PHPDirectoryServer2/main.cpp +++ b/Samples/PHPDirectoryServer2/main.cpp @@ -20,8 +20,8 @@ #include "mafianet/TCPInterface.h" #include "mafianet/HTTPConnection.h" #include "PHPDirectoryServer2.h" -#include "mafianet/sleep.h" -#include "mafianet/string.h" +#include "mafianet/RakSleep.h" +#include "mafianet/RakString.h" #include "mafianet/GetTime.h" #include "mafianet/DS_Table.h" #include @@ -29,8 +29,8 @@ #include #include "mafianet/Gets.h" #include "mafianet/Getche.h" -#include "mafianet/linux_adapter.h" -#include "mafianet/osx_adapter.h" +#include "mafianet/LinuxAdapter.h" +#include "mafianet/OsxAdapter.h" using namespace MafiaNet; diff --git a/Samples/PacketConsoleLogger/main.cpp b/Samples/PacketConsoleLogger/main.cpp index e82b150b8..80b65b06a 100644 --- a/Samples/PacketConsoleLogger/main.cpp +++ b/Samples/PacketConsoleLogger/main.cpp @@ -17,8 +17,8 @@ #include "mafianet/ConsoleServer.h" #include "mafianet/LogCommandParser.h" #include "mafianet/PacketConsoleLogger.h" -#include "mafianet/peerinterface.h" -#include "mafianet/sleep.h" +#include "mafianet/RakPeerInterface.h" +#include "mafianet/RakSleep.h" #include #include "mafianet/Getche.h" #include "mafianet/MessageIdentifiers.h" diff --git a/Samples/PacketLogger/PacketLoggerTest.cpp b/Samples/PacketLogger/PacketLoggerTest.cpp index 7e71a2888..d82a5f518 100644 --- a/Samples/PacketLogger/PacketLoggerTest.cpp +++ b/Samples/PacketLogger/PacketLoggerTest.cpp @@ -18,7 +18,7 @@ #include #include "mafianet/GetTime.h" #include "mafianet/Rand.h" -#include "mafianet/peerinterface.h" +#include "mafianet/RakPeerInterface.h" #include "mafianet/MessageIdentifiers.h" #include "mafianet/Gets.h" #include "mafianet/PacketLogger.h" diff --git a/Samples/Ping/Ping.cpp b/Samples/Ping/Ping.cpp index ab2008f38..437f914b2 100644 --- a/Samples/Ping/Ping.cpp +++ b/Samples/Ping/Ping.cpp @@ -20,9 +20,9 @@ // ---------------------------------------------------------------------- #include "mafianet/MessageIdentifiers.h" -#include "mafianet/peerinterface.h" -#include "mafianet/peerinterface.h" -#include "mafianet/types.h" +#include "mafianet/RakPeerInterface.h" +#include "mafianet/RakPeerInterface.h" +#include "mafianet/RakNetTypes.h" #include "mafianet/GetTime.h" #include "mafianet/BitStream.h" #include @@ -32,8 +32,8 @@ #include // used for std::numeric_limits #include "mafianet/Gets.h" #include "mafianet/Kbhit.h" -#include "mafianet/linux_adapter.h" -#include "mafianet/osx_adapter.h" +#include "mafianet/LinuxAdapter.h" +#include "mafianet/OsxAdapter.h" int main(void) { diff --git a/Samples/RPC3/RPC3Sample.cpp b/Samples/RPC3/RPC3Sample.cpp index 2c603bda2..123f89087 100644 --- a/Samples/RPC3/RPC3Sample.cpp +++ b/Samples/RPC3/RPC3Sample.cpp @@ -14,7 +14,7 @@ */ #include "RPC3.h" -#include "mafianet/peerinterface.h" +#include "mafianet/RakPeerInterface.h" #include #include "mafianet/Kbhit.h" @@ -23,7 +23,7 @@ #include "mafianet/BitStream.h" #include "mafianet/MessageIdentifiers.h" #include "mafianet/StringCompressor.h" -#include "mafianet/sleep.h" +#include "mafianet/RakSleep.h" #include "mafianet/NetworkIDObject.h" #include "mafianet/NetworkIDManager.h" #include "mafianet/GetTime.h" diff --git a/Samples/RPC4/RPC4Sample.cpp b/Samples/RPC4/RPC4Sample.cpp index 6076c83cc..da462ef1c 100644 --- a/Samples/RPC4/RPC4Sample.cpp +++ b/Samples/RPC4/RPC4Sample.cpp @@ -14,18 +14,18 @@ */ #include "mafianet/RPC4Plugin.h" -#include "mafianet/peerinterface.h" +#include "mafianet/RakPeerInterface.h" #include #include "mafianet/Kbhit.h" #include #include #include // used for std::numeric_limits -#include "mafianet/sleep.h" +#include "mafianet/RakSleep.h" #include "mafianet/BitStream.h" #include "mafianet/MessageIdentifiers.h" #include "mafianet/Gets.h" -#include "mafianet/linux_adapter.h" -#include "mafianet/osx_adapter.h" +#include "mafianet/LinuxAdapter.h" +#include "mafianet/OsxAdapter.h" using namespace MafiaNet; diff --git a/Samples/RackspaceConsole/main.cpp b/Samples/RackspaceConsole/main.cpp index b70472d29..0a6724990 100644 --- a/Samples/RackspaceConsole/main.cpp +++ b/Samples/RackspaceConsole/main.cpp @@ -19,9 +19,9 @@ #include "mafianet/Rackspace.h" #include "mafianet/TCPInterface.h" #include "mafianet/Kbhit.h" -#include "mafianet/sleep.h" -#include "mafianet/linux_adapter.h" -#include "mafianet/osx_adapter.h" +#include "mafianet/RakSleep.h" +#include "mafianet/LinuxAdapter.h" +#include "mafianet/OsxAdapter.h" struct CommandAndDescription { diff --git a/Samples/RakVoice/main.cpp b/Samples/RakVoice/main.cpp index e04af508e..d0fd3db2e 100644 --- a/Samples/RakVoice/main.cpp +++ b/Samples/RakVoice/main.cpp @@ -19,18 +19,18 @@ #include // used for std::numeric_limits #include "portaudio.h" #include "mafianet/Kbhit.h" -#include "mafianet/peerinterface.h" +#include "mafianet/RakPeerInterface.h" #include "mafianet/MessageIdentifiers.h" #include "mafianet/RakVoice.h" -#include "mafianet/statistics.h" +#include "mafianet/RakNetStatistics.h" #include "mafianet/NatPunchthroughClient.h" #include "mafianet/BitStream.h" #include "mafianet/Getche.h" #include "mafianet/Gets.h" -#include "mafianet/linux_adapter.h" -#include "mafianet/osx_adapter.h" -#include "mafianet/guid_util.h" +#include "mafianet/LinuxAdapter.h" +#include "mafianet/OsxAdapter.h" +#include "mafianet/GuidUtil.h" /// To test sending to myself. Also uncomment in RakVoice.cpp //#define _TEST_LOOPBACK diff --git a/Samples/RakVoiceDSound/DSoundVoiceAdapter.cpp b/Samples/RakVoiceDSound/DSoundVoiceAdapter.cpp index 736867ba6..4b52ba386 100644 --- a/Samples/RakVoiceDSound/DSoundVoiceAdapter.cpp +++ b/Samples/RakVoiceDSound/DSoundVoiceAdapter.cpp @@ -14,8 +14,8 @@ */ #include "DSoundVoiceAdapter.h" -#include "mafianet/assert.h" -#include "mafianet/peerinterface.h" +#include "mafianet/RakAssert.h" +#include "mafianet/RakPeerInterface.h" #include /// To test sending to myself diff --git a/Samples/RakVoiceDSound/main.cpp b/Samples/RakVoiceDSound/main.cpp index 54076ca2d..dbc915f36 100644 --- a/Samples/RakVoiceDSound/main.cpp +++ b/Samples/RakVoiceDSound/main.cpp @@ -23,18 +23,18 @@ #include #include #include // used for std::numeric_limits -#include "mafianet/peerinterface.h" +#include "mafianet/RakPeerInterface.h" #include "mafianet/MessageIdentifiers.h" -#include "mafianet/sleep.h" +#include "mafianet/RakSleep.h" #include "mafianet/RakVoice.h" -#include "mafianet/statistics.h" +#include "mafianet/RakNetStatistics.h" #include "mafianet/GetTime.h" -#include "mafianet/assert.h" +#include "mafianet/RakAssert.h" #include "mafianet/Gets.h" #include "DSoundVoiceAdapter.h" -#include "mafianet/linux_adapter.h" -#include "mafianet/osx_adapter.h" +#include "mafianet/LinuxAdapter.h" +#include "mafianet/OsxAdapter.h" // Reads and writes per second of the sound data // Opus supports: 8000, 16000, 24000, 48000 diff --git a/Samples/RakVoiceFMOD/FMODVoiceAdapter.cpp b/Samples/RakVoiceFMOD/FMODVoiceAdapter.cpp index 3e40949c8..2610b1dbf 100644 --- a/Samples/RakVoiceFMOD/FMODVoiceAdapter.cpp +++ b/Samples/RakVoiceFMOD/FMODVoiceAdapter.cpp @@ -16,7 +16,7 @@ #include #include #include -#include "mafianet/peerinterface.h" +#include "mafianet/RakPeerInterface.h" #include "mafianet/MessageIdentifiers.h" #include "FMODVoiceAdapter.h" diff --git a/Samples/RakVoiceFMOD/main.cpp b/Samples/RakVoiceFMOD/main.cpp index cc0815618..8c9304931 100644 --- a/Samples/RakVoiceFMOD/main.cpp +++ b/Samples/RakVoiceFMOD/main.cpp @@ -22,17 +22,17 @@ #include #include #include -#include "mafianet/peerinterface.h" +#include "mafianet/RakPeerInterface.h" #include "mafianet/MessageIdentifiers.h" #include "mafianet/Gets.h" -#include "mafianet/sleep.h" +#include "mafianet/RakSleep.h" #include "mafianet/RakVoice.h" -#include "mafianet/statistics.h" +#include "mafianet/RakNetStatistics.h" #include "mafianet/GetTime.h" -#include "mafianet/assert.h" -#include "mafianet/linux_adapter.h" -#include "mafianet/osx_adapter.h" +#include "mafianet/RakAssert.h" +#include "mafianet/LinuxAdapter.h" +#include "mafianet/OsxAdapter.h" #include "fmod.hpp" #include "fmod_errors.h" diff --git a/Samples/ReadyEvent/ReadyEventSample.cpp b/Samples/ReadyEvent/ReadyEventSample.cpp index e53493838..33fb6b4d3 100644 --- a/Samples/ReadyEvent/ReadyEventSample.cpp +++ b/Samples/ReadyEvent/ReadyEventSample.cpp @@ -18,20 +18,20 @@ #include #include "mafianet/GetTime.h" #include "mafianet/Rand.h" -#include "mafianet/peerinterface.h" +#include "mafianet/RakPeerInterface.h" #include "mafianet/MessageIdentifiers.h" #include "mafianet/ReadyEvent.h" #include #include // used for std::numeric_limits #include "mafianet/Kbhit.h" -#include "mafianet/sleep.h" +#include "mafianet/RakSleep.h" #include "mafianet/SocketLayer.h" #include "mafianet/FullyConnectedMesh2.h" #include "mafianet/ConnectionGraph2.h" -#include "mafianet/linux_adapter.h" -#include "mafianet/osx_adapter.h" +#include "mafianet/LinuxAdapter.h" +#include "mafianet/OsxAdapter.h" #include "mafianet/Gets.h" -#include "mafianet/guid_util.h" +#include "mafianet/GuidUtil.h" void PrintConnections(); diff --git a/Samples/RelayPluginTest/main.cpp b/Samples/RelayPluginTest/main.cpp index 118646ee7..96f2d1e8f 100644 --- a/Samples/RelayPluginTest/main.cpp +++ b/Samples/RelayPluginTest/main.cpp @@ -13,15 +13,15 @@ * license found in the license.txt file in the root directory of this source tree. */ -#include "mafianet/peerinterface.h" -#include "mafianet/sleep.h" +#include "mafianet/RakPeerInterface.h" +#include "mafianet/RakSleep.h" #include "mafianet/RelayPlugin.h" #include "mafianet/Gets.h" #include "mafianet/Kbhit.h" #include "mafianet/BitStream.h" #include "mafianet/MessageIdentifiers.h" -#include "mafianet/linux_adapter.h" -#include "mafianet/osx_adapter.h" +#include "mafianet/LinuxAdapter.h" +#include "mafianet/OsxAdapter.h" #include // used for std::numeric_limits using namespace MafiaNet; diff --git a/Samples/ReliableOrderedTest/ReliableOrderedTest.cpp b/Samples/ReliableOrderedTest/ReliableOrderedTest.cpp index 0273d1c67..2a027f49e 100644 --- a/Samples/ReliableOrderedTest/ReliableOrderedTest.cpp +++ b/Samples/ReliableOrderedTest/ReliableOrderedTest.cpp @@ -13,7 +13,7 @@ * license found in the license.txt file in the root directory of this source tree. */ -#include "mafianet/peerinterface.h" +#include "mafianet/RakPeerInterface.h" #include "mafianet/GetTime.h" #include "mafianet/MessageIdentifiers.h" #include "mafianet/BitStream.h" @@ -22,15 +22,15 @@ #include #include #include "mafianet/Rand.h" -#include "mafianet/statistics.h" -#include "mafianet/sleep.h" -#include "mafianet/memoryoverride.h" +#include "mafianet/RakNetStatistics.h" +#include "mafianet/RakSleep.h" +#include "mafianet/RakMemoryOverride.h" #include #include // used for std::numeric_limits #include "mafianet/Gets.h" #include "mafianet/Kbhit.h" -#include "mafianet/linux_adapter.h" -#include "mafianet/osx_adapter.h" +#include "mafianet/LinuxAdapter.h" +#include "mafianet/OsxAdapter.h" using namespace MafiaNet; diff --git a/Samples/ReplicaManager3/main.cpp b/Samples/ReplicaManager3/main.cpp index e211f0a35..f5004ed1b 100644 --- a/Samples/ReplicaManager3/main.cpp +++ b/Samples/ReplicaManager3/main.cpp @@ -16,7 +16,7 @@ // Demonstrates ReplicaManager 3: A system to automatically create, destroy, and serialize objects #include "mafianet/StringTable.h" -#include "mafianet/peerinterface.h" +#include "mafianet/RakPeerInterface.h" #include #include "mafianet/Kbhit.h" @@ -25,18 +25,18 @@ #include "mafianet/MessageIdentifiers.h" #include "mafianet/ReplicaManager3.h" #include "mafianet/NetworkIDManager.h" -#include "mafianet/sleep.h" +#include "mafianet/RakSleep.h" #include "mafianet/FormatString.h" -#include "mafianet/string.h" +#include "mafianet/RakString.h" #include "mafianet/GetTime.h" #include "mafianet/SocketLayer.h" #include "mafianet/Getche.h" #include "mafianet/Rand.h" #include "mafianet/VariableDeltaSerializer.h" #include "mafianet/Gets.h" -#include "mafianet/linux_adapter.h" -#include "mafianet/osx_adapter.h" -#include "mafianet/guid_util.h" +#include "mafianet/LinuxAdapter.h" +#include "mafianet/OsxAdapter.h" +#include "mafianet/GuidUtil.h" enum { diff --git a/Samples/ReplicatedLogin/ReplicatedLogin.cpp b/Samples/ReplicatedLogin/ReplicatedLogin.cpp index a6d2f63d3..e6255750d 100644 --- a/Samples/ReplicatedLogin/ReplicatedLogin.cpp +++ b/Samples/ReplicatedLogin/ReplicatedLogin.cpp @@ -13,17 +13,17 @@ * license found in the license.txt file in the root directory of this source tree. */ -#include "mafianet/peerinterface.h" +#include "mafianet/RakPeerInterface.h" #include "mafianet/BitStream.h" #include "mafianet/GetTime.h" -#include "mafianet/sleep.h" +#include "mafianet/RakSleep.h" #include "mafianet/Gets.h" #include "mafianet/MessageIdentifiers.h" #include "mafianet/Kbhit.h" #include "mafianet/ReplicaManager3.h" -#include "mafianet/peerinterface.h" +#include "mafianet/RakPeerInterface.h" #include "mafianet/NetworkIDManager.h" -#include "mafianet/guid_util.h" +#include "mafianet/GuidUtil.h" using namespace MafiaNet; diff --git a/Samples/Rooms/RoomsSample.cpp b/Samples/Rooms/RoomsSample.cpp index 468dca295..70e047036 100644 --- a/Samples/Rooms/RoomsSample.cpp +++ b/Samples/Rooms/RoomsSample.cpp @@ -14,7 +14,7 @@ */ #include "RoomsPlugin.h" -#include "mafianet/peerinterface.h" +#include "mafianet/RakPeerInterface.h" #include "ProfanityFilter.h" #include "mafianet/MessageIdentifiers.h" diff --git a/Samples/RoomsBrowserGFx3/RakNet/RoomsBrowserGFx3_RakNet.h b/Samples/RoomsBrowserGFx3/RakNet/RoomsBrowserGFx3_RakNet.h index 0349d4e27..0e19a9ac9 100644 --- a/Samples/RoomsBrowserGFx3/RakNet/RoomsBrowserGFx3_RakNet.h +++ b/Samples/RoomsBrowserGFx3/RakNet/RoomsBrowserGFx3_RakNet.h @@ -17,7 +17,7 @@ #define __ROOMS_BROWSER_GFX3_RAKNET #include "mafianet/WindowsIncludes.h" -#include "mafianet/types.h" +#include "mafianet/RakNetTypes.h" #include "Lobby2Message.h" #include "mafianet/PluginInterface2.h" #include "RoomsBrowserGFx3.h" diff --git a/Samples/RoomsBrowserGFx3/RoomsBrowserGFx3.h b/Samples/RoomsBrowserGFx3/RoomsBrowserGFx3.h index d4b79b8d7..b4a1fbb9c 100644 --- a/Samples/RoomsBrowserGFx3/RoomsBrowserGFx3.h +++ b/Samples/RoomsBrowserGFx3/RoomsBrowserGFx3.h @@ -15,7 +15,7 @@ #include "mafianet/WindowsIncludes.h" #include "FxGameDelegate.h" -#include "mafianet/string.h" +#include "mafianet/RakString.h" #define ACTIONSCRIPT_CALLABLE_HEADER(functionName) virtual void functionName(const FxDelegateArgs& pparams); #define ACTIONSCRIPT_CALLABLE_FUNCTION(className, functionName) \ diff --git a/Samples/Router2/Router2Sample.cpp b/Samples/Router2/Router2Sample.cpp index ad87df28c..7cd2ff469 100644 --- a/Samples/Router2/Router2Sample.cpp +++ b/Samples/Router2/Router2Sample.cpp @@ -13,7 +13,7 @@ * license found in the license.txt file in the root directory of this source tree. */ -#include "mafianet/peerinterface.h" +#include "mafianet/RakPeerInterface.h" #include #include "mafianet/Kbhit.h" #include @@ -22,16 +22,16 @@ #include "mafianet/BitStream.h" #include "mafianet/MessageIdentifiers.h" #include "mafianet/Router2.h" -#include "mafianet/sleep.h" +#include "mafianet/RakSleep.h" #include "mafianet/GetTime.h" #include "mafianet/Rand.h" -#include "mafianet/assert.h" +#include "mafianet/RakAssert.h" #include "mafianet/SocketLayer.h" #include "mafianet/Getche.h" #include "mafianet/Gets.h" -#include "mafianet/linux_adapter.h" -#include "mafianet/osx_adapter.h" -#include "mafianet/guid_util.h" +#include "mafianet/LinuxAdapter.h" +#include "mafianet/OsxAdapter.h" +#include "mafianet/GuidUtil.h" using namespace MafiaNet; diff --git a/Samples/SendEmail/main.cpp b/Samples/SendEmail/main.cpp index 6df8bb2d8..439254bd4 100644 --- a/Samples/SendEmail/main.cpp +++ b/Samples/SendEmail/main.cpp @@ -17,8 +17,8 @@ #include "mafianet/FileList.h" #include #include "mafianet/Gets.h" -#include "mafianet/linux_adapter.h" -#include "mafianet/osx_adapter.h" +#include "mafianet/LinuxAdapter.h" +#include "mafianet/OsxAdapter.h" int main() { diff --git a/Samples/ServerClientTest2/ServerClientTest2.cpp b/Samples/ServerClientTest2/ServerClientTest2.cpp index 9b8fc409b..98685c1c0 100644 --- a/Samples/ServerClientTest2/ServerClientTest2.cpp +++ b/Samples/ServerClientTest2/ServerClientTest2.cpp @@ -13,22 +13,22 @@ * license found in the license.txt file in the root directory of this source tree. */ -#include "mafianet/peerinterface.h" +#include "mafianet/RakPeerInterface.h" #include "mafianet/BitStream.h" #include // For atoi #include // For strlen #include "mafianet/Rand.h" -#include "mafianet/statistics.h" +#include "mafianet/RakNetStatistics.h" #include "mafianet/MessageIdentifiers.h" #include #include "mafianet/Kbhit.h" #include "mafianet/GetTime.h" -#include "mafianet/assert.h" -#include "mafianet/sleep.h" +#include "mafianet/RakAssert.h" +#include "mafianet/RakSleep.h" #include "mafianet/Gets.h" -#include "mafianet/linux_adapter.h" -#include "mafianet/osx_adapter.h" +#include "mafianet/LinuxAdapter.h" +#include "mafianet/OsxAdapter.h" using namespace MafiaNet; diff --git a/Samples/StatisticsHistoryTest/StatisticsHistoryTest.cpp b/Samples/StatisticsHistoryTest/StatisticsHistoryTest.cpp index 0f54a2ee1..ba149c8ad 100644 --- a/Samples/StatisticsHistoryTest/StatisticsHistoryTest.cpp +++ b/Samples/StatisticsHistoryTest/StatisticsHistoryTest.cpp @@ -20,11 +20,11 @@ #include #include #include "mafianet/GetTime.h" -#include "mafianet/peerinterface.h" +#include "mafianet/RakPeerInterface.h" #include "mafianet/MessageIdentifiers.h" #include "mafianet/StatisticsHistory.h" #include -#include "mafianet/sleep.h" +#include "mafianet/RakSleep.h" using namespace MafiaNet; diff --git a/Samples/SteamLobby/main.cpp b/Samples/SteamLobby/main.cpp index 426c2b359..3d5613d75 100644 --- a/Samples/SteamLobby/main.cpp +++ b/Samples/SteamLobby/main.cpp @@ -17,17 +17,17 @@ #include #include "Lobby2Client_Steam.h" // If Lobby2Client_Steam.h is included before SocketLayer.h, then it will use the steam send functions #include "Lobby2Message_Steam.h" -#include "mafianet/time.h" -#include "mafianet/sleep.h" -#include "mafianet/types.h" -#include "mafianet/peerinterface.h" +#include "mafianet/RakNetTime.h" +#include "mafianet/RakSleep.h" +#include "mafianet/RakNetTypes.h" +#include "mafianet/RakPeerInterface.h" #include "mafianet/GetTime.h" #include "mafianet/MessageIdentifiers.h" #include #include #include "mafianet/Gets.h" #include "mafianet/FullyConnectedMesh2.h" -#include "mafianet/guid_util.h" +#include "mafianet/GuidUtil.h" #pragma warning( push ) #pragma warning(disable:4127) // conditional expression is constant (with Steamworks 1.23a) #include "steam_api.h" diff --git a/Samples/TeamManager/TeamManagerTest.cpp b/Samples/TeamManager/TeamManagerTest.cpp index 11a9e62ed..a106567aa 100644 --- a/Samples/TeamManager/TeamManagerTest.cpp +++ b/Samples/TeamManager/TeamManagerTest.cpp @@ -18,20 +18,20 @@ #include #include "mafianet/GetTime.h" #include "mafianet/Rand.h" -#include "mafianet/peerinterface.h" +#include "mafianet/RakPeerInterface.h" #include "mafianet/MessageIdentifiers.h" #include "mafianet/FullyConnectedMesh2.h" #include "mafianet/TeamManager.h" #include "mafianet/Kbhit.h" -#include "mafianet/sleep.h" -#include "mafianet/types.h" +#include "mafianet/RakSleep.h" +#include "mafianet/RakNetTypes.h" #include "mafianet/BitStream.h" #include "mafianet/SocketLayer.h" #include "mafianet/ReplicaManager3.h" #include "mafianet/NetworkIDManager.h" -#include "mafianet/osx_adapter.h" +#include "mafianet/OsxAdapter.h" #include "mafianet/Gets.h" -#include "mafianet/guid_util.h" +#include "mafianet/GuidUtil.h" using namespace MafiaNet; diff --git a/Samples/TestDLL/main.cpp b/Samples/TestDLL/main.cpp index a8917a930..3aed361bc 100644 --- a/Samples/TestDLL/main.cpp +++ b/Samples/TestDLL/main.cpp @@ -13,16 +13,16 @@ * license found in the license.txt file in the root directory of this source tree. */ -#include "mafianet/peerinterface.h" +#include "mafianet/RakPeerInterface.h" #include "mafianet/FileOperations.h" -#include "mafianet/memoryoverride.h" +#include "mafianet/RakMemoryOverride.h" #include "mafianet/ConsoleServer.h" #include "mafianet/LogCommandParser.h" -#include "mafianet/commandparser.h" +#include "mafianet/RakNetCommandParser.h" #include "mafianet/PacketLogger.h" #include "mafianet/DS_List.h" #include "mafianet/SocketLayer.h" -#include "mafianet/sleep.h" +#include "mafianet/RakSleep.h" #include "mafianet/TCPInterface.h" using namespace MafiaNet; diff --git a/Samples/ThreadTest/ThreadTest.cpp b/Samples/ThreadTest/ThreadTest.cpp index d6adaa1ca..db42a06fd 100644 --- a/Samples/ThreadTest/ThreadTest.cpp +++ b/Samples/ThreadTest/ThreadTest.cpp @@ -17,17 +17,17 @@ /// \brief Tests multiple readers and writers on the same instance of RakPeer. -#include "mafianet/peerinterface.h" +#include "mafianet/RakPeerInterface.h" #include "mafianet/GetTime.h" -#include "mafianet/statistics.h" +#include "mafianet/RakNetStatistics.h" #include "mafianet/MessageIdentifiers.h" #include "mafianet/Kbhit.h" #include // Printf #include "mafianet/WindowsIncludes.h" // Sleep //#include -#include "mafianet/thread.h" -#include "mafianet/sleep.h" +#include "mafianet/RakThread.h" +#include "mafianet/RakSleep.h" using namespace MafiaNet; RakPeerInterface *peer1, *peer2; diff --git a/Samples/Timestamping/Timestamping.cpp b/Samples/Timestamping/Timestamping.cpp index 7b248fab2..a244e2483 100644 --- a/Samples/Timestamping/Timestamping.cpp +++ b/Samples/Timestamping/Timestamping.cpp @@ -13,12 +13,12 @@ * license found in the license.txt file in the root directory of this source tree. */ -#include "mafianet/peerinterface.h" +#include "mafianet/RakPeerInterface.h" #include "mafianet/BitStream.h" #include "mafianet/MessageIdentifiers.h" #include "mafianet/GetTime.h" -#include "mafianet/sleep.h" +#include "mafianet/RakSleep.h" using namespace MafiaNet; #include @@ -26,8 +26,8 @@ using namespace MafiaNet; #include #include "mafianet/Gets.h" #include "mafianet/Kbhit.h" -#include "mafianet/linux_adapter.h" -#include "mafianet/osx_adapter.h" +#include "mafianet/LinuxAdapter.h" +#include "mafianet/OsxAdapter.h" int main(void) diff --git a/Samples/TwoWayAuthentication/TwoWayAuthenticationTest.cpp b/Samples/TwoWayAuthentication/TwoWayAuthenticationTest.cpp index 803500119..a1ff12e12 100644 --- a/Samples/TwoWayAuthentication/TwoWayAuthenticationTest.cpp +++ b/Samples/TwoWayAuthentication/TwoWayAuthenticationTest.cpp @@ -18,11 +18,11 @@ #include #include "mafianet/GetTime.h" #include "mafianet/Rand.h" -#include "mafianet/peerinterface.h" +#include "mafianet/RakPeerInterface.h" #include "mafianet/MessageIdentifiers.h" #include "mafianet/BitStream.h" #include "mafianet/TwoWayAuthentication.h" -#include "mafianet/sleep.h" +#include "mafianet/RakSleep.h" static const int NUM_PEERS=2; MafiaNet::RakPeerInterface *rakPeer[NUM_PEERS]; diff --git a/Samples/UDPForwarder/main.cpp b/Samples/UDPForwarder/main.cpp index 9b1df5279..79dfbd9ea 100644 --- a/Samples/UDPForwarder/main.cpp +++ b/Samples/UDPForwarder/main.cpp @@ -13,8 +13,8 @@ * license found in the license.txt file in the root directory of this source tree. */ -#include "mafianet/peerinterface.h" -#include "mafianet/sleep.h" +#include "mafianet/RakPeerInterface.h" +#include "mafianet/RakSleep.h" #include #include @@ -22,7 +22,7 @@ #include "mafianet/Kbhit.h" #include "mafianet/MessageIdentifiers.h" #include "mafianet/BitStream.h" -#include "mafianet/sleep.h" +#include "mafianet/RakSleep.h" #include "mafianet/UDPForwarder.h" #include "mafianet/SocketLayer.h" diff --git a/Samples/VirtualWorld/main.cpp b/Samples/VirtualWorld/main.cpp index 3011a96b6..174e0fa3f 100644 --- a/Samples/VirtualWorld/main.cpp +++ b/Samples/VirtualWorld/main.cpp @@ -27,14 +27,14 @@ // The sample is non-interactive: it drives the peers, prints what each client // sees at each step, and returns 0 only if visibility matched expectations. -#include "mafianet/peerinterface.h" +#include "mafianet/RakPeerInterface.h" #include "mafianet/ReplicaManager3.h" #include "mafianet/VirtualWorld.h" #include "mafianet/VirtualWorldReplica3.h" #include "mafianet/NetworkIDManager.h" #include "mafianet/BitStream.h" #include "mafianet/MessageIdentifiers.h" -#include "mafianet/sleep.h" +#include "mafianet/RakSleep.h" #include diff --git a/Samples/iOS/ChatClient/ChatClient.xcodeproj/project.pbxproj b/Samples/iOS/ChatClient/ChatClient.xcodeproj/project.pbxproj index 6635c9e09..a92ba664d 100644 --- a/Samples/iOS/ChatClient/ChatClient.xcodeproj/project.pbxproj +++ b/Samples/iOS/ChatClient/ChatClient.xcodeproj/project.pbxproj @@ -37,7 +37,7 @@ B23EA3DE147F5A43002B8C06 /* Getche.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B23EA31A147F5A43002B8C06 /* Getche.cpp */; }; B23EA3DF147F5A43002B8C06 /* Gets.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B23EA31C147F5A43002B8C06 /* Gets.cpp */; }; B23EA3E0147F5A43002B8C06 /* GetTime.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B23EA31E147F5A43002B8C06 /* GetTime.cpp */; }; - B23EA3E1147F5A43002B8C06 /* gettimeofday.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B23EA320147F5A43002B8C06 /* gettimeofday.cpp */; }; + B23EA3E1147F5A43002B8C06 /* GetTimeOfDay.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B23EA320147F5A43002B8C06 /* GetTimeOfDay.cpp */; }; B23EA3E2147F5A43002B8C06 /* GridSectorizer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B23EA322147F5A43002B8C06 /* GridSectorizer.cpp */; }; B23EA3E3147F5A43002B8C06 /* HTTPConnection.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B23EA324147F5A43002B8C06 /* HTTPConnection.cpp */; }; B23EA3E4147F5A43002B8C06 /* IncrementalReadInterface.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B23EA326147F5A43002B8C06 /* IncrementalReadInterface.cpp */; }; @@ -199,7 +199,7 @@ B23EA31D147F5A43002B8C06 /* Gets.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Gets.h; path = ../../../Source/Gets.h; sourceTree = ""; }; B23EA31E147F5A43002B8C06 /* GetTime.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = GetTime.cpp; path = ../../../Source/GetTime.cpp; sourceTree = ""; }; B23EA31F147F5A43002B8C06 /* GetTime.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = GetTime.h; path = ../../../Source/GetTime.h; sourceTree = ""; }; - B23EA320147F5A43002B8C06 /* gettimeofday.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = gettimeofday.cpp; path = ../../../Source/gettimeofday.cpp; sourceTree = ""; }; + B23EA320147F5A43002B8C06 /* GetTimeOfDay.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = GetTimeOfDay.cpp; path = ../../../Source/GetTimeOfDay.cpp; sourceTree = ""; }; B23EA321147F5A43002B8C06 /* gettimeofday.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = gettimeofday.h; path = ../../../Source/gettimeofday.h; sourceTree = ""; }; B23EA322147F5A43002B8C06 /* GridSectorizer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = GridSectorizer.cpp; path = ../../../Source/GridSectorizer.cpp; sourceTree = ""; }; B23EA323147F5A43002B8C06 /* GridSectorizer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = GridSectorizer.h; path = ../../../Source/GridSectorizer.h; sourceTree = ""; }; @@ -532,7 +532,7 @@ B23EA31D147F5A43002B8C06 /* Gets.h */, B23EA31E147F5A43002B8C06 /* GetTime.cpp */, B23EA31F147F5A43002B8C06 /* GetTime.h */, - B23EA320147F5A43002B8C06 /* gettimeofday.cpp */, + B23EA320147F5A43002B8C06 /* GetTimeOfDay.cpp */, B23EA321147F5A43002B8C06 /* gettimeofday.h */, B23EA322147F5A43002B8C06 /* GridSectorizer.cpp */, B23EA323147F5A43002B8C06 /* GridSectorizer.h */, @@ -795,7 +795,7 @@ B23EA3DE147F5A43002B8C06 /* Getche.cpp in Sources */, B23EA3DF147F5A43002B8C06 /* Gets.cpp in Sources */, B23EA3E0147F5A43002B8C06 /* GetTime.cpp in Sources */, - B23EA3E1147F5A43002B8C06 /* gettimeofday.cpp in Sources */, + B23EA3E1147F5A43002B8C06 /* GetTimeOfDay.cpp in Sources */, B23EA3E2147F5A43002B8C06 /* GridSectorizer.cpp in Sources */, B23EA3E3147F5A43002B8C06 /* HTTPConnection.cpp in Sources */, B23EA3E4147F5A43002B8C06 /* IncrementalReadInterface.cpp in Sources */, diff --git a/Samples/iOS/ChatClient/ChatClient/ViewController.h b/Samples/iOS/ChatClient/ChatClient/ViewController.h index e95ff314e..5ed1fba97 100644 --- a/Samples/iOS/ChatClient/ChatClient/ViewController.h +++ b/Samples/iOS/ChatClient/ChatClient/ViewController.h @@ -16,16 +16,16 @@ // RakNet headers #include "mafianet/MessageIdentifiers.h" -#include "mafianet/peerinterface.h" -#include "mafianet/statistics.h" -#include "mafianet/types.h" +#include "mafianet/RakPeerInterface.h" +#include "mafianet/RakNetStatistics.h" +#include "mafianet/RakNetTypes.h" #include "mafianet/BitStream.h" #include "mafianet/PacketLogger.h" #include #include #include #include -#include "mafianet/types.h" +#include "mafianet/RakNetTypes.h" // For simplicity, this sample doesn't support secure connections #if LIBCAT_SECURITY==1 diff --git a/Source/CMakeLists.txt b/Source/CMakeLists.txt index 0cc7bfada..90b89ec61 100644 --- a/Source/CMakeLists.txt +++ b/Source/CMakeLists.txt @@ -18,9 +18,7 @@ set(MAFIANET_SOURCES src/CloudClient.cpp src/CloudCommon.cpp src/CloudServer.cpp - src/CommandParserInterface.cpp src/ConnectionGraph2.cpp - src/ConsoleServer.cpp src/DataCompressor.cpp src/DirectoryDeltaTransfer.cpp src/DR_SHA1.cpp @@ -29,7 +27,6 @@ set(MAFIANET_SOURCES src/DS_HuffmanEncodingTree.cpp src/DS_Table.cpp src/DynDNS.cpp - src/EmailSender.cpp src/EpochTimeToString.cpp src/FileList.cpp src/FileListTransfer.cpp @@ -39,17 +36,14 @@ set(MAFIANET_SOURCES src/Getche.cpp src/Gets.cpp src/GetTime.cpp - src/gettimeofday.cpp + src/GetTimeOfDay.cpp src/GridSectorizer.cpp - src/guid_util.cpp - src/HTTPConnection.cpp - src/HTTPConnection2.cpp + src/GuidUtil.cpp src/IncrementalReadInterface.cpp src/Itoa.cpp - src/linux_adapter.cpp + src/LinuxAdapter.cpp src/LinuxStrings.cpp src/LocklessTypes.cpp - src/LogCommandParser.cpp src/MessageFilter.cpp src/MmsgBatch.cpp src/MtuBlackHole.cpp @@ -60,8 +54,7 @@ set(MAFIANET_SOURCES src/NatTypeDetectionServer.cpp src/NetworkIDManager.cpp src/NetworkIDObject.cpp - src/osx_adapter.cpp - src/PacketConsoleLogger.cpp + src/OsxAdapter.cpp src/PacketFileLogger.cpp src/PacketizedTCP.cpp src/PacketLogger.cpp @@ -71,12 +64,10 @@ set(MAFIANET_SOURCES src/PointGridSectorizer.cpp src/Rackspace.cpp src/RakMemoryOverride.cpp - src/RakNetCommandParser.cpp src/RakNetSocket2.cpp src/RakNetSocket2_Berkley.cpp src/RakNetSocket2_Windows_Linux.cpp src/RakNetStatistics.cpp - src/RakNetTransport2.cpp src/RakNetTypes.cpp src/RakPeer.cpp src/RakSleep.cpp @@ -105,7 +96,6 @@ set(MAFIANET_SOURCES src/TCPInterface.cpp src/TeamBalancer.cpp src/TeamManager.cpp - src/TelnetTransport.cpp src/ThreadsafePacketLogger.cpp src/TwoWayAuthentication.cpp src/UDPForwarder.cpp @@ -118,6 +108,23 @@ set(MAFIANET_SOURCES src/WSAStartupSingleton.cpp ) +# Extras: utilities that are not game networking (SMTP, HTTP client, telnet and +# console command transports, console packet logger). Built into the separate +# MafiaNetExtras target when MAFIANET_BUILD_EXTRAS is ON; their headers stay in +# include/mafianet/ so include paths are unchanged. See issue #50, stage 2. +set(MAFIANET_EXTRAS_SOURCES + src/CommandParserInterface.cpp + src/ConsoleServer.cpp + src/EmailSender.cpp + src/HTTPConnection.cpp + src/HTTPConnection2.cpp + src/LogCommandParser.cpp + src/PacketConsoleLogger.cpp + src/RakNetCommandParser.cpp + src/RakNetTransport2.cpp + src/TelnetTransport.cpp +) + set(MAFIANET_CRYPTO_SOURCES src/crypto/cryptomanager.cpp src/crypto/factory.cpp @@ -127,8 +134,8 @@ set(MAFIANET_CRYPTO_SOURCES set(MAFIANET_HEADERS include/mafianet/_FindFirst.h - include/mafianet/alloca.h - include/mafianet/assert.h + include/mafianet/RakAlloca.h + include/mafianet/RakAssert.h include/mafianet/AutopatcherPatchContext.h include/mafianet/AutopatcherRepositoryInterface.h include/mafianet/Base64Encoder.h @@ -139,13 +146,13 @@ set(MAFIANET_HEADERS include/mafianet/CloudClient.h include/mafianet/CloudCommon.h include/mafianet/CloudServer.h - include/mafianet/commandparser.h + include/mafianet/RakNetCommandParser.h include/mafianet/CommandParserInterface.h include/mafianet/ConnectionGraph2.h include/mafianet/ConsoleServer.h include/mafianet/DataCompressor.h - include/mafianet/defineoverrides.h - include/mafianet/defines.h + include/mafianet/RakNetDefinesOverrides.h + include/mafianet/RakNetDefines.h include/mafianet/DirectoryDeltaTransfer.h include/mafianet/DR_SHA1.h include/mafianet/DS_BinarySearchTree.h @@ -186,20 +193,20 @@ set(MAFIANET_HEADERS include/mafianet/Getche.h include/mafianet/Gets.h include/mafianet/GetTime.h - include/mafianet/gettimeofday.h + include/mafianet/GetTimeOfDay.h include/mafianet/GridSectorizer.h - include/mafianet/guid_util.h + include/mafianet/GuidUtil.h include/mafianet/HTTPConnection.h include/mafianet/HTTPConnection2.h include/mafianet/IncrementalReadInterface.h include/mafianet/InternalPacket.h include/mafianet/Itoa.h include/mafianet/Kbhit.h - include/mafianet/linux_adapter.h + include/mafianet/LinuxAdapter.h include/mafianet/LinuxStrings.h include/mafianet/LocklessTypes.h include/mafianet/LogCommandParser.h - include/mafianet/memoryoverride.h + include/mafianet/RakMemoryOverride.h include/mafianet/MessageFilter.h include/mafianet/MessageIdentifiers.h include/mafianet/MmsgBatch.h @@ -215,7 +222,7 @@ set(MAFIANET_HEADERS include/mafianet/NatTypeDetectionServer.h include/mafianet/NetworkIDManager.h include/mafianet/NetworkIDObject.h - include/mafianet/osx_adapter.h + include/mafianet/OsxAdapter.h include/mafianet/PacketConsoleLogger.h include/mafianet/PacketFileLogger.h include/mafianet/PacketizedTCP.h @@ -224,8 +231,8 @@ set(MAFIANET_HEADERS include/mafianet/PacketPool.h include/mafianet/PacketPriority.h include/mafianet/PeerHandle.h - include/mafianet/peer.h - include/mafianet/peerinterface.h + include/mafianet/RakPeer.h + include/mafianet/RakPeerInterface.h include/mafianet/PluginInterface2.h include/mafianet/PointGridSectorizer.h include/mafianet/Rackspace.h @@ -246,16 +253,16 @@ set(MAFIANET_HEADERS include/mafianet/SimpleMutex.h include/mafianet/SimpleTCPServer.h include/mafianet/SingleProducerConsumer.h - include/mafianet/sleep.h + include/mafianet/RakSleep.h include/mafianet/mafianet.h - include/mafianet/smartptr.h - include/mafianet/socket2.h + include/mafianet/RakNetSmartPtr.h + include/mafianet/RakNetSocket2.h include/mafianet/SocketDefines.h include/mafianet/SocketIncludes.h include/mafianet/SocketLayer.h - include/mafianet/statistics.h + include/mafianet/RakNetStatistics.h include/mafianet/StatisticsHistory.h - include/mafianet/string.h + include/mafianet/RakString.h include/mafianet/StringCompressor.h include/mafianet/StringTable.h include/mafianet/SuperFastHash.h @@ -264,14 +271,14 @@ set(MAFIANET_HEADERS include/mafianet/TeamBalancer.h include/mafianet/TeamManager.h include/mafianet/TelnetTransport.h - include/mafianet/thread.h + include/mafianet/RakThread.h include/mafianet/ThreadPool.h include/mafianet/ThreadsafePacketLogger.h - include/mafianet/time.h - include/mafianet/transport2.h + include/mafianet/RakNetTime.h + include/mafianet/RakNetTransport2.h include/mafianet/TransportInterface.h include/mafianet/TwoWayAuthentication.h - include/mafianet/types.h + include/mafianet/RakNetTypes.h include/mafianet/UDPForwarder.h include/mafianet/UDPProxyClient.h include/mafianet/UDPProxyCommon.h @@ -280,11 +287,36 @@ set(MAFIANET_HEADERS include/mafianet/VariableDeltaSerializer.h include/mafianet/VariableListDeltaTracker.h include/mafianet/VariadicSQLParser.h - include/mafianet/version.h + include/mafianet/Version.h include/mafianet/VirtualWorld.h include/mafianet/VirtualWorldReplica3.h include/mafianet/WindowsIncludes.h include/mafianet/WSAStartupSingleton.h + include/mafianet/RakWString.h +) + +# Deprecated lowercase forwarding headers (one release cycle, see docs/changelog.rst) +set(MAFIANET_DEPRECATED_HEADERS + include/mafianet/alloca.h + include/mafianet/assert.h + include/mafianet/commandparser.h + include/mafianet/defineoverrides.h + include/mafianet/defines.h + include/mafianet/guid_util.h + include/mafianet/linux_adapter.h + include/mafianet/memoryoverride.h + include/mafianet/osx_adapter.h + include/mafianet/peer.h + include/mafianet/peerinterface.h + include/mafianet/sleep.h + include/mafianet/smartptr.h + include/mafianet/socket2.h + include/mafianet/statistics.h + include/mafianet/string.h + include/mafianet/thread.h + include/mafianet/time.h + include/mafianet/transport2.h + include/mafianet/types.h include/mafianet/wstring.h ) @@ -304,6 +336,7 @@ set(MAFIANET_ALL_SOURCES set(MAFIANET_ALL_HEADERS ${MAFIANET_HEADERS} + ${MAFIANET_DEPRECATED_HEADERS} ${MAFIANET_CRYPTO_HEADERS} ) @@ -463,6 +496,29 @@ if(MAFIANET_BUILD_SHARED) endif() endif() +# Extras library (off by default). Links the core library PUBLIC so consumers +# get the core, its include directories and its feature definitions through +# this one target. +if(MAFIANET_BUILD_EXTRAS) + add_library(MafiaNetExtras STATIC ${MAFIANET_EXTRAS_SOURCES}) + add_library(MafiaNet::MafiaNetExtras ALIAS MafiaNetExtras) + + if(MAFIANET_BUILD_STATIC) + target_link_libraries(MafiaNetExtras PUBLIC MafiaNetStatic) + else() + target_link_libraries(MafiaNetExtras PUBLIC MafiaNet) + endif() + + target_include_directories(MafiaNetExtras PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/src) + target_compile_definitions(MafiaNetExtras + PRIVATE + $<$:_DEBUG> + $<$:NDEBUG> + ) + set_target_properties(MafiaNetExtras PROPERTIES FOLDER "Libraries") + source_group("Source Files" FILES ${MAFIANET_EXTRAS_SOURCES}) +endif() + # Installation include(GNUInstallDirs) include(CMakePackageConfigHelpers) @@ -475,6 +531,9 @@ endif() if(MAFIANET_BUILD_SHARED) list(APPEND MAFIANET_INSTALL_TARGETS MafiaNet) endif() +if(MAFIANET_BUILD_EXTRAS) + list(APPEND MAFIANET_INSTALL_TARGETS MafiaNetExtras) +endif() # Install targets install(TARGETS ${MAFIANET_INSTALL_TARGETS} diff --git a/Source/include/mafianet/aliases.h b/Source/include/mafianet/Aliases.h similarity index 88% rename from Source/include/mafianet/aliases.h rename to Source/include/mafianet/Aliases.h index af8a5322a..fd0c7c965 100644 --- a/Source/include/mafianet/aliases.h +++ b/Source/include/mafianet/Aliases.h @@ -23,9 +23,9 @@ #pragma once -#include "mafianet/peerinterface.h" // RakPeerInterface -#include "mafianet/types.h" // RakNetGUID, UNASSIGNED_RAKNET_GUID -#include "mafianet/statistics.h" // RakNetStatistics +#include "mafianet/RakPeerInterface.h" // RakPeerInterface +#include "mafianet/RakNetTypes.h" // RakNetGUID, UNASSIGNED_RAKNET_GUID +#include "mafianet/RakNetStatistics.h" // RakNetStatistics namespace MafiaNet { diff --git a/Source/include/mafianet/BitStream.h b/Source/include/mafianet/BitStream.h index 3b82db6b8..5a5c2f65e 100644 --- a/Source/include/mafianet/BitStream.h +++ b/Source/include/mafianet/BitStream.h @@ -21,13 +21,13 @@ #ifndef __BITSTREAM_H #define __BITSTREAM_H -#include "memoryoverride.h" -#include "defines.h" +#include "RakMemoryOverride.h" +#include "RakNetDefines.h" #include "Export.h" -#include "types.h" -#include "string.h" -#include "wstring.h" -#include "assert.h" +#include "RakNetTypes.h" +#include "RakString.h" +#include "RakWString.h" +#include "RakAssert.h" #include #include #include diff --git a/Source/include/mafianet/CCRakNetSlidingWindow.h b/Source/include/mafianet/CCRakNetSlidingWindow.h index bb6458a1a..b2a8330e3 100644 --- a/Source/include/mafianet/CCRakNetSlidingWindow.h +++ b/Source/include/mafianet/CCRakNetSlidingWindow.h @@ -40,7 +40,7 @@ else use congestion avoidance */ -#include "defines.h" +#include "RakNetDefines.h" #if USE_SLIDING_WINDOW_CONGESTION_CONTROL==1 @@ -48,8 +48,8 @@ else use congestion avoidance #define __CONGESTION_CONTROL_SLIDING_WINDOW_H #include "NativeTypes.h" -#include "time.h" -#include "types.h" +#include "RakNetTime.h" +#include "RakNetTypes.h" #include "DS_Queue.h" /// Sizeof an UDP header in byte diff --git a/Source/include/mafianet/CCRakNetUDT.h b/Source/include/mafianet/CCRakNetUDT.h index 8e168a442..40d4071f9 100644 --- a/Source/include/mafianet/CCRakNetUDT.h +++ b/Source/include/mafianet/CCRakNetUDT.h @@ -13,7 +13,7 @@ * license found in the license.txt file in the root directory of this source tree. */ -#include "defines.h" +#include "RakNetDefines.h" #if USE_SLIDING_WINDOW_CONGESTION_CONTROL!=1 @@ -21,8 +21,8 @@ #define __CONGESTION_CONTROL_UDT_H #include "NativeTypes.h" -#include "time.h" -#include "types.h" +#include "RakNetTime.h" +#include "RakNetTypes.h" #include "DS_Queue.h" /// Set to 4 if you are using the iPod Touch TG. See http://www.jenkinssoftware.com/forum/index.php?topic=2717.0 diff --git a/Source/include/mafianet/CheckSum.h b/Source/include/mafianet/CheckSum.h index d4ab2f97f..214bf5b98 100644 --- a/Source/include/mafianet/CheckSum.h +++ b/Source/include/mafianet/CheckSum.h @@ -21,7 +21,7 @@ #ifndef __CHECKSUM_H #define __CHECKSUM_H -#include "memoryoverride.h" +#include "RakMemoryOverride.h" /// Generates and validates checksums class CheckSum diff --git a/Source/include/mafianet/CloudClient.h b/Source/include/mafianet/CloudClient.h index 19f909eaa..95680eb53 100644 --- a/Source/include/mafianet/CloudClient.h +++ b/Source/include/mafianet/CloudClient.h @@ -26,7 +26,7 @@ #include "PluginInterface2.h" #include "CloudCommon.h" -#include "memoryoverride.h" +#include "RakMemoryOverride.h" #include "DS_Hash.h" namespace MafiaNet diff --git a/Source/include/mafianet/CloudCommon.h b/Source/include/mafianet/CloudCommon.h index 7ddb130e8..0a1f7b1dd 100644 --- a/Source/include/mafianet/CloudCommon.h +++ b/Source/include/mafianet/CloudCommon.h @@ -19,8 +19,8 @@ #ifndef __CLOUD_COMMON_H #define __CLOUD_COMMON_H -#include "types.h" -#include "string.h" +#include "RakNetTypes.h" +#include "RakString.h" namespace MafiaNet { diff --git a/Source/include/mafianet/CloudServer.h b/Source/include/mafianet/CloudServer.h index 75d7917bd..558cdb065 100644 --- a/Source/include/mafianet/CloudServer.h +++ b/Source/include/mafianet/CloudServer.h @@ -26,9 +26,9 @@ #define __CLOUD_SERVER_H #include "PluginInterface2.h" -#include "memoryoverride.h" +#include "RakMemoryOverride.h" #include "NativeTypes.h" -#include "string.h" +#include "RakString.h" #include "DS_Hash.h" #include "CloudCommon.h" #include "DS_OrderedList.h" diff --git a/Source/include/mafianet/CommandParserInterface.h b/Source/include/mafianet/CommandParserInterface.h index 17f9312c5..1496a3af2 100644 --- a/Source/include/mafianet/CommandParserInterface.h +++ b/Source/include/mafianet/CommandParserInterface.h @@ -21,8 +21,8 @@ #ifndef __COMMAND_PARSER_INTERFACE #define __COMMAND_PARSER_INTERFACE -#include "memoryoverride.h" -#include "types.h" +#include "RakMemoryOverride.h" +#include "RakNetTypes.h" #include "DS_OrderedList.h" #include "Export.h" diff --git a/Source/include/mafianet/ConnectionGraph2.h b/Source/include/mafianet/ConnectionGraph2.h index 42b61c927..0f3c6ffd0 100644 --- a/Source/include/mafianet/ConnectionGraph2.h +++ b/Source/include/mafianet/ConnectionGraph2.h @@ -24,8 +24,8 @@ #ifndef __CONNECTION_GRAPH_2_H #define __CONNECTION_GRAPH_2_H -#include "memoryoverride.h" -#include "types.h" +#include "RakMemoryOverride.h" +#include "RakNetTypes.h" #include "PluginInterface2.h" #include "DS_List.h" #include "DS_WeightedGraph.h" diff --git a/Source/include/mafianet/ConsoleServer.h b/Source/include/mafianet/ConsoleServer.h index ed7ec1564..12792c42e 100644 --- a/Source/include/mafianet/ConsoleServer.h +++ b/Source/include/mafianet/ConsoleServer.h @@ -24,9 +24,9 @@ #ifndef __CONSOLE_SERVER_H #define __CONSOLE_SERVER_H -#include "memoryoverride.h" +#include "RakMemoryOverride.h" #include "DS_List.h" -#include "types.h" +#include "RakNetTypes.h" #include "Export.h" namespace MafiaNet diff --git a/Source/include/mafianet/DR_SHA1.h b/Source/include/mafianet/DR_SHA1.h index beac1112c..7bf5d60ab 100644 --- a/Source/include/mafianet/DR_SHA1.h +++ b/Source/include/mafianet/DR_SHA1.h @@ -116,7 +116,7 @@ #define SHA1_H_A545E61D43E9404E8D736869AB3CBFE7 // KevinJ: -#include "memoryoverride.h" +#include "RakMemoryOverride.h" #include // Needed for file access #include // Needed for memset and memcpy diff --git a/Source/include/mafianet/DS_BPlusTree.h b/Source/include/mafianet/DS_BPlusTree.h index 8de09b3e2..92e917f38 100644 --- a/Source/include/mafianet/DS_BPlusTree.h +++ b/Source/include/mafianet/DS_BPlusTree.h @@ -38,7 +38,7 @@ #pragma warning( push ) #endif -#include "memoryoverride.h" +#include "RakMemoryOverride.h" /// The namespace DataStructures was only added to avoid compiler errors for commonly named data structures /// As these data structures are stand-alone, you can use them outside of RakNet for your own projects if you wish. diff --git a/Source/include/mafianet/DS_BinarySearchTree.h b/Source/include/mafianet/DS_BinarySearchTree.h index 650f023d7..ff40c423a 100644 --- a/Source/include/mafianet/DS_BinarySearchTree.h +++ b/Source/include/mafianet/DS_BinarySearchTree.h @@ -19,11 +19,18 @@ /// +// Deprecated: DS_BinarySearchTree.h has no consumer in the library and is scheduled for removal in the next +// minor release. Copy it into your project if you depend on it. +// Define MAFIANET_SILENCE_DEPRECATED_INCLUDES to suppress the message. +#ifndef MAFIANET_SILENCE_DEPRECATED_INCLUDES +#pragma message("mafianet/DS_BinarySearchTree.h is deprecated and will be removed; copy it into your project if you use it") +#endif + #ifndef __BINARY_SEARCH_TREE_H #define __BINARY_SEARCH_TREE_H #include "DS_QueueLinkedList.h" -#include "memoryoverride.h" +#include "RakMemoryOverride.h" #include "Export.h" diff --git a/Source/include/mafianet/DS_BytePool.h b/Source/include/mafianet/DS_BytePool.h index a8d8a8bc9..ca3e98081 100644 --- a/Source/include/mafianet/DS_BytePool.h +++ b/Source/include/mafianet/DS_BytePool.h @@ -17,14 +17,21 @@ /// +// Deprecated: DS_BytePool.h has no consumer in the library and is scheduled for removal in the next +// minor release. Copy it into your project if you depend on it. +// Define MAFIANET_SILENCE_DEPRECATED_INCLUDES to suppress the message. +#ifndef MAFIANET_SILENCE_DEPRECATED_INCLUDES +#pragma message("mafianet/DS_BytePool.h is deprecated and will be removed; copy it into your project if you use it") +#endif + #ifndef __BYTE_POOL_H #define __BYTE_POOL_H -#include "memoryoverride.h" +#include "RakMemoryOverride.h" #include "DS_MemoryPool.h" #include "Export.h" #include "SimpleMutex.h" -#include "assert.h" +#include "RakAssert.h" // #define _DISABLE_BYTE_POOL // #define _THREADSAFE_BYTE_POOL diff --git a/Source/include/mafianet/DS_ByteQueue.h b/Source/include/mafianet/DS_ByteQueue.h index 263c4b299..32c1de725 100644 --- a/Source/include/mafianet/DS_ByteQueue.h +++ b/Source/include/mafianet/DS_ByteQueue.h @@ -22,7 +22,7 @@ #ifndef __BYTE_QUEUE_H #define __BYTE_QUEUE_H -#include "memoryoverride.h" +#include "RakMemoryOverride.h" #include "Export.h" /// The namespace DataStructures was only added to avoid compiler errors for commonly named data structures diff --git a/Source/include/mafianet/DS_Hash.h b/Source/include/mafianet/DS_Hash.h index 7bf5be45b..67eb58dfd 100644 --- a/Source/include/mafianet/DS_Hash.h +++ b/Source/include/mafianet/DS_Hash.h @@ -21,11 +21,11 @@ #ifndef __HASH_H #define __HASH_H -#include "assert.h" +#include "RakAssert.h" #include // memmove #include "Export.h" -#include "memoryoverride.h" -#include "string.h" +#include "RakMemoryOverride.h" +#include "RakString.h" /// The namespace DataStructures was only added to avoid compiler errors for commonly named data structures /// As these data structures are stand-alone, you can use them outside of RakNet for your own projects if you wish. diff --git a/Source/include/mafianet/DS_Heap.h b/Source/include/mafianet/DS_Heap.h index 3e08c51b6..bb25d1ec3 100644 --- a/Source/include/mafianet/DS_Heap.h +++ b/Source/include/mafianet/DS_Heap.h @@ -23,10 +23,10 @@ #ifndef __RAKNET_HEAP_H #define __RAKNET_HEAP_H -#include "memoryoverride.h" +#include "RakMemoryOverride.h" #include "DS_List.h" #include "Export.h" -#include "assert.h" +#include "RakAssert.h" #ifdef _MSC_VER #pragma warning( push ) diff --git a/Source/include/mafianet/DS_HuffmanEncodingTree.h b/Source/include/mafianet/DS_HuffmanEncodingTree.h index 4f362f937..8e3ad6697 100644 --- a/Source/include/mafianet/DS_HuffmanEncodingTree.h +++ b/Source/include/mafianet/DS_HuffmanEncodingTree.h @@ -21,7 +21,7 @@ #ifndef __HUFFMAN_ENCODING_TREE #define __HUFFMAN_ENCODING_TREE -#include "memoryoverride.h" +#include "RakMemoryOverride.h" #include "DS_HuffmanEncodingTreeNode.h" #include "BitStream.h" #include "Export.h" diff --git a/Source/include/mafianet/DS_HuffmanEncodingTreeFactory.h b/Source/include/mafianet/DS_HuffmanEncodingTreeFactory.h index 8bc5f201e..632038078 100644 --- a/Source/include/mafianet/DS_HuffmanEncodingTreeFactory.h +++ b/Source/include/mafianet/DS_HuffmanEncodingTreeFactory.h @@ -19,10 +19,17 @@ /// +// Deprecated: DS_HuffmanEncodingTreeFactory.h has no consumer in the library and is scheduled for removal in the next +// minor release. Copy it into your project if you depend on it. +// Define MAFIANET_SILENCE_DEPRECATED_INCLUDES to suppress the message. +#ifndef MAFIANET_SILENCE_DEPRECATED_INCLUDES +#pragma message("mafianet/DS_HuffmanEncodingTreeFactory.h is deprecated and will be removed; copy it into your project if you use it") +#endif + #ifndef __HUFFMAN_ENCODING_TREE_FACTORY #define __HUFFMAN_ENCODING_TREE_FACTORY -#include "memoryoverride.h" +#include "RakMemoryOverride.h" namespace MafiaNet { /// Forward declarations diff --git a/Source/include/mafianet/DS_LinkedList.h b/Source/include/mafianet/DS_LinkedList.h index c4ddc7529..e5523591a 100644 --- a/Source/include/mafianet/DS_LinkedList.h +++ b/Source/include/mafianet/DS_LinkedList.h @@ -23,7 +23,7 @@ #define __LINKED_LIST_H #include "Export.h" -#include "memoryoverride.h" +#include "RakMemoryOverride.h" /// The namespace DataStructures was only added to avoid compiler errors for commonly named data structures /// As these data structures are stand-alone, you can use them outside of RakNet for your own projects if you wish. diff --git a/Source/include/mafianet/DS_List.h b/Source/include/mafianet/DS_List.h index e4b893eba..92e9de6c7 100644 --- a/Source/include/mafianet/DS_List.h +++ b/Source/include/mafianet/DS_List.h @@ -23,10 +23,10 @@ #ifndef __LIST_H #define __LIST_H -#include "assert.h" +#include "RakAssert.h" #include // memmove #include "Export.h" -#include "memoryoverride.h" +#include "RakMemoryOverride.h" /// Maximum unsigned long static const unsigned int MAX_UNSIGNED_LONG = 4294967295U; diff --git a/Source/include/mafianet/DS_Map.h b/Source/include/mafianet/DS_Map.h index 06581bb82..c8014fe39 100644 --- a/Source/include/mafianet/DS_Map.h +++ b/Source/include/mafianet/DS_Map.h @@ -24,8 +24,8 @@ #include "DS_OrderedList.h" #include "Export.h" -#include "memoryoverride.h" -#include "assert.h" +#include "RakMemoryOverride.h" +#include "RakAssert.h" // If I want to change this to a red-black tree, this is a good site: http://www.cs.auckland.ac.nz/software/AlgAnim/red_black.html // This makes insertions and deletions faster. But then traversals are slow, while they are currently fast. diff --git a/Source/include/mafianet/DS_MemoryPool.h b/Source/include/mafianet/DS_MemoryPool.h index 5b2e7c59b..f3775a48e 100644 --- a/Source/include/mafianet/DS_MemoryPool.h +++ b/Source/include/mafianet/DS_MemoryPool.h @@ -24,10 +24,10 @@ // Use stdlib and not malloc for compatibility #include #endif -#include "assert.h" +#include "RakAssert.h" #include "Export.h" -#include "memoryoverride.h" +#include "RakMemoryOverride.h" // DS_MEMORY_POOL_MAX_FREE_PAGES must be > 1 #define DS_MEMORY_POOL_MAX_FREE_PAGES 4 diff --git a/Source/include/mafianet/DS_Multilist.h b/Source/include/mafianet/DS_Multilist.h index c7f1dda80..2e48a7e2b 100644 --- a/Source/include/mafianet/DS_Multilist.h +++ b/Source/include/mafianet/DS_Multilist.h @@ -21,10 +21,10 @@ #ifndef __MULTILIST_H #define __MULTILIST_H -#include "assert.h" +#include "RakAssert.h" #include // memmove #include "Export.h" -#include "memoryoverride.h" +#include "RakMemoryOverride.h" #include "NativeTypes.h" diff --git a/Source/include/mafianet/DS_OrderedChannelHeap.h b/Source/include/mafianet/DS_OrderedChannelHeap.h index a967c7050..e4e996001 100644 --- a/Source/include/mafianet/DS_OrderedChannelHeap.h +++ b/Source/include/mafianet/DS_OrderedChannelHeap.h @@ -19,6 +19,13 @@ /// +// Deprecated: DS_OrderedChannelHeap.h has no consumer in the library and is scheduled for removal in the next +// minor release. Copy it into your project if you depend on it. +// Define MAFIANET_SILENCE_DEPRECATED_INCLUDES to suppress the message. +#ifndef MAFIANET_SILENCE_DEPRECATED_INCLUDES +#pragma message("mafianet/DS_OrderedChannelHeap.h is deprecated and will be removed; copy it into your project if you use it") +#endif + #ifndef __RAKNET_ORDERED_CHANNEL_HEAP_H #define __RAKNET_ORDERED_CHANNEL_HEAP_H @@ -26,7 +33,7 @@ #include "DS_Map.h" #include "DS_Queue.h" #include "Export.h" -#include "assert.h" +#include "RakAssert.h" #include "Rand.h" /// The namespace DataStructures was only added to avoid compiler errors for commonly named data structures diff --git a/Source/include/mafianet/DS_OrderedList.h b/Source/include/mafianet/DS_OrderedList.h index 8d5cfe775..349ea980a 100644 --- a/Source/include/mafianet/DS_OrderedList.h +++ b/Source/include/mafianet/DS_OrderedList.h @@ -19,7 +19,7 @@ /// #include "DS_List.h" -#include "memoryoverride.h" +#include "RakMemoryOverride.h" #include "Export.h" #ifndef __ORDERED_LIST_H diff --git a/Source/include/mafianet/DS_Queue.h b/Source/include/mafianet/DS_Queue.h index f222177e4..9ecc4c01a 100644 --- a/Source/include/mafianet/DS_Queue.h +++ b/Source/include/mafianet/DS_Queue.h @@ -23,9 +23,9 @@ #define __QUEUE_H // Template classes have to have all the code in the header file -#include "assert.h" +#include "RakAssert.h" #include "Export.h" -#include "memoryoverride.h" +#include "RakMemoryOverride.h" /// The namespace DataStructures was only added to avoid compiler errors for commonly named data structures /// As these data structures are stand-alone, you can use them outside of RakNet for your own projects if you wish. diff --git a/Source/include/mafianet/DS_QueueLinkedList.h b/Source/include/mafianet/DS_QueueLinkedList.h index b8f83c21d..7590c063b 100644 --- a/Source/include/mafianet/DS_QueueLinkedList.h +++ b/Source/include/mafianet/DS_QueueLinkedList.h @@ -19,12 +19,19 @@ /// +// Deprecated: DS_QueueLinkedList.h has only used by the deprecated DS_BinarySearchTree and is scheduled for removal in the next +// minor release. Copy it into your project if you depend on it. +// Define MAFIANET_SILENCE_DEPRECATED_INCLUDES to suppress the message. +#ifndef MAFIANET_SILENCE_DEPRECATED_INCLUDES +#pragma message("mafianet/DS_QueueLinkedList.h is deprecated and will be removed; copy it into your project if you use it") +#endif + #ifndef __QUEUE_LINKED_LIST_H #define __QUEUE_LINKED_LIST_H #include "DS_LinkedList.h" #include "Export.h" -#include "memoryoverride.h" +#include "RakMemoryOverride.h" /// The namespace DataStructures was only added to avoid compiler errors for commonly named data structures /// As these data structures are stand-alone, you can use them outside of RakNet for your own projects if you wish. diff --git a/Source/include/mafianet/DS_RangeList.h b/Source/include/mafianet/DS_RangeList.h index ca609c4a4..b6dfc4920 100644 --- a/Source/include/mafianet/DS_RangeList.h +++ b/Source/include/mafianet/DS_RangeList.h @@ -24,8 +24,8 @@ #include "DS_OrderedList.h" #include "BitStream.h" -#include "memoryoverride.h" -#include "assert.h" +#include "RakMemoryOverride.h" +#include "RakAssert.h" namespace DataStructures { diff --git a/Source/include/mafianet/DS_Table.h b/Source/include/mafianet/DS_Table.h index 0b71890e4..bf8b1bbe1 100644 --- a/Source/include/mafianet/DS_Table.h +++ b/Source/include/mafianet/DS_Table.h @@ -22,9 +22,9 @@ #include "DS_List.h" #include "DS_BPlusTree.h" -#include "memoryoverride.h" +#include "RakMemoryOverride.h" #include "Export.h" -#include "string.h" +#include "RakString.h" #define _TABLE_BPLUS_TREE_ORDER 16 #define _TABLE_MAX_COLUMN_NAME_LENGTH 64 diff --git a/Source/include/mafianet/DS_Tree.h b/Source/include/mafianet/DS_Tree.h index afcb7a7e5..ec8de8b13 100644 --- a/Source/include/mafianet/DS_Tree.h +++ b/Source/include/mafianet/DS_Tree.h @@ -26,7 +26,7 @@ #include "Export.h" #include "DS_List.h" #include "DS_Queue.h" -#include "memoryoverride.h" +#include "RakMemoryOverride.h" /// The namespace DataStructures was only added to avoid compiler errors for commonly named data structures /// As these data structures are stand-alone, you can use them outside of RakNet for your own projects if you wish. diff --git a/Source/include/mafianet/DS_WeightedGraph.h b/Source/include/mafianet/DS_WeightedGraph.h index b77e5fcc4..9edc646bd 100644 --- a/Source/include/mafianet/DS_WeightedGraph.h +++ b/Source/include/mafianet/DS_WeightedGraph.h @@ -28,8 +28,8 @@ #include "DS_Heap.h" #include "DS_Queue.h" #include "DS_Tree.h" -#include "assert.h" -#include "memoryoverride.h" +#include "RakAssert.h" +#include "RakMemoryOverride.h" #ifdef _DEBUG #include #endif diff --git a/Source/include/mafianet/DataCompressor.h b/Source/include/mafianet/DataCompressor.h index e81004f82..2f4274dab 100644 --- a/Source/include/mafianet/DataCompressor.h +++ b/Source/include/mafianet/DataCompressor.h @@ -22,7 +22,7 @@ #ifndef __DATA_COMPRESSOR_H #define __DATA_COMPRESSOR_H -#include "memoryoverride.h" +#include "RakMemoryOverride.h" #include "DS_HuffmanEncodingTree.h" #include "Export.h" diff --git a/Source/include/mafianet/DirectoryDeltaTransfer.h b/Source/include/mafianet/DirectoryDeltaTransfer.h index bcbe4258a..41b357c08 100644 --- a/Source/include/mafianet/DirectoryDeltaTransfer.h +++ b/Source/include/mafianet/DirectoryDeltaTransfer.h @@ -25,8 +25,8 @@ #ifndef __DIRECTORY_DELTA_TRANSFER_H #define __DIRECTORY_DELTA_TRANSFER_H -#include "memoryoverride.h" -#include "types.h" +#include "RakMemoryOverride.h" +#include "RakNetTypes.h" #include "Export.h" #include "PluginInterface2.h" #include "DS_Map.h" diff --git a/Source/include/mafianet/Dispatcher.h b/Source/include/mafianet/Dispatcher.h index 63a93a7ce..90781e882 100644 --- a/Source/include/mafianet/Dispatcher.h +++ b/Source/include/mafianet/Dispatcher.h @@ -54,9 +54,9 @@ #include "mafianet/BitStream.h" // BitStream over the packet body #include "mafianet/MessageIdentifiers.h" // ID_TIMESTAMP, ID_USER_PACKET_ENUM #include "mafianet/PeerHandle.h" // PacketPtr -#include "mafianet/guid_util.h" // MafiaNet::to_string (owning, thread-safe) -#include "mafianet/time.h" // MafiaNet::Time (timestamp-prefix width) -#include "mafianet/types.h" // Packet, MessageID, RakNetGUID, SystemAddress, PeerGuid +#include "mafianet/GuidUtil.h" // MafiaNet::to_string (owning, thread-safe) +#include "mafianet/RakNetTime.h" // MafiaNet::Time (timestamp-prefix width) +#include "mafianet/RakNetTypes.h" // Packet, MessageID, RakNetGUID, SystemAddress, PeerGuid namespace MafiaNet { diff --git a/Source/include/mafianet/DynDNS.h b/Source/include/mafianet/DynDNS.h index 09dce0cd0..48b04afd7 100644 --- a/Source/include/mafianet/DynDNS.h +++ b/Source/include/mafianet/DynDNS.h @@ -25,7 +25,7 @@ #ifndef __DYN_DNS_H #define __DYN_DNS_H -#include "string.h" +#include "RakString.h" namespace MafiaNet { diff --git a/Source/include/mafianet/EmailSender.h b/Source/include/mafianet/EmailSender.h index 0501ce7e4..01901d417 100644 --- a/Source/include/mafianet/EmailSender.h +++ b/Source/include/mafianet/EmailSender.h @@ -23,8 +23,8 @@ #ifndef __EMAIL_SENDER_H #define __EMAIL_SENDER_H -#include "types.h" -#include "memoryoverride.h" +#include "RakNetTypes.h" +#include "RakMemoryOverride.h" #include "Export.h" #include "Rand.h" #include "TCPInterface.h" diff --git a/Source/include/mafianet/Export.h b/Source/include/mafianet/Export.h index 3ae92b488..4ff308d0a 100644 --- a/Source/include/mafianet/Export.h +++ b/Source/include/mafianet/Export.h @@ -13,7 +13,7 @@ * license found in the license.txt file in the root directory of this source tree. */ -#include "defines.h" +#include "RakNetDefines.h" #if defined(_WIN32) && !(defined(__GNUC__) || defined(__GCCXML__)) && !defined(_MAFIANET_LIB) && defined(_MAFIANET_DLL) #define RAK_DLL_EXPORT __declspec(dllexport) diff --git a/Source/include/mafianet/FileList.h b/Source/include/mafianet/FileList.h index 58d342594..058e1c8d0 100644 --- a/Source/include/mafianet/FileList.h +++ b/Source/include/mafianet/FileList.h @@ -25,10 +25,10 @@ #include "Export.h" #include "DS_List.h" -#include "memoryoverride.h" -#include "types.h" +#include "RakMemoryOverride.h" +#include "RakNetTypes.h" #include "FileListNodeContext.h" -#include "string.h" +#include "RakString.h" namespace MafiaNet { diff --git a/Source/include/mafianet/FileListTransfer.h b/Source/include/mafianet/FileListTransfer.h index 1b6ad9869..7cd73114e 100644 --- a/Source/include/mafianet/FileListTransfer.h +++ b/Source/include/mafianet/FileListTransfer.h @@ -24,13 +24,13 @@ #ifndef __FILE_LIST_TRANFER_H #define __FILE_LIST_TRANFER_H -#include "types.h" +#include "RakNetTypes.h" #include "Export.h" #include "PluginInterface2.h" #include "DS_Map.h" -#include "types.h" +#include "RakNetTypes.h" #include "PacketPriority.h" -#include "memoryoverride.h" +#include "RakMemoryOverride.h" #include "FileList.h" #include "DS_Queue.h" #include "SimpleMutex.h" diff --git a/Source/include/mafianet/FileListTransferCBInterface.h b/Source/include/mafianet/FileListTransferCBInterface.h index ade0309ac..77bf80251 100644 --- a/Source/include/mafianet/FileListTransferCBInterface.h +++ b/Source/include/mafianet/FileListTransferCBInterface.h @@ -20,7 +20,7 @@ #ifndef __FILE_LIST_TRANSFER_CALLBACK_INTERFACE_H #define __FILE_LIST_TRANSFER_CALLBACK_INTERFACE_H -#include "memoryoverride.h" +#include "RakMemoryOverride.h" #include "FileListNodeContext.h" namespace MafiaNet diff --git a/Source/include/mafianet/FullyConnectedMesh2.h b/Source/include/mafianet/FullyConnectedMesh2.h index 6c81b49a0..8283abd2e 100644 --- a/Source/include/mafianet/FullyConnectedMesh2.h +++ b/Source/include/mafianet/FullyConnectedMesh2.h @@ -26,10 +26,10 @@ #define __FULLY_CONNECTED_MESH_2_H #include "PluginInterface2.h" -#include "memoryoverride.h" +#include "RakMemoryOverride.h" #include "NativeTypes.h" #include "DS_List.h" -#include "string.h" +#include "RakString.h" #include "BitStream.h" typedef int64_t FCM2Guid; diff --git a/Source/include/mafianet/GetTime.h b/Source/include/mafianet/GetTime.h index d57243ef9..20ea1b204 100644 --- a/Source/include/mafianet/GetTime.h +++ b/Source/include/mafianet/GetTime.h @@ -22,7 +22,7 @@ #define __GET_TIME_H #include "Export.h" -#include "time.h" // For MafiaNet::TimeMS +#include "RakNetTime.h" // For MafiaNet::TimeMS namespace MafiaNet { diff --git a/Source/include/mafianet/gettimeofday.h b/Source/include/mafianet/GetTimeOfDay.h similarity index 100% rename from Source/include/mafianet/gettimeofday.h rename to Source/include/mafianet/GetTimeOfDay.h diff --git a/Source/include/mafianet/GridSectorizer.h b/Source/include/mafianet/GridSectorizer.h index 3890fcc02..6f4dd30eb 100644 --- a/Source/include/mafianet/GridSectorizer.h +++ b/Source/include/mafianet/GridSectorizer.h @@ -18,7 +18,7 @@ //#define _USE_ORDERED_LIST -#include "memoryoverride.h" +#include "RakMemoryOverride.h" #ifdef _USE_ORDERED_LIST #include "DS_OrderedList.h" diff --git a/Source/include/mafianet/GuidUtil.h b/Source/include/mafianet/GuidUtil.h new file mode 100644 index 000000000..8048c42c5 --- /dev/null +++ b/Source/include/mafianet/GuidUtil.h @@ -0,0 +1,48 @@ +/* + * Copyright (c) 2024, MafiaHub + * + * This source code is licensed under the MIT-style license found in the + * license.txt file in the root directory of this source tree. + */ + +/// \file +/// \brief Modern, additive value-type accessors layered over the legacy +/// RakNet/SLikeNet value types (\a RakNetGUID, \a SystemAddress). +/// +/// These free functions live alongside the legacy struct methods rather than +/// inside them, so they don't touch the wire-transmitted ABI of \a RakNetGUID. +/// They favour ownership over shared static buffers and \a std::optional over +/// sentinel return values, giving callers thread-safe, leak-free primitives to +/// build cleaner APIs on top of. + +#ifndef __MAFIANET_GUID_UTIL_H +#define __MAFIANET_GUID_UTIL_H + +#include +#include + +#include "RakNetTypes.h" +#include "RakPeerInterface.h" + +namespace MafiaNet { + +/// Return the GUID as an owned \a std::string. +/// +/// Unlike the legacy \a RakNetGUID::ToString() member (which returned a pointer +/// into a rotating, process-wide static buffer and was explicitly NOT thread +/// safe), this allocates a fresh string on every call and shares no state, so +/// it is safe to call concurrently from multiple threads. It is implemented on +/// top of the thread-safe \a RakNetGUID::ToString(char*, size_t) member. +RAK_DLL_EXPORT std::string to_string(const RakNetGUID& g); + +/// Look up the SystemAddress currently connected to \a g. +/// +/// A thin facade over \a RakPeerInterface::GetSystemAddressFromGuid that maps +/// the legacy \a UNASSIGNED_SYSTEM_ADDRESS "none" sentinel to \a std::nullopt, +/// so callers can use ordinary optional handling instead of comparing against a +/// magic value. +RAK_DLL_EXPORT std::optional connected_address(RakPeerInterface& peer, const RakNetGUID& g); + +} // namespace MafiaNet + +#endif // __MAFIANET_GUID_UTIL_H diff --git a/Source/include/mafianet/HTTPConnection.h b/Source/include/mafianet/HTTPConnection.h index 52bae2b8f..d29c04e88 100644 --- a/Source/include/mafianet/HTTPConnection.h +++ b/Source/include/mafianet/HTTPConnection.h @@ -25,9 +25,9 @@ #define __HTTP_CONNECTION #include "Export.h" -#include "string.h" -#include "memoryoverride.h" -#include "types.h" +#include "RakString.h" +#include "RakMemoryOverride.h" +#include "RakNetTypes.h" #include "DS_Queue.h" namespace MafiaNet diff --git a/Source/include/mafianet/HTTPConnection2.h b/Source/include/mafianet/HTTPConnection2.h index 9511de97b..031276956 100644 --- a/Source/include/mafianet/HTTPConnection2.h +++ b/Source/include/mafianet/HTTPConnection2.h @@ -26,9 +26,9 @@ #define __HTTP_CONNECTION_2 #include "Export.h" -#include "string.h" -#include "memoryoverride.h" -#include "types.h" +#include "RakString.h" +#include "RakMemoryOverride.h" +#include "RakNetTypes.h" #include "DS_List.h" #include "DS_Queue.h" #include "PluginInterface2.h" diff --git a/Source/include/mafianet/InternalPacket.h b/Source/include/mafianet/InternalPacket.h index db4ccc754..e9fbe99f7 100644 --- a/Source/include/mafianet/InternalPacket.h +++ b/Source/include/mafianet/InternalPacket.h @@ -21,11 +21,11 @@ #define __INTERNAL_PACKET_H #include "PacketPriority.h" -#include "types.h" -#include "memoryoverride.h" -#include "defines.h" +#include "RakNetTypes.h" +#include "RakMemoryOverride.h" +#include "RakNetDefines.h" #include "NativeTypes.h" -#include "defines.h" +#include "RakNetDefines.h" #if USE_SLIDING_WINDOW_CONGESTION_CONTROL!=1 #include "CCRakNetUDT.h" #else diff --git a/Source/include/mafianet/LinuxAdapter.h b/Source/include/mafianet/LinuxAdapter.h new file mode 100644 index 000000000..ee83d384f --- /dev/null +++ b/Source/include/mafianet/LinuxAdapter.h @@ -0,0 +1,88 @@ +/* + * Copyright (c) 2016-2019, SLikeSoft UG (haftungsbeschränkt) + * + * This source code is licensed under the MIT-style license found in the + * license.txt file in the root directory of this source tree. + * + * + * This file declares adapters for all MS-specific functions used throughout MafiaNet. + */ +#pragma once + +#ifdef __linux__ +#define _TRUNCATE ((size_t)-1) +typedef int errno_t; + +#include // for va_start, va_end, va_list +#include // for FILE +#include // for time_t + +// MS specific security enhanced functions +errno_t fopen_s(FILE **pfile, const char *filename, const char *mode); +errno_t localtime_s(struct tm* _tm, const time_t *time); +errno_t mbstowcs_s(size_t *pReturnValue, wchar_t *wcstr, size_t sizeInWords, const char *mbstr, size_t count); +int sprintf_s(char *buffer, size_t sizeOfBuffer, const char *format, ...); +errno_t strcat_s(char *strDestination, size_t numberOfElements, const char *strSource); +errno_t strcpy_s(char* strDestination, size_t numberOfElements, const char *strSource); +errno_t strerror_s(char* buffer, size_t numberOfElements, int errnum); +errno_t strncat_s(char *strDest, size_t numberOfElements, const char *strSource, size_t count); +errno_t strncpy_s(char *strDest, size_t numberOfElements, const char *strSource, size_t count); +int vsnprintf_s(char *buffer, size_t sizeOfBuffer, size_t count, const char *format, va_list argptr); +errno_t wcscat_s(wchar_t *strDestination, size_t numberOfElements, const wchar_t *strSource); +errno_t wcscpy_s(wchar_t* strDestination, size_t numberOfElements, const wchar_t *strSource); + +// corresponding template overloads +template errno_t mbstowcs_s(size_t *pReturnValue, wchar_t(&wcstr)[BufferSize], const char *mbstr, size_t count) +{ + return mbstowcs_s(pReturnValue, wcstr, BufferSize, mbstr, count); +} + +template int sprintf_s(char (&buffer)[BufferSize], const char* format, ...) +{ + va_list arglist; + va_start(arglist, format); + int numCharsWritten = vsnprintf_s(buffer, BufferSize, BufferSize - 1, format, arglist); + va_end(arglist); + + return numCharsWritten; +} + +template errno_t strcat_s(char (&strDestination)[BufferSize], const char* strSource) +{ + return strcat_s(strDestination, BufferSize, strSource); +} + +template errno_t strcpy_s(char (&strDestination)[BufferSize], const char* strSource) +{ + return strcpy_s(strDestination, BufferSize, strSource); +} + +template errno_t strerror_s(char(&buffer)[BufferSize], int errnum) +{ + return strerror_s(buffer, BufferSize, errnum); +} + +template errno_t strncat_s(char(&strDest)[BufferSize], const char *strSource, size_t count) +{ + return strncat_s(strDest, BufferSize, strSource, count); +} + +template errno_t strncpy_s(char(&strDest)[BufferSize], const char *strSource, size_t count) +{ + return strncpy_s(strDest, BufferSize, strSource, count); +} + +template int vsnprintf_s(char (&buffer)[BufferSize], size_t count, const char *format, va_list argptr) +{ + return vsnprintf_s(buffer, BufferSize, count, format, argptr); +} + +// MS gets_s function adapter - wraps MafiaNet's Gets function +// Note: Samples should include this header for gets_s support on Linux +#include "Gets.h" +template char* gets_s(char (&buffer)[BufferSize]) +{ + return Gets(buffer, static_cast(BufferSize)); +} + +#endif diff --git a/Source/include/mafianet/MessageFilter.h b/Source/include/mafianet/MessageFilter.h index dd670b870..8c1f30285 100644 --- a/Source/include/mafianet/MessageFilter.h +++ b/Source/include/mafianet/MessageFilter.h @@ -23,7 +23,7 @@ #ifndef __MESSAGE_FILTER_PLUGIN_H #define __MESSAGE_FILTER_PLUGIN_H -#include "types.h" +#include "RakNetTypes.h" #include "PluginInterface2.h" #include "DS_OrderedList.h" #include "DS_Hash.h" diff --git a/Source/include/mafianet/MmsgBatch.h b/Source/include/mafianet/MmsgBatch.h index 9e33254c4..cfc2033a2 100644 --- a/Source/include/mafianet/MmsgBatch.h +++ b/Source/include/mafianet/MmsgBatch.h @@ -22,9 +22,9 @@ #ifndef __MAFIANET_MMSG_BATCH_H #define __MAFIANET_MMSG_BATCH_H -#include "mafianet/socket2.h" -#include "mafianet/assert.h" -#include "mafianet/memoryoverride.h" +#include "mafianet/RakNetSocket2.h" +#include "mafianet/RakAssert.h" +#include "mafianet/RakMemoryOverride.h" #include // memcpy #include // RAKNET_DEBUG_PRINTF defaults to printf diff --git a/Source/include/mafianet/NatPunchthroughClient.h b/Source/include/mafianet/NatPunchthroughClient.h index f6c1a2181..94e8e8901 100644 --- a/Source/include/mafianet/NatPunchthroughClient.h +++ b/Source/include/mafianet/NatPunchthroughClient.h @@ -23,13 +23,13 @@ #ifndef __NAT_PUNCHTHROUGH_CLIENT_H #define __NAT_PUNCHTHROUGH_CLIENT_H -#include "types.h" +#include "RakNetTypes.h" #include "Export.h" #include "PluginInterface2.h" #include "PacketPriority.h" #include "SocketIncludes.h" #include "DS_List.h" -#include "string.h" +#include "RakString.h" #include "DS_Queue.h" // Trendnet TEW-632BRP sometimes starts at port 1024 and increments sequentially. diff --git a/Source/include/mafianet/NatPunchthroughServer.h b/Source/include/mafianet/NatPunchthroughServer.h index 938e484d3..eb69cd78f 100644 --- a/Source/include/mafianet/NatPunchthroughServer.h +++ b/Source/include/mafianet/NatPunchthroughServer.h @@ -24,13 +24,13 @@ #ifndef __NAT_PUNCHTHROUGH_SERVER_H #define __NAT_PUNCHTHROUGH_SERVER_H -#include "types.h" +#include "RakNetTypes.h" #include "Export.h" #include "PluginInterface2.h" #include "PacketPriority.h" #include "SocketIncludes.h" #include "DS_OrderedList.h" -#include "string.h" +#include "RakString.h" namespace MafiaNet { diff --git a/Source/include/mafianet/NatTypeDetectionClient.h b/Source/include/mafianet/NatTypeDetectionClient.h index a834080fa..e8de1ecaf 100644 --- a/Source/include/mafianet/NatTypeDetectionClient.h +++ b/Source/include/mafianet/NatTypeDetectionClient.h @@ -24,13 +24,13 @@ #ifndef __NAT_TYPE_DETECTION_CLIENT_H #define __NAT_TYPE_DETECTION_CLIENT_H -#include "types.h" +#include "RakNetTypes.h" #include "Export.h" #include "PluginInterface2.h" #include "PacketPriority.h" #include "SocketIncludes.h" #include "DS_OrderedList.h" -#include "string.h" +#include "RakString.h" #include "NatTypeDetectionCommon.h" namespace MafiaNet diff --git a/Source/include/mafianet/NatTypeDetectionCommon.h b/Source/include/mafianet/NatTypeDetectionCommon.h index e333983af..41b15dd46 100644 --- a/Source/include/mafianet/NatTypeDetectionCommon.h +++ b/Source/include/mafianet/NatTypeDetectionCommon.h @@ -26,8 +26,8 @@ #if _RAKNET_SUPPORT_NatTypeDetectionServer==1 || _RAKNET_SUPPORT_NatTypeDetectionClient==1 #include "SocketIncludes.h" -#include "types.h" -#include "socket2.h" +#include "RakNetTypes.h" +#include "RakNetSocket2.h" namespace MafiaNet { diff --git a/Source/include/mafianet/NatTypeDetectionServer.h b/Source/include/mafianet/NatTypeDetectionServer.h index 92c135089..d9d72cb6c 100644 --- a/Source/include/mafianet/NatTypeDetectionServer.h +++ b/Source/include/mafianet/NatTypeDetectionServer.h @@ -23,13 +23,13 @@ #ifndef __NAT_TYPE_DETECTION_SERVER_H #define __NAT_TYPE_DETECTION_SERVER_H -#include "types.h" +#include "RakNetTypes.h" #include "Export.h" #include "PluginInterface2.h" #include "PacketPriority.h" #include "SocketIncludes.h" #include "DS_OrderedList.h" -#include "string.h" +#include "RakString.h" #include "NatTypeDetectionCommon.h" diff --git a/Source/include/mafianet/NetworkIDManager.h b/Source/include/mafianet/NetworkIDManager.h index 24b99bb53..1de68cd7f 100644 --- a/Source/include/mafianet/NetworkIDManager.h +++ b/Source/include/mafianet/NetworkIDManager.h @@ -20,9 +20,9 @@ #ifndef __NETWORK_ID_MANAGER_H #define __NETWORK_ID_MANAGER_H -#include "types.h" +#include "RakNetTypes.h" #include "Export.h" -#include "memoryoverride.h" +#include "RakMemoryOverride.h" #include "NetworkIDObject.h" #include "Rand.h" diff --git a/Source/include/mafianet/NetworkIDObject.h b/Source/include/mafianet/NetworkIDObject.h index 9b48f5051..7bf338253 100644 --- a/Source/include/mafianet/NetworkIDObject.h +++ b/Source/include/mafianet/NetworkIDObject.h @@ -21,8 +21,8 @@ #if !defined(__NETWORK_ID_GENERATOR) #define __NETWORK_ID_GENERATOR -#include "types.h" -#include "memoryoverride.h" +#include "RakNetTypes.h" +#include "RakMemoryOverride.h" #include "Export.h" namespace MafiaNet diff --git a/Source/include/mafianet/OsxAdapter.h b/Source/include/mafianet/OsxAdapter.h new file mode 100644 index 000000000..1b0273b57 --- /dev/null +++ b/Source/include/mafianet/OsxAdapter.h @@ -0,0 +1,91 @@ +/* + * Copyright (c) 2016-2019, SLikeSoft UG (haftungsbeschränkt) + * + * This source code is licensed under the MIT-style license found in the + * license.txt file in the root directory of this source tree. + * + * + * This file declares adapters for all MS-specific functions used throughout MafiaNet. + */ +#pragma once + +#ifdef __APPLE__ +#define _TRUNCATE ((size_t)-1) +typedef int errno_t; + +#include // for va_start, va_end, va_list +#include // for FILE +#include // for time_t + +// MS specific string functions +char *_strlwr(char *str); + +// MS specific security enhanced functions +errno_t fopen_s(FILE **pfile, const char *filename, const char *mode); +errno_t localtime_s(struct tm* _tm, const time_t *time); +errno_t mbstowcs_s(size_t *pReturnValue, wchar_t *wcstr, size_t sizeInWords, const char *mbstr, size_t count); +int sprintf_s(char *buffer, size_t sizeOfBuffer, const char *format, ...); +errno_t strcat_s(char *strDestination, size_t numberOfElements, const char *strSource); +errno_t strcpy_s(char* strDestination, size_t numberOfElements, const char *strSource); +errno_t strerror_s(char* buffer, size_t numberOfElements, int errnum); +errno_t strncat_s(char *strDest, size_t numberOfElements, const char *strSource, size_t count); +errno_t strncpy_s(char *strDest, size_t numberOfElements, const char *strSource, size_t count); +int vsnprintf_s(char *buffer, size_t sizeOfBuffer, size_t count, const char *format, va_list argptr); +errno_t wcscat_s(wchar_t *strDestination, size_t numberOfElements, const wchar_t *strSource); +errno_t wcscpy_s(wchar_t* strDestination, size_t numberOfElements, const wchar_t *strSource); + +// corresponding template overloads +template errno_t mbstowcs_s(size_t *pReturnValue, wchar_t(&wcstr)[BufferSize], const char *mbstr, size_t count) +{ + return mbstowcs_s(pReturnValue, wcstr, BufferSize, mbstr, count); +} + +template int sprintf_s(char (&buffer)[BufferSize], const char* format, ...) +{ + va_list arglist; + va_start(arglist, format); + int numCharsWritten = vsnprintf_s(buffer, BufferSize, BufferSize - 1, format, arglist); + va_end(arglist); + + return numCharsWritten; +} + +template errno_t strcat_s(char (&strDestination)[BufferSize], const char* strSource) +{ + return strcat_s(strDestination, BufferSize, strSource); +} + +template errno_t strcpy_s(char (&strDestination)[BufferSize], const char* strSource) +{ + return strcpy_s(strDestination, BufferSize, strSource); +} + +template errno_t strerror_s(char(&buffer)[BufferSize], int errnum) +{ + return strerror_s(buffer, BufferSize, errnum); +} + +template errno_t strncat_s(char (&strDest)[BufferSize], const char *strSource, size_t count) +{ + return strncat_s(strDest, BufferSize, strSource, count); +} + +template errno_t strncpy_s(char (&strDest)[BufferSize], const char *strSource, size_t count) +{ + return strncpy_s(strDest, BufferSize, strSource, count); +} + +template int vsnprintf_s(char (&buffer)[BufferSize], size_t count, const char *format, va_list argptr) +{ + return vsnprintf_s(buffer, BufferSize, count, format, argptr); +} + +// MS gets_s function adapter - wraps MafiaNet's Gets function +// Note: Samples should include this header for gets_s support on macOS +#include "Gets.h" +template char* gets_s(char (&buffer)[BufferSize]) +{ + return Gets(buffer, static_cast(BufferSize)); +} + +#endif diff --git a/Source/include/mafianet/PacketLogger.h b/Source/include/mafianet/PacketLogger.h index 638259038..caa7325f1 100644 --- a/Source/include/mafianet/PacketLogger.h +++ b/Source/include/mafianet/PacketLogger.h @@ -24,7 +24,7 @@ #ifndef __PACKET_LOGGER_H #define __PACKET_LOGGER_H -#include "types.h" +#include "RakNetTypes.h" #include "PluginInterface2.h" #include "Export.h" diff --git a/Source/include/mafianet/PeerHandle.h b/Source/include/mafianet/PeerHandle.h index 779698c77..b1824e069 100644 --- a/Source/include/mafianet/PeerHandle.h +++ b/Source/include/mafianet/PeerHandle.h @@ -19,8 +19,8 @@ #include // std::string (owned password / bind-address in the builders) #include // std::move -#include "mafianet/peerinterface.h" // RakPeerInterface, Send, Receive, DeallocatePacket, GetInstance, DestroyInstance -#include "mafianet/types.h" // Packet, StartupResult, ConnectionAttemptResult, SocketDescriptor, PublicKey, AddressOrGUID +#include "mafianet/RakPeerInterface.h" // RakPeerInterface, Send, Receive, DeallocatePacket, GetInstance, DestroyInstance +#include "mafianet/RakNetTypes.h" // Packet, StartupResult, ConnectionAttemptResult, SocketDescriptor, PublicKey, AddressOrGUID #include "mafianet/PacketPriority.h"// Priority, Reliability (scoped enums with the send defaults) #include "mafianet/BitStream.h" // BitStream (the encode() scratch buffer for send/broadcast) #include "mafianet/Export.h" // RAK_DLL_EXPORT diff --git a/Source/include/mafianet/PluginInterface2.h b/Source/include/mafianet/PluginInterface2.h index e07337556..f392d9894 100644 --- a/Source/include/mafianet/PluginInterface2.h +++ b/Source/include/mafianet/PluginInterface2.h @@ -22,7 +22,7 @@ #define __PLUGIN_INTERFACE_2_H #include "NativeFeatureIncludes.h" -#include "types.h" +#include "RakNetTypes.h" #include "Export.h" #include "PacketPriority.h" diff --git a/Source/include/mafianet/PointGridSectorizer.h b/Source/include/mafianet/PointGridSectorizer.h index 386973d50..76f7d1c5d 100644 --- a/Source/include/mafianet/PointGridSectorizer.h +++ b/Source/include/mafianet/PointGridSectorizer.h @@ -22,7 +22,7 @@ #define MAFIANET_POINT_GRID_SECTORIZER_H #include "Export.h" -#include "memoryoverride.h" +#include "RakMemoryOverride.h" #include "DS_List.h" namespace MafiaNet diff --git a/Source/include/mafianet/RPC4Plugin.h b/Source/include/mafianet/RPC4Plugin.h index 04dcfa08c..50592840b 100644 --- a/Source/include/mafianet/RPC4Plugin.h +++ b/Source/include/mafianet/RPC4Plugin.h @@ -26,9 +26,9 @@ #include "PluginInterface2.h" #include "PacketPriority.h" -#include "types.h" +#include "RakNetTypes.h" #include "BitStream.h" -#include "string.h" +#include "RakString.h" #include "NetworkIDObject.h" #include "DS_Hash.h" #include "DS_OrderedList.h" diff --git a/Source/include/mafianet/Rackspace.h b/Source/include/mafianet/Rackspace.h index aecadbdd1..4a6002bdf 100644 --- a/Source/include/mafianet/Rackspace.h +++ b/Source/include/mafianet/Rackspace.h @@ -24,9 +24,9 @@ #include "Export.h" #include "DS_List.h" -#include "types.h" +#include "RakNetTypes.h" #include "DS_Queue.h" -#include "string.h" +#include "RakString.h" #ifndef __RACKSPACE_H #define __RACKSPACE_H diff --git a/Source/include/mafianet/RakAlloca.h b/Source/include/mafianet/RakAlloca.h new file mode 100644 index 000000000..7767c5f96 --- /dev/null +++ b/Source/include/mafianet/RakAlloca.h @@ -0,0 +1,26 @@ +/* + * Copyright (c) 2014, Oculus VR, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * RakNet License.txt file in the licenses directory of this source tree. An additional grant + * of patent rights can be found in the RakNet Patents.txt file in the same directory. + * + */ + +#if defined(__FreeBSD__) +#include + + + + +#elif defined ( __APPLE__ ) || defined ( __APPLE_CC__ ) +#include +#include +#elif defined(_WIN32) +#include +#else +#include +// Alloca needed on Ubuntu apparently +#include +#endif diff --git a/Source/include/mafianet/RakAssert.h b/Source/include/mafianet/RakAssert.h new file mode 100644 index 000000000..61198ac92 --- /dev/null +++ b/Source/include/mafianet/RakAssert.h @@ -0,0 +1,17 @@ +/* + * Copyright (c) 2014, Oculus VR, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * RakNet License.txt file in the licenses directory of this source tree. An additional grant + * of patent rights can be found in the RakNet Patents.txt file in the same directory. + * + * + * Modified work: Copyright (c) 2017, SLikeSoft UG (haftungsbeschränkt) + * + * This source code was modified by SLikeSoft. Modifications are licensed under the MIT-style + * license found in the license.txt file in the root directory of this source tree. + */ + +#include +#include "RakNetDefines.h" diff --git a/Source/include/mafianet/RakMemoryOverride.h b/Source/include/mafianet/RakMemoryOverride.h new file mode 100644 index 000000000..e769998b7 --- /dev/null +++ b/Source/include/mafianet/RakMemoryOverride.h @@ -0,0 +1,249 @@ +/* + * Original work: Copyright (c) 2014, Oculus VR, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * RakNet License.txt file in the licenses directory of this source tree. An additional grant + * of patent rights can be found in the RakNet Patents.txt file in the same directory. + * + * + * Modified work: Copyright (c) 2017, SLikeSoft UG (haftungsbeschränkt) + * + * This source code was modified by SLikeSoft. Modifications are licensed under the MIT-style + * license found in the license.txt file in the root directory of this source tree. + */ + +/// \file +/// \brief If _USE_RAK_MEMORY_OVERRIDE is defined, memory allocations go through rakMalloc, rakRealloc, and rakFree +/// + + + +#ifndef __RAK_MEMORY_H +#define __RAK_MEMORY_H + +#include "Export.h" +#include "RakNetDefines.h" +#include + + + + + + + +#include "RakAlloca.h" + +// #if _USE_RAK_MEMORY_OVERRIDE==1 +// #if defined(new) +// #pragma push_macro("new") +// #undef new +// #define RMO_NEW_UNDEF +// #endif +// #endif + + +// These pointers are statically and globally defined in RakMemoryOverride.cpp +// Change them to point to your own allocators if you want. +// Use the functions for a DLL, or just reassign the variable if using source +extern RAK_DLL_EXPORT void * (*rakMalloc) (size_t size); +extern RAK_DLL_EXPORT void * (*rakRealloc) (void *p, size_t size); +extern RAK_DLL_EXPORT void (*rakFree) (void *p); +extern RAK_DLL_EXPORT void * (*rakMalloc_Ex) (size_t size, const char *file, unsigned int line); +extern RAK_DLL_EXPORT void * (*rakRealloc_Ex) (void *p, size_t size, const char *file, unsigned int line); +extern RAK_DLL_EXPORT void (*rakFree_Ex) (void *p, const char *file, unsigned int line); +extern RAK_DLL_EXPORT void (*notifyOutOfMemory) (const char *file, const long line); +extern RAK_DLL_EXPORT void * (*dlMallocMMap) (size_t size); +extern RAK_DLL_EXPORT void * (*dlMallocDirectMMap) (size_t size); +extern RAK_DLL_EXPORT int (*dlMallocMUnmap) (void* ptr, size_t size); + +// Change to a user defined allocation function +void RAK_DLL_EXPORT SetMalloc( void* (*userFunction)(size_t size) ); +void RAK_DLL_EXPORT SetRealloc( void* (*userFunction)(void *p, size_t size) ); +void RAK_DLL_EXPORT SetFree( void (*userFunction)(void *p) ); +void RAK_DLL_EXPORT SetMalloc_Ex( void* (*userFunction)(size_t size, const char *file, unsigned int line) ); +void RAK_DLL_EXPORT SetRealloc_Ex( void* (*userFunction)(void *p, size_t size, const char *file, unsigned int line) ); +void RAK_DLL_EXPORT SetFree_Ex( void (*userFunction)(void *p, const char *file, unsigned int line) ); +// Change to a user defined out of memory function +void RAK_DLL_EXPORT SetNotifyOutOfMemory( void (*userFunction)(const char *file, const long line) ); +void RAK_DLL_EXPORT SetDLMallocMMap( void* (*userFunction)(size_t size) ); +void RAK_DLL_EXPORT SetDLMallocDirectMMap( void* (*userFunction)(size_t size) ); +void RAK_DLL_EXPORT SetDLMallocMUnmap( int (*userFunction)(void* ptr, size_t size) ); + +extern RAK_DLL_EXPORT void * (*GetMalloc()) (size_t size); +extern RAK_DLL_EXPORT void * (*GetRealloc()) (void *p, size_t size); +extern RAK_DLL_EXPORT void (*GetFree()) (void *p); +extern RAK_DLL_EXPORT void * (*GetMalloc_Ex()) (size_t size, const char *file, unsigned int line); +extern RAK_DLL_EXPORT void * (*GetRealloc_Ex()) (void *p, size_t size, const char *file, unsigned int line); +extern RAK_DLL_EXPORT void (*GetFree_Ex()) (void *p, const char *file, unsigned int line); +extern RAK_DLL_EXPORT void *(*GetDLMallocMMap())(size_t size); +extern RAK_DLL_EXPORT void *(*GetDLMallocDirectMMap())(size_t size); +extern RAK_DLL_EXPORT int (*GetDLMallocMUnmap())(void* ptr, size_t size); + +namespace MafiaNet +{ + + template + RAK_DLL_EXPORT Type* OP_NEW(const char *file, unsigned int line) + { +#if _USE_RAK_MEMORY_OVERRIDE==1 + char *buffer = (char *) (GetMalloc_Ex())(sizeof(Type), file, line); + Type *t = new (buffer) Type; + return t; +#else + (void) file; + (void) line; + return new Type; +#endif + } + + template + RAK_DLL_EXPORT Type* OP_NEW_1(const char *file, unsigned int line, const P1 &p1) + { +#if _USE_RAK_MEMORY_OVERRIDE==1 + char *buffer = (char *) (GetMalloc_Ex())(sizeof(Type), file, line); + Type *t = new (buffer) Type(p1); + return t; +#else + (void) file; + (void) line; + return new Type(p1); +#endif + } + + template + RAK_DLL_EXPORT Type* OP_NEW_2(const char *file, unsigned int line, const P1 &p1, const P2 &p2) + { +#if _USE_RAK_MEMORY_OVERRIDE==1 + char *buffer = (char *) (GetMalloc_Ex())(sizeof(Type), file, line); + Type *t = new (buffer) Type(p1, p2); + return t; +#else + (void) file; + (void) line; + return new Type(p1, p2); +#endif + } + + template + RAK_DLL_EXPORT Type* OP_NEW_3(const char *file, unsigned int line, const P1 &p1, const P2 &p2, const P3 &p3) + { +#if _USE_RAK_MEMORY_OVERRIDE==1 + char *buffer = (char *) (GetMalloc_Ex())(sizeof(Type), file, line); + Type *t = new (buffer) Type(p1, p2, p3); + return t; +#else + (void) file; + (void) line; + return new Type(p1, p2, p3); +#endif + } + + template + RAK_DLL_EXPORT Type* OP_NEW_4(const char *file, unsigned int line, const P1 &p1, const P2 &p2, const P3 &p3, const P4 &p4) + { +#if _USE_RAK_MEMORY_OVERRIDE==1 + char *buffer = (char *) (GetMalloc_Ex())(sizeof(Type), file, line); + Type *t = new (buffer) Type(p1, p2, p3, p4); + return t; +#else + (void) file; + (void) line; + return new Type(p1, p2, p3, p4); +#endif + } + + + template + RAK_DLL_EXPORT Type* OP_NEW_ARRAY(const int count, const char *file, unsigned int line) + { + if (count==0) + return 0; + +#if _USE_RAK_MEMORY_OVERRIDE==1 +// Type *t; + char *buffer = (char *) (GetMalloc_Ex())(sizeof(int)+sizeof(Type)*count, file, line); + ((int*)buffer)[0]=count; + for (int i=0; i + RAK_DLL_EXPORT void OP_DELETE(Type *buff, const char *file, unsigned int line) + { +#if _USE_RAK_MEMORY_OVERRIDE==1 + if (buff==0) return; + buff->~Type(); + (GetFree_Ex())((char*)buff, file, line ); +#else + (void) file; + (void) line; + delete buff; +#endif + + } + + template + RAK_DLL_EXPORT void OP_DELETE_ARRAY(Type *buff, const char *file, unsigned int line) + { +#if _USE_RAK_MEMORY_OVERRIDE==1 + if (buff==0) + return; + + int count = ((int*)((char*)buff-sizeof(int)))[0]; + Type *t; + for (int i=0; i~Type(); + } + (GetFree_Ex())((char*)buff-sizeof(int), file, line ); +#else + (void) file; + (void) line; + delete [] buff; +#endif + + } + + void RAK_DLL_EXPORT * _RakMalloc (size_t size); + void RAK_DLL_EXPORT * _RakRealloc (void *p, size_t size); + void RAK_DLL_EXPORT _RakFree (void *p); + void RAK_DLL_EXPORT * _RakMalloc_Ex (size_t size, const char *file, unsigned int line); + void RAK_DLL_EXPORT * _RakRealloc_Ex (void *p, size_t size, const char *file, unsigned int line); + void RAK_DLL_EXPORT _RakFree_Ex (void *p, const char *file, unsigned int line); + void RAK_DLL_EXPORT * _DLMallocMMap (size_t size); + void RAK_DLL_EXPORT * _DLMallocDirectMMap (size_t size); + int RAK_DLL_EXPORT _DLMallocMUnmap (void *p, size_t size); + +} + +// Call to make RakNet allocate a large block of memory, and do all subsequent allocations in that memory block +// Initial and reallocations will be done through whatever function is pointed to by yourMMapFunction, and yourDirectMMapFunction (default is malloc) +// Allocations will be freed through whatever function is pointed to by yourMUnmapFunction (default free) +void UseRaknetFixedHeap(size_t initialCapacity, + void * (*yourMMapFunction) (size_t size) = MafiaNet::_DLMallocMMap, + void * (*yourDirectMMapFunction) (size_t size) = MafiaNet::_DLMallocDirectMMap, + int (*yourMUnmapFunction) (void *p, size_t size) = MafiaNet::_DLMallocMUnmap); + +// Free memory allocated from UseRaknetFixedHeap +void FreeRakNetFixedHeap(void); + +// #if _USE_RAK_MEMORY_OVERRIDE==1 +// #if defined(RMO_NEW_UNDEF) +// #pragma pop_macro("new") +// #undef RMO_NEW_UNDEF +// #endif +// #endif + +#endif diff --git a/Source/include/mafianet/RakNetCommandParser.h b/Source/include/mafianet/RakNetCommandParser.h new file mode 100644 index 000000000..d54ba8ef0 --- /dev/null +++ b/Source/include/mafianet/RakNetCommandParser.h @@ -0,0 +1,75 @@ +/* + * Original work: Copyright (c) 2014, Oculus VR, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * RakNet License.txt file in the licenses directory of this source tree. An additional grant + * of patent rights can be found in the RakNet Patents.txt file in the same directory. + * + * + * Modified work: Copyright (c) 2017, SLikeSoft UG (haftungsbeschränkt) + * + * This source code was modified by SLikeSoft. Modifications are licensed under the MIT-style + * license found in the license.txt file in the root directory of this source tree. + */ + +/// \file +/// \brief Contains RakNetCommandParser , used to send commands to an instance of RakPeer +/// + +#include "NativeFeatureIncludes.h" +#if _RAKNET_SUPPORT_RakNetCommandParser==1 + +#ifndef __RAKNET_COMMAND_PARSER +#define __RAKNET_COMMAND_PARSER + +#include "CommandParserInterface.h" +#include "Export.h" + +namespace MafiaNet +{ +class RakPeerInterface; + +/// \brief This allows a console client to call most of the functions in RakPeer +class RAK_DLL_EXPORT RakNetCommandParser : public CommandParserInterface +{ +public: + // GetInstance() and DestroyInstance(instance*) + STATIC_FACTORY_DECLARATIONS(RakNetCommandParser) + + RakNetCommandParser(); + ~RakNetCommandParser(); + + /// Given \a command with parameters \a parameterList , do whatever processing you wish. + /// \param[in] command The command to process + /// \param[in] numParameters How many parameters were passed along with the command + /// \param[in] parameterList The list of parameters. parameterList[0] is the first parameter and so on. + /// \param[in] transport The transport interface we can use to write to + /// \param[in] systemAddress The player that sent this command. + /// \param[in] originalString The string that was actually sent over the network, in case you want to do your own parsing + bool OnCommand(const char *command, unsigned numParameters, char **parameterList, TransportInterface *transport, const SystemAddress &systemAddress, const char *originalString); + + /// You are responsible for overriding this function and returning a static string, which will identifier your parser. + /// This should return a static string + /// \return The name that you return. + const char *GetName(void) const; + + /// A callback for when you are expected to send a brief description of your parser to \a systemAddress + /// \param[in] transport The transport interface we can use to write to + /// \param[in] systemAddress The player that requested help. + void SendHelp(TransportInterface *transport, const SystemAddress &systemAddress); + + /// Records the instance of RakPeer to perform the desired commands on + /// \param[in] rakPeer The RakPeer instance, or a derived class (e.g. RakPeer or RakPeer) + void SetRakPeerInterface(MafiaNet::RakPeerInterface *rakPeer); +protected: + + /// Which instance of RakPeer we are working on. Set from SetRakPeerInterface() + RakPeerInterface *peer; +}; + +} // namespace MafiaNet + +#endif + +#endif // _RAKNET_SUPPORT_* diff --git a/Source/include/mafianet/RakNetDefines.h b/Source/include/mafianet/RakNetDefines.h new file mode 100644 index 000000000..57a3f9d45 --- /dev/null +++ b/Source/include/mafianet/RakNetDefines.h @@ -0,0 +1,227 @@ +/* + * Original work: Copyright (c) 2014, Oculus VR, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * RakNet License.txt file in the licenses directory of this source tree. An additional grant + * of patent rights can be found in the RakNet Patents.txt file in the same directory. + * + * + * Modified work: Copyright (c) 2016-2018, SLikeSoft UG (haftungsbeschränkt) + * + * This source code was modified by SLikeSoft. Modifications are licensed under the MIT-style + * license found in the license.txt file in the root directory of this source tree. + */ + +#ifndef __RAKNET_DEFINES_H +#define __RAKNET_DEFINES_H + +#ifdef _RETAIL +// retail builds imply release configurations +#define _RELEASE +#endif + +// If you want to change these defines, put them in RakNetDefinesOverrides so your changes are not lost when updating RakNet +// The user should not edit this file +#include "RakNetDefinesOverrides.h" + +/// Define __GET_TIME_64BIT to have MafiaNet::TimeMS use a 64, rather than 32 bit value. A 32 bit value will overflow after about 5 weeks. +/// However, this doubles the bandwidth use for sending times, so don't do it unless you have a reason to. +/// Comment out if you are using the iPod Touch TG. See http://www.jenkinssoftware.com/forum/index.php?topic=2717.0 +/// This must be the same on all systems, or they won't connect +#ifndef __GET_TIME_64BIT +#define __GET_TIME_64BIT 1 +#endif + +// Define _FILE_AND_LINE_ to "",0 if you want to strip out file and line info for memory tracking from the EXE +// SWIG: This macro must be excluded from generating C# wrappers/interfaces since SWIG would try to handle the +// macro as a constant definition and fail to convert it, issuing the following warning: +// "warning 305: Bad constant value (ignored)." - see SLNET-227 for details +// Since this is not a constant definition at all, the correct solution is to exclude this macro therefore. +#ifndef _FILE_AND_LINE_ +#ifndef SWIG +#ifdef _RETAIL +// retail builds do not contain source-code related information in order to reduce the overall EXE size +#define _FILE_AND_LINE_ "",0 +#else +#define _FILE_AND_LINE_ __FILE__,__LINE__ +#endif // _RETAIL +#endif // SWIG +#endif // _FILE_AND_LINE_ + +/// Define RAKNET_COMPATIBILITY to enable API compatibility with RakNet. +/// This allows you to keep existing code which was compatible with RakNet 4.082 unmodified and +/// use MafiaNet as an in-place replacement for the RakNet library without having to modify any +/// of your code. +// #define RAKNET_COMPATIBILITY + +/// Define __BITSTREAM_NATIVE_END to NOT support endian swapping in the BitStream class. This is faster and is what you should use +/// unless you actually plan to have different endianness systems connect to each other +/// Enabled by default. +// #define __BITSTREAM_NATIVE_END + +/// Maximum (stack) size to use with _alloca before using new and delete instead. +#ifndef MAX_ALLOCA_STACK_ALLOCATION +#define MAX_ALLOCA_STACK_ALLOCATION 1048576 +#endif + +// Use WaitForSingleObject instead of sleep. +// Defining it plays nicer with other systems, and uses less CPU, but gives worse RakNet performance +// Undefining it uses more CPU time, but is more responsive and faster. +#define USE_WAIT_FOR_MULTIPLE_EVENTS + +/// Uncomment to use RakMemoryOverride for custom memory tracking +/// See memoryoverride.h. +#ifndef _USE_RAK_MEMORY_OVERRIDE +#define _USE_RAK_MEMORY_OVERRIDE 0 +#endif + +/// If defined, OpenSSL is enabled for the class TCPInterface +/// This is necessary to use the SendEmail class with Google POP servers +/// Note that OpenSSL carries its own license restrictions that you should be aware of. If you don't agree, don't enable this define +/// This also requires that you enable header search paths to DependentExtensions/openssl/include/[platform] +#ifndef OPEN_SSL_CLIENT_SUPPORT +#define OPEN_SSL_CLIENT_SUPPORT 0 +#endif + +/// Threshold at which to do a malloc / free rather than pushing data onto a fixed stack for the bitstream class +/// Arbitrary size, just picking something likely to be larger than most packets +#ifndef BITSTREAM_STACK_ALLOCATION_SIZE +#define BITSTREAM_STACK_ALLOCATION_SIZE 256 +#endif + +// Redefine if you want to disable or change the target for debug RAKNET_DEBUG_PRINTF +#ifndef RAKNET_DEBUG_PRINTF +#define RAKNET_DEBUG_PRINTF printf +#endif + +#ifndef RAKNET_DEBUG_TPRINTF +#define RAKNET_DEBUG_TPRINTF _tprintf +#endif + +// Maximum number of local IP addresses supported +#ifndef MAXIMUM_NUMBER_OF_INTERNAL_IDS +#define MAXIMUM_NUMBER_OF_INTERNAL_IDS 10 +#endif + +// Maximum size in bytes of a session-handshake payload (see RakPeerInterface::SetSessionConfig). +// Enforced on both send and receive; an oversized inbound payload is a protocol violation and +// closes the connection. The payload rides the reliability layer after MTU negotiation, so it is +// split into ordinary reliable datagrams rather than sent as one oversized burst. +#ifndef MAXIMUM_SESSION_CONFIG_SIZE +#define MAXIMUM_SESSION_CONFIG_SIZE 65536 +#endif + +#ifndef RakAssert +#if defined(_DEBUG) +#define RakAssert(x) assert(x); +#else +#define RakAssert(x) +#endif +#endif + +#if !defined(_DEBUG) +#define SLNET_VERIFY(x) ((void)(x)) +#else +#define SLNET_VERIFY(x) RakAssert(x) +#endif + +/// This controls the amount of memory used per connection. +/// This many datagrams are tracked by datagramNumber. If more than this many datagrams are sent, then an ack for an older datagram would be ignored +/// This results in an unnecessary resend in that case +#ifndef DATAGRAM_MESSAGE_ID_ARRAY_LENGTH +#define DATAGRAM_MESSAGE_ID_ARRAY_LENGTH 512 +#endif + +/// This is the maximum number of reliable user messages that can be on the wire at a time +/// If this is too low, then high ping connections with a large throughput will be underutilized +/// This will be evident because RakNetStatistics::messagesInSend buffer will increase over time, yet at the same time the outgoing bandwidth per second is less than your connection supports +#ifndef RESEND_BUFFER_ARRAY_LENGTH +#define RESEND_BUFFER_ARRAY_LENGTH 512 +#define RESEND_BUFFER_ARRAY_MASK 511 +#endif + +/// Uncomment if you want to link in the DLMalloc library to use with RakMemoryOverride +// #define _LINK_DL_MALLOC + +#ifndef GET_TIME_SPIKE_LIMIT +/// Workaround for http://support.microsoft.com/kb/274323 +/// If two calls between MafiaNet::GetTime() happen farther apart than this time in microseconds, this delta will be returned instead +/// Note: This will cause ID_TIMESTAMP to be temporarily inaccurate if you set a breakpoint that pauses the UpdateNetworkLoop() thread in RakPeer +/// Define in definesoverrides.h to enable (non-zero) or disable (0) +#define GET_TIME_SPIKE_LIMIT 0 +#endif + +// Use sliding window congestion control instead of ping based congestion control +#ifndef USE_SLIDING_WINDOW_CONGESTION_CONTROL +#define USE_SLIDING_WINDOW_CONGESTION_CONTROL 1 +#endif + +// When a large message is arriving, preallocate the memory for the entire block +// This results in large messages not taking up time to reassembly with memcpy, but is vulnerable to attackers causing the host to run out of memory +#ifndef PREALLOCATE_LARGE_MESSAGES +#define PREALLOCATE_LARGE_MESSAGES 0 +#endif + +#ifndef RAKNET_SUPPORT_IPV6 +#define RAKNET_SUPPORT_IPV6 0 +#endif + +#ifndef RAKSTRING_TYPE +#if defined(_UNICODE) +#define RAKSTRING_TYPE RakWString +#define RAKSTRING_TYPE_IS_UNICODE 1 +#else +#define RAKSTRING_TYPE RakString +#define RAKSTRING_TYPE_IS_UNICODE 0 +#endif +#endif + +#ifndef RPC4_GLOBAL_REGISTRATION_MAX_FUNCTIONS +#define RPC4_GLOBAL_REGISTRATION_MAX_FUNCTIONS 48 +#endif + +#ifndef RPC4_GLOBAL_REGISTRATION_MAX_FUNCTION_NAME_LENGTH +#define RPC4_GLOBAL_REGISTRATION_MAX_FUNCTION_NAME_LENGTH 48 +#endif + +// Controls how many allocations occur at once for the memory pool of incoming datagrams waiting to be transferred between the recvfrom thread and the main update thread +// Has large effect on memory usage, per instance of RakPeer. Approximately MAXIMUM_MTU_SIZE*BUFFERED_PACKETS_PAGE_SIZE bytes, once after calling RakPeer::Startup() +#ifndef BUFFERED_PACKETS_PAGE_SIZE +#define BUFFERED_PACKETS_PAGE_SIZE 8 +#endif + +// Controls how many allocations occur at once for the memory pool of incoming or outgoing datagrams. +// Has small effect on memory usage per connection. Uses about 256 bytes*INTERNAL_PACKET_PAGE_SIZE per connection +#ifndef INTERNAL_PACKET_PAGE_SIZE +#define INTERNAL_PACKET_PAGE_SIZE 8 +#endif + +// If defined to 1, the user is responsible for calling RakPeer::RunUpdateCycle and RakPeer::RunRecvfrom +#ifndef RAKPEER_USER_THREADED +#define RAKPEER_USER_THREADED 0 +#endif + +#ifndef USE_ALLOCA +#define USE_ALLOCA 1 +#endif + +//#define USE_THREADED_SEND + +// @since 0.1.1: added +// Controls the maximum retrievable filesize for incoming files using FileListTransfer. +// The configured limit only applies for files which are transferred incrementally (which basically applies to any larger file). +// Note that this also impacts the upper limit for memory allocations. It's suggested to redefine the value to a reasonable smaller size in the defineoverrides.h header file. +// For backwards compatibility with RakNet, the default is set to 4 GiB-1. +// #low - consider introducing GiB/MiB/KiB-functions and then define as GiB(4)? +#ifndef SLNET_MAX_RETRIEVABLE_FILESIZE +#define SLNET_MAX_RETRIEVABLE_FILESIZE (0xFFFFFFFF) +#endif + +// Short-hand alias for the MafiaNet namespace. +// note: we use a preprocessor macro rather than a namespace alias to ensure ABI compatibility with shared +// libraries/DLLs. With a namespace alias the names in the DLLs would still point to the actual namespace +// (MafiaNet) rather than the alias namespace, so the macro simply rewrites MNet to the real MafiaNet namespace. +#define MNet MafiaNet + +#endif // __RAKNET_DEFINES_H diff --git a/Source/include/mafianet/RakNetDefinesOverrides.h b/Source/include/mafianet/RakNetDefinesOverrides.h new file mode 100644 index 000000000..f3e874fe4 --- /dev/null +++ b/Source/include/mafianet/RakNetDefinesOverrides.h @@ -0,0 +1,12 @@ +/* + * Copyright (c) 2014, Oculus VR, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * RakNet License.txt file in the licenses directory of this source tree. An additional grant + * of patent rights can be found in the RakNet Patents.txt file in the same directory. + * + */ + +// USER EDITABLE FILE + diff --git a/Source/include/mafianet/RakNetSmartPtr.h b/Source/include/mafianet/RakNetSmartPtr.h new file mode 100644 index 000000000..25a9d6e48 --- /dev/null +++ b/Source/include/mafianet/RakNetSmartPtr.h @@ -0,0 +1,188 @@ +/* + * Original work: Copyright (c) 2014, Oculus VR, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * RakNet License.txt file in the licenses directory of this source tree. An additional grant + * of patent rights can be found in the RakNet Patents.txt file in the same directory. + * + * + * Modified work: Copyright (c) 2017, SLikeSoft UG (haftungsbeschränkt) + * + * This source code was modified by SLikeSoft. Modifications are licensed under the MIT-style + * license found in the license.txt file in the root directory of this source tree. + */ + +#ifndef __RAKNET_SMART_PTR_H +#define __RAKNET_SMART_PTR_H + +// From http://www.codeproject.com/KB/cpp/SmartPointers.aspx +// with bugs fixed + +#include "RakMemoryOverride.h" +#include "Export.h" + +//static int allocCount=0; +//static int deallocCount=0; + +namespace MafiaNet +{ + +class RAK_DLL_EXPORT ReferenceCounter +{ +private: + int refCount; + +public: + ReferenceCounter() {refCount=0;} + ~ReferenceCounter() {} + void AddRef() {refCount++;} + int Release() {return --refCount;} + int GetRefCount(void) const {return refCount;} +}; + +template < typename T > class RAK_DLL_EXPORT RakNetSmartPtr +{ +private: + T* ptr; // pointer + ReferenceCounter* reference; // Reference refCount + +public: + RakNetSmartPtr() : ptr(0), reference(0) + { + // Do not allocate by default, wasteful if we just have a list of preallocated and unassigend smart pointers + } + + RakNetSmartPtr(T* pValue) : ptr(pValue) + { + reference = MafiaNet::OP_NEW(_FILE_AND_LINE_); + reference->AddRef(); + +// allocCount+=2; +// printf("allocCount=%i deallocCount=%i Line=%i\n",allocCount, deallocCount, __LINE__); + } + + RakNetSmartPtr(const RakNetSmartPtr& sp) : ptr(sp.ptr), reference(sp.reference) + { + if (reference) + reference->AddRef(); + } + + ~RakNetSmartPtr() + { + if(reference && reference->Release() == 0) + { + MafiaNet::OP_DELETE(ptr, _FILE_AND_LINE_); + MafiaNet::OP_DELETE(reference, _FILE_AND_LINE_); + +// deallocCount+=2; +// printf("allocCount=%i deallocCount=%i Line=%i\n",allocCount, deallocCount, __LINE__); + } + } + + bool IsNull(void) const + { + return ptr==0; + } + + void SetNull(void) + { + if(reference && reference->Release() == 0) + { + MafiaNet::OP_DELETE(ptr, _FILE_AND_LINE_); + MafiaNet::OP_DELETE(reference, _FILE_AND_LINE_); + +// deallocCount+=2; +// printf("allocCount=%i deallocCount=%i Line=%i\n",allocCount, deallocCount, __LINE__); + } + ptr=0; + reference=0; + } + + bool IsUnique(void) const + { + return reference->GetRefCount()==1; + } + + // Allow you to change the values of the internal contents of the pointer, without changing what is pointed to by other instances of the smart pointer + void Clone(bool copyContents) + { + if (IsUnique()==false) + { + reference->Release(); + + reference = MafiaNet::OP_NEW(_FILE_AND_LINE_); + reference->AddRef(); + T* oldPtr=ptr; + ptr= MafiaNet::OP_NEW(_FILE_AND_LINE_); + if (copyContents) + *ptr=*oldPtr; + } + } + + int GetRefCount(void) const + { + return reference->GetRefCount(); + } + + T& operator* () + { + return *ptr; + } + + const T& operator* () const + { + return *ptr; + } + + T* operator-> () + { + return ptr; + } + + const T* operator-> () const + { + return ptr; + } + + bool operator == (const RakNetSmartPtr& sp) + { + return ptr == sp.ptr; + } + bool operator<( const RakNetSmartPtr &right ) {return ptr < right.ptr;} + bool operator>( const RakNetSmartPtr &right ) {return ptr > right.ptr;} + + bool operator != (const RakNetSmartPtr& sp) + { + return ptr != sp.ptr; + } + + RakNetSmartPtr& operator = (const RakNetSmartPtr& sp) + { + // Assignment operator + + if (this != &sp) // Avoid self assignment + { + if(reference && reference->Release() == 0) + { + MafiaNet::OP_DELETE(ptr, _FILE_AND_LINE_); + MafiaNet::OP_DELETE(reference, _FILE_AND_LINE_); + +// deallocCount+=2; +// printf("allocCount=%i deallocCount=%i Line=%i\n",allocCount, deallocCount, __LINE__); + } + + ptr = sp.ptr; + reference = sp.reference; + if (reference) + reference->AddRef(); + } + return *this; + } + + +}; + +} // namespace MafiaNet + +#endif diff --git a/Source/include/mafianet/RakNetSocket2.h b/Source/include/mafianet/RakNetSocket2.h new file mode 100644 index 000000000..1b603e8f6 --- /dev/null +++ b/Source/include/mafianet/RakNetSocket2.h @@ -0,0 +1,342 @@ +/* + * Original work: Copyright (c) 2014, Oculus VR, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * RakNet License.txt file in the licenses directory of this source tree. An additional grant + * of patent rights can be found in the RakNet Patents.txt file in the same directory. + * + * + * Modified work: Copyright (c) 2016-2017, SLikeSoft UG (haftungsbeschränkt) + * + * This source code was modified by SLikeSoft. Modifications are licensed under the MIT-style + * license found in the license.txt file in the root directory of this source tree. + */ + +#ifndef __RAKNET_SOCKET_2_H +#define __RAKNET_SOCKET_2_H + +#include "RakNetTypes.h" +#include "MTUSize.h" +#include "LocklessTypes.h" +#include "RakThread.h" +#include "DS_ThreadsafeAllocatingQueue.h" +#include "Export.h" + +// Batched datagram I/O (recvmmsg / sendmmsg) is guarded by a plain +// `#if defined(__linux__)` wherever it appears. There is no macro and no build +// option for it: the syscalls exist on Linux and nowhere else MafiaNet targets, +// so it is simply always on there. Every other platform compiles the portable +// fallbacks instead -- RakNetSocket2::SendBatch loops Send(), and the scalar +// recvfrom loop drains the socket. +// +// Delivery semantics are identical either way: the same datagrams arrive, in +// the same order, with the same reliability, and nothing differs that +// application code can observe. Two internals DO differ -- the number of +// system calls, and how SendBatch reports a transient send failure: the +// batched override classifies errno and can return 0 ("nothing sent, retry +// later"), whereas the portable loop cannot read errno through Send() and +// reports every failure as permanent. See the SendBatch contract below. +// Either way the datagrams are dropped and the reliability layer resends. + +// For CFSocket +// https://developer.apple.com/library/mac/#documentation/CoreFOundation/Reference/CFSocketRef/Reference/reference.html +// Reason: http://sourceforge.net/p/open-dis/discussion/683284/thread/0929d6a0 +#if defined(__APPLE__) +#import +#include +#include +#endif + +namespace MafiaNet +{ + +class RakNetSocket2; +struct RNS2_BerkleyBindParameters; +struct RNS2_SendParameters; +#ifdef WIN32 +typedef SOCKET RNS2Socket; +#else +// #low determine whether we cannot use SOCKET on all platforms... +typedef int RNS2Socket; +#endif + +enum RNS2BindResult +{ + BR_SUCCESS, + BR_REQUIRES_RAKNET_SUPPORT_IPV6_DEFINE, + BR_FAILED_TO_BIND_SOCKET, + BR_FAILED_SEND_TEST, +}; + +typedef int RNS2SendResult; + +/// The last socket error the calling thread raised, as WSAGetLastError() on +/// Windows and errno everywhere else. +/// +/// Send() collapses every failure to a single negative RNS2SendResult (sendto's +/// own return value), which loses the reason. Call this immediately after a +/// failing socket call on the same thread to recover it -- any intervening +/// socket call may overwrite it. +int RNS2_GetLastSocketError(void); + +/// Does \a err mean "that datagram was larger than the outgoing interface's +/// MTU"? WSAEMSGSIZE on Windows, EMSGSIZE elsewhere. +/// +/// This is a local refusal, not a network event: the stack rejected the send +/// outright, so every retry at that size fails identically and instantly. The +/// connection handshake uses it to abandon an MTU rung the moment the local +/// interface refuses it -- a VPN or PPPoE adapter with a small MTU -- instead of +/// spending that rung's whole attempt budget on sends that never leave the +/// machine. +/// +/// Split out as a free function taking a plain int so the classification is +/// unit testable without provoking a real socket failure. +bool RNS2_IsDatagramTooLargeError(int err); + +enum RNS2Type +{ + RNS2T_WINDOWS, + RNS2T_LINUX +}; + +struct RNS2_SendParameters +{ + RNS2_SendParameters() {ttl=0;} + char *data; + int length; + SystemAddress systemAddress; + int ttl; +}; + +struct RNS2RecvStruct +{ + + char data[MAXIMUM_MTU_SIZE]; + + int bytesRead; + SystemAddress systemAddress; + MafiaNet::TimeUS timeRead; + RakNetSocket2 *socket; +}; + +class RakNetSocket2Allocator +{ +public: + static RakNetSocket2* AllocRNS2(void); + static void DeallocRNS2(RakNetSocket2 *s); +}; + +class RAK_DLL_EXPORT RNS2EventHandler +{ +public: + RNS2EventHandler() {} + virtual ~RNS2EventHandler() {} + + // bufferedPackets.Push(recvFromStruct); + // quitAndDataEvents.SetEvent(); + virtual void OnRNS2Recv(RNS2RecvStruct *recvStruct)=0; + virtual void DeallocRNS2RecvStruct(RNS2RecvStruct *s, const char *file, unsigned int line)=0; + virtual RNS2RecvStruct *AllocRNS2RecvStruct(const char *file, unsigned int line)=0; + + // recvFromStruct=bufferedPackets.Allocate( _FILE_AND_LINE_ ); + // DataStructures::ThreadsafeAllocatingQueue bufferedPackets; +}; + +class RakNetSocket2 +{ +public: + RakNetSocket2(); + virtual ~RakNetSocket2(); + + // In order for the handler to trigger, some platforms must call PollRecvFrom, some platforms this create an internal thread. + void SetRecvEventHandler(RNS2EventHandler *_eventHandler); + virtual RNS2SendResult Send( RNS2_SendParameters *sendParameters, const char *file, unsigned int line )=0; + // Batched send. The base implementation simply loops Send() so every socket + // type has a working default; RNS2_Linux overrides it with sendmmsg where the + // syscall exists (Linux). + // Returns a datagram COUNT, NOT the byte total Send() returns: + // > 0 datagrams accepted (may be < count -- see the drop rule below) + // 0 nothing went out, but nothing is permanently wrong: a transient + // socket-wide condition (send buffer full, interrupted call). + // Retry on a later tick. + // < 0 nothing went out and at least one datagram failed permanently; + // the value is the first such error, mirroring sendmmsg(2)'s + // "an error is returned only if no datagrams could be sent". + // A datagram that fails on its own (bad destination, oversized) is dropped and + // the rest of the batch is still sent, so the count may be short without an + // error being reported. + // Both implementations agree on the sign convention above, but NOT on how they + // detect the transient case: the sendmmsg override classifies errno + // (ClassifySendmmsgErrno) and so can return 0, whereas the base loop cannot + // portably read errno through Send() and reports every failure as permanent. + // A caller must therefore treat "0" and "negative" alike as "these datagrams + // did not go out"; only the diagnostics differ. See MmsgBatchTests. + // RNS2_SendParameters::ttl is honoured either way: sendmmsg has no per-message + // TTL, so the override defers a batch carrying one to this base loop. + virtual RNS2SendResult SendBatch( RNS2_SendParameters *sends, unsigned count, const char *file, unsigned int line ); + RNS2Type GetSocketType(void) const; + void SetSocketType(RNS2Type t); + bool IsBerkleySocket(void) const; + SystemAddress GetBoundAddress(void) const; + unsigned int GetUserConnectionSocketIndex(void) const; + void SetUserConnectionSocketIndex(unsigned int i); + RNS2EventHandler * GetEventHandler(void) const; + + // ----------- STATICS ------------ + static void GetMyIP( SystemAddress addresses[MAXIMUM_NUMBER_OF_INTERNAL_IDS] ); + static void DomainNameToIP( const char *domainName, char ip[65] ); + +protected: + RNS2EventHandler *eventHandler; + RNS2Type socketType; + SystemAddress boundAddress; + unsigned int userConnectionSocketIndex; +}; + +struct RNS2_BerkleyBindParameters +{ + // Input parameters + unsigned short port; + char *hostAddress; + unsigned short addressFamily; // AF_INET or AF_INET6 + int type; // SOCK_DGRAM + int protocol; // 0 + bool nonBlockingSocket; + int setBroadcast; + int setIPHdrIncl; + int doNotFragment; + int pollingThreadPriority; + RNS2EventHandler *eventHandler; +}; + +// Berkeley sockets interface - base class for all platforms +class IRNS2_Berkley : public RakNetSocket2 +{ +public: + // ----------- STATICS ------------ + // For addressFamily, use AF_INET + // For type, use SOCK_DGRAM + static bool IsPortInUse(unsigned short port, const char *hostAddress, unsigned short addressFamily, int type ); + + // ----------- MEMBERS ------------ + virtual RNS2BindResult Bind( RNS2_BerkleyBindParameters *bindParameters, const char *file, unsigned int line )=0; +}; +// Common Berkeley socket implementation for Windows and Linux +class RNS2_Berkley : public IRNS2_Berkley +{ +public: + RNS2_Berkley(); + virtual ~RNS2_Berkley(); + int CreateRecvPollingThread(int threadPriority); + void SignalStopRecvPollingThread(void); + void BlockOnStopRecvPollingThread(void); + const RNS2_BerkleyBindParameters *GetBindings(void) const; + RNS2Socket GetSocket(void) const; + void SetDoNotFragment( int opt ); + +protected: + // Used by other classes + RNS2BindResult BindShared( RNS2_BerkleyBindParameters *bindParameters, const char *file, unsigned int line ); + RNS2BindResult BindSharedIPV4( RNS2_BerkleyBindParameters *bindParameters, const char *file, unsigned int line ); + RNS2BindResult BindSharedIPV4And6( RNS2_BerkleyBindParameters *bindParameters, const char *file, unsigned int line ); + + static void GetSystemAddressIPV4 ( RNS2Socket rns2Socket, SystemAddress *systemAddressOut ); + static void GetSystemAddressIPV4And6 ( RNS2Socket rns2Socket, SystemAddress *systemAddressOut ); + + // Internal + void SetNonBlockingSocket(unsigned long nonblocking); + void SetSocketOptions(void); + void SetBroadcastSocket(int broadcast); + void SetIPHdrIncl(int ipHdrIncl); + void RecvFromBlocking(RNS2RecvStruct *recvFromStruct); + void RecvFromBlockingIPV4(RNS2RecvStruct *recvFromStruct); + void RecvFromBlockingIPV4And6(RNS2RecvStruct *recvFromStruct); + + RNS2Socket rns2Socket; + RNS2_BerkleyBindParameters binding; + + unsigned RecvFromLoopInt(void); + // Batched drain of the recv socket via recvmmsg (Linux). + // Declared unconditionally; only ever called from RecvFromLoopInt under the + // same guard, and only defined on that platform. + void RecvFromBatchedLoop(void); + MafiaNet::LocklessUint32_t isRecvFromLoopThreadActive; + volatile bool endThreads; + // Constructor not called! + +#if defined(__APPLE__) + // http://sourceforge.net/p/open-dis/discussion/683284/thread/0929d6a0 + CFSocketRef _cfSocket; +#endif + + static RAK_THREAD_DECLARATION(RecvFromLoop); +}; + +#if defined(_WIN32) || defined(__GNUC__) || defined(__GCCXML__) || defined(__S3E__) +class RNS2_Windows_Linux +{ +public: +protected: + static RNS2SendResult Send_Windows_Linux( RNS2Socket rns2Socket, RNS2_SendParameters *sendParameters, const char *file, unsigned int line ); +}; +#endif + +#if defined(_WIN32) + +class RAK_DLL_EXPORT SocketLayerOverride +{ +public: + SocketLayerOverride() {} + virtual ~SocketLayerOverride() {} + + /// Called when SendTo would otherwise occur. + virtual int RakNetSendTo( const char *data, int length, const SystemAddress &systemAddress )=0; + + /// Called when RecvFrom would otherwise occur. Return number of bytes read. Write data into dataOut + // Return -1 to use RakNet's normal recvfrom, 0 to abort RakNet's normal recvfrom, and positive to return data + virtual int RakNetRecvFrom( char dataOut[ MAXIMUM_MTU_SIZE ], SystemAddress *senderOut, bool calledFromMainThread )=0; +}; + +class RNS2_Windows : public RNS2_Berkley, public RNS2_Windows_Linux +{ +public: + RNS2_Windows(); + virtual ~RNS2_Windows(); + RNS2BindResult Bind( RNS2_BerkleyBindParameters *bindParameters, const char *file, unsigned int line ); + RNS2SendResult Send( RNS2_SendParameters *sendParameters, const char *file, unsigned int line ); + void SetSocketLayerOverride(SocketLayerOverride *_slo); + SocketLayerOverride* GetSocketLayerOverride(void); + // ----------- STATICS ------------ + static void GetMyIP( SystemAddress addresses[MAXIMUM_NUMBER_OF_INTERNAL_IDS] ); +protected: + static void GetMyIPIPV4( SystemAddress addresses[MAXIMUM_NUMBER_OF_INTERNAL_IDS] ); + static void GetMyIPIPV4And6( SystemAddress addresses[MAXIMUM_NUMBER_OF_INTERNAL_IDS] ); + SocketLayerOverride *slo; +}; + +#else +class RNS2_Linux : public RNS2_Berkley, public RNS2_Windows_Linux +{ +public: + RNS2BindResult Bind( RNS2_BerkleyBindParameters *bindParameters, const char *file, unsigned int line ); + RNS2SendResult Send( RNS2_SendParameters *sendParameters, const char *file, unsigned int line ); + // Guarded because RNS2_Linux is the non-Windows socket class: macOS and the + // BSDs compile it too, and sendmmsg/mmsghdr do not exist there. Those + // platforms inherit the portable base SendBatch (a Send() loop). +#if defined(__linux__) + RNS2SendResult SendBatch( RNS2_SendParameters *sends, unsigned count, const char *file, unsigned int line ); +#endif + + // ----------- STATICS ------------ + static void GetMyIP( SystemAddress addresses[MAXIMUM_NUMBER_OF_INTERNAL_IDS] ); +protected: + static void GetMyIPIPV4( SystemAddress addresses[MAXIMUM_NUMBER_OF_INTERNAL_IDS] ); + static void GetMyIPIPV4And6( SystemAddress addresses[MAXIMUM_NUMBER_OF_INTERNAL_IDS] ); +}; + +#endif // Linux + +} // namespace MafiaNet + +#endif // __RAKNET_SOCKET_2_H diff --git a/Source/include/mafianet/RakNetStatistics.h b/Source/include/mafianet/RakNetStatistics.h new file mode 100644 index 000000000..99c15ddd0 --- /dev/null +++ b/Source/include/mafianet/RakNetStatistics.h @@ -0,0 +1,140 @@ +/* + * Original work: Copyright (c) 2014, Oculus VR, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * RakNet License.txt file in the licenses directory of this source tree. An additional grant + * of patent rights can be found in the RakNet Patents.txt file in the same directory. + * + * + * Modified work: Copyright (c) 2016-2018, SLikeSoft UG (haftungsbeschränkt) + * + * This source code was modified by SLikeSoft. Modifications are licensed under the MIT-style + * license found in the license.txt file in the root directory of this source tree. + */ + +/// \file +/// \brief A structure that holds all statistical data returned by RakNet. +/// + + + +#ifndef __RAK_NET_STATISTICS_H +#define __RAK_NET_STATISTICS_H + +#include "PacketPriority.h" +#include "Export.h" +#include "RakNetTypes.h" + +namespace MafiaNet +{ + +enum RNSPerSecondMetrics +{ + /// How many bytes per pushed via a call to RakPeerInterface::Send() + USER_MESSAGE_BYTES_PUSHED, + + /// How many user message bytes were sent via a call to RakPeerInterface::Send(). This is less than or equal to USER_MESSAGE_BYTES_PUSHED. + /// A message would be pushed, but not yet sent, due to congestion control + USER_MESSAGE_BYTES_SENT, + + /// How many user message bytes were resent. A message is resent if it is marked as reliable, and either the message didn't arrive or the message ack didn't arrive. + USER_MESSAGE_BYTES_RESENT, + + /// How many user message bytes were received, and returned to the user successfully. + USER_MESSAGE_BYTES_RECEIVED_PROCESSED, + + /// How many user message bytes were received, but ignored due to data format errors. This will usually be 0. + USER_MESSAGE_BYTES_RECEIVED_IGNORED, + + /// How many actual bytes were sent, including per-message and per-datagram overhead, and reliable message acks + ACTUAL_BYTES_SENT, + + /// How many actual bytes were received, including overead and acks. + ACTUAL_BYTES_RECEIVED, + + /// \internal + RNS_PER_SECOND_METRICS_COUNT +}; + +/// \brief Network Statisics Usage +/// +/// Store Statistics information related to network usage +struct RAK_DLL_EXPORT RakNetStatistics +{ + /// For each type in RNSPerSecondMetrics, what is the value over the last 1 second? + uint64_t valueOverLastSecond[RNS_PER_SECOND_METRICS_COUNT]; + + /// For each type in RNSPerSecondMetrics, what is the total value over the lifetime of the connection? + uint64_t runningTotal[RNS_PER_SECOND_METRICS_COUNT]; + + /// When did the connection start? + /// \sa MafiaNet::GetTimeUS() + MafiaNet::TimeUS connectionStartTime; + + /// Is our current send rate throttled by congestion control? + /// This value should be true if you send more data per second than your bandwidth capacity + bool isLimitedByCongestionControl; + + /// If \a isLimitedByCongestionControl is true, what is the limit, in bytes per second? + uint64_t BPSLimitByCongestionControl; + + /// Is our current send rate throttled by a call to RakPeer::SetPerConnectionOutgoingBandwidthLimit()? + bool isLimitedByOutgoingBandwidthLimit; + + /// If \a isLimitedByOutgoingBandwidthLimit is true, what is the limit, in bytes per second? + uint64_t BPSLimitByOutgoingBandwidthLimit; + + /// For each priority level, how many messages are waiting to be sent out? + unsigned int messageInSendBuffer[MafiaNet::NUMBER_OF_PRIORITIES]; + + /// For each priority level, how many bytes are waiting to be sent out? + double bytesInSendBuffer[MafiaNet::NUMBER_OF_PRIORITIES]; + + /// How many messages are waiting in the resend buffer? This includes messages waiting for an ack, so should normally be a small value + /// If the value is rising over time, you are exceeding the bandwidth capacity. See BPSLimitByCongestionControl + unsigned int messagesInResendBuffer; + + /// How many bytes are waiting in the resend buffer. See also messagesInResendBuffer + uint64_t bytesInResendBuffer; + + /// Over the last second, what was our packetloss? This number will range from 0.0 (for none) to 1.0 (for 100%) + float packetlossLastSecond; + + /// What is the average total packetloss over the lifetime of the connection? + float packetlossTotal; + + RakNetStatistics& operator +=(const RakNetStatistics& other) + { + unsigned i; + for (i=0; i < MafiaNet::NUMBER_OF_PRIORITIES; i++) + { + messageInSendBuffer[i]+=other.messageInSendBuffer[i]; + bytesInSendBuffer[i]+=other.bytesInSendBuffer[i]; + } + + for (i=0; i < RNS_PER_SECOND_METRICS_COUNT; i++) + { + valueOverLastSecond[i]+=other.valueOverLastSecond[i]; + runningTotal[i]+=other.runningTotal[i]; + } + + return *this; + } +}; + +/// Verbosity level currently supports 0 (low), 1 (medium), 2 (high) +/// \param[in] s The Statistical information to format out +/// \param[in] buffer The buffer containing a formated report +/// \param[in] bufferLength The size (in characters) of the buffer +/// \param[in] verbosityLevel +/// 0 low +/// 1 medium +/// 2 high +/// 3 debugging congestion control +void RAK_DLL_EXPORT StatisticsToString(RakNetStatistics *s, char *buffer, int verbosityLevel); +void RAK_DLL_EXPORT StatisticsToString( RakNetStatistics *s, char *buffer, size_t bufferLength, int verbosityLevel ); + +} // namespace MafiaNet + +#endif diff --git a/Source/include/mafianet/RakNetTime.h b/Source/include/mafianet/RakNetTime.h new file mode 100644 index 000000000..b22b47ebc --- /dev/null +++ b/Source/include/mafianet/RakNetTime.h @@ -0,0 +1,40 @@ +/* + * Original work: Copyright (c) 2014, Oculus VR, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * RakNet License.txt file in the licenses directory of this source tree. An additional grant + * of patent rights can be found in the RakNet Patents.txt file in the same directory. + * + * + * Modified work: Copyright (c) 2016-2017, SLikeSoft UG (haftungsbeschränkt) + * + * This source code was modified by SLikeSoft. Modifications are licensed under the MIT-style + * license found in the license.txt file in the root directory of this source tree. + */ + +#ifndef __RAKNET_TIME_H +#define __RAKNET_TIME_H + +#include "NativeTypes.h" +#include "RakNetDefines.h" + +namespace MafiaNet { + +// Define __GET_TIME_64BIT if you want to use large types for GetTime (takes more bandwidth when you transmit time though!) +// You would want to do this if your system is going to run long enough to overflow the millisecond counter (over a month) +#if __GET_TIME_64BIT==1 +typedef uint64_t Time; +#define RAK_TIME_FORMAT_STRING "%llu" +typedef uint32_t TimeMS; +typedef uint64_t TimeUS; +#else +typedef uint32_t Time; +#define RAK_TIME_FORMAT_STRING "%u" +typedef uint32_t TimeMS; +typedef uint64_t TimeUS; +#endif + +} // namespace MafiaNet + +#endif diff --git a/Source/include/mafianet/RakNetTransport2.h b/Source/include/mafianet/RakNetTransport2.h new file mode 100644 index 000000000..ea88bba9a --- /dev/null +++ b/Source/include/mafianet/RakNetTransport2.h @@ -0,0 +1,115 @@ +/* + * Original work: Copyright (c) 2014, Oculus VR, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * RakNet License.txt file in the licenses directory of this source tree. An additional grant + * of patent rights can be found in the RakNet Patents.txt file in the same directory. + * + * + * Modified work: Copyright (c) 2017, SLikeSoft UG (haftungsbeschränkt) + * + * This source code was modified by SLikeSoft. Modifications are licensed under the MIT-style + * license found in the license.txt file in the root directory of this source tree. + */ + +/// \file +/// \brief Contains RakNetTransportCommandParser and RakNetTransport used to provide a secure console connection. +/// + + +#include "NativeFeatureIncludes.h" +#if _RAKNET_SUPPORT_TelnetTransport==1 + +#ifndef __RAKNET_TRANSPORT_2 +#define __RAKNET_TRANSPORT_2 + +#include "TransportInterface.h" +#include "DS_Queue.h" +#include "CommandParserInterface.h" +#include "PluginInterface2.h" +#include "Export.h" + +namespace MafiaNet +{ +/// Forward declarations +class BitStream; +class RakPeerInterface; +class RakNetTransport; + +/// \defgroup RAKNET_TRANSPORT_GROUP RakNetTransport +/// \brief UDP based transport implementation for the ConsoleServer +/// \details +/// \ingroup PLUGINS_GROUP + +/// \brief Use RakNetTransport if you need a secure connection between the client and the console server. +/// \details RakNetTransport automatically initializes security for the system. Use the project CommandConsoleClient to connect +/// To the ConsoleServer if you use RakNetTransport +/// \ingroup RAKNET_TRANSPORT_GROUP +class RAK_DLL_EXPORT RakNetTransport2 : public TransportInterface, public PluginInterface2 +{ +public: + // GetInstance() and DestroyInstance(instance*) + STATIC_FACTORY_DECLARATIONS(RakNetTransport2) + + RakNetTransport2(); + virtual ~RakNetTransport2(); + + /// Start the transport provider on the indicated port. + /// \param[in] port The port to start the transport provider on + /// \param[in] serverMode If true, you should allow incoming connections (I don't actually use this anywhere) + /// \return Return true on success, false on failure. + bool Start(unsigned short port, bool serverMode); + + /// Stop the transport provider. You can clear memory and shutdown threads here. + void Stop(void); + + /// Send a null-terminated string to \a systemAddress + /// If your transport method requires particular formatting of the outgoing data (e.g. you don't just send strings) you can do it here + /// and parse it out in Receive(). + /// \param[in] systemAddress The player to send the string to + /// \param[in] data format specifier - same as RAKNET_DEBUG_PRINTF + /// \param[in] ... format specification arguments - same as RAKNET_DEBUG_PRINTF + void Send( SystemAddress systemAddress, const char *data, ... ); + + /// Disconnect \a systemAddress . The binary address and port defines the SystemAddress structure. + /// \param[in] systemAddress The player/address to disconnect + void CloseConnection( SystemAddress systemAddress ); + + /// Return a string. The string should be allocated and written to Packet::data . + /// The byte length should be written to Packet::length . The player/address should be written to Packet::systemAddress + /// If your transport protocol adds special formatting to the data stream you should parse it out before returning it in the packet + /// and thus only return a string in Packet::data + /// \return The packet structure containing the result of Receive, or 0 if no data is available + Packet* Receive( void ); + + /// Deallocate the Packet structure returned by Receive + /// \param[in] The packet to deallocate + void DeallocatePacket( Packet *packet ); + + /// If a new system connects to you, you should queue that event and return the systemAddress/address of that player in this function. + /// \return The SystemAddress/address of the system + SystemAddress HasNewIncomingConnection(void); + + /// If a system loses the connection, you should queue that event and return the systemAddress/address of that player in this function. + /// \return The SystemAddress/address of the system + SystemAddress HasLostConnection(void); + + virtual CommandParserInterface* GetCommandParser(void) {return 0;} + + /// \internal + virtual PluginReceiveResult OnReceive(Packet *packet); + /// \internal + virtual void OnClosedConnection(const SystemAddress &systemAddress, RakNetGUID rakNetGUID, PI2_LostConnectionReason lostConnectionReason ); + /// \internal + virtual void OnNewConnection(const SystemAddress &systemAddress, RakNetGUID rakNetGUID, bool isIncoming); +protected: + DataStructures::Queue newConnections, lostConnections; + DataStructures::Queue packetQueue; +}; + +} // namespace MafiaNet + +#endif + +#endif // _RAKNET_SUPPORT_* diff --git a/Source/include/mafianet/RakNetTypes.h b/Source/include/mafianet/RakNetTypes.h new file mode 100644 index 000000000..8fb863160 --- /dev/null +++ b/Source/include/mafianet/RakNetTypes.h @@ -0,0 +1,487 @@ +/* + * Original work: Copyright (c) 2014, Oculus VR, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * RakNet License.txt file in the licenses directory of this source tree. An additional grant + * of patent rights can be found in the RakNet Patents.txt file in the same directory. + * + * + * Modified work: Copyright (c) 2016-2019, SLikeSoft UG (haftungsbeschränkt) + * + * This source code was modified by SLikeSoft. Modifications are licensed under the MIT-style + * license found in the license.txt file in the root directory of this source tree. + */ + +/// \file +/// \brief Types used by RakNet, most of which involve user code. +/// +#ifndef __NETWORK_TYPES_H +#define __NETWORK_TYPES_H + +#include "RakNetDefines.h" +#include "NativeTypes.h" +#include "RakNetTime.h" +#include "Export.h" +#include "WindowsIncludes.h" +#include "SocketIncludes.h" + +namespace MafiaNet { +/// Forward declarations +class RakPeerInterface; +class BitStream; +struct Packet; + +enum StartupResult +{ + RAKNET_STARTED, + RAKNET_ALREADY_STARTED, + INVALID_SOCKET_DESCRIPTORS, + INVALID_MAX_CONNECTIONS, + SOCKET_FAMILY_NOT_SUPPORTED, + SOCKET_PORT_ALREADY_IN_USE, + SOCKET_FAILED_TO_BIND, + SOCKET_FAILED_TEST_SEND, + PORT_CANNOT_BE_ZERO, + FAILED_TO_CREATE_NETWORK_THREAD, + COULD_NOT_GENERATE_GUID, + STARTUP_OTHER_FAILURE +}; + + +enum ConnectionAttemptResult +{ + CONNECTION_ATTEMPT_STARTED, + INVALID_PARAMETER, + CANNOT_RESOLVE_DOMAIN_NAME, + ALREADY_CONNECTED_TO_ENDPOINT, + CONNECTION_ATTEMPT_ALREADY_IN_PROGRESS, + SECURITY_INITIALIZATION_FAILED +}; + +/// Returned from RakPeerInterface::GetConnectionState() +enum ConnectionState +{ + /// Connect() was called, but the process hasn't started yet + IS_PENDING, + /// Processing the connection attempt + IS_CONNECTING, + /// Is connected and able to communicate + IS_CONNECTED, + /// Was connected, but will disconnect as soon as the remaining messages are delivered + IS_DISCONNECTING, + /// A connection attempt failed and will be aborted + IS_SILENTLY_DISCONNECTING, + /// No longer connected + IS_DISCONNECTED, + /// Was never connected, or else was disconnected long enough ago that the entry has been discarded + IS_NOT_CONNECTED +}; + +/// Given a number of bits, return how many bytes are needed to represent that. +#define BITS_TO_BYTES(x) (((x)+7)>>3) +#define BYTES_TO_BITS(x) ((x)<<3) + +/// \sa NetworkIDObject.h +typedef unsigned char UniqueIDType; +typedef unsigned short SystemIndex; +typedef unsigned char RPCIndex; +const int MAX_RPC_MAP_SIZE=((RPCIndex)-1)-1; +const int UNDEFINED_RPC_INDEX=((RPCIndex)-1); + +/// First byte of a network message +typedef unsigned char MessageID; + +typedef uint32_t BitSize_t; + +#define PRINTF_64_BIT_MODIFIER "ll" + +/// Used with the PublicKey structure +enum PublicKeyMode +{ + /// The connection is insecure. You can also just pass 0 for the pointer to PublicKey in RakPeerInterface::Connect() + PKM_INSECURE_CONNECTION, + + /// Accept whatever public key the server gives us. This is vulnerable to man in the middle, but does not require + /// distribution of the public key in advance of connecting. + PKM_ACCEPT_ANY_PUBLIC_KEY, + + /// Use a known remote server public key. PublicKey::remoteServerPublicKey must be non-zero. + /// This is the recommended mode for secure connections. + PKM_USE_KNOWN_PUBLIC_KEY, + + /// Use a known remote server public key AND provide a public key for the connecting client. + /// PublicKey::remoteServerPublicKey, myPublicKey and myPrivateKey must be all be non-zero. + /// The server must cooperate for this mode to work. + /// I recommend not using this mode except for server-to-server communication as it significantly increases the CPU requirements during connections for both sides. + /// Furthermore, when it is used, a connection password should be used as well to avoid DoS attacks. + PKM_USE_TWO_WAY_AUTHENTICATION +}; + +/// Passed to RakPeerInterface::Connect() +struct RAK_DLL_EXPORT PublicKey +{ + /// How to interpret the public key, see above + PublicKeyMode publicKeyMode; + + /// Pointer to a public key of length cat::EasyHandshake::PUBLIC_KEY_BYTES. See the Encryption sample. + char *remoteServerPublicKey; + + /// (Optional) Pointer to a public key of length cat::EasyHandshake::PUBLIC_KEY_BYTES + char *myPublicKey; + + /// (Optional) Pointer to a private key of length cat::EasyHandshake::PRIVATE_KEY_BYTES + char *myPrivateKey; +}; + +/// Describes the local socket to use for RakPeer::Startup +struct RAK_DLL_EXPORT SocketDescriptor +{ + SocketDescriptor(); + SocketDescriptor(unsigned short _port, const char *_hostAddress); + + /// The local port to bind to. Pass 0 to have the OS autoassign a port. + unsigned short port; + + /// The local network card address to bind to, such as "127.0.0.1". Pass an empty string to use INADDR_ANY. + char hostAddress[32]; + + /// IP version: For IPV4, use AF_INET (default). For IPV6, use AF_INET6. To autoselect, use AF_UNSPEC. + /// IPV6 is the newer internet protocol. Instead of addresses such as natpunch.slikesoft.com, you may have an address such as fe80::7c:31f7:fec4:27de%14. + /// Encoding takes 16 bytes instead of 4, so IPV6 is less efficient for bandwidth. + /// On the positive side, NAT Punchthrough is not needed and should not be used with IPV6 because there are enough addresses that routers do not need to create address mappings. + /// RakPeer::Startup() will fail if this IP version is not supported. + /// \pre RAKNET_SUPPORT_IPV6 must be set to 1 in RakNetDefines.h for AF_INET6 + short socketFamily; + + // Set to true to use a blocking socket (default, do not change unless you have a reason to) + bool blockingSocket; + + /// Protocol argument passed to socket(). Leave 0 (the default) for plain UDP. + unsigned int extraSocketOptions; +}; + +extern bool NonNumericHostString( const char *host ); + +/// \brief Network address for a system +/// \details Corresponds to a network address
+/// This is not necessarily a unique identifier. For example, if a system has both LAN and internet connections, the system may be identified by either one, depending on who is communicating
+/// Therefore, you should not transmit the SystemAddress over the network and expect it to identify a system, or use it to connect to that system, except in the case where that system is not behind a NAT (such as with a dedciated server) +/// Use RakNetGUID for a unique per-instance of RakPeer to identify systems +struct RAK_DLL_EXPORT SystemAddress +{ + /// Constructors + SystemAddress(); + SystemAddress(const char *str); + SystemAddress(const char *str, unsigned short port); + + /// SystemAddress, with RAKNET_SUPPORT_IPV6 defined, holds both an sockaddr_in6 and a sockaddr_in + union// In6OrIn4 + { +#if RAKNET_SUPPORT_IPV6==1 + struct sockaddr_storage sa_stor; + sockaddr_in6 addr6; +#endif + + sockaddr_in addr4; + } address; + + /// This is not used internally, but holds a copy of the port held in the address union, so for debugging it's easier to check what port is being held + unsigned short debugPort; + + /// \internal Return the size to write to a bitStream + static int size(void); + + /// Hash the system address + static unsigned long ToInteger(const SystemAddress &sa); + + /// Return the IP version, either IPV4 or IPV6 + /// \return Either 4 or 6 + unsigned char GetIPVersion(void) const; + + /// \internal Returns either IPPROTO_IP or IPPROTO_IPV6 + /// \sa GetIPVersion + unsigned int GetIPPROTO(void) const; + + /// Call SetToLoopback(), with whatever IP version is currently held. Defaults to IPV4 + void SetToLoopback(void); + + /// Call SetToLoopback() with a specific IP version + /// \param[in] ipVersion Either 4 for IPV4 or 6 for IPV6 + void SetToLoopback(unsigned char ipVersion); + + /// \return If was set to 127.0.0.1 or ::1 + bool IsLoopback(void) const; + + // Return the systemAddress as a string in the format | + // Returns a static string + // NOT THREADSAFE + // portDelineator should not be '.', ':', '%', '-', '/', a number, or a-f + const char *ToString(bool writePort=true, char portDelineator='|') const; + + // Return the systemAddress as a string in the format | + // dest must be large enough to hold the output + // portDelineator should not be '.', ':', '%', '-', '/', a number, or a-f + // THREADSAFE + void ToString(bool writePort, char *dest, char portDelineator = '|') const; + void ToString(bool writePort, char *dest, size_t destLength, char portDelineator='|') const; + + /// Set the system address from a printable IP string, for example "192.0.2.1" or "2001:db8:63b3:1::3490" + /// You can write the port as well, using the portDelineator, for example "192.0.2.1|1234" + /// \param[in] str A printable IP string, for example "192.0.2.1" or "2001:db8:63b3:1::3490". Pass 0 for \a str to set to UNASSIGNED_SYSTEM_ADDRESS + /// \param[in] portDelineator if \a str contains a port, delineate the port with this character. portDelineator should not be '.', ':', '%', '-', '/', a number, or a-f + /// \param[in] ipVersion Only used if str is a pre-defined address in the wrong format, such as 127.0.0.1 but you want ip version 6, so you can pass 6 here to do the conversion + /// \note The current port is unchanged if a port is not specified in \a str + /// \return True on success, false on ipVersion does not match type of passed string + bool FromString(const char *str, char portDelineator='|', int ipVersion=0); + + /// Same as FromString(), but you explicitly set a port at the same time + bool FromStringExplicitPort(const char *str, unsigned short port, int ipVersion=0); + + /// Copy the port from another SystemAddress structure + void CopyPort( const SystemAddress& right ); + + /// Returns if two system addresses have the same IP (port is not checked) + bool EqualsExcludingPort( const SystemAddress& right ) const; + + /// Returns the port in host order (this is what you normally use) + unsigned short GetPort(void) const; + + /// \internal Returns the port in network order + unsigned short GetPortNetworkOrder(void) const; + + /// Sets the port. The port value should be in host order (this is what you normally use) + /// Renamed from SetPort because of winspool.h http://edn.embarcadero.com/article/21494 + void SetPortHostOrder(unsigned short s); + + /// \internal Sets the port. The port value should already be in network order. + void SetPortNetworkOrder(unsigned short s); + + /// Old version, for crap platforms that don't support newer socket functions + bool SetBinaryAddress(const char *str, char portDelineator=':'); + /// Old version, for crap platforms that don't support newer socket functions + void ToString_Old(bool writePort, char *dest, char portDelineator = ':') const; + void ToString_Old(bool writePort, char *dest, size_t destLength, char portDelineator = ':') const; + + /// \internal sockaddr_in6 requires extra data beyond just the IP and port. Copy that extra data from an existing SystemAddress that already has it + void FixForIPVersion(const SystemAddress &boundAddressToSocket); + + bool IsLANAddress(void); + + SystemAddress& operator = ( const SystemAddress& input ); + bool operator==( const SystemAddress& right ) const; + bool operator!=( const SystemAddress& right ) const; + bool operator > ( const SystemAddress& right ) const; + bool operator < ( const SystemAddress& right ) const; + + /// \internal Used internally for fast lookup. Optional (use -1 to do regular lookup). Don't transmit this. + SystemIndex systemIndex; + + private: + +#if RAKNET_SUPPORT_IPV6==1 + void ToString_New(bool writePort, char *dest, char portDelineator) const; + void ToString_New(bool writePort, char *dest, size_t destLength, char portDelineator) const; +#endif +}; + +/// Uniquely identifies an instance of RakPeer. Use RakPeer::GetGuidFromSystemAddress() and RakPeer::GetSystemAddressFromGuid() to go between SystemAddress and RakNetGUID +/// Use RakPeer::GetGuidFromSystemAddress(UNASSIGNED_SYSTEM_ADDRESS) to get your own GUID +struct RAK_DLL_EXPORT RakNetGUID +{ + RakNetGUID(); + explicit RakNetGUID(uint64_t _g) {g=_g; systemIndex=(SystemIndex)-1;} +// uint32_t g[6]; + uint64_t g; + + // Return the GUID as a string. + // For an owning, thread-safe std::string use MafiaNet::to_string(guid) + // from "mafianet/GuidUtil.h". + // dest must be large enough to hold the output + // THREADSAFE + void ToString(char *dest) const; + void ToString(char *dest, size_t destSize) const; + + bool FromString(const char *source); + + static unsigned long ToUint32( const RakNetGUID &g ); + + RakNetGUID& operator = ( const RakNetGUID& input ) + { + g=input.g; + systemIndex=input.systemIndex; + return *this; + } + + // Used internally for fast lookup. Optional (use -1 to do regular lookup). Don't transmit this. + SystemIndex systemIndex; + static int size() {return (int) sizeof(uint64_t);} + + bool operator==( const RakNetGUID& right ) const; + bool operator!=( const RakNetGUID& right ) const; + bool operator > ( const RakNetGUID& right ) const; + bool operator < ( const RakNetGUID& right ) const; +}; + +/// Strong type for a peer's RakNetGUID value, distinct from NetworkID so the two +/// can't be passed interchangeably. Trivially copyable and 8 bytes, so it is +/// wire-compatible with the raw uint64_t it replaces. Convert with ToPeerGuid()/ToGuid(). +enum class PeerGuid : uint64_t {}; + +inline PeerGuid ToPeerGuid( const RakNetGUID& guid ) { return static_cast(guid.g); } +inline RakNetGUID ToGuid( PeerGuid guid ) { return RakNetGUID(static_cast(guid)); } + +constexpr PeerGuid UNASSIGNED_PEER_GUID = static_cast((uint64_t)-1); + +/// Index of an invalid SystemAddress +//const SystemAddress UNASSIGNED_SYSTEM_ADDRESS = +//{ +// 0xFFFFFFFF, 0xFFFF +//}; +#ifndef SWIG +extern const SystemAddress UNASSIGNED_SYSTEM_ADDRESS; +extern const RakNetGUID UNASSIGNED_RAKNET_GUID; +#endif +//{ +// {0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF} +// 0xFFFFFFFFFFFFFFFF +//}; + + +struct RAK_DLL_EXPORT AddressOrGUID +{ + RakNetGUID rakNetGuid; + SystemAddress systemAddress; + + SystemIndex GetSystemIndex(void) const {if (rakNetGuid!=UNASSIGNED_RAKNET_GUID) return rakNetGuid.systemIndex; else return systemAddress.systemIndex;} + bool IsUndefined(void) const {return rakNetGuid==UNASSIGNED_RAKNET_GUID && systemAddress==UNASSIGNED_SYSTEM_ADDRESS;} + void SetUndefined(void) {rakNetGuid=UNASSIGNED_RAKNET_GUID; systemAddress=UNASSIGNED_SYSTEM_ADDRESS;} + static unsigned long ToInteger( const AddressOrGUID &aog ); + const char *ToString(bool writePort=true) const; + void ToString(bool writePort, char *dest) const; + void ToString(bool writePort, char *dest, size_t destLength) const; + + AddressOrGUID() {} + AddressOrGUID( const AddressOrGUID& input ) + { + rakNetGuid=input.rakNetGuid; + systemAddress=input.systemAddress; + } + AddressOrGUID( const SystemAddress& input ) + { + rakNetGuid=UNASSIGNED_RAKNET_GUID; + systemAddress=input; + } + AddressOrGUID( Packet *packet ); + AddressOrGUID( const RakNetGUID& input ) + { + rakNetGuid=input; + systemAddress=UNASSIGNED_SYSTEM_ADDRESS; + } + AddressOrGUID& operator = ( const AddressOrGUID& input ) + { + rakNetGuid=input.rakNetGuid; + systemAddress=input.systemAddress; + return *this; + } + + AddressOrGUID& operator = ( const SystemAddress& input ) + { + rakNetGuid=UNASSIGNED_RAKNET_GUID; + systemAddress=input; + return *this; + } + + AddressOrGUID& operator = ( const RakNetGUID& input ) + { + rakNetGuid=input; + systemAddress=UNASSIGNED_SYSTEM_ADDRESS; + return *this; + } + + inline bool operator==( const AddressOrGUID& right ) const {return (rakNetGuid!=UNASSIGNED_RAKNET_GUID && rakNetGuid==right.rakNetGuid) || (systemAddress!=UNASSIGNED_SYSTEM_ADDRESS && systemAddress==right.systemAddress);} +}; + +typedef uint64_t NetworkID; + +/// This represents a user message from another system. +struct Packet +{ + /// The system that send this packet. + SystemAddress systemAddress; + + /// A unique identifier for the system that sent this packet, regardless of IP address (internal / external / remote system) + /// Only valid once a connection has been established (ID_CONNECTION_REQUEST_ACCEPTED, or ID_NEW_INCOMING_CONNECTION) + /// Until that time, will be UNASSIGNED_RAKNET_GUID + RakNetGUID guid; + + /// The length of the data in bytes + unsigned int length; + + /// The length of the data in bits + BitSize_t bitSize; + + /// The data from the sender + unsigned char* data; + + /// @internal + /// Indicates whether to delete the data, or to simply delete the packet. + bool deleteData; + + /// @internal + /// If true, this message is meant for the user, not for the plugins, so do not process it through plugins + bool wasGeneratedLocally; +}; + +/// Index of an unassigned player +const SystemIndex UNASSIGNED_PLAYER_INDEX = 65535; + +/// Unassigned object ID +const NetworkID UNASSIGNED_NETWORK_ID = (uint64_t) -1; + +const int PING_TIMES_ARRAY_SIZE = 5; + +struct RAK_DLL_EXPORT uint24_t +{ + uint32_t val; + + uint24_t() {} + inline operator uint32_t() { return val; } + inline operator uint32_t() const { return val; } + + inline uint24_t(const uint24_t& a) {val=a.val;} + inline uint24_t operator++() {++val; val&=0x00FFFFFF; return *this;} + inline uint24_t operator--() {--val; val&=0x00FFFFFF; return *this;} + inline uint24_t operator++(int) {uint24_t temp(val); ++val; val&=0x00FFFFFF; return temp;} + inline uint24_t operator--(int) {uint24_t temp(val); --val; val&=0x00FFFFFF; return temp;} + inline uint24_t operator&(const uint24_t& a) {return uint24_t(val&a.val);} + inline uint24_t& operator=(const uint24_t& a) { val=a.val; return *this; } + inline uint24_t& operator+=(const uint24_t& a) { val+=a.val; val&=0x00FFFFFF; return *this; } + inline uint24_t& operator-=(const uint24_t& a) { val-=a.val; val&=0x00FFFFFF; return *this; } + inline bool operator==( const uint24_t& right ) const {return val==right.val;} + inline bool operator!=( const uint24_t& right ) const {return val!=right.val;} + inline bool operator > ( const uint24_t& right ) const {return val>right.val;} + inline bool operator < ( const uint24_t& right ) const {return val ( const uint32_t& right ) const {return val>(right&0x00FFFFFF);} + inline bool operator < ( const uint32_t& right ) const {return val<(right&0x00FFFFFF);} + inline const uint24_t operator+( const uint32_t &other ) const { return uint24_t(val+other); } + inline const uint24_t operator-( const uint32_t &other ) const { return uint24_t(val-other); } + inline const uint24_t operator/( const uint32_t &other ) const { return uint24_t(val/other); } + inline const uint24_t operator*( const uint32_t &other ) const { return uint24_t(val*other); } +}; + +} // namespace MafiaNet + +#endif diff --git a/Source/include/mafianet/RakPeer.h b/Source/include/mafianet/RakPeer.h new file mode 100644 index 000000000..fa21bf3cd --- /dev/null +++ b/Source/include/mafianet/RakPeer.h @@ -0,0 +1,1178 @@ +/* + * Original work: Copyright (c) 2014, Oculus VR, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * RakNet License.txt file in the licenses directory of this source tree. An additional grant + * of patent rights can be found in the RakNet Patents.txt file in the same directory. + * + * + * Modified work: Copyright (c) 2017-2018, SLikeSoft UG (haftungsbeschränkt) + * + * This source code was modified by SLikeSoft. Modifications are licensed under the MIT-style + * license found in the license.txt file in the root directory of this source tree. + */ + +/// \file +/// \brief Declares RakPeer class. +/// + + +// TODO - RakNet 4 - Add network simulator +// TODO - RakNet 4 - Enable disabling flow control per connections + +#ifndef __RAK_PEER_H +#define __RAK_PEER_H + +#include "ReliabilityLayer.h" +#include "RakPeerInterface.h" +#include "BitStream.h" +#include "SingleProducerConsumer.h" +#include "SimpleMutex.h" +#include "DS_OrderedList.h" +#include "Export.h" +#include "RakString.h" +#include "RakThread.h" +//#include "socket.h" +#include "RakNetSmartPtr.h" +#include "DS_ThreadsafeAllocatingQueue.h" +#include "SignaledEvent.h" +#include "NativeFeatureIncludes.h" +#include "SecureHandshake.h" +#include "LocklessTypes.h" +#include "DS_Queue.h" + +namespace MafiaNet { +/// Forward declarations +class HuffmanEncodingTree; +class PluginInterface2; + +// Sucks but this struct has to be outside the class. Inside and DevCPP won't let you refer to the struct as RakPeer::RemoteSystemIndex while GCC +// forces you to do RakPeer::RemoteSystemIndex +struct RemoteSystemIndex{unsigned index; RemoteSystemIndex *next;}; +//int RAK_DLL_EXPORT SystemAddressAndIndexComp( const SystemAddress &key, const RemoteSystemIndex &data ); // GCC requires RakPeer::RemoteSystemIndex or it won't compile + +///\brief Main interface for network communications. +/// \details It implements most of RakNet's functionality and is the primary interface for RakNet. +/// +/// Inherits RakPeerInterface. +/// +/// See the individual functions for what the class can do. +/// +class RAK_DLL_EXPORT RakPeer : public RakPeerInterface, public RNS2EventHandler +{ +public: + ///Constructor + RakPeer(); + + ///Destructor + virtual ~RakPeer(); + + // --------------------------------------------------------------------------------------------Major Low Level Functions - Functions needed by most users-------------------------------------------------------------------------------------------- + /// \brief Starts the network threads and opens the listen port. + /// \details You must call this before calling Connect(). + /// \pre On the PS3, call Startup() after Client_Login() + /// \note Multiple calls while already active are ignored. To call this function again with different settings, you must first call Shutdown(). + /// \note Call SetMaximumIncomingConnections if you want to accept incoming connections. + /// \param[in] maxConnections Maximum number of connections between this instance of RakPeer and another instance of RakPeer. Required so that the network can preallocate and for thread safety. A pure client would set this to 1. A pure server would set it to the number of allowed clients.A hybrid would set it to the sum of both types of connections. + /// \param[in] localPort The port to listen for connections on. On linux the system may be set up so thast ports under 1024 are restricted for everything but the root user. Use a higher port for maximum compatibility. + /// \param[in] socketDescriptors An array of SocketDescriptor structures to force RakNet to listen on a particular IP address or port (or both). Each SocketDescriptor will represent one unique socket. Do not pass redundant structures. To listen on a specific port, you can pass SocketDescriptor(myPort,0); such as for a server. For a client, it is usually OK to just pass SocketDescriptor(); + /// \param[in] socketDescriptorCount The size of the \a socketDescriptors array. Pass 1 if you are not sure what to pass. + /// \param[in] threadPriority Passed to the thread creation routine. Use THREAD_PRIORITY_NORMAL for Windows. For Linux based systems, you MUST pass something reasonable based on the thread priorities for your application. + /// \return RAKNET_STARTED on success, otherwise appropriate failure enumeration. + StartupResult Startup( unsigned int maxConnections, SocketDescriptor *socketDescriptors, unsigned socketDescriptorCount, int threadPriority=-99999 ); + + /// If you accept connections, you must call this or else security will not be enabled for incoming connections. + /// This feature requires more round trips, bandwidth, and CPU time for the connection handshake + /// x64 builds require under 25% of the CPU time of other builds + /// See the Encryption sample for example usage + /// \pre Must be called while offline + /// \pre LIBCAT_SECURITY must be defined to 1 in NativeFeatureIncludes.h for this function to have any effect + /// \param[in] publicKey A pointer to the public key for accepting new connections + /// \param[in] privateKey A pointer to the private key for accepting new connections + /// \param[in] bRequireClientKey: Should be set to false for most servers. Allows the server to accept a public key from connecting clients as a proof of identity but eats twice as much CPU time as a normal connection + bool InitializeSecurity( const char *publicKey, const char *privateKey, bool bRequireClientKey = false ); + + /// Disables security for incoming connections. + /// \note Must be called while offline + void DisableSecurity( void ); + + /// \brief This is useful if you have a fixed-address internal server behind a LAN. + /// + /// Secure connections are determined by the recipient of an incoming connection. This has no effect if called on the system attempting to connect. + /// \note If secure connections are on, do not use secure connections for a specific IP address. + /// \param[in] ip IP address to add. * wildcards are supported. + void AddToSecurityExceptionList(const char *ip); + + /// \brief Remove a specific connection previously added via AddToSecurityExceptionList. + /// \param[in] ip IP address to remove. Pass 0 to remove all IP addresses. * wildcards are supported. + void RemoveFromSecurityExceptionList(const char *ip); + + /// \brief Checks to see if a given IP is in the security exception list. + /// \param[in] IP address to check. + /// \return True if the IP address is found in security exception list, else returns false. + bool IsInSecurityExceptionList(const char *ip); + + /// \brief Sets the maximum number of incoming connections allowed. + /// \details If the number of incoming connections is less than the number of players currently connected, + /// no more players will be allowed to connect. If this is greater than the maximum number of peers allowed, + /// it will be reduced to the maximum number of peers allowed. + /// + /// Defaults to 0, meaning by default, nobody can connect to you + /// \param[in] numberAllowed Maximum number of incoming connections allowed. + void SetMaximumIncomingConnections( unsigned short numberAllowed ); + + /// \brief Returns the value passed to SetMaximumIncomingConnections(). + /// \return Maximum number of incoming connections, which is always <= maxConnections + unsigned int GetMaximumIncomingConnections( void ) const; + + /// \brief Returns how many open connections exist at this time. + /// \return Number of open connections. + unsigned short NumberOfConnections(void) const; + + /// \brief Sets the password for the incoming connections. + /// \details The password must match in the call to Connect (defaults to none). + /// Pass 0 to passwordData to specify no password. + /// This is a way to set a low level password for all incoming connections. To selectively reject connections, implement your own scheme using CloseConnection() to remove unwanted connections. + /// \param[in] passwordData A data block that incoming connections must match. This can be just a password, or can be a stream of data. Specify 0 for no password data + /// \param[in] passwordDataLength The length in bytes of passwordData + void SetIncomingPassword( const char* passwordData, int passwordDataLength ); + + /// \brief Gets the password passed to SetIncomingPassword + /// \param[out] passwordData Should point to a block large enough to hold the password data you passed to SetIncomingPassword() + /// \param[in,out] passwordDataLength Maximum size of the passwordData array. Modified to hold the number of bytes actually written. + void GetIncomingPassword( char* passwordData, int *passwordDataLength ); + + /// \brief Connect to the specified host (ip or domain name) and server port. + /// \details Calling Connect and not calling SetMaximumIncomingConnections acts as a dedicated client. + /// Calling both acts as a true peer. + /// + /// This is a non-blocking connection. + /// + /// The connection is successful when GetConnectionState() returns IS_CONNECTED or Receive() gets a message with the type identifier ID_CONNECTION_REQUEST_ACCEPTED. + /// If the connection is not successful, such as a rejected connection or no response then neither of these things will happen. + /// \pre Requires that you first call Startup(). + /// \param[in] host Either a dotted IP address or a domain name. + /// \param[in] remotePort Port to connect to on the remote machine. + /// \param[in] passwordData A data block that must match the data block on the server passed to SetIncomingPassword(). This can be a string or can be a stream of data. Use 0 for no password. + /// \param[in] passwordDataLength The length in bytes of passwordData. + /// \param[in] publicKey The public key the server is using. If 0, the server is not using security. If non-zero, the publicKeyMode member determines how to connect + /// \param[in] connectionSocketIndex Index into the array of socket descriptors passed to socketDescriptors in RakPeer::Startup() to determine the one to send on. + /// \param[in] sendConnectionAttemptCount Number of datagrams to send to the other system to try to connect. + /// \param[in] timeBetweenSendConnectionAttemptsMS Time to elapse before a datagram is sent to the other system to try to connect. After sendConnectionAttemptCount number of attempts, ID_CONNECTION_ATTEMPT_FAILED is returned. Under low bandwidth conditions with multiple simultaneous outgoing connections, this value should be raised to 1000 or higher, or else the MTU detection can overrun the available bandwidth. + /// \param[in] timeoutTime Time to elapse before dropping the connection if a reliable message could not be sent. 0 to use the default value from SetTimeoutTime(UNASSIGNED_SYSTEM_ADDRESS); + /// \return CONNECTION_ATTEMPT_STARTED on successful initiation. Otherwise, an appropriate enumeration indicating failure. + /// \note CONNECTION_ATTEMPT_STARTED does not mean you are already connected! + /// \note It is possible to immediately get back ID_CONNECTION_ATTEMPT_FAILED if you exceed the maxConnections parameter passed to Startup(). This could happen if you call CloseConnection() with sendDisconnectionNotificaiton true, then immediately call Connect() before the connection has closed. + ConnectionAttemptResult Connect( const char* host, unsigned short remotePort, const char *passwordData, int passwordDataLength, PublicKey *publicKey=0, unsigned connectionSocketIndex=0, unsigned sendConnectionAttemptCount=6, unsigned timeBetweenSendConnectionAttemptsMS=1000, MafiaNet::TimeMS timeoutTime=0 ); + + /// \brief Connect to the specified host (ip or domain name) and server port. + /// \param[in] host Either a dotted IP address or a domain name. + /// \param[in] remotePort Which port to connect to on the remote machine. + /// \param[in] passwordData A data block that must match the data block on the server passed to SetIncomingPassword(). This can be a string or can be a stream of data. Use 0 for no password. + /// \param[in] passwordDataLength The length in bytes of passwordData. + /// \param[in] socket A bound socket returned by another instance of RakPeerInterface. + /// \param[in] sendConnectionAttemptCount Number of datagrams to send to the other system to try to connect. + /// \param[in] timeBetweenSendConnectionAttemptsMS Time to elapse before a datagram is sent to the other system to try to connect. After sendConnectionAttemptCount number of attempts, ID_CONNECTION_ATTEMPT_FAILED is returned.. Under low bandwidth conditions with multiple simultaneous outgoing connections, this value should be raised to 1000 or higher, or else the MTU detection can overrun the available bandwidth. + /// \param[in] timeoutTime Time to elapse before dropping the connection if a reliable message could not be sent. 0 to use the default from SetTimeoutTime(UNASSIGNED_SYSTEM_ADDRESS); + /// \return CONNECTION_ATTEMPT_STARTED on successful initiation. Otherwise, an appropriate enumeration indicating failure. + /// \note CONNECTION_ATTEMPT_STARTED does not mean you are already connected! + virtual ConnectionAttemptResult ConnectWithSocket(const char* host, unsigned short remotePort, const char *passwordData, int passwordDataLength, RakNetSocket2* socket, PublicKey *publicKey=0, unsigned sendConnectionAttemptCount=6, unsigned timeBetweenSendConnectionAttemptsMS=1000, MafiaNet::TimeMS timeoutTime=0); + + /* /// \brief Connect to the specified network ID (Platform specific console function) + /// \details Does built-in NAT traversal + /// \param[in] networkServiceId Network ID structure for the online service + /// \param[in] passwordData A data block that must match the data block on the server passed to SetIncomingPassword(). This can be a string or can be a stream of data. Use 0 for no password. + /// \param[in] passwordDataLength The length in bytes of passwordData. + //bool Console2LobbyConnect( void *networkServiceId, const char *passwordData, int passwordDataLength );*/ + + /// \brief Stops the network threads and closes all connections. + /// \param[in] blockDuration Wait time(milli seconds) for all remaining messages to go out, including ID_DISCONNECTION_NOTIFICATION. If 0, it doesn't wait at all. + /// \param[in] orderingChannel Channel on which ID_DISCONNECTION_NOTIFICATION will be sent, if blockDuration > 0. + /// \param[in] disconnectionNotificationPriority Priority at which ID_DISCONNECTION_NOTIFICATION is sent. Note that a blockDuration of 0 means the threads stop without waiting for it to flush. + void Shutdown( unsigned int blockDuration, unsigned char orderingChannel=0, MafiaNet::Priority disconnectionNotificationPriority=MafiaNet::Priority::Low ); + + /// \brief Returns true if the network thread is running. + /// \return True if the network thread is running, False otherwise + bool IsActive( void ) const; + + /// \brief Fills the array remoteSystems with the SystemAddress of all the systems we are connected to. + /// \param[out] remoteSystems An array of SystemAddress structures, to be filled with the SystemAddresss of the systems we are connected to. Pass 0 to remoteSystems to get the number of systems we are connected to. + /// \param[in, out] numberOfSystems As input, the size of remoteSystems array. As output, the number of elements put into the array. + bool GetConnectionList( SystemAddress *remoteSystems, unsigned short *numberOfSystems ) const; + + /// Returns the next uint32_t that Send() will return + /// \note If using RakPeer from multiple threads, this may not be accurate for your thread. Use IncrementNextSendReceipt() in that case. + /// \return The next uint32_t that Send() or SendList will return + virtual uint32_t GetNextSendReceipt(void); + + /// Returns the next uint32_t that Send() will return, and increments the value by one + /// \note If using RakPeer from multiple threads, pass this to forceReceipt in the send function + /// \return The next uint32_t that Send() or SendList will return + virtual uint32_t IncrementNextSendReceipt(void); + + /// \brief Sends a block of data to the specified system that you are connected to. + /// \note This function only works while connected. + /// \note The first byte should be a message identifier starting at ID_USER_PACKET_ENUM. + /// \param[in] data Block of data to send. + /// \param[in] length Size in bytes of the data to send. + /// \param[in] priority Priority level to send on. See PacketPriority.h + /// \param[in] reliability How reliably to send this data. See PacketPriority.h + /// \param[in] orderingChannel When using ordered or sequenced messages, the channel to order these on. Messages are only ordered relative to other messages on the same stream. + /// \param[in] systemIdentifier Who to send this packet to, or in the case of broadcasting who not to send it to. Pass either a SystemAddress structure or a RakNetGUID structure. Use UNASSIGNED_SYSTEM_ADDRESS or to specify none + /// \param[in] broadcast True to send this packet to all connected systems. If true, then systemAddress specifies who not to send the packet to. + /// \param[in] forceReceipt If 0, will automatically determine the receipt number to return. If non-zero, will return what you give it. + /// \return 0 on bad input. Otherwise a number that identifies this message. If \a reliability is a type that returns a receipt, on a later call to Receive() you will get ID_SND_RECEIPT_ACKED or ID_SND_RECEIPT_LOSS with bytes 1-4 inclusive containing this number + uint32_t Send( const char *data, const int length, MafiaNet::Priority priority, MafiaNet::Reliability reliability, char orderingChannel, const AddressOrGUID systemIdentifier, bool broadcast, uint32_t forceReceiptNumber=0 ); + + /// \brief "Send" to yourself rather than a remote system. + /// \details The message will be processed through the plugins and returned to the game as usual. + /// This function works anytime + /// \note The first byte should be a message identifier starting at ID_USER_PACKET_ENUM + /// \param[in] data Block of data to send. + /// \param[in] length Size in bytes of the data to send. + void SendLoopback( const char *data, const int length ); + + /// \brief Sends a block of data to the specified system that you are connected to. + /// + /// Same as the above version, but takes a BitStream as input. + /// \param[in] bitStream Bitstream to send + /// \param[in] priority Priority level to send on. See PacketPriority.h + /// \param[in] reliability How reliably to send this data. See PacketPriority.h + /// \param[in] orderingChannel Channel to order the messages on, when using ordered or sequenced messages. Messages are only ordered relative to other messages on the same stream. + /// \param[in] systemIdentifier System Address or RakNetGUID to send this packet to, or in the case of broadcasting, the address not to send it to. Use UNASSIGNED_SYSTEM_ADDRESS to specify none. + /// \param[in] broadcast True to send this packet to all connected systems. If true, then systemAddress specifies who not to send the packet to. + /// \param[in] forceReceipt If 0, will automatically determine the receipt number to return. If non-zero, will return what you give it. + /// \return 0 on bad input. Otherwise a number that identifies this message. If \a reliability is a type that returns a receipt, on a later call to Receive() you will get ID_SND_RECEIPT_ACKED or ID_SND_RECEIPT_LOSS with bytes 1-4 inclusive containing this number + /// \note COMMON MISTAKE: When writing the first byte, bitStream->Write((unsigned char) ID_MY_TYPE) be sure it is casted to a byte, and you are not writing a 4 byte enumeration. + uint32_t Send( const MafiaNet::BitStream * bitStream, MafiaNet::Priority priority, MafiaNet::Reliability reliability, char orderingChannel, const AddressOrGUID systemIdentifier, bool broadcast, uint32_t forceReceiptNumber=0 ); + + /// \brief Sends multiple blocks of data, concatenating them automatically. + /// + /// This is equivalent to: + /// MafiaNet::BitStream bs; + /// bs.WriteAlignedBytes(block1, blockLength1); + /// bs.WriteAlignedBytes(block2, blockLength2); + /// bs.WriteAlignedBytes(block3, blockLength3); + /// Send(&bs, ...) + /// + /// This function only works when connected. + /// \param[in] data An array of pointers to blocks of data + /// \param[in] lengths An array of integers indicating the length of each block of data + /// \param[in] numParameters Length of the arrays data and lengths + /// \param[in] priority Priority level to send on. See PacketPriority.h + /// \param[in] reliability How reliably to send this data. See PacketPriority.h + /// \param[in] orderingChannel Channel to order the messages on, when using ordered or sequenced messages. Messages are only ordered relative to other messages on the same stream. + /// \param[in] systemIdentifier System Address or RakNetGUID to send this packet to, or in the case of broadcasting, the address not to send it to. Use UNASSIGNED_SYSTEM_ADDRESS to specify none. + /// \param[in] broadcast True to send this packet to all connected systems. If true, then systemAddress specifies who not to send the packet to. + /// \param[in] forceReceipt If 0, will automatically determine the receipt number to return. If non-zero, will return what you give it. + /// \return 0 on bad input. Otherwise a number that identifies this message. If \a reliability is a type that returns a receipt, on a later call to Receive() you will get ID_SND_RECEIPT_ACKED or ID_SND_RECEIPT_LOSS with bytes 1-4 inclusive containing this number + uint32_t SendList( const char **data, const int *lengths, const int numParameters, MafiaNet::Priority priority, MafiaNet::Reliability reliability, char orderingChannel, const AddressOrGUID systemIdentifier, bool broadcast, uint32_t forceReceiptNumber=0 ); + + /// \brief Gets a message from the incoming message queue. + /// \details Use DeallocatePacket() to deallocate the message after you are done with it. + /// User-thread functions, such as RPC calls and the plugin function PluginInterface::Update occur here. + /// \return 0 if no packets are waiting to be handled, otherwise a pointer to a packet. + /// \note COMMON MISTAKE: Be sure to call this in a loop, once per game tick, until it returns 0. If you only process one packet per game tick they will buffer up. + /// \sa types.h contains struct Packet. + Packet* Receive( void ); + + /// \brief Call this to deallocate a message returned by Receive() when you are done handling it. + /// \param[in] packet Message to deallocate. + void DeallocatePacket( Packet *packet ); + + /// \brief Return the total number of connections we are allowed. + /// \return Total number of connections allowed. + unsigned int GetMaximumNumberOfPeers( void ) const; + + // -------------------------------------------------------------------------------------------- Connection Management Functions-------------------------------------------------------------------------------------------- + /// \brief Close the connection to another host (if we initiated the connection it will disconnect, if they did it will kick them out). + /// \details This method closes the connection irrespective of who initiated the connection. + /// \param[in] target Which system to close the connection to. + /// \param[in] sendDisconnectionNotification True to send ID_DISCONNECTION_NOTIFICATION to the recipient. False to close it silently. + /// \param[in] channel Which ordering channel to send the disconnection notification on, if any + /// \param[in] disconnectionNotificationPriority Priority to send ID_DISCONNECTION_NOTIFICATION on. + void CloseConnection( const AddressOrGUID target, bool sendDisconnectionNotification, unsigned char orderingChannel=0, MafiaNet::Priority disconnectionNotificationPriority=MafiaNet::Priority::Low, const MafiaNet::BitStream *reasonData=nullptr ); + + /// \brief Cancel a pending connection attempt. + /// \details If we are already connected, the connection stays open + /// \param[in] target Target system to cancel. + void CancelConnectionAttempt( const SystemAddress target ); + /// Returns if a system is connected, disconnected, connecting in progress, or various other states + /// \param[in] systemIdentifier The system we are referring to + /// \note This locks a mutex, do not call too frequently during connection attempts or the attempt will take longer and possibly even timeout + /// \return What state the remote system is in + ConnectionState GetConnectionState(const AddressOrGUID systemIdentifier); + + /// \brief Given \a systemAddress, returns its index into remoteSystemList. + /// \details Values range from 0 to the maximum number of players allowed - 1. + /// This includes systems which were formerly connected, but are now not connected. + /// \param[in] systemAddress The SystemAddress we are referring to + /// \return The index of this SystemAddress or -1 on system not found. + int GetIndexFromSystemAddress( const SystemAddress systemAddress ) const; + + /// \brief Given \a index into remoteSystemList, will return a SystemAddress. + /// This function is only useful for looping through all systems. + /// + /// \param[in] index Index should range between 0 and the maximum number of players allowed - 1. + /// \return The SystemAddress structure corresponding to \a index in remoteSystemList. + SystemAddress GetSystemAddressFromIndex( unsigned int index ); + + /// \brief Same as GetSystemAddressFromIndex but returns RakNetGUID + /// \param[in] index Index should range between 0 and the maximum number of players allowed - 1. + /// \return The RakNetGUID + RakNetGUID GetGUIDFromIndex( unsigned int index ); + + /// \brief Same as calling GetSystemAddressFromIndex and GetGUIDFromIndex for all systems, but more efficient + /// Indices match each other, so \a addresses[0] and \a guids[0] refer to the same system + /// \param[out] addresses All system addresses. Size of the list is the number of connections. Size of the \a addresses list will match the size of the \a guids list. + /// \param[out] guids All guids. Size of the list is the number of connections. Size of the list will match the size of the \a addresses list. + void GetSystemList(DataStructures::List &addresses, DataStructures::List &guids) const; + + /// \brief Bans an IP from connecting. + /// \details Banned IPs persist between connections but are not saved on shutdown nor loaded on startup. + /// \param[in] IP Dotted IP address. You can use * for a wildcard address, such as 128.0.0. * will ban all IP addresses starting with 128.0.0. + /// \param[in] milliseconds Gives time in milli seconds for a temporary ban of the IP address. Use 0 for a permanent ban. + void AddToBanList( const char *IP, MafiaNet::TimeMS milliseconds=0 ); + + /// \brief Allows a previously banned IP to connect. + /// param[in] Dotted IP address. You can use * as a wildcard. An IP such as 128.0.0.* will ban all IP addresses starting with 128.0.0. + void RemoveFromBanList( const char *IP ); + + /// \brief Allows all previously banned IPs to connect. + void ClearBanList( void ); + + /// \brief Returns true or false indicating if a particular IP is banned. + /// \param[in] IP Dotted IP address. + /// \return True if IP matches any IPs in the ban list, accounting for any wildcards. False otherwise. + bool IsBanned( const char *IP ); + + /// \brief Enable or disable allowing frequent connections from the same IP adderss + /// \details This is a security measure which is disabled by default, but can be set to true to prevent attackers from using up all connection slots. + /// \param[in] b True to limit connections from the same ip to at most 1 per 100 milliseconds. + void SetLimitIPConnectionFrequency(bool b); + + // --------------------------------------------------------------------------------------------Pinging Functions - Functions dealing with the automatic ping mechanism-------------------------------------------------------------------------------------------- + /// Send a ping to the specified connected system. + /// \pre The sender and recipient must already be started via a successful call to Startup() + /// \param[in] target Which system to ping + void Ping( const SystemAddress target ); + + /// \brief Send a ping to the specified unconnected system. + /// \details The remote system, if it is Initialized, will respond with ID_PONG followed by sizeof(MafiaNet::TimeMS) containing the system time the ping was sent. Default is 4 bytes - See __GET_TIME_64BIT in types.h + /// System should reply with ID_PONG if it is active + /// \param[in] host Either a dotted IP address or a domain name. Can be 255.255.255.255 for LAN broadcast. + /// \param[in] remotePort Which port to connect to on the remote machine. + /// \param[in] onlyReplyOnAcceptingConnections Only request a reply if the remote system is accepting connections + /// \param[in] connectionSocketIndex Index into the array of socket descriptors passed to socketDescriptors in RakPeer::Startup() to send on. + /// \return true on success, false on failure (unknown hostname) + bool Ping( const char* host, unsigned short remotePort, bool onlyReplyOnAcceptingConnections, unsigned connectionSocketIndex=0 ); + + /// \brief Returns the average of all ping times read for the specific system or -1 if none read yet + /// \param[in] systemAddress Which system we are referring to + /// \return The ping time for this system, or -1 + int GetAveragePing( const AddressOrGUID systemIdentifier ); + + /// \brief Returns the last ping time read for the specific system or -1 if none read yet. + /// \param[in] systemAddress Which system we are referring to + /// \return The last ping time for this system, or -1. + int GetLastPing( const AddressOrGUID systemIdentifier ) const; + + /// \brief Returns the lowest ping time read or -1 if none read yet. + /// \param[in] systemIdentifier Which system we are referring to + /// \return The lowest ping time for this system, or -1. + int GetLowestPing( const AddressOrGUID systemIdentifier ) const; + + /// Ping the remote systems every so often, or not. Can be called anytime. + /// By default this is true. Recommended to leave on, because congestion control uses it to determine how often to resend lost packets. + /// It would be true by default to prevent timestamp drift, since in the event of a clock spike, the timestamp deltas would no longer be accurate + /// \param[in] doPing True to start occasional pings. False to stop them. + void SetOccasionalPing( bool doPing ); + + /// Return the clock difference between your system and the specified system + /// Subtract GetClockDifferential() from a time returned by the remote system to get that time relative to your own system + /// Returns 0 if the system is unknown + /// \param[in] systemIdentifier Which system we are referring to + MafiaNet::Time GetClockDifferential( const AddressOrGUID systemIdentifier ); + + // --------------------------------------------------------------------------------------------Static Data Functions - Functions dealing with API defined synchronized memory-------------------------------------------------------------------------------------------- + /// \brief Sets the data to send along with a LAN server discovery or offline ping reply. + /// \param[in] data Block of data to send, or 0 for none + /// \param[in] length Length of the data in bytes, or 0 for none + /// \note \a length should be under 400 bytes, as a security measure against flood attacks + /// \sa Ping.cpp + void SetOfflinePingResponse( const char *data, const unsigned int length ); + + /// \brief Returns pointers to a copy of the \a data passed to SetOfflinePingResponse. + /// \param[out] data A pointer to a copy of the data passed to SetOfflinePingResponse() + /// \param[out] length A pointer filled in with the length parameter passed to SetOfflinePingResponse() + /// \sa SetOfflinePingResponse + void GetOfflinePingResponse( char **data, unsigned int *length ); + + // -------------------------------------------------------------------------------------------------------------- + // Session handshake + // -------------------------------------------------------------------------------------------------------------- + /// \brief Sets this peer's session-handshake payload. + /// \details Exchanged before either side reports a connection: a client sends it in + /// ID_SESSION_CONFIG_REQUEST, a server answers with it in ID_SESSION_CONFIG. The bytes are opaque to + /// MafiaNet. Call before Startup()/Connect(). + /// \param[in] data Payload to send, or 0 for none. + /// \param[in] length Length of \a data in bytes; must not exceed MAXIMUM_SESSION_CONFIG_SIZE. + void SetSessionConfig( const char *data, unsigned int length ); + + /// \brief Returns a pointer to the payload passed to SetSessionConfig. + void GetSessionConfig( char **data, unsigned int *length ); + + /// \brief Returns the remote peer's session payload. + /// \details Valid from the moment ID_CONNECTION_REQUEST_ACCEPTED or ID_NEW_INCOMING_CONNECTION + /// surfaces for \a systemIdentifier, for the lifetime of that connection. + /// \param[in] systemIdentifier The connection to read. + /// \param[out] length Filled in with the payload length; 0 when there is none. + /// \return Pointer to the payload owned by the connection, or 0 when there is none. + const char *GetRemoteSessionConfig( const AddressOrGUID systemIdentifier, unsigned int *length ); + + /// \brief Server: decide each client's session answer individually instead of replying automatically. + /// \details With this on, ID_SESSION_CONFIG_REQUEST is surfaced to the application and the connection + /// stays unreported until AcceptSession() or RejectSession() is called for that peer. Off by default, + /// in which case the payload set by SetSessionConfig() answers every client and no application code is + /// required. + void SetSessionConfigInteractive( bool interactive ); + + /// \brief Server: accept a pending session request, sending \a data as this connection's payload. + /// \details Only meaningful for a peer that surfaced ID_SESSION_CONFIG_REQUEST. Completes the + /// handshake and surfaces the withheld ID_NEW_INCOMING_CONNECTION. + void AcceptSession( const AddressOrGUID systemIdentifier, const char *data, unsigned int length ); + + /// \brief Server: refuse a pending session request. + /// \details The client reports ID_CONNECTION_ATTEMPT_FAILED and neither side ever reports a + /// connection. \a reason is delivered to the client in ID_SESSION_CONFIG_REJECTED; it may be 0. + void RejectSession( const AddressOrGUID systemIdentifier, const char *reason ); + + /// rief Server: hold peers in the session handshake in a pool of their own instead of in the incoming limit. + /// \details See RakPeerInterface::SetMaximumPendingSessions. + void SetMaximumPendingSessions( unsigned short total, unsigned short perAddress ); + + /// rief Bounds how long a session handshake may wait for its answer; 0 uses the connection timeout. + void SetSessionTimeout( MafiaNet::TimeMS timeMS ); + + /// rief Server: send ID_SESSION_CONFIG_STATUS to a peer awaiting a session decision. + void SendSessionStatus( const AddressOrGUID systemIdentifier, const char *data, unsigned int length ); + + //--------------------------------------------------------------------------------------------Network Functions - Functions dealing with the network in general-------------------------------------------------------------------------------------------- + /// \brief Returns the unique address identifier that represents you or another system on the the network + /// \param[in] systemAddress Use UNASSIGNED_SYSTEM_ADDRESS to get your behind-LAN address. Use a connected system to get their behind-LAN address. This does not return the port. + /// \param[in] index When you have multiple internal IDs, which index to return? Currently limited to MAXIMUM_NUMBER_OF_INTERNAL_IDS (so the maximum value of this variable is MAXIMUM_NUMBER_OF_INTERNAL_IDS-1) + /// \return Identifier of your system internally, which may not be how other systems see if you if you are behind a NAT or proxy. + SystemAddress GetInternalID( const SystemAddress systemAddress=UNASSIGNED_SYSTEM_ADDRESS, const int index=0 ) const; + + /// \brief Sets your internal IP address, for platforms that do not support reading it, or to override a value + /// \param[in] systemAddress. The address to set. Use SystemAddress::FromString() if you want to use a dotted string + /// \param[in] index When you have multiple internal IDs, which index to set? + void SetInternalID(SystemAddress systemAddress, int index=0); + + /// \brief Returns the unique address identifier that represents the target on the the network and is based on the target's external IP / port. + /// \param[in] target The SystemAddress of the remote system. Usually the same for all systems, unless you have two or more network cards. + SystemAddress GetExternalID( const SystemAddress target ) const; + + /// Return my own GUID + const RakNetGUID GetMyGUID(void) const; + + /// Return the address bound to a socket at the specified index + SystemAddress GetMyBoundAddress(const int socketIndex=0); + + /// \brief Given a connected system address, this method gives the unique GUID representing that instance of RakPeer. + /// This will be the same on all systems connected to that instance of RakPeer, even if the external system addresses are different. + /// Complexity is O(log2(n)). + /// If \a input is UNASSIGNED_SYSTEM_ADDRESS, will return your own GUID + /// \pre Call Startup() first, or the function will return UNASSIGNED_RAKNET_GUID + /// \param[in] input The system address of the target system we are connected to. + const RakNetGUID& GetGuidFromSystemAddress( const SystemAddress input ) const; + + /// \brief Gives the system address of a connected system, given its GUID. + /// The GUID will be the same on all systems connected to that instance of RakPeer, even if the external system addresses are different. + /// Currently O(log(n)), but this may be improved in the future + /// If \a input is UNASSIGNED_RAKNET_GUID, UNASSIGNED_SYSTEM_ADDRESS is returned. + /// \param[in] input The RakNetGUID of the target system. + SystemAddress GetSystemAddressFromGuid( const RakNetGUID input ) const; + + /// Given the SystemAddress of a connected system, get the public key they provided as an identity + /// Returns false if system address was not found or client public key is not known + /// \param[in] input The RakNetGUID of the system + /// \param[in] client_public_key The connected client's public key is copied to this address. Buffer must be cat::EasyHandshake::PUBLIC_KEY_BYTES bytes in length. + bool GetClientPublicKeyFromSystemAddress( const SystemAddress input, char *client_public_key ) const; + + /// \brief Set the time, in MS, to use before considering ourselves disconnected after not being able to deliver a reliable message. + + /// Set the time, in MS, to use before considering ourselves disconnected after not being able to deliver a reliable message. + /// Default time is 10,000 or 10 seconds in release and 30,000 or 30 seconds in debug. + /// Do not set different values for different computers that are connected to each other, or you won't be able to reconnect after ID_CONNECTION_LOST + /// \param[in] timeMS Time, in MS + /// \param[in] target SystemAddress structure of the target system. Pass UNASSIGNED_SYSTEM_ADDRESS for all systems. + void SetTimeoutTime(MafiaNet::TimeMS timeMS, const SystemAddress target ); + + /// \brief Returns the Timeout time for the given system. + /// \param[in] target Target system to get the TimeoutTime for. Pass UNASSIGNED_SYSTEM_ADDRESS to get the default value. + /// \return Timeout time for a given system. + MafiaNet::TimeMS GetTimeoutTime( const SystemAddress target ); + + /// \brief Returns the current MTU size + /// \param[in] target Which system to get MTU for. UNASSIGNED_SYSTEM_ADDRESS to get the default + /// \return The current MTU size of the target system. + int GetMTUSize( const SystemAddress target ) const; + + /// \brief Returns the number of IP addresses this system has internally. + /// \details Get the actual addresses from GetLocalIP() + unsigned GetNumberOfAddresses( void ); + + /// Returns an IP address at index 0 to GetNumberOfAddresses-1 in ipList array. + /// \param[in] index index into the list of IP addresses + /// \return The local IP address at this index + const char* GetLocalIP( unsigned int index ); + + /// Is this a local IP? + /// Checks if this ip is in the ipList array. + /// \param[in] An IP address to check, excluding the port. + /// \return True if this is one of the IP addresses returned by GetLocalIP + bool IsLocalIP( const char *ip ); + + /// \brief Allow or disallow connection responses from any IP. + /// \details Normally this should be false, but may be necessary when connecting to servers with multiple IP addresses. + /// \param[in] allow - True to allow this behavior, false to not allow. Defaults to false. Value persists between connections. + void AllowConnectionResponseIPMigration( bool allow ); + + /// \brief Sends a one byte message ID_ADVERTISE_SYSTEM to the remote unconnected system. + /// This will send our external IP outside the LAN along with some user data to the remote system. + /// \pre The sender and recipient must already be started via a successful call to Initialize + /// \param[in] host Either a dotted IP address or a domain name + /// \param[in] remotePort Which port to connect to on the remote machine. + /// \param[in] data Optional data to append to the packet. + /// \param[in] dataLength Length of data in bytes. Use 0 if no data. + /// \param[in] connectionSocketIndex Index into the array of socket descriptors passed to socketDescriptors in RakPeer::Startup() to send on. + /// \return False if IsActive()==false or the host is unresolvable. True otherwise. + bool AdvertiseSystem( const char *host, unsigned short remotePort, const char *data, int dataLength, unsigned connectionSocketIndex=0 ); + + /// \brief Controls how often to return ID_DOWNLOAD_PROGRESS for large message downloads. + /// \details ID_DOWNLOAD_PROGRESS is returned to indicate a new partial message chunk, roughly the MTU size, has arrived. + /// As it can be slow or cumbersome to get this notification for every chunk, you can set the interval at which it is returned. + /// Defaults to 0 (never return this notification). + /// \param[in] interval How many messages to use as an interval before a download progress notification is returned. + void SetSplitMessageProgressInterval(int interval); + + /// \brief Returns what was passed to SetSplitMessageProgressInterval(). + /// \return Number of messages to be recieved before a download progress notification is returned. Default to 0. + int GetSplitMessageProgressInterval(void) const; + + /// \brief Set how long to wait before giving up on sending an unreliable message. + /// Useful if the network is clogged up. + /// Set to 0 or less to never timeout. Defaults to 0. + /// \param[in] timeoutMS How many ms to wait before simply not sending an unreliable message. + void SetUnreliableTimeout(MafiaNet::TimeMS timeoutMS); + + /// \brief Send a message to a host, with the IP socket option TTL set to 3. + /// \details This message will not reach the host, but will open the router. + /// \param[in] host The address of the remote host in dotted notation. + /// \param[in] remotePort The port number to send to. + /// \param[in] ttl Max hops of datagram, set to 3 + /// \param[in] connectionSocketIndex userConnectionSocketIndex. + /// \remarks Used for NAT-Punchthrough + void SendTTL( const char* host, unsigned short remotePort, int ttl, unsigned connectionSocketIndex=0 ); + + // -------------------------------------------------------------------------------------------- Plugin Functions-------------------------------------------------------------------------------------------- + /// \brief Attaches a Plugin interface to an instance of the base class (RakPeer or PacketizedTCP) to run code automatically on message receipt in the Receive call. + /// If the plugin returns false from PluginInterface::UsesReliabilityLayer(), which is the case for all plugins except PacketLogger, you can call AttachPlugin() and DetachPlugin() for this plugin while RakPeer is active. + /// \param[in] messageHandler Pointer to the plugin to attach. + void AttachPlugin( PluginInterface2 *plugin ); + + /// \brief Detaches a Plugin interface from the instance of the base class (RakPeer or PacketizedTCP) it is attached to. + /// \details This method disables the plugin code from running automatically on base class's updates or message receipt. + /// If the plugin returns false from PluginInterface::UsesReliabilityLayer(), which is the case for all plugins except PacketLogger, you can call AttachPlugin() and DetachPlugin() for this plugin while RakPeer is active. + /// \param[in] messageHandler Pointer to a plugin to detach. + void DetachPlugin( PluginInterface2 *messageHandler ); + + // --------------------------------------------------------------------------------------------Miscellaneous Functions-------------------------------------------------------------------------------------------- + /// \brief Puts a message back in the receive queue in case you don't want to deal with it immediately. + /// \param[in] packet The pointer to the packet you want to push back. + /// \param[in] pushAtHead True to push the packet at the start of the queue so that the next receive call returns it. False to push it at the end of the queue. + /// \note Setting pushAtHead to false end makes the packets out of order. + void PushBackPacket( Packet *packet, bool pushAtHead ); + + /// \internal + /// \brief For a given system identified by \a guid, change the SystemAddress to send to. + /// \param[in] guid The connection we are referring to + /// \param[in] systemAddress The new address to send to + void ChangeSystemAddress(RakNetGUID guid, const SystemAddress &systemAddress); + + /// \brief Returns a packet for you to write to if you want to create a Packet for some reason. + /// You can add it to the receive buffer with PushBackPacket + /// \param[in] dataSize How many bytes to allocate for the buffer + /// \return A packet. + Packet* AllocatePacket(unsigned dataSize); + + /// \brief Get the socket used with a particular active connection. + /// The smart pointer reference counts the RakNetSocket object, so the socket will remain active as long as the smart pointer does, even if RakNet were to shutdown or close the connection. + /// \note This sends a query to the thread and blocks on the return value for up to one second. In practice it should only take a millisecond or so. + /// \param[in] target Which system. + /// \return A smart pointer object containing the socket information about the target. Be sure to check IsNull() which is returned if the update thread is unresponsive, shutting down, or if this system is not connected. + virtual RakNetSocket2* GetSocket( const SystemAddress target ); + + /// \brief Gets all sockets in use. + /// \note This sends a query to the thread and blocks on the return value for up to one second. In practice it should only take a millisecond or so. + /// \param[out] sockets List of RakNetSocket structures in use. + virtual void GetSockets( DataStructures::List &sockets ); + virtual void ReleaseSockets( DataStructures::List &sockets ); + + /// \internal + virtual void WriteOutOfBandHeader(MafiaNet::BitStream *bitStream); + + /// If you need code to run in the same thread as RakNet's update thread, this function can be used for that + /// \param[in] _userUpdateThreadPtr C callback function + /// \param[in] _userUpdateThreadData Passed to C callback function + virtual void SetUserUpdateThread(void (*_userUpdateThreadPtr)(RakPeerInterface *, void *), void *_userUpdateThreadData); + + /// Set a C callback to be called whenever a datagram arrives + /// Return true from the callback to have RakPeer handle the datagram. Return false and RakPeer will ignore the datagram. + /// This can be used to filter incoming datagrams by system, or to share a recvfrom socket with RakPeer + /// RNS2RecvStruct will only remain valid for the duration of the call + virtual void SetIncomingDatagramEventHandler( bool (*_incomingDatagramEventHandler)(RNS2RecvStruct *) ); + + // --------------------------------------------------------------------------------------------Network Simulator Functions-------------------------------------------------------------------------------------------- + /// Adds simulated ping and packet loss to the outgoing data flow. + /// To simulate bi-directional ping and packet loss, you should call this on both the sender and the recipient, with half the total ping and packetloss value on each. + /// You can exclude network simulator code with the _RELEASE #define to decrease code size + /// \deprecated Use http://www.jenkinssoftware.com/forum/index.php?topic=1671.0 instead. + /// \note Doesn't work past version 3.6201 + /// \param[in] packetloss Chance to lose a packet. Ranges from 0 to 1. + /// \param[in] minExtraPing The minimum time to delay sends. + /// \param[in] extraPingVariance The additional random time to delay sends. + virtual void ApplyNetworkSimulator( float packetloss, unsigned short minExtraPing, unsigned short extraPingVariance); + + /// Limits how much outgoing bandwidth can be sent per-connection. + /// This limit does not apply to the sum of all connections! + /// Exceeding the limit queues up outgoing traffic + /// \param[in] maxBitsPerSecond Maximum bits per second to send. Use 0 for unlimited (default). Once set, it takes effect immedately and persists until called again. + virtual void SetPerConnectionOutgoingBandwidthLimit( unsigned maxBitsPerSecond ); + + /// Returns if you previously called ApplyNetworkSimulator + /// \return If you previously called ApplyNetworkSimulator + virtual bool IsNetworkSimulatorActive( void ); + + // --------------------------------------------------------------------------------------------Statistical Functions - Functions dealing with API performance-------------------------------------------------------------------------------------------- + + /// \brief Returns a structure containing a large set of network statistics for the specified system. + /// You can map this data to a string using the C style StatisticsToString() function + /// \param[in] systemAddress Which connected system to get statistics for. + /// \param[in] rns If you supply this structure,the network statistics will be written to it. Otherwise the method uses a static struct to write the data, which is not threadsafe. + /// \return 0 if the specified system can't be found. Otherwise a pointer to the struct containing the specified system's network statistics. + /// \sa statistics.h + RakNetStatistics * GetStatistics( const SystemAddress systemAddress, RakNetStatistics *rns=0 ); + /// \brief Returns the network statistics of the system at the given index in the remoteSystemList. + /// \return True if the index is less than the maximum number of peers allowed and the system is active. False otherwise. + bool GetStatistics( const unsigned int index, RakNetStatistics *rns ); + /// \brief Returns the list of systems, and statistics for each of those systems + /// Each system has one entry in each of the lists, in the same order + /// \param[out] addresses SystemAddress for each connected system + /// \param[out] guids RakNetGUID for each connected system + /// \param[out] statistics Calculated RakNetStatistics for each connected system + virtual void GetStatisticsList(DataStructures::List &addresses, DataStructures::List &guids, DataStructures::List &statistics); + + /// \Returns how many messages are waiting when you call Receive() + virtual unsigned int GetReceiveBufferSize(void); + + // --------------------------------------------------------------------------------------------EVERYTHING AFTER THIS COMMENT IS FOR INTERNAL USE ONLY-------------------------------------------------------------------------------------------- + + + /// \internal + // Call manually if RAKPEER_USER_THREADED==1 at least every 30 milliseconds. + // updateBitStream should be: + // BitStream updateBitStream( MAXIMUM_MTU_SIZE + // #if LIBCAT_SECURITY==1 + // + cat::AuthenticatedEncryption::OVERHEAD_BYTES + // #endif + // ); + bool RunUpdateCycle( BitStream &updateBitStream ); + + /// \internal + // Call manually if RAKPEER_USER_THREADED==1 at least every 30 milliseconds. + // Call in a loop until returns false if the socket is non-blocking + // extraSocketOptions is from SocketDescriptor when the socket was created + // bool RunRecvFromOnce( RakNetSocket *s ); + + /// \internal + bool SendOutOfBand(const char *host, unsigned short remotePort, const char *data, BitSize_t dataLength, unsigned connectionSocketIndex=0 ); + + // static Packet *AllocPacket(unsigned dataSize, const char *file, unsigned int line); + + /// \internal + /// \brief Holds the clock differences between systems, along with the ping + struct PingAndClockDifferential + { + unsigned short pingTime; + MafiaNet::Time clockDifferential; + }; + + /// \internal + /// \brief All the information representing a connected system + struct RemoteSystemStruct + { + bool isActive; // Is this structure in use? + SystemAddress systemAddress; /// Their external IP on the internet + SystemAddress myExternalSystemAddress; /// Your external IP on the internet, from their perspective + SystemAddress theirInternalSystemAddress[MAXIMUM_NUMBER_OF_INTERNAL_IDS]; /// Their internal IP, behind the LAN + ReliabilityLayer reliabilityLayer; /// The reliability layer associated with this player + bool weInitiatedTheConnection; /// True if we started this connection via Connect. False if someone else connected to us. + PingAndClockDifferential pingAndClockDifferential[ PING_TIMES_ARRAY_SIZE ]; /// last x ping times and calculated clock differentials with it + MafiaNet::Time pingAndClockDifferentialWriteIndex; /// The index we are writing into the pingAndClockDifferential circular buffer + unsigned short lowestPing; ///The lowest ping value encountered + MafiaNet::Time nextPingTime; /// When to next ping this player + MafiaNet::Time lastReliableSend; /// When did the last reliable send occur. Reliable sends must occur at least once every timeoutTime/2 units to notice disconnects + MafiaNet::Time connectionTime; /// connection time, if active. +// int connectionSocketIndex; // index into connectionSockets to send back on. + RakNetGUID guid; + int MTUSize; + // Reference counted socket to send back on + RakNetSocket2* rakNetSocket; + SystemIndex remoteSystemIndex; + + // Optional disconnect-reason payload received with an incoming ID_DISCONNECTION_NOTIFICATION. The payload is + // stashed here when the notification arrives and copied into the user-facing notification packet that is + // synthesized after outstanding ACKs are flushed (the raw reliability-layer buffer is freed in between, so it + // cannot be delivered directly). null/0 when the remote sent no reason. Owned by this struct; copied out at + // delivery and freed via ClearDisconnectReason() on every slot teardown (including the immediate close that + // directly follows delivery) and on slot reuse. + unsigned char* disconnectReasonData; + unsigned int disconnectReasonLength; + +#if LIBCAT_SECURITY==1 + // Cached answer used internally by RakPeer to prevent DoS attacks based on the connexion handshake + char answer[cat::EasyHandshake::ANSWER_BYTES]; + + // If the server has bRequireClientKey = true, then this is set to the validated public key of the connected client + // Valid after connectMode reaches HANDLING_CONNECTION_REQUEST + char client_public_key[cat::EasyHandshake::PUBLIC_KEY_BYTES]; +#endif + + // Session-handshake payload received from the remote peer (see RakPeerInterface::SetSessionConfig). + // null/0 until the exchange completes. Owned by this struct; freed via ClearSessionConfig() on every + // slot teardown and on slot reuse, exactly like disconnectReasonData above. + unsigned char* remoteSessionConfigData; + unsigned int remoteSessionConfigLength; + + // Set while connectMode==EXCHANGING_SESSION_DATA and SetSessionConfigInteractive(true) is in effect: + // the server surfaced ID_SESSION_CONFIG_REQUEST and is waiting for AcceptSession()/RejectSession(). + bool sessionConfigAwaitingLocalDecision; + + // True when WE initiated this connection, i.e. we are the peer that will report + // ID_CONNECTION_REQUEST_ACCEPTED. Recorded explicitly rather than inferred from the withheld + // packet so it stays correct even if that allocation failed, and so the session-handshake + // messages can be bound to the role that is allowed to send them. In a simultaneous + // (cross-connection) handshake both peers legitimately have this set. + bool sessionConfigIsConnectingSide; + + // True once the withheld connection packet has actually been handed to the application. A + // connection refused by RejectSession(), or dropped while still exchanging session data, never + // reaches this point on the accepting side -- and a close notification for a connection the + // application was never told about would be a lie. + bool connectionReportedToApplication; + + // GetTimeMS() at which this connection entered EXCHANGING_SESSION_DATA, so a handshake that never + // completes is timed out instead of pinning the slot forever. + MafiaNet::TimeMS sessionConfigStartTime; + + // The ID_CONNECTION_REQUEST_ACCEPTED / ID_NEW_INCOMING_CONNECTION bytes held back while the session + // handshake runs, replayed verbatim by ProduceWithheldConnectionPacket() once it completes. Owned by + // this struct; freed via ClearSessionConfig(). + unsigned char* withheldConnectionPacketData; + unsigned int withheldConnectionPacketLength; + + // EXCHANGING_SESSION_DATA sits between HANDLING_CONNECTION_REQUEST and CONNECTED: the reliability + // layer is fully up (MTU negotiated, acks flowing) but the application has NOT been told a + // connection exists. ID_CONNECTION_REQUEST_ACCEPTED / ID_NEW_INCOMING_CONNECTION are withheld until + // the session payloads have been exchanged, so those packets mean "the remote's session payload is + // in hand" and an application can never observe a connection without it. + enum ConnectMode {NO_ACTION, DISCONNECT_ASAP, DISCONNECT_ASAP_SILENTLY, DISCONNECT_ON_NO_ACK, REQUESTED_CONNECTION, HANDLING_CONNECTION_REQUEST, UNVERIFIED_SENDER, EXCHANGING_SESSION_DATA, CONNECTED} connectMode; + }; + + // DS_APR + //void ProcessChromePacket(RakNetSocket2 *s, const char *buffer, int dataSize, const SystemAddress& recvFromAddress, MafiaNet::TimeUS timeRead); + // /DS_APR +protected: + + friend RAK_THREAD_DECLARATION(UpdateNetworkLoop); + //friend RAK_THREAD_DECLARATION(RecvFromLoop); + friend RAK_THREAD_DECLARATION(UDTConnect); + + friend bool ProcessOfflineNetworkPacket( SystemAddress systemAddress, const char *data, const int length, RakPeer *rakPeer, RakNetSocket2* rakNetSocket, bool *isOfflineMessage, MafiaNet::TimeUS timeRead ); + friend void ProcessNetworkPacket( const SystemAddress systemAddress, const char *data, const int length, RakPeer *rakPeer, MafiaNet::TimeUS timeRead, BitStream &updateBitStream ); + friend void ProcessNetworkPacket( const SystemAddress systemAddress, const char *data, const int length, RakPeer *rakPeer, RakNetSocket2* rakNetSocket, MafiaNet::TimeUS timeRead, BitStream &updateBitStream ); + + int GetIndexFromSystemAddress( const SystemAddress systemAddress, bool calledFromNetworkThread ) const; + int GetIndexFromGuid( const RakNetGUID guid ); + + //void RemoveFromRequestedConnectionsList( const SystemAddress systemAddress ); + // Two versions needed because some buggy compilers strip the last parameter if unused, and crashes + ConnectionAttemptResult SendConnectionRequest( const char* host, unsigned short remotePort, const char *passwordData, int passwordDataLength, PublicKey *publicKey, unsigned connectionSocketIndex, unsigned int extraData, unsigned sendConnectionAttemptCount, unsigned timeBetweenSendConnectionAttemptsMS, MafiaNet::TimeMS timeoutTime, RakNetSocket2* socket ); + ConnectionAttemptResult SendConnectionRequest( const char* host, unsigned short remotePort, const char *passwordData, int passwordDataLength, PublicKey *publicKey, unsigned connectionSocketIndex, unsigned int extraData, unsigned sendConnectionAttemptCount, unsigned timeBetweenSendConnectionAttemptsMS, MafiaNet::TimeMS timeoutTime ); + ///Get the reliability layer associated with a systemAddress. + /// \param[in] systemAddress The player identifier + /// \return 0 if none + RemoteSystemStruct *GetRemoteSystemFromSystemAddress( const SystemAddress systemAddress, bool calledFromNetworkThread, bool onlyActive ) const; + RakPeer::RemoteSystemStruct *GetRemoteSystem( const AddressOrGUID systemIdentifier, bool calledFromNetworkThread, bool onlyActive ) const; + void ValidateRemoteSystemLookup(void) const; + RemoteSystemStruct *GetRemoteSystemFromGUID( const RakNetGUID guid, bool onlyActive ) const; + ///Parse out a connection request packet + void ParseConnectionRequestPacket( RakPeer::RemoteSystemStruct *remoteSystem, const SystemAddress &systemAddress, const char *data, int byteSize); + void OnConnectionRequest( RakPeer::RemoteSystemStruct *remoteSystem, MafiaNet::Time incomingTimestamp ); + ///Send a reliable disconnect packet to this player and disconnect them when it is delivered + void NotifyAndFlagForShutdown( const SystemAddress systemAddress, bool performImmediate, unsigned char orderingChannel, MafiaNet::Priority disconnectionNotificationPriority, const MafiaNet::BitStream *reasonData=nullptr ); + ///Returns how many remote systems initiated a connection to us + unsigned int GetNumberOfRemoteInitiatedConnections( void ) const; + /// \brief Get a free remote system from the list and assign our systemAddress to it. + /// \note Should only be called from the update thread - not the user thread. + /// \param[in] systemAddress systemAddress to be assigned + /// \param[in] connectionMode connection mode of the RemoteSystem. + /// \param[in] rakNetSocket + /// \param[in] thisIPConnectedRecently Is this IP connected recently? set to False; + /// \param[in] bindingAddress Address to be binded with the remote system + /// \param[in] incomingMTU MTU for the remote system + RemoteSystemStruct * AssignSystemAddressToRemoteSystemList( const SystemAddress systemAddress, RemoteSystemStruct::ConnectMode connectionMode, RakNetSocket2* incomingRakNetSocket, bool *thisIPConnectedRecently, SystemAddress bindingAddress, int incomingMTU, RakNetGUID guid, bool useSecurity ); + /// \brief Adjust the timestamp of the incoming packet to be relative to this system. + /// \param[in] data Data in the incoming packet. + /// \param[in] systemAddress Sender of the incoming packet. + void ShiftIncomingTimestamp( unsigned char *data, const SystemAddress &systemAddress ) const; + /// Get the most accurate clock differential for a certain player. + /// \param[in] systemAddress The player with whose clock the time difference is calculated. + /// \returns The clock differential for a certain player. + MafiaNet::Time GetBestClockDifferential( const SystemAddress systemAddress ) const; + + bool IsLoopbackAddress(const AddressOrGUID &systemIdentifier, bool matchPort) const; + SystemAddress GetLoopbackAddress(void) const; + + ///Set this to true to terminate the Peer thread execution + volatile bool endThreads; + ///true if the peer thread is active. + volatile bool isMainLoopThreadActive; + + // MafiaNet::LocklessUint32_t isRecvFromLoopThreadActive; + + + bool occasionalPing; /// Do we occasionally ping the other systems?*/ + ///Store the maximum number of peers allowed to connect + unsigned int maximumNumberOfPeers; + //05/02/06 Just using maximumNumberOfPeers instead + ///Store the maximum number of peers able to connect, including reserved connection slots for pings, etc. + //unsigned short remoteSystemListSize; + ///Store the maximum incoming connection allowed + unsigned int maximumIncomingConnections; + MafiaNet::BitStream offlinePingResponse; + /// Our own session-handshake payload (see SetSessionConfig). On a client it is sent in + /// ID_SESSION_CONFIG_REQUEST; on a server it is the default answer in ID_SESSION_CONFIG. + MafiaNet::BitStream sessionConfig; + /// When true a server surfaces ID_SESSION_CONFIG_REQUEST and waits for AcceptSession()/RejectSession() + /// instead of answering automatically with sessionConfig. + bool sessionConfigInteractive; + /// SetMaximumPendingSessions(). 0 total keeps peers mid-handshake in the incoming limit. + unsigned short maximumPendingSessions; + unsigned short maximumPendingSessionsPerAddress; + /// SetSessionTimeout(). 0 uses the connection timeout. + MafiaNet::TimeMS sessionTimeout; + ///Local Player ID + // SystemAddress mySystemAddress[MAXIMUM_NUMBER_OF_INTERNAL_IDS]; + char incomingPassword[256]; + unsigned char incomingPasswordLength; + + /// This is an array of pointers to RemoteSystemStruct + /// This allows us to preallocate the list when starting, so we don't have to allocate or delete at runtime. + /// Another benefit is that is lets us add and remove active players simply by setting systemAddress + /// and moving elements in the list by copying pointers variables without affecting running threads, even if they are in the reliability layer + RemoteSystemStruct* remoteSystemList; + /// activeSystemList holds a list of pointers and is preallocated to be the same size as remoteSystemList. It is updated only by the network thread, but read by both threads + /// When the isActive member of RemoteSystemStruct is set to true or false, that system is added to this list of pointers + /// Threadsafe because RemoteSystemStruct is preallocated, and the list is only added to, not removed from + RemoteSystemStruct** activeSystemList; + unsigned int activeSystemListSize; + + // Use a hash, with binaryAddress plus port mod length as the index + RemoteSystemIndex **remoteSystemLookup; + unsigned int RemoteSystemLookupHashIndex(const SystemAddress &sa) const; + void ReferenceRemoteSystem(const SystemAddress &sa, unsigned int remoteSystemListIndex); + void DereferenceRemoteSystem(const SystemAddress &sa); + RemoteSystemStruct* GetRemoteSystem(const SystemAddress &sa) const; + unsigned int GetRemoteSystemIndex(const SystemAddress &sa) const; + void ClearRemoteSystemLookup(void); + DataStructures::MemoryPool remoteSystemIndexPool; + + void AddToActiveSystemList(unsigned int remoteSystemListIndex); + void RemoveFromActiveSystemList(const SystemAddress &sa); + +// unsigned int LookupIndexUsingHashIndex(const SystemAddress &sa) const; +// unsigned int RemoteSystemListIndexUsingHashIndex(const SystemAddress &sa) const; +// unsigned int FirstFreeRemoteSystemLookupIndex(const SystemAddress &sa) const; + + enum + { + // Only put these mutexes in user thread functions! + requestedConnectionList_Mutex, + offlinePingResponse_Mutex, + sessionConfig_Mutex, + NUMBER_OF_RAKPEER_MUTEXES + }; + SimpleMutex rakPeerMutexes[ NUMBER_OF_RAKPEER_MUTEXES ]; + ///RunUpdateCycle is not thread safe but we don't need to mutex calls. Just skip calls if it is running already + + bool updateCycleIsRunning; + ///The list of people we have tried to connect to recently + + //DataStructures::Queue requestedConnectionsList; + ///Data that both the client and the server needs + + unsigned int bytesSentPerSecond, bytesReceivedPerSecond; + // bool isSocketLayerBlocking; + // bool continualPing,isRecvfromThreadActive,isMainLoopThreadActive, endThreads, isSocketLayerBlocking; + unsigned int validationInteger; + SimpleMutex incomingQueueMutex, banListMutex; //,synchronizedMemoryQueueMutex, automaticVariableSynchronizationMutex; + //DataStructures::Queue incomingpacketSingleProducerConsumer; //, synchronizedMemorypacketSingleProducerConsumer; + // BitStream enumerationData; + + struct BanStruct + { + char *IP; + MafiaNet::TimeMS timeout; // 0 for none + }; + + struct RequestedConnectionStruct + { + SystemAddress systemAddress; + MafiaNet::Time nextRequestTime; + unsigned char requestsMade; + char *data; + unsigned short dataLength; + char outgoingPassword[256]; + unsigned char outgoingPasswordLength; + unsigned socketIndex; + unsigned int extraData; + unsigned sendConnectionAttemptCount; + unsigned timeBetweenSendConnectionAttemptsMS; + MafiaNet::TimeMS timeoutTime; + PublicKeyMode publicKeyMode; + RakNetSocket2* socket; + enum {CONNECT=1, /*PING=2, PING_OPEN_CONNECTIONS=4,*/ /*ADVERTISE_SYSTEM=2*/} actionToTake; + +#if LIBCAT_SECURITY==1 + char handshakeChallenge[cat::EasyHandshake::CHALLENGE_BYTES]; + cat::ClientEasyHandshake *client_handshake; + char remote_public_key[cat::EasyHandshake::PUBLIC_KEY_BYTES]; +// char remote_challenge[cat::EasyHandshake::CHALLENGE_BYTES]; + // char random[16]; +#endif + }; +#if LIBCAT_SECURITY==1 + bool GenerateConnectionRequestChallenge(RequestedConnectionStruct *rcs,PublicKey *publicKey); +#endif + + //DataStructures::List* > automaticVariableSynchronizationList; + DataStructures::List banList; + // Threadsafe, and not thread safe + DataStructures::List pluginListTS, pluginListNTS; + + DataStructures::Queue requestedConnectionQueue; + SimpleMutex requestedConnectionQueueMutex; + + // void RunMutexedUpdateCycle(void); + + struct BufferedCommandStruct + { + BitSize_t numberOfBitsToSend; + MafiaNet::Priority priority; + MafiaNet::Reliability reliability; + char orderingChannel; + AddressOrGUID systemIdentifier; + bool broadcast; + RemoteSystemStruct::ConnectMode connectionMode; + NetworkID networkID; + bool blockingCommand; // Only used for RPC + char *data; + bool haveRakNetCloseSocket; + unsigned connectionSocketIndex; + unsigned int extraSocketOptions; + RakNetSocket2* socket; + unsigned short port; + uint32_t receipt; + // BCS_SESSION_ACCEPT / BCS_SESSION_REJECT carry an application's answer to ID_SESSION_CONFIG_REQUEST + // from the user thread to the network thread: data holds the payload (accept) or reason (reject) and + // numberOfBitsToSend its length. The decision must not be applied inline because it sends on the + // connection and mutates connectMode, both of which belong to the network thread. + enum {BCS_SEND, BCS_CLOSE_CONNECTION, BCS_GET_SOCKET, BCS_CHANGE_SYSTEM_ADDRESS,/* BCS_USE_USER_SOCKET, BCS_REBIND_SOCKET_ADDRESS, BCS_RPC, BCS_RPC_SHIFT,*/ BCS_SESSION_ACCEPT, BCS_SESSION_REJECT, BCS_SESSION_STATUS, BCS_DO_NOTHING} command; + }; + + // Single producer single consumer queue using a linked list + //BufferedCommandStruct* bufferedCommandReadIndex, bufferedCommandWriteIndex; + + DataStructures::ThreadsafeAllocatingQueue bufferedCommands; + + + // DataStructures::ThreadsafeAllocatingQueue bufferedPackets; + + DataStructures::Queue bufferedPacketsFreePool; + MafiaNet::SimpleMutex bufferedPacketsFreePoolMutex; + DataStructures::Queue bufferedPacketsQueue; + MafiaNet::SimpleMutex bufferedPacketsQueueMutex; + + virtual void DeallocRNS2RecvStruct(RNS2RecvStruct *s, const char *file, unsigned int line); + virtual RNS2RecvStruct *AllocRNS2RecvStruct(const char *file, unsigned int line); + void SetupBufferedPackets(void); + void PushBufferedPacket(RNS2RecvStruct * p); + RNS2RecvStruct *PopBufferedPacket(void); + + struct SocketQueryOutput + { + SocketQueryOutput() {} + ~SocketQueryOutput() {} + DataStructures::List sockets; + }; + + DataStructures::ThreadsafeAllocatingQueue socketQueryOutput; + + + bool AllowIncomingConnections(void) const; + /// Admission for one new remote-initiated peer from  address, by SessionAdmission's rules. + bool AllowIncomingConnection(const SystemAddress &address) const; + /// How long  remoteSystem's session handshake may wait: sessionTimeout, or its connection timeout. + MafiaNet::TimeMS GetSessionTimeoutFor(RemoteSystemStruct *remoteSystem) const; + + void PingInternal( const SystemAddress target, bool performImmediate, MafiaNet::Reliability reliability ); + // This stores the user send calls to be handled by the update thread. This way we don't have thread contention over systemAddresss + void CloseConnectionInternal( const AddressOrGUID& systemIdentifier, bool sendDisconnectionNotification, bool performImmediate, unsigned char orderingChannel, MafiaNet::Priority disconnectionNotificationPriority ); + void SendBuffered( const char *data, BitSize_t numberOfBitsToSend, MafiaNet::Priority priority, MafiaNet::Reliability reliability, char orderingChannel, const AddressOrGUID systemIdentifier, bool broadcast, RemoteSystemStruct::ConnectMode connectionMode, uint32_t receipt ); + void SendBufferedList( const char **data, const int *lengths, const int numParameters, MafiaNet::Priority priority, MafiaNet::Reliability reliability, char orderingChannel, const AddressOrGUID systemIdentifier, bool broadcast, RemoteSystemStruct::ConnectMode connectionMode, uint32_t receipt ); + bool SendImmediate( char *data, BitSize_t numberOfBitsToSend, MafiaNet::Priority priority, MafiaNet::Reliability reliability, char orderingChannel, const AddressOrGUID systemIdentifier, bool broadcast, bool useCallerDataAllocation, MafiaNet::TimeUS currentTime, uint32_t receipt ); + //bool HandleBufferedRPC(BufferedCommandStruct *bcs, MafiaNet::TimeMS time); + void ClearBufferedCommands(void); + void ClearBufferedPackets(void); + void ClearSocketQueryOutput(void); + void ClearRequestedConnectionList(void); + void AddPacketToProducer(MafiaNet::Packet *p); + unsigned int GenerateSeedFromGuid(void); + MafiaNet::Time GetClockDifferentialInt(RemoteSystemStruct *remoteSystem) const; + SimpleMutex securityExceptionMutex; + + //DataStructures::AVLBalancedBinarySearchTree rpcTree; + int defaultMTUSize; + bool trackFrequencyTable; + + // Smart pointer so I can return the object to the user + DataStructures::List socketList; + void DerefAllSockets(void); + unsigned int GetRakNetSocketFromUserConnectionSocketIndex(unsigned int userIndex) const; + // Used for RPC replies + MafiaNet::BitStream *replyFromTargetBS; + SystemAddress replyFromTargetPlayer; + bool replyFromTargetBroadcast; + + MafiaNet::TimeMS defaultTimeoutTime; + + // Generate and store a unique GUID + void GenerateGUID(void); + unsigned int GetSystemIndexFromGuid( const RakNetGUID input ) const; + RakNetGUID myGuid; + + unsigned maxOutgoingBPS; + + // Nobody would use the internet simulator in a final build. +#ifdef _DEBUG + double _packetloss; + unsigned short _minExtraPing, _extraPingVariance; +#endif + + ///How long it has been since things were updated by a call to receiveUpdate thread uses this to determine how long to sleep for + //unsigned int lastUserUpdateCycle; + /// True to allow connection accepted packets from anyone. False to only allow these packets from servers we requested a connection to. + bool allowConnectionResponseIPMigration; + + SystemAddress firstExternalID; + int splitMessageProgressInterval; + MafiaNet::TimeMS unreliableTimeout; + + bool (*incomingDatagramEventHandler)(RNS2RecvStruct *); + + // Systems in this list will not go through the secure connection process, even when secure connections are turned on. Wildcards are accepted. + DataStructures::List securityExceptionList; + + SystemAddress ipList[ MAXIMUM_NUMBER_OF_INTERNAL_IDS ]; + + bool allowInternalRouting; + + void (*userUpdateThreadPtr)(RakPeerInterface *, void *); + void *userUpdateThreadData; + + + SignaledEvent quitAndDataEvents; + bool limitConnectionFrequencyFromTheSameIP; + + SimpleMutex packetAllocationPoolMutex; + DataStructures::MemoryPool packetAllocationPool; + + SimpleMutex packetReturnMutex; + DataStructures::Queue packetReturnQueue; + Packet *AllocPacket(unsigned dataSize, const char *file, unsigned int line); + Packet *AllocPacket(unsigned dataSize, unsigned char *data, const char *file, unsigned int line); + + /// This is used to return a number to the user when they call Send identifying the message + /// This number will be returned back with ID_SND_RECEIPT_ACKED or ID_SND_RECEIPT_LOSS and is only returned + /// with the reliability types that contain RECEIPT in the name + SimpleMutex sendReceiptSerialMutex; + uint32_t sendReceiptSerial; + void ResetSendReceipt(void); + void OnConnectedPong(MafiaNet::Time sendPingTime, MafiaNet::Time sendPongTime, RemoteSystemStruct *remoteSystem); + void CallPluginCallbacks(DataStructures::List &pluginList, Packet *packet); + +#if LIBCAT_SECURITY==1 + // Encryption and security + bool _using_security, _require_client_public_key; + char my_public_key[cat::EasyHandshake::PUBLIC_KEY_BYTES]; + cat::ServerEasyHandshake *_server_handshake; + cat::CookieJar *_cookie_jar; + bool InitializeClientSecurity(RequestedConnectionStruct *rcs, const char *public_key); +#endif + + + + + + + virtual void OnRNS2Recv(RNS2RecvStruct *recvStruct); + void FillIPList(void); + + private: + // internal helpers + void CloseConnectionInternal2(const AddressOrGUID& systemIdentifier, bool sendDisconnectionNotification, bool performImmediate, unsigned char orderingChannel, MafiaNet::Priority disconnectionNotificationPriority, RakNetSocket2& socket, const MafiaNet::BitStream *reasonData=nullptr); + // Free and null any stashed disconnect-reason payload for the given remote system (safe on null). + void ClearDisconnectReason(RemoteSystemStruct *remoteSystem); + /// Free any stashed session payload on this slot. + void ClearSessionConfig(RemoteSystemStruct *remoteSystem); + /// Store a received session payload on the slot, enforcing MAXIMUM_SESSION_CONFIG_SIZE. + /// Returns false if the payload is oversized (a protocol violation). + bool StoreRemoteSessionConfig(RemoteSystemStruct *remoteSystem, const unsigned char *data, unsigned int length); + /// Send our session payload to a peer that is waiting in EXCHANGING_SESSION_DATA and, on the + /// server, promote the slot to CONNECTED and surface the withheld ID_NEW_INCOMING_CONNECTION. + void SendSessionConfigResponse(RemoteSystemStruct *remoteSystem, const char *data, unsigned int length); + /// Refuse a pending session request and drop the connection once the refusal is acknowledged. + void SendSessionConfigRejection(RemoteSystemStruct *remoteSystem, const char *reason, unsigned int reasonLength); + /// Queue an application session decision for the network thread (see BCS_SESSION_ACCEPT). + void QueueSessionDecision(const AddressOrGUID systemIdentifier, bool accept, const char *data, unsigned int length); + /// Queue any session command (accept, reject, status) with a copy of its payload. + /// Server: tell the application a session request it was holding is gone (ID_SESSION_CONFIG_ABANDONED). + void ProduceSessionAbandoned(RemoteSystemStruct *remoteSystem); + void QueueSessionCommand(const AddressOrGUID systemIdentifier, int command, const char *data, unsigned int length); + /// Counts remote-initiated peers for SessionAdmission; pendingFromAddress is for \a address, or 0 when unassigned. + void CountRemoteInitiatedPeers(const SystemAddress &address, unsigned int &connected, unsigned int &exchanging, unsigned int &pending, unsigned int &pendingFromAddress) const; + /// True when a directed application send must be refused because the target is still running the + /// session handshake and so has not been reported to the application yet. + bool IsExchangingSessionData(const AddressOrGUID systemIdentifier); + /// Produce the connection packet that was withheld while the session handshake ran. + void ProduceWithheldConnectionPacket(RemoteSystemStruct *remoteSystem, MessageID messageId); +} +; + +} // namespace MafiaNet + +#endif diff --git a/Source/include/mafianet/RakPeerInterface.h b/Source/include/mafianet/RakPeerInterface.h new file mode 100644 index 000000000..25e6ccbba --- /dev/null +++ b/Source/include/mafianet/RakPeerInterface.h @@ -0,0 +1,698 @@ +/* + * Original work: Copyright (c) 2014, Oculus VR, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * RakNet License.txt file in the licenses directory of this source tree. An additional grant + * of patent rights can be found in the RakNet Patents.txt file in the same directory. + * + * + * Modified work: Copyright (c) 2017, SLikeSoft UG (haftungsbeschränkt) + * + * This source code was modified by SLikeSoft. Modifications are licensed under the MIT-style + * license found in the license.txt file in the root directory of this source tree. + */ + +/// \file +/// \brief An interface for RakPeer. Simply contains all user functions as pure virtuals. +/// + + + +#ifndef __RAK_PEER_INTERFACE_H +#define __RAK_PEER_INTERFACE_H + +#include "PacketPriority.h" +#include "RakNetTypes.h" +#include "RakMemoryOverride.h" +#include "Export.h" +#include "DS_List.h" +#include "RakNetSmartPtr.h" +#include "RakNetSocket2.h" + +namespace MafiaNet +{ +// Forward declarations +class BitStream; +class PluginInterface2; +struct RPCMap; +struct RakNetStatistics; +struct RakNetBandwidth; +class RouterInterface; +class NetworkIDManager; + +/// The primary interface for RakNet, RakPeer contains all major functions for the library. +/// See the individual functions for what the class can do. +/// \brief The main interface for network communications +class RAK_DLL_EXPORT RakPeerInterface +{ +public: + // GetInstance() and DestroyInstance(instance*) + STATIC_FACTORY_DECLARATIONS(RakPeerInterface) + + ///Destructor + virtual ~RakPeerInterface() {} + + // --------------------------------------------------------------------------------------------Major Low Level Functions - Functions needed by most users-------------------------------------------------------------------------------------------- + /// \brief Starts the network threads, opens the listen port. + /// \details You must call this before calling Connect(). + /// \pre On the PS3, call Startup() after Client_Login() + /// \pre On Android, add the necessary permission to your application's androidmanifest.xml: + /// Multiple calls while already active are ignored. To call this function again with different settings, you must first call Shutdown(). + /// \note Call SetMaximumIncomingConnections if you want to accept incoming connections + /// \param[in] maxConnections The maximum number of connections between this instance of RakPeer and another instance of RakPeer. Required so the network can preallocate and for thread safety. A pure client would set this to 1. A pure server would set it to the number of allowed clients.- A hybrid would set it to the sum of both types of connections + /// \param[in] localPort The port to listen for connections on. On linux the system may be set up so thast ports under 1024 are restricted for everything but the root user. Use a higher port for maximum compatibility. + /// \param[in] socketDescriptors An array of SocketDescriptor structures to force RakNet to listen on a particular IP address or port (or both). Each SocketDescriptor will represent one unique socket. Do not pass redundant structures. To listen on a specific port, you can pass SocketDescriptor(myPort,0); such as for a server. For a client, it is usually OK to just pass SocketDescriptor(); + /// \param[in] socketDescriptorCount The size of the \a socketDescriptors array. Pass 1 if you are not sure what to pass. + /// \param[in] threadPriority Passed to the thread creation routine. Use THREAD_PRIORITY_NORMAL for Windows. For Linux based systems, you MUST pass something reasonable based on the thread priorities for your application. + /// \return RAKNET_STARTED on success, otherwise appropriate failure enumeration. + virtual StartupResult Startup( unsigned int maxConnections, SocketDescriptor *socketDescriptors, unsigned socketDescriptorCount, int threadPriority=-99999 )=0; + + /// If you accept connections, you must call this or else security will not be enabled for incoming connections. + /// This feature requires more round trips, bandwidth, and CPU time for the connection handshake + /// x64 builds require under 25% of the CPU time of other builds + /// See the Encryption sample for example usage + /// \pre Must be called while offline + /// \pre LIBCAT_SECURITY must be defined to 1 in NativeFeatureIncludes.h for this function to have any effect + /// \param[in] publicKey A pointer to the public key for accepting new connections + /// \param[in] privateKey A pointer to the private key for accepting new connections + /// \param[in] bRequireClientKey: Should be set to false for most servers. Allows the server to accept a public key from connecting clients as a proof of identity but eats twice as much CPU time as a normal connection + virtual bool InitializeSecurity( const char *publicKey, const char *privateKey, bool bRequireClientKey = false )=0; + + /// Disables security for incoming connections. + /// \note Must be called while offline + virtual void DisableSecurity( void )=0; + + /// If secure connections are on, do not use secure connections for a specific IP address. + /// This is useful if you have a fixed-address internal server behind a LAN. + /// \note Secure connections are determined by the recipient of an incoming connection. This has no effect if called on the system attempting to connect. + /// \param[in] ip IP address to add. * wildcards are supported. + virtual void AddToSecurityExceptionList(const char *ip)=0; + + /// Remove a specific connection previously added via AddToSecurityExceptionList + /// \param[in] ip IP address to remove. Pass 0 to remove all IP addresses. * wildcards are supported. + virtual void RemoveFromSecurityExceptionList(const char *ip)=0; + + /// Checks to see if a given IP is in the security exception list + /// \param[in] IP address to check. + virtual bool IsInSecurityExceptionList(const char *ip)=0; + + /// Sets how many incoming connections are allowed. If this is less than the number of players currently connected, + /// no more players will be allowed to connect. If this is greater than the maximum number of peers allowed, + /// it will be reduced to the maximum number of peers allowed. + /// Defaults to 0, meaning by default, nobody can connect to you + /// \param[in] numberAllowed Maximum number of incoming connections allowed. + virtual void SetMaximumIncomingConnections( unsigned short numberAllowed )=0; + + /// Returns the value passed to SetMaximumIncomingConnections() + /// \return the maximum number of incoming connections, which is always <= maxConnections + virtual unsigned int GetMaximumIncomingConnections( void ) const=0; + + /// Returns how many open connections there are at this time + /// \return the number of open connections + virtual unsigned short NumberOfConnections(void) const=0; + + /// Sets the password incoming connections must match in the call to Connect (defaults to none). Pass 0 to passwordData to specify no password + /// This is a way to set a low level password for all incoming connections. To selectively reject connections, implement your own scheme using CloseConnection() to remove unwanted connections + /// \param[in] passwordData A data block that incoming connections must match. This can be just a password, or can be a stream of data. Specify 0 for no password data + /// \param[in] passwordDataLength The length in bytes of passwordData + virtual void SetIncomingPassword( const char* passwordData, int passwordDataLength )=0; + + /// Gets the password passed to SetIncomingPassword + /// \param[out] passwordData Should point to a block large enough to hold the password data you passed to SetIncomingPassword() + /// \param[in,out] passwordDataLength Maximum size of the array passwordData. Modified to hold the number of bytes actually written + virtual void GetIncomingPassword( char* passwordData, int *passwordDataLength )=0; + + /// \brief Connect to the specified host (ip or domain name) and server port. + /// Calling Connect and not calling SetMaximumIncomingConnections acts as a dedicated client. + /// Calling both acts as a true peer. This is a non-blocking connection. + /// You know the connection is successful when GetConnectionState() returns IS_CONNECTED or Receive() gets a message with the type identifier ID_CONNECTION_REQUEST_ACCEPTED. + /// If the connection is not successful, such as a rejected connection or no response then neither of these things will happen. + /// \pre Requires that you first call Startup() + /// \param[in] host Either a dotted IP address or a domain name + /// \param[in] remotePort Which port to connect to on the remote machine. + /// \param[in] passwordData A data block that must match the data block on the server passed to SetIncomingPassword. This can be a string or can be a stream of data. Use 0 for no password. + /// \param[in] passwordDataLength The length in bytes of passwordData + /// \param[in] publicKey The public key the server is using. If 0, the server is not using security. If non-zero, the publicKeyMode member determines how to connect + /// \param[in] connectionSocketIndex Index into the array of socket descriptors passed to socketDescriptors in RakPeer::Startup() to send on. + /// \param[in] sendConnectionAttemptCount How many datagrams to send to the other system to try to connect. + /// \param[in] timeBetweenSendConnectionAttemptsMS Time to elapse before a datagram is sent to the other system to try to connect. After sendConnectionAttemptCount number of attempts, ID_CONNECTION_ATTEMPT_FAILED is returned. Under low bandwidth conditions with multiple simultaneous outgoing connections, this value should be raised to 1000 or higher, or else the MTU detection can overrun the available bandwidth. + /// \param[in] timeoutTime How long to keep the connection alive before dropping it on unable to send a reliable message. 0 to use the default from SetTimeoutTime(UNASSIGNED_SYSTEM_ADDRESS); + /// \return CONNECTION_ATTEMPT_STARTED on successful initiation. Otherwise, an appropriate enumeration indicating failure. + /// \note CONNECTION_ATTEMPT_STARTED does not mean you are already connected! + /// \note It is possible to immediately get back ID_CONNECTION_ATTEMPT_FAILED if you exceed the maxConnections parameter passed to Startup(). This could happen if you call CloseConnection() with sendDisconnectionNotificaiton true, then immediately call Connect() before the connection has closed. + virtual ConnectionAttemptResult Connect( const char* host, unsigned short remotePort, const char *passwordData, int passwordDataLength, PublicKey *publicKey=0, unsigned connectionSocketIndex=0, unsigned sendConnectionAttemptCount=12, unsigned timeBetweenSendConnectionAttemptsMS=500, MafiaNet::TimeMS timeoutTime=0 )=0; + + /// \brief Connect to the specified host (ip or domain name) and server port, using a shared socket from another instance of RakNet + /// \param[in] host Either a dotted IP address or a domain name + /// \param[in] remotePort Which port to connect to on the remote machine. + /// \param[in] passwordData A data block that must match the data block on the server passed to SetIncomingPassword. This can be a string or can be a stream of data. Use 0 for no password. + /// \param[in] passwordDataLength The length in bytes of passwordData + /// \param[in] socket A bound socket returned by another instance of RakPeerInterface + /// \param[in] sendConnectionAttemptCount How many datagrams to send to the other system to try to connect. + /// \param[in] timeBetweenSendConnectionAttemptsMS Time to elapse before a datagram is sent to the other system to try to connect. After sendConnectionAttemptCount number of attempts, ID_CONNECTION_ATTEMPT_FAILED is returned. Under low bandwidth conditions with multiple simultaneous outgoing connections, this value should be raised to 1000 or higher, or else the MTU detection can overrun the available bandwidth. + /// \param[in] timeoutTime How long to keep the connection alive before dropping it on unable to send a reliable message. 0 to use the default from SetTimeoutTime(UNASSIGNED_SYSTEM_ADDRESS); + /// \return CONNECTION_ATTEMPT_STARTED on successful initiation. Otherwise, an appropriate enumeration indicating failure. + /// \note CONNECTION_ATTEMPT_STARTED does not mean you are already connected! + virtual ConnectionAttemptResult ConnectWithSocket(const char* host, unsigned short remotePort, const char *passwordData, int passwordDataLength, RakNetSocket2* socket, PublicKey *publicKey=0, unsigned sendConnectionAttemptCount=12, unsigned timeBetweenSendConnectionAttemptsMS=500, MafiaNet::TimeMS timeoutTime=0)=0; + + /// \brief Connect to the specified network ID (Platform specific console function) + /// \details Does built-in NAt traversal + /// \param[in] passwordData A data block that must match the data block on the server passed to SetIncomingPassword. This can be a string or can be a stream of data. Use 0 for no password. + /// \param[in] passwordDataLength The length in bytes of passwordData + //virtual bool Console2LobbyConnect( void *networkServiceId, const char *passwordData, int passwordDataLength )=0; + + /// \brief Stops the network threads and closes all connections. + /// \param[in] blockDuration How long, in milliseconds, you should wait for all remaining messages to go out, including ID_DISCONNECTION_NOTIFICATION. If 0, it doesn't wait at all. + /// \param[in] orderingChannel If blockDuration > 0, ID_DISCONNECTION_NOTIFICATION will be sent on this channel + /// \param[in] disconnectionNotificationPriority Priority at which ID_DISCONNECTION_NOTIFICATION is sent. Note that a blockDuration of 0 means the threads stop without waiting for it to flush. + virtual void Shutdown( unsigned int blockDuration, unsigned char orderingChannel=0, MafiaNet::Priority disconnectionNotificationPriority=MafiaNet::Priority::Low )=0; + + /// Returns if the network thread is running + /// \return true if the network thread is running, false otherwise + virtual bool IsActive( void ) const=0; + + /// Fills the array remoteSystems with the SystemAddress of all the systems we are connected to + /// \param[out] remoteSystems An array of SystemAddress structures to be filled with the SystemAddresss of the systems we are connected to. Pass 0 to remoteSystems to only get the number of systems we are connected to + /// \param[in, out] numberOfSystems As input, the size of remoteSystems array. As output, the number of elements put into the array + virtual bool GetConnectionList( SystemAddress *remoteSystems, unsigned short *numberOfSystems ) const=0; + + /// Returns the next uint32_t that Send() will return + /// \note If using RakPeer from multiple threads, this may not be accurate for your thread. Use IncrementNextSendReceipt() in that case. + /// \return The next uint32_t that Send() or SendList will return + virtual uint32_t GetNextSendReceipt(void)=0; + + /// Returns the next uint32_t that Send() will return, and increments the value by one + /// \note If using RakPeer from multiple threads, pass this to forceReceipt in the send function + /// \return The next uint32_t that Send() or SendList will return + virtual uint32_t IncrementNextSendReceipt(void)=0; + + /// Sends a block of data to the specified system that you are connected to. + /// This function only works while connected + /// The first byte should be a message identifier starting at ID_USER_PACKET_ENUM + /// \param[in] data The block of data to send + /// \param[in] length The size in bytes of the data to send + /// \param[in] priority What priority level to send on. See PacketPriority.h + /// \param[in] reliability How reliability to send this data. See PacketPriority.h + /// \param[in] orderingChannel When using ordered or sequenced messages, what channel to order these on. Messages are only ordered relative to other messages on the same stream + /// \param[in] systemIdentifier Who to send this packet to, or in the case of broadcasting who not to send it to. Pass either a SystemAddress structure or a RakNetGUID structure. Use UNASSIGNED_SYSTEM_ADDRESS or to specify none + /// \param[in] broadcast True to send this packet to all connected systems. If true, then systemAddress specifies who not to send the packet to. + /// \param[in] forceReceipt If 0, will automatically determine the receipt number to return. If non-zero, will return what you give it. + /// \return 0 on bad input. Otherwise a number that identifies this message. If \a reliability is a type that returns a receipt, on a later call to Receive() you will get ID_SND_RECEIPT_ACKED or ID_SND_RECEIPT_LOSS with bytes 1-4 inclusive containing this number + virtual uint32_t Send( const char *data, const int length, MafiaNet::Priority priority, MafiaNet::Reliability reliability, char orderingChannel, const AddressOrGUID systemIdentifier, bool broadcast, uint32_t forceReceiptNumber=0 )=0; + + /// "Send" to yourself rather than a remote system. The message will be processed through the plugins and returned to the game as usual + /// This function works anytime + /// The first byte should be a message identifier starting at ID_USER_PACKET_ENUM + /// \param[in] data The block of data to send + /// \param[in] length The size in bytes of the data to send + virtual void SendLoopback( const char *data, const int length )=0; + + /// Sends a block of data to the specified system that you are connected to. Same as the above version, but takes a BitStream as input. + /// \param[in] bitStream The bitstream to send + /// \param[in] priority What priority level to send on. See PacketPriority.h + /// \param[in] reliability How reliability to send this data. See PacketPriority.h + /// \param[in] orderingChannel When using ordered or sequenced messages, what channel to order these on. Messages are only ordered relative to other messages on the same stream + /// \param[in] systemIdentifier Who to send this packet to, or in the case of broadcasting who not to send it to. Pass either a SystemAddress structure or a RakNetGUID structure. Use UNASSIGNED_SYSTEM_ADDRESS or to specify none + /// \param[in] broadcast True to send this packet to all connected systems. If true, then systemAddress specifies who not to send the packet to. + /// \param[in] forceReceipt If 0, will automatically determine the receipt number to return. If non-zero, will return what you give it. + /// \return 0 on bad input. Otherwise a number that identifies this message. If \a reliability is a type that returns a receipt, on a later call to Receive() you will get ID_SND_RECEIPT_ACKED or ID_SND_RECEIPT_LOSS with bytes 1-4 inclusive containing this number + /// \note COMMON MISTAKE: When writing the first byte, bitStream->Write((unsigned char) ID_MY_TYPE) be sure it is casted to a byte, and you are not writing a 4 byte enumeration. + virtual uint32_t Send( const MafiaNet::BitStream * bitStream, MafiaNet::Priority priority, MafiaNet::Reliability reliability, char orderingChannel, const AddressOrGUID systemIdentifier, bool broadcast, uint32_t forceReceiptNumber=0 )=0; + + /// Sends multiple blocks of data, concatenating them automatically. + /// + /// This is equivalent to: + /// MafiaNet::BitStream bs; + /// bs.WriteAlignedBytes(block1, blockLength1); + /// bs.WriteAlignedBytes(block2, blockLength2); + /// bs.WriteAlignedBytes(block3, blockLength3); + /// Send(&bs, ...) + /// + /// This function only works while connected + /// \param[in] data An array of pointers to blocks of data + /// \param[in] lengths An array of integers indicating the length of each block of data + /// \param[in] numParameters Length of the arrays data and lengths + /// \param[in] priority What priority level to send on. See PacketPriority.h + /// \param[in] reliability How reliability to send this data. See PacketPriority.h + /// \param[in] orderingChannel When using ordered or sequenced messages, what channel to order these on. Messages are only ordered relative to other messages on the same stream + /// \param[in] systemIdentifier Who to send this packet to, or in the case of broadcasting who not to send it to. Pass either a SystemAddress structure or a RakNetGUID structure. Use UNASSIGNED_SYSTEM_ADDRESS or to specify none + /// \param[in] broadcast True to send this packet to all connected systems. If true, then systemAddress specifies who not to send the packet to. + /// \param[in] forceReceipt If 0, will automatically determine the receipt number to return. If non-zero, will return what you give it. + /// \return 0 on bad input. Otherwise a number that identifies this message. If \a reliability is a type that returns a receipt, on a later call to Receive() you will get ID_SND_RECEIPT_ACKED or ID_SND_RECEIPT_LOSS with bytes 1-4 inclusive containing this number + virtual uint32_t SendList( const char **data, const int *lengths, const int numParameters, MafiaNet::Priority priority, MafiaNet::Reliability reliability, char orderingChannel, const AddressOrGUID systemIdentifier, bool broadcast, uint32_t forceReceiptNumber=0 )=0; + + /// Gets a message from the incoming message queue. + /// Use DeallocatePacket() to deallocate the message after you are done with it. + /// User-thread functions, such as RPC calls and the plugin function PluginInterface::Update occur here. + /// \return 0 if no packets are waiting to be handled, otherwise a pointer to a packet. + /// \note COMMON MISTAKE: Be sure to call this in a loop, once per game tick, until it returns 0. If you only process one packet per game tick they will buffer up. + /// sa types.h contains struct Packet + virtual Packet* Receive( void )=0; + + /// Call this to deallocate a message returned by Receive() when you are done handling it. + /// \param[in] packet The message to deallocate. + virtual void DeallocatePacket( Packet *packet )=0; + + /// Return the total number of connections we are allowed + virtual unsigned int GetMaximumNumberOfPeers( void ) const=0; + + // -------------------------------------------------------------------------------------------- Connection Management Functions-------------------------------------------------------------------------------------------- + /// Close the connection to another host (if we initiated the connection it will disconnect, if they did it will kick them out). + /// \param[in] target Which system to close the connection to. + /// \param[in] sendDisconnectionNotification True to send ID_DISCONNECTION_NOTIFICATION to the recipient. False to close it silently. + /// \param[in] channel Which ordering channel to send the disconnection notification on, if any + /// \param[in] disconnectionNotificationPriority Priority to send ID_DISCONNECTION_NOTIFICATION on. + /// \param[in] reasonData Optional payload appended after the ID_DISCONNECTION_NOTIFICATION message ID so the + /// remote peer can learn *why* it was dropped (e.g. an enum + custom string). The receiver reads it + /// from packet->data+1 (length packet->length-1), exactly like any other message body. Only graceful + /// disconnects (sendDisconnectionNotification==true) carry a reason; locally-synthesized notifications + /// (ID_CONNECTION_LOST and timeout/dead-connection paths) stay payload-less, so consumers must tolerate + /// a zero-length body. Pass nullptr (the default) for no reason. Appending bytes after the 1-byte ID is + /// wire-backward-compatible: peers that only read data[0] are unaffected. + virtual void CloseConnection( const AddressOrGUID target, bool sendDisconnectionNotification, unsigned char orderingChannel=0, MafiaNet::Priority disconnectionNotificationPriority=MafiaNet::Priority::Low, const MafiaNet::BitStream *reasonData=nullptr )=0; + + /// Returns if a system is connected, disconnected, connecting in progress, or various other states + /// \param[in] systemIdentifier The system we are referring to + /// \note This locks a mutex, do not call too frequently during connection attempts or the attempt will take longer and possibly even timeout + /// \return What state the remote system is in + virtual ConnectionState GetConnectionState(const AddressOrGUID systemIdentifier)=0; + + /// Cancel a pending connection attempt + /// If we are already connected, the connection stays open + /// \param[in] target Which system to cancel + virtual void CancelConnectionAttempt( const SystemAddress target )=0; + + /// Given a systemAddress, returns an index from 0 to the maximum number of players allowed - 1. + /// \param[in] systemAddress The SystemAddress we are referring to + /// \return The index of this SystemAddress or -1 on system not found. + virtual int GetIndexFromSystemAddress( const SystemAddress systemAddress ) const=0; + + /// This function is only useful for looping through all systems + /// Given an index, will return a SystemAddress. + /// \param[in] index Index should range between 0 and the maximum number of players allowed - 1. + /// \return The SystemAddress + virtual SystemAddress GetSystemAddressFromIndex( unsigned int index )=0; + + /// Same as GetSystemAddressFromIndex but returns RakNetGUID + /// \param[in] index Index should range between 0 and the maximum number of players allowed - 1. + /// \return The RakNetGUID + virtual RakNetGUID GetGUIDFromIndex( unsigned int index )=0; + + /// Same as calling GetSystemAddressFromIndex and GetGUIDFromIndex for all systems, but more efficient + /// Indices match each other, so \a addresses[0] and \a guids[0] refer to the same system + /// \param[out] addresses All system addresses. Size of the list is the number of connections. Size of the list will match the size of the \a guids list. + /// \param[out] guids All guids. Size of the list is the number of connections. Size of the list will match the size of the \a addresses list. + virtual void GetSystemList(DataStructures::List &addresses, DataStructures::List &guids) const=0; + + /// Bans an IP from connecting. Banned IPs persist between connections but are not saved on shutdown nor loaded on startup. + /// param[in] IP Dotted IP address. Can use * as a wildcard, such as 128.0.0.* will ban all IP addresses starting with 128.0.0 + /// \param[in] milliseconds how many ms for a temporary ban. Use 0 for a permanent ban + virtual void AddToBanList( const char *IP, MafiaNet::TimeMS milliseconds=0 )=0; + + /// Allows a previously banned IP to connect. + /// param[in] Dotted IP address. Can use * as a wildcard, such as 128.0.0.* will banAll IP addresses starting with 128.0.0 + virtual void RemoveFromBanList( const char *IP )=0; + + /// Allows all previously banned IPs to connect. + virtual void ClearBanList( void )=0; + + /// Returns true or false indicating if a particular IP is banned. + /// \param[in] IP - Dotted IP address. + /// \return true if IP matches any IPs in the ban list, accounting for any wildcards. False otherwise. + virtual bool IsBanned( const char *IP )=0; + + /// Enable or disable allowing frequent connections from the same IP adderss + /// This is a security measure which is disabled by default, but can be set to true to prevent attackers from using up all connection slots + /// \param[in] b True to limit connections from the same ip to at most 1 per 100 milliseconds. + virtual void SetLimitIPConnectionFrequency(bool b)=0; + + // --------------------------------------------------------------------------------------------Pinging Functions - Functions dealing with the automatic ping mechanism-------------------------------------------------------------------------------------------- + /// Send a ping to the specified connected system. + /// \pre The sender and recipient must already be started via a successful call to Startup() + /// \param[in] target Which system to ping + virtual void Ping( const SystemAddress target )=0; + + /// Send a ping to the specified unconnected system. The remote system, if it is Initialized, will respond with ID_PONG followed by sizeof(MafiaNet::TimeMS) containing the system time the ping was sent.(Default is 4 bytes - See __GET_TIME_64BIT in types.h + /// System should reply with ID_PONG if it is active + /// \param[in] host Either a dotted IP address or a domain name. Can be 255.255.255.255 for LAN broadcast. + /// \param[in] remotePort Which port to connect to on the remote machine. + /// \param[in] onlyReplyOnAcceptingConnections Only request a reply if the remote system is accepting connections + /// \param[in] connectionSocketIndex Index into the array of socket descriptors passed to socketDescriptors in RakPeer::Startup() to send on. + /// \return true on success, false on failure (unknown hostname) + virtual bool Ping( const char* host, unsigned short remotePort, bool onlyReplyOnAcceptingConnections, unsigned connectionSocketIndex=0 )=0; + + /// Returns the average of all ping times read for the specific system or -1 if none read yet + /// \param[in] systemAddress Which system we are referring to + /// \return The ping time for this system, or -1 + virtual int GetAveragePing( const AddressOrGUID systemIdentifier )=0; + + /// Returns the last ping time read for the specific system or -1 if none read yet + /// \param[in] systemAddress Which system we are referring to + /// \return The last ping time for this system, or -1 + virtual int GetLastPing( const AddressOrGUID systemIdentifier ) const=0; + + /// Returns the lowest ping time read or -1 if none read yet + /// \param[in] systemAddress Which system we are referring to + /// \return The lowest ping time for this system, or -1 + virtual int GetLowestPing( const AddressOrGUID systemIdentifier ) const=0; + + /// Ping the remote systems every so often, or not. Can be called anytime. + /// By default this is true. Recommended to leave on, because congestion control uses it to determine how often to resend lost packets. + /// It would be true by default to prevent timestamp drift, since in the event of a clock spike, the timestamp deltas would no longer be accurate + /// \param[in] doPing True to start occasional pings. False to stop them. + virtual void SetOccasionalPing( bool doPing )=0; + + /// Return the clock difference between your system and the specified system + /// Subtract GetClockDifferential() from a time returned by the remote system to get that time relative to your own system + /// Returns 0 if the system is unknown + /// \param[in] systemIdentifier Which system we are referring to + virtual MafiaNet::Time GetClockDifferential( const AddressOrGUID systemIdentifier )=0; + + // --------------------------------------------------------------------------------------------Static Data Functions - Functions dealing with API defined synchronized memory-------------------------------------------------------------------------------------------- + /// Sets the data to send along with a LAN server discovery or offline ping reply. + /// \a length should be under 400 bytes, as a security measure against flood attacks + /// \param[in] data a block of data to store, or 0 for none + /// \param[in] length The length of data in bytes, or 0 for none + /// \sa Ping.cpp + virtual void SetOfflinePingResponse( const char *data, const unsigned int length )=0; + + /// Returns pointers to a copy of the data passed to SetOfflinePingResponse + /// \param[out] data A pointer to a copy of the data passed to \a SetOfflinePingResponse() + /// \param[out] length A pointer filled in with the length parameter passed to SetOfflinePingResponse() + /// \sa SetOfflinePingResponse + virtual void GetOfflinePingResponse( char **data, unsigned int *length )=0; + + // --------------------------------------------------------------------------------------------Session Handshake - Payloads exchanged before a connection is reported-------------------------------------------------------------------------------------------- + /// Sets this peer's session-handshake payload. + /// \details The session handshake runs after the transport connection is up but before either side + /// reports it: a client sends this payload in ID_SESSION_CONFIG_REQUEST, a server answers with it in + /// ID_SESSION_CONFIG. Neither peer produces ID_CONNECTION_REQUEST_ACCEPTED / ID_NEW_INCOMING_CONNECTION + /// until the exchange completes, so those packets mean "the remote's session payload is in hand". + /// The bytes are opaque to MafiaNet. Call before Startup()/Connect(). + /// \param[in] data A block of data to send, or 0 for none + /// \param[in] length The length of data in bytes, or 0 for none; at most MAXIMUM_SESSION_CONFIG_SIZE + virtual void SetSessionConfig( const char *data, unsigned int length )=0; + + /// Returns a pointer to the payload passed to SetSessionConfig + /// \param[out] data A pointer to the data passed to SetSessionConfig() + /// \param[out] length A pointer filled in with the length of that data + /// \sa SetSessionConfig + virtual void GetSessionConfig( char **data, unsigned int *length )=0; + + /// Returns the session payload the remote peer sent during the handshake. + /// \details Valid from the moment ID_CONNECTION_REQUEST_ACCEPTED or ID_NEW_INCOMING_CONNECTION surfaces + /// for this system, for the lifetime of that connection. + /// \param[in] systemIdentifier The connection to read + /// \param[out] length Filled in with the payload length, or 0 when there is none + /// \return Pointer to the payload owned by that connection, or 0 when there is none + virtual const char *GetRemoteSessionConfig( const AddressOrGUID systemIdentifier, unsigned int *length )=0; + + /// Server: decide each client's session answer individually instead of replying automatically. + /// \details With this on, ID_SESSION_CONFIG_REQUEST is surfaced to the application and the connection + /// stays unreported until AcceptSession() or RejectSession() is called for that peer. Off by default, in + /// which case the payload set by SetSessionConfig() answers every client and no application code is + /// required. A peer that is never answered is timed out like any other incomplete connection attempt. + /// \param[in] interactive Whether to surface ID_SESSION_CONFIG_REQUEST for a per-client decision + virtual void SetSessionConfigInteractive( bool interactive )=0; + + /// Server: accept a pending session request, sending \a data as this connection's payload. + /// \details Completes the handshake and surfaces the withheld ID_NEW_INCOMING_CONNECTION. Only + /// meaningful for a peer that surfaced ID_SESSION_CONFIG_REQUEST; ignored otherwise. + /// \param[in] systemIdentifier The peer whose request to accept + /// \param[in] data This connection's session payload, or 0 for none + /// \param[in] length The length of data in bytes, at most MAXIMUM_SESSION_CONFIG_SIZE + virtual void AcceptSession( const AddressOrGUID systemIdentifier, const char *data, unsigned int length )=0; + + /// Server: refuse a pending session request. + /// \details The client reports ID_CONNECTION_ATTEMPT_FAILED and neither side ever reports a connection. + /// \param[in] systemIdentifier The peer whose request to refuse + /// \param[in] reason Delivered to the client in ID_SESSION_CONFIG_REJECTED; may be 0 + virtual void RejectSession( const AddressOrGUID systemIdentifier, const char *reason )=0; + + /// Server: hold peers in the session handshake in a pool of their own instead of in the incoming limit. + /// \details By default a peer mid-handshake counts against SetMaximumIncomingConnections(), so peers that + /// stall the handshake take the slots of the players it is meant for. With a pool, every remote-initiated + /// peer that is not yet CONNECTED -- from its first open-connection request until the application + /// answers -- counts against  total instead, and at most  perAddress of them may come from one IP. + /// SetMaximumIncomingConnections() then bounds CONNECTED peers only: a handshake starts even while it is + /// full, so an interactive server can queue, and an AcceptSession() that would exceed it refuses the peer + /// instead. Startup()'s maxConnections must leave room for both, i.e. at least incoming +  total. + /// \param[in] total Peers that may be in the handshake at once; 0 restores the default accounting + /// \param[in] perAddress Of those, how many may share one IP address; 0 for no per-address bound + virtual void SetMaximumPendingSessions( unsigned short total, unsigned short perAddress )=0; + + /// Bounds how long a session handshake may wait for its answer, instead of the connection timeout. + /// \details On a server it is how long an interactive decision may take; on a client how long it waits + /// for the server's answer. Every SendSessionStatus() restarts it on both ends, so a server that keeps a + /// queued peer informed is never timed out by it. Set both ends: a client that gives up first fails the + /// attempt however long the server is prepared to wait. + /// \param[in] timeMS Milliseconds, or 0 to use the connection timeout (the default) + virtual void SetSessionTimeout( MafiaNet::TimeMS timeMS )=0; + + /// Server: send a status to a peer whose session request awaits AcceptSession()/RejectSession(). + /// \details The client receives it as ID_SESSION_CONFIG_STATUS with the payload after the id, and the + /// session timeout restarts on both ends. Ignored for a peer that is not awaiting a decision. + /// \param[in] systemIdentifier The waiting peer + /// \param[in] data Payload, opaque to MafiaNet + /// \param[in] length The length of data in bytes, at most MAXIMUM_SESSION_CONFIG_SIZE + virtual void SendSessionStatus( const AddressOrGUID systemIdentifier, const char *data, unsigned int length )=0; + + //--------------------------------------------------------------------------------------------Network Functions - Functions dealing with the network in general-------------------------------------------------------------------------------------------- + /// Return the unique address identifier that represents you or another system on the the network and is based on your local IP / port. + /// \param[in] systemAddress Use UNASSIGNED_SYSTEM_ADDRESS to get your behind-LAN address. Use a connected system to get their behind-LAN address + /// \param[in] index When you have multiple internal IDs, which index to return? Currently limited to MAXIMUM_NUMBER_OF_INTERNAL_IDS (so the maximum value of this variable is MAXIMUM_NUMBER_OF_INTERNAL_IDS-1) + /// \return the identifier of your system internally, which may not be how other systems see if you if you are behind a NAT or proxy + virtual SystemAddress GetInternalID( const SystemAddress systemAddress=UNASSIGNED_SYSTEM_ADDRESS, const int index=0 ) const=0; + + /// \brief Sets your internal IP address, for platforms that do not support reading it, or to override a value + /// \param[in] systemAddress. The address to set. Use SystemAddress::FromString() if you want to use a dotted string + /// \param[in] index When you have multiple internal IDs, which index to set? + virtual void SetInternalID(SystemAddress systemAddress, int index=0)=0; + + /// Return the unique address identifier that represents you on the the network and is based on your externalIP / port + /// (the IP / port the specified player uses to communicate with you) + /// \param[in] target Which remote system you are referring to for your external ID. Usually the same for all systems, unless you have two or more network cards. + virtual SystemAddress GetExternalID( const SystemAddress target ) const=0; + + /// Return my own GUID + virtual const RakNetGUID GetMyGUID(void) const=0; + + /// Return the address bound to a socket at the specified index + virtual SystemAddress GetMyBoundAddress(const int socketIndex=0)=0; + + /// Get a random number (to generate a GUID) + static uint64_t Get64BitUniqueRandomNumber(void); + + /// Given a connected system, give us the unique GUID representing that instance of RakPeer. + /// This will be the same on all systems connected to that instance of RakPeer, even if the external system addresses are different + /// Currently O(log(n)), but this may be improved in the future. If you use this frequently, you may want to cache the value as it won't change. + /// Returns UNASSIGNED_RAKNET_GUID if system address can't be found. + /// If \a input is UNASSIGNED_SYSTEM_ADDRESS, will return your own GUID + /// \pre Call Startup() first, or the function will return UNASSIGNED_RAKNET_GUID + /// \param[in] input The system address of the system we are connected to + virtual const RakNetGUID& GetGuidFromSystemAddress( const SystemAddress input ) const=0; + + /// Given the GUID of a connected system, give us the system address of that system. + /// The GUID will be the same on all systems connected to that instance of RakPeer, even if the external system addresses are different + /// Currently O(log(n)), but this may be improved in the future. If you use this frequently, you may want to cache the value as it won't change. + /// If \a input is UNASSIGNED_RAKNET_GUID, will return UNASSIGNED_SYSTEM_ADDRESS + /// \param[in] input The RakNetGUID of the system we are checking to see if we are connected to + virtual SystemAddress GetSystemAddressFromGuid( const RakNetGUID input ) const=0; + + /// Given the SystemAddress of a connected system, get the public key they provided as an identity + /// Returns false if system address was not found or client public key is not known + /// \param[in] input The RakNetGUID of the system + /// \param[in] client_public_key The connected client's public key is copied to this address. Buffer must be cat::EasyHandshake::PUBLIC_KEY_BYTES bytes in length. + virtual bool GetClientPublicKeyFromSystemAddress( const SystemAddress input, char *client_public_key ) const=0; + + /// Set the time, in MS, to use before considering ourselves disconnected after not being able to deliver a reliable message. + /// Default time is 10,000 or 10 seconds in release and 30,000 or 30 seconds in debug. + /// Do not set different values for different computers that are connected to each other, or you won't be able to reconnect after ID_CONNECTION_LOST + /// \param[in] timeMS Time, in MS + /// \param[in] target Which system to do this for. Pass UNASSIGNED_SYSTEM_ADDRESS for all systems. + virtual void SetTimeoutTime(MafiaNet::TimeMS timeMS, const SystemAddress target )=0; + + /// \param[in] target Which system to do this for. Pass UNASSIGNED_SYSTEM_ADDRESS to get the default value + /// \return timeoutTime for a given system. + virtual MafiaNet::TimeMS GetTimeoutTime( const SystemAddress target )=0; + + /// Returns the current MTU size + /// \param[in] target Which system to get this for. UNASSIGNED_SYSTEM_ADDRESS to get the default + /// \return The current MTU size + virtual int GetMTUSize( const SystemAddress target ) const=0; + + /// Returns the number of IP addresses this system has internally. Get the actual addresses from GetLocalIP() + virtual unsigned GetNumberOfAddresses( void )=0; + + /// Returns an IP address at index 0 to GetNumberOfAddresses-1 + /// \param[in] index index into the list of IP addresses + /// \return The local IP address at this index + virtual const char* GetLocalIP( unsigned int index )=0; + + /// Is this a local IP? + /// \param[in] An IP address to check, excluding the port + /// \return True if this is one of the IP addresses returned by GetLocalIP + virtual bool IsLocalIP( const char *ip )=0; + + /// Allow or disallow connection responses from any IP. Normally this should be false, but may be necessary + /// when connecting to servers with multiple IP addresses. + /// \param[in] allow - True to allow this behavior, false to not allow. Defaults to false. Value persists between connections + virtual void AllowConnectionResponseIPMigration( bool allow )=0; + + /// Sends a one byte message ID_ADVERTISE_SYSTEM to the remote unconnected system. + /// This will tell the remote system our external IP outside the LAN along with some user data. + /// \pre The sender and recipient must already be started via a successful call to Initialize + /// \param[in] host Either a dotted IP address or a domain name + /// \param[in] remotePort Which port to connect to on the remote machine. + /// \param[in] data Optional data to append to the packet. + /// \param[in] dataLength length of data in bytes. Use 0 if no data. + /// \param[in] connectionSocketIndex Index into the array of socket descriptors passed to socketDescriptors in RakPeer::Startup() to send on. + /// \return false if IsActive()==false or the host is unresolvable. True otherwise + virtual bool AdvertiseSystem( const char *host, unsigned short remotePort, const char *data, int dataLength, unsigned connectionSocketIndex=0 )=0; + + /// Controls how often to return ID_DOWNLOAD_PROGRESS for large message downloads. + /// ID_DOWNLOAD_PROGRESS is returned to indicate a new partial message chunk, roughly the MTU size, has arrived + /// As it can be slow or cumbersome to get this notification for every chunk, you can set the interval at which it is returned. + /// Defaults to 0 (never return this notification) + /// \param[in] interval How many messages to use as an interval + virtual void SetSplitMessageProgressInterval(int interval)=0; + + /// Returns what was passed to SetSplitMessageProgressInterval() + /// \return What was passed to SetSplitMessageProgressInterval(). Default to 0. + virtual int GetSplitMessageProgressInterval(void) const=0; + + /// Set how long to wait before giving up on sending an unreliable message + /// Useful if the network is clogged up. + /// Set to 0 or less to never timeout. Defaults to 0. + /// \param[in] timeoutMS How many ms to wait before simply not sending an unreliable message. + virtual void SetUnreliableTimeout(MafiaNet::TimeMS timeoutMS)=0; + + /// Send a message to host, with the IP socket option TTL set to 3 + /// This message will not reach the host, but will open the router. + /// Used for NAT-Punchthrough + virtual void SendTTL( const char* host, unsigned short remotePort, int ttl, unsigned connectionSocketIndex=0 )=0; + + // -------------------------------------------------------------------------------------------- Plugin Functions-------------------------------------------------------------------------------------------- + /// \brief Attaches a Plugin interface to an instance of the base class (RakPeer or PacketizedTCP) to run code automatically on message receipt in the Receive call. + /// If the plugin returns false from PluginInterface::UsesReliabilityLayer(), which is the case for all plugins except PacketLogger, you can call AttachPlugin() and DetachPlugin() for this plugin while RakPeer is active. + /// \param[in] messageHandler Pointer to the plugin to attach. + virtual void AttachPlugin( PluginInterface2 *plugin )=0; + + /// \brief Detaches a Plugin interface from the instance of the base class (RakPeer or PacketizedTCP) it is attached to. + /// \details This method disables the plugin code from running automatically on base class's updates or message receipt. + /// If the plugin returns false from PluginInterface::UsesReliabilityLayer(), which is the case for all plugins except PacketLogger, you can call AttachPlugin() and DetachPlugin() for this plugin while RakPeer is active. + /// \param[in] messageHandler Pointer to a plugin to detach. + virtual void DetachPlugin( PluginInterface2 *messageHandler )=0; + + // --------------------------------------------------------------------------------------------Miscellaneous Functions-------------------------------------------------------------------------------------------- + /// Put a message back at the end of the receive queue in case you don't want to deal with it immediately + /// \param[in] packet The packet you want to push back. + /// \param[in] pushAtHead True to push the packet so that the next receive call returns it. False to push it at the end of the queue (obviously pushing it at the end makes the packets out of order) + virtual void PushBackPacket( Packet *packet, bool pushAtHead )=0; + + /// \internal + /// \brief For a given system identified by \a guid, change the SystemAddress to send to. + /// \param[in] guid The connection we are referring to + /// \param[in] systemAddress The new address to send to + virtual void ChangeSystemAddress(RakNetGUID guid, const SystemAddress &systemAddress)=0; + + /// \returns a packet for you to write to if you want to create a Packet for some reason. + /// You can add it to the receive buffer with PushBackPacket + /// \param[in] dataSize How many bytes to allocate for the buffer + /// \return A packet you can write to + virtual Packet* AllocatePacket(unsigned dataSize)=0; + + /// Get the socket used with a particular active connection + /// The smart pointer reference counts the RakNetSocket2 object, so the socket will remain active as long as the smart pointer does, even if RakNet were to shutdown or close the connection. + /// \note This sends a query to the thread and blocks on the return value for up to one second. In practice it should only take a millisecond or so. + /// \param[in] target Which system + /// \return A smart pointer object containing the socket information about the socket. Be sure to check IsNull() which is returned if the update thread is unresponsive, shutting down, or if this system is not connected + virtual RakNetSocket2* GetSocket( const SystemAddress target )=0; + + /// Get all sockets in use + /// \note This sends a query to the thread and blocks on the return value for up to one second. In practice it should only take a millisecond or so. + /// \param[out] sockets List of RakNetSocket2 structures in use. Sockets will not be closed until \a sockets goes out of scope + virtual void GetSockets( DataStructures::List &sockets )=0; + virtual void ReleaseSockets( DataStructures::List &sockets )=0; + + virtual void WriteOutOfBandHeader(MafiaNet::BitStream *bitStream)=0; + + /// If you need code to run in the same thread as RakNet's update thread, this function can be used for that + /// \param[in] _userUpdateThreadPtr C callback function + /// \param[in] _userUpdateThreadData Passed to C callback function + virtual void SetUserUpdateThread(void (*_userUpdateThreadPtr)(RakPeerInterface *, void *), void *_userUpdateThreadData)=0; + + /// Set a C callback to be called whenever a datagram arrives + /// Return true from the callback to have RakPeer handle the datagram. Return false and RakPeer will ignore the datagram. + /// This can be used to filter incoming datagrams by system, or to share a recvfrom socket with RakPeer + /// RNS2RecvStruct will only remain valid for the duration of the call + /// If the incoming datagram is not from your game at all, it is a RakNet packet. + /// If the incoming datagram has an IP address that matches a known address from your game, then check the first byte of data. + /// For RakNet connected systems, the first bit is always 1. So for your own game packets, make sure the first bit is always 0. + virtual void SetIncomingDatagramEventHandler( bool (*_incomingDatagramEventHandler)(RNS2RecvStruct *) )=0; + + // --------------------------------------------------------------------------------------------Network Simulator Functions-------------------------------------------------------------------------------------------- + /// Adds simulated ping and packet loss to the outgoing data flow. + /// To simulate bi-directional ping and packet loss, you should call this on both the sender and the recipient, with half the total ping and packetloss value on each. + /// You can exclude network simulator code with the _RELEASE #define to decrease code size + /// \deprecated Use http://www.jenkinssoftware.com/forum/index.php?topic=1671.0 instead. + /// \note Doesn't work past version 3.6201 + /// \param[in] packetloss Chance to lose a packet. Ranges from 0 to 1. + /// \param[in] minExtraPing The minimum time to delay sends. + /// \param[in] extraPingVariance The additional random time to delay sends. + virtual void ApplyNetworkSimulator( float packetloss, unsigned short minExtraPing, unsigned short extraPingVariance)=0; + + /// Limits how much outgoing bandwidth can be sent per-connection. + /// This limit does not apply to the sum of all connections! + /// Exceeding the limit queues up outgoing traffic + /// \param[in] maxBitsPerSecond Maximum bits per second to send. Use 0 for unlimited (default). Once set, it takes effect immedately and persists until called again. + virtual void SetPerConnectionOutgoingBandwidthLimit( unsigned maxBitsPerSecond )=0; + + /// Returns if you previously called ApplyNetworkSimulator + /// \return If you previously called ApplyNetworkSimulator + virtual bool IsNetworkSimulatorActive( void )=0; + + // --------------------------------------------------------------------------------------------Statistical Functions - Functions dealing with API performance-------------------------------------------------------------------------------------------- + + /// Returns a structure containing a large set of network statistics for the specified system. + /// You can map this data to a string using the C style StatisticsToString() function + /// \param[in] systemAddress: Which connected system to get statistics for + /// \param[in] rns If you supply this structure, it will be written to it. Otherwise it will use a static struct, which is not threadsafe + /// \return 0 on can't find the specified system. A pointer to a set of data otherwise. + /// \sa statistics.h + virtual RakNetStatistics * GetStatistics( const SystemAddress systemAddress, RakNetStatistics *rns=0 )=0; + /// \brief Returns the network statistics of the system at the given index in the remoteSystemList. + /// \return True if the index is less than the maximum number of peers allowed and the system is active. False otherwise. + virtual bool GetStatistics( const unsigned int index, RakNetStatistics *rns )=0; + /// \brief Returns the list of systems, and statistics for each of those systems + /// Each system has one entry in each of the lists, in the same order + /// \param[out] addresses SystemAddress for each connected system + /// \param[out] guids RakNetGUID for each connected system + /// \param[out] statistics Calculated RakNetStatistics for each connected system + virtual void GetStatisticsList(DataStructures::List &addresses, DataStructures::List &guids, DataStructures::List &statistics)=0; + + /// \Returns how many messages are waiting when you call Receive() + virtual unsigned int GetReceiveBufferSize(void)=0; + + // --------------------------------------------------------------------------------------------EVERYTHING AFTER THIS COMMENT IS FOR INTERNAL USE ONLY-------------------------------------------------------------------------------------------- + + /// \internal + // Call manually if RAKPEER_USER_THREADED==1 at least every 30 milliseconds. + // updateBitStream should be: + // BitStream updateBitStream( MAXIMUM_MTU_SIZE + // #if LIBCAT_SECURITY==1 + // + cat::AuthenticatedEncryption::OVERHEAD_BYTES + // #endif + // ); + virtual bool RunUpdateCycle( BitStream &updateBitStream )=0; + + /// \internal + virtual bool SendOutOfBand(const char *host, unsigned short remotePort, const char *data, BitSize_t dataLength, unsigned connectionSocketIndex=0 )=0; + +} +; + +} // namespace MafiaNet + +#endif diff --git a/Source/include/mafianet/RakSleep.h b/Source/include/mafianet/RakSleep.h new file mode 100644 index 000000000..83f825787 --- /dev/null +++ b/Source/include/mafianet/RakSleep.h @@ -0,0 +1,18 @@ +/* + * Copyright (c) 2014, Oculus VR, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * RakNet License.txt file in the licenses directory of this source tree. An additional grant + * of patent rights can be found in the RakNet Patents.txt file in the same directory. + * + */ + +#ifndef __RAK_SLEEP_H +#define __RAK_SLEEP_H + +#include "Export.h" + +void RAK_DLL_EXPORT RakSleep(unsigned int ms); + +#endif diff --git a/Source/include/mafianet/RakString.h b/Source/include/mafianet/RakString.h new file mode 100644 index 000000000..ed6af7866 --- /dev/null +++ b/Source/include/mafianet/RakString.h @@ -0,0 +1,354 @@ +/* + * Original work: Copyright (c) 2014, Oculus VR, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * RakNet License.txt file in the licenses directory of this source tree. An additional grant + * of patent rights can be found in the RakNet Patents.txt file in the same directory. + * + * + * Modified work: Copyright (c) 2016-2019, SLikeSoft UG (haftungsbeschränkt) + * + * This source code was modified by SLikeSoft. Modifications are licensed under the MIT-style + * license found in the license.txt file in the root directory of this source tree. + */ + +#ifndef __RAK_STRING_H +#define __RAK_STRING_H + +#include "Export.h" +#include "DS_List.h" +#include "RakNetTypes.h" // int64_t +#include +#include "stdarg.h" + +#ifdef _WIN32 +#include "WindowsIncludes.h" +#endif + +namespace MafiaNet +{ +/// Forward declarations +class SimpleMutex; +class BitStream; + +/// \brief String class +/// \details Has the following improvements over std::string +/// -Reference counting: Suitable to store in lists +/// -Variadic assignment operator +/// -Doesn't cause linker errors +class RAK_DLL_EXPORT RakString +{ +public: + // Constructors + RakString(); + RakString(char input); + RakString(unsigned char input); + RakString(const unsigned char *format, ...); + RakString(const char *format, ...); + ~RakString(); + RakString( const RakString & rhs); + + /// Implicit return of const char* + operator const char* () const {return sharedString->c_str;} + + /// Same as std::string::c_str + const char *C_String(void) const {return sharedString->c_str;} + + // Lets you modify the string. Do not make the string longer - however, you can make it shorter, or change the contents. + // Pointer is only valid in the scope of RakString itself + char *C_StringUnsafe(void) {Clone(); return sharedString->c_str;} + + /// Assigment operators + RakString& operator = ( const RakString& rhs ); + RakString& operator = ( const char *str ); + RakString& operator = ( char *str ); + RakString& operator = ( const unsigned char *str ); + RakString& operator = ( char unsigned *str ); + RakString& operator = ( const char c ); + + /// Concatenation + RakString& operator +=( const RakString& rhs); + RakString& operator += ( const char *str ); + RakString& operator += ( char *str ); + RakString& operator += ( const unsigned char *str ); + RakString& operator += ( char unsigned *str ); + RakString& operator += ( const char c ); + + /// Character index. Do not use to change the string however. + unsigned char operator[] ( const unsigned int position ) const; + +#ifdef _WIN32 + // Return as Wide char + // Deallocate with DeallocWideChar + WCHAR * ToWideChar(void); + void DeallocWideChar(WCHAR * w); + + void FromWideChar(const wchar_t *source); + static MafiaNet::RakString FromWideChar_S(const wchar_t *source); +#endif + + /// String class find replacement + /// Searches the string for the content specified in stringToFind and returns the position of the first occurrence in the string. + /// Search only includes characters on or after position pos, ignoring any possible occurrences in previous locations. + /// \param[in] stringToFind The string to find inside of this object's string + /// \param[in] pos The position in the string to start the search + /// \return Returns the position of the first occurrence in the string. + size_t Find(const char *stringToFind,size_t pos = 0 ); + + /// Equality + bool operator==(const RakString &rhs) const; + bool operator==(const char *str) const; + bool operator==(char *str) const; + + // Comparison + bool operator < ( const RakString& right ) const; + bool operator <= ( const RakString& right ) const; + bool operator > ( const RakString& right ) const; + bool operator >= ( const RakString& right ) const; + + /// Inequality + bool operator!=(const RakString &rhs) const; + bool operator!=(const char *str) const; + bool operator!=(char *str) const; + + /// Change all characters to lowercase + const char * ToLower(void); + + /// Change all characters to uppercase + const char * ToUpper(void); + + /// Set the value of the string + void Set(const char *format, ...); + + /// Sets a copy of a substring of str as the new content. The substring is the portion of str + /// that begins at the character position pos and takes up to n characters + /// (it takes less than n if the end of str is reached before). + /// \param[in] str The string to copy in + /// \param[in] pos The position on str to start the copy + /// \param[in] n How many chars to copy + /// \return Returns the string, note that the current string is set to that value as well + RakString Assign(const char *str,size_t pos, size_t n ); + + /// Returns if the string is empty. Also, C_String() would return "" + bool IsEmpty(void) const; + + /// Returns the length of the string + size_t GetLength(void) const; + size_t GetLengthUTF8(void) const; + + /// Replace character(s) in starting at index, for count, with c + void Replace(unsigned index, unsigned count, unsigned char c); + + /// Replace character at index with c + void SetChar( unsigned index, unsigned char c ); + + /// Replace character at index with string s + void SetChar( unsigned index, MafiaNet::RakString s ); + + /// Make sure string is no longer than \a length + void Truncate(unsigned int length); + void TruncateUTF8(unsigned int length); + + // Gets the substring starting at index for count characters + RakString SubStr(unsigned int index, size_t count) const; + + /// Erase characters out of the string at index for count + void Erase(unsigned int index, unsigned int count); + + /// Set the first instance of c with a null-terminator + void TerminateAtFirstCharacter(char c); + /// Set the last instance of c with a null-terminator + void TerminateAtLastCharacter(char c); + + void StartAfterFirstCharacter(char c); + void StartAfterLastCharacter(char c); + + /// Returns how many occurances there are of \a c in the string + int GetCharacterCount(char c); + + /// Remove all instances of c + void RemoveCharacter(char c); + + /// Create a RakString with a value, without doing printf style parsing + /// Equivalent to assignment operator + static MafiaNet::RakString NonVariadic(const char *str); + + /// Hash the string into an unsigned int + static unsigned long ToInteger(const char *str); + static unsigned long ToInteger(const RakString &rs); + + /// \brief Read an integer out of a substring + /// \param[in] str The string + /// \param[in] pos The position on str where the integer starts + /// \param[in] n How many chars to copy + static int ReadIntFromSubstring(const char *str, size_t pos, size_t n); + + // Like strncat, but for a fixed length + void AppendBytes(const char *bytes, size_t count); + + /// Compare strings (case sensitive) + int StrCmp(const RakString &rhs) const; + + /// Compare strings (case sensitive), up to num characters + int StrNCmp(const RakString &rhs, size_t num) const; + + /// Compare strings (not case sensitive) + int StrICmp(const RakString &rhs) const; + + /// Clear the string + void Clear(void); + + /// Print the string to the screen + void Printf(void); + + /// Print the string to a file + void FPrintf(FILE *fp); + + /// Does the given IP address match the IP address encoded into this string, accounting for wildcards? + bool IPAddressMatch(const char *IP); + + /// Does the string contain non-printable characters other than spaces? + bool ContainsNonprintableExceptSpaces(void) const; + + /// Is this a valid email address? + bool IsEmailAddress(void) const; + + /// URL Encode the string. See http://www.codeguru.com/cpp/cpp/cpp_mfc/article.php/c4029/ + MafiaNet::RakString& URLEncode(void); + + /// URL decode the string + MafiaNet::RakString& URLDecode(void); + + /// https://servers.api.rackspacecloud.com/v1.0 to https://, servers.api.rackspacecloud.com, /v1.0 + void SplitURI(MafiaNet::RakString &header, MafiaNet::RakString &domain, MafiaNet::RakString &path); + + /// Scan for quote, double quote, and backslash and prepend with backslash + MafiaNet::RakString& SQLEscape(void); + + /// Format as a POST command that can be sent to a webserver + /// \param[in] uri For example, masterserver2.raknet.com/testServer + /// \param[in] contentType For example, text/plain; charset=UTF-8 + /// \param[in] body Body of the post + /// \return Formatted string + static MafiaNet::RakString FormatForPOST(const char* uri, const char* contentType, const char* body, const char* extraHeaders=""); + static MafiaNet::RakString FormatForPUT(const char* uri, const char* contentType, const char* body, const char* extraHeaders=""); + + /// Format as a GET command that can be sent to a webserver + /// \param[in] uri For example, masterserver2.raknet.com/testServer?__gameId=comprehensivePCGame + /// \return Formatted string + static MafiaNet::RakString FormatForGET(const char* uri, const char* extraHeaders=""); + + /// Format as a DELETE command that can be sent to a webserver + /// \param[in] uri For example, masterserver2.raknet.com/testServer?__gameId=comprehensivePCGame&__rowId=1 + /// \return Formatted string + static MafiaNet::RakString FormatForDELETE(const char* uri, const char* extraHeaders=""); + + /// Fix to be a file path, ending with / + MafiaNet::RakString& MakeFilePath(void); + + /// RakString uses a freeList of old no-longer used strings + /// Call this function to clear this memory on shutdown + static void FreeMemory(void); + /// \internal + static void FreeMemoryNoMutex(void); + + /// Serialize to a bitstream, uncompressed (slightly faster) + /// \param[out] bs Bitstream to serialize to + void Serialize(BitStream *bs) const; + + /// Static version of the Serialize function + static void Serialize(const char *str, BitStream *bs); + + /// Serialize to a bitstream, compressed (better bandwidth usage) + /// \param[out] bs Bitstream to serialize to + /// \param[in] languageId languageId to pass to the StringCompressor class + /// \param[in] writeLanguageId encode the languageId variable in the stream. If false, 0 is assumed, and DeserializeCompressed will not look for this variable in the stream (saves bandwidth) + /// \pre StringCompressor::AddReference must have been called to instantiate the class (Happens automatically from RakPeer::Startup()) + void SerializeCompressed(BitStream *bs, uint8_t languageId=0, bool writeLanguageId=false) const; + + /// Static version of the SerializeCompressed function + static void SerializeCompressed(const char *str, BitStream *bs, uint8_t languageId=0, bool writeLanguageId=false); + + /// Deserialize what was written by Serialize + /// \param[in] bs Bitstream to serialize from + /// \return true if the deserialization was successful + bool Deserialize(BitStream *bs); + + /// Static version of the Deserialize() function + static bool Deserialize(char *str, BitStream *bs); + + /// Deserialize compressed string, written by SerializeCompressed + /// \param[in] bs Bitstream to serialize from + /// \param[in] readLanguageId If true, looks for the variable langaugeId in the data stream. Must match what was passed to SerializeCompressed + /// \return true if the deserialization was successful + /// \pre StringCompressor::AddReference must have been called to instantiate the class (Happens automatically from RakPeer::Startup()) + bool DeserializeCompressed(BitStream *bs, bool readLanguageId=false); + + /// Static version of the DeserializeCompressed() function + static bool DeserializeCompressed(char *str, BitStream *bs, bool readLanguageId=false); + + static const char *ToString(int64_t i); + static const char *ToString(uint64_t i); + + /// \internal + static size_t GetSizeToAllocate(size_t bytes) + { + const size_t smallStringSize = 128-sizeof(unsigned int)-sizeof(size_t)-sizeof(char*)*2; + if (bytes<=smallStringSize) + return smallStringSize; + else + return bytes*2; + } + + /// \internal + struct SharedString + { + SimpleMutex *refCountMutex; + unsigned int refCount; + size_t bytesUsed; + char *bigString; + char *c_str; + char smallString[128-sizeof(unsigned int)-sizeof(size_t)-sizeof(char*)*2]; + }; + + /// \internal + RakString( SharedString *_sharedString ); + + /// \internal + SharedString *sharedString; + +// static SimpleMutex poolMutex; +// static DataStructures::MemoryPool pool; + /// \internal + static SharedString emptyString; + + //static SharedString *sharedStringFreeList; + //static unsigned int sharedStringFreeListAllocationCount; + /// \internal + /// List of free objects to reduce memory reallocations + static DataStructures::List freeList; + + static int RakStringComp( RakString const &key, RakString const &data ); + + static void LockMutex(void); + static void UnlockMutex(void); + +protected: + static MafiaNet::RakString FormatForPUTOrPost(const char* type, const char* uri, const char* contentType, const char* body, const char* extraHeaders); + void Allocate(size_t len); + void Assign(const char *str); + void Assign(const char *str, va_list ap); + + void Clone(void); + void Free(void); + unsigned char ToLower(unsigned char c); + unsigned char ToUpper(unsigned char c); + void Realloc(SharedString *inSharedString, size_t bytes); +}; + +} + +const MafiaNet::RakString RAK_DLL_EXPORT operator+(const MafiaNet::RakString &lhs, const MafiaNet::RakString &rhs); + +#endif diff --git a/Source/include/mafianet/RakThread.h b/Source/include/mafianet/RakThread.h new file mode 100644 index 000000000..af0a3423f --- /dev/null +++ b/Source/include/mafianet/RakThread.h @@ -0,0 +1,57 @@ +/* + * Original work: Copyright (c) 2014, Oculus VR, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * RakNet License.txt file in the licenses directory of this source tree. An additional grant + * of patent rights can be found in the RakNet Patents.txt file in the same directory. + * + * + * Modified work: Copyright (c) 2017-2018, SLikeSoft UG (haftungsbeschränkt) + * + * This source code was modified by SLikeSoft. Modifications are licensed under the MIT-style + * license found in the license.txt file in the root directory of this source tree. + */ + +#ifndef __RAK_THREAD_H +#define __RAK_THREAD_H + +#include "Export.h" + +namespace MafiaNet +{ +/// To define a thread, use RAK_THREAD_DECLARATION(functionName); +#if defined(_WIN32) +#define RAK_THREAD_DECLARATION(functionName) unsigned __stdcall functionName( void* arguments ) + +#else +#define RAK_THREAD_DECLARATION(functionName) void* functionName( void* arguments ) +#endif + +class RAK_DLL_EXPORT RakThread +{ +public: + /// Create a thread, simplified to be cross platform without all the extra junk + /// To then start that thread, call RakCreateThread(functionName, arguments); + /// \param[in] start_address Function you want to call + /// \param[in] arglist Arguments to pass to the function + /// \return 0=success. >0 = error code + + /* + nice value Win32 Priority + -20 to -16 THREAD_PRIORITY_HIGHEST + -15 to -6 THREAD_PRIORITY_ABOVE_NORMAL + -5 to +4 THREAD_PRIORITY_NORMAL + +5 to +14 THREAD_PRIORITY_BELOW_NORMAL + +15 to +19 THREAD_PRIORITY_LOWEST + */ +#if defined(_WIN32) + static int Create( unsigned __stdcall start_address( void* ), void *arglist, int priority=0); +#else + static int Create( void* start_address( void* ), void *arglist, int priority=0); +#endif +}; + +} + +#endif diff --git a/Source/include/mafianet/RakVoice.h b/Source/include/mafianet/RakVoice.h index e1d6aae44..03464c95e 100644 --- a/Source/include/mafianet/RakVoice.h +++ b/Source/include/mafianet/RakVoice.h @@ -20,7 +20,7 @@ #ifndef __RAK_VOICE_H #define __RAK_VOICE_H -#include "mafianet/types.h" +#include "mafianet/RakNetTypes.h" #include "mafianet/PluginInterface2.h" #include "mafianet/DS_OrderedList.h" #include "mafianet/NativeTypes.h" diff --git a/Source/include/mafianet/RakWString.h b/Source/include/mafianet/RakWString.h new file mode 100644 index 000000000..8e4e57136 --- /dev/null +++ b/Source/include/mafianet/RakWString.h @@ -0,0 +1,124 @@ +/* + * Original work: Copyright (c) 2014, Oculus VR, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * RakNet License.txt file in the licenses directory of this source tree. An additional grant + * of patent rights can be found in the RakNet Patents.txt file in the same directory. + * + * + * Modified work: Copyright (c) 2016-2018, SLikeSoft UG (haftungsbeschränkt) + * + * This source code was modified by SLikeSoft. Modifications are licensed under the MIT-style + * license found in the license.txt file in the root directory of this source tree. + */ + +#ifndef __RAK_W_STRING_H +#define __RAK_W_STRING_H + +#include "Export.h" +#include "RakNetTypes.h" // int64_t +#include "RakString.h" + +#ifdef _WIN32 +#include "WindowsIncludes.h" +#endif + +namespace MafiaNet +{ + /// \brief String class for Unicode + class RAK_DLL_EXPORT RakWString + { + public: + // Constructors + RakWString(); + RakWString( const RakString &right ); + RakWString( const wchar_t *input ); + RakWString( const RakWString & right); + RakWString( const char *input ); + ~RakWString(); + + /// Implicit return of wchar_t* + operator wchar_t* () const {if (c_str) return c_str; return (wchar_t*) L"";} + + /// Same as std::string::c_str + const wchar_t* C_String(void) const {if (c_str) return c_str; return (const wchar_t*) L"";} + + /// Assignment operators + RakWString& operator = ( const RakWString& right ); + RakWString& operator = ( const RakString& right ); + RakWString& operator = ( const wchar_t * const str ); + RakWString& operator = ( wchar_t *str ); + RakWString& operator = ( const char * const str ); + RakWString& operator = ( char *str ); + + /// Concatenation + RakWString& operator +=( const RakWString& right); + RakWString& operator += ( const wchar_t * const right ); + RakWString& operator += ( wchar_t *right ); + + /// Equality + bool operator==(const RakWString &right) const; + + // Comparison + bool operator < ( const RakWString& right ) const; + bool operator <= ( const RakWString& right ) const; + bool operator > ( const RakWString& right ) const; + bool operator >= ( const RakWString& right ) const; + + /// Inequality + bool operator!=(const RakWString &right) const; + + /// Set the value of the string + void Set( wchar_t *str ); + + /// Returns if the string is empty. Also, C_String() would return "" + bool IsEmpty(void) const; + + /// Returns the length of the string + size_t GetLength(void) const; + + /// Has the string into an unsigned int + static unsigned long ToInteger(const RakWString &rs); + + /// Compare strings (case sensitive) + int StrCmp(const RakWString &right) const; + + /// Compare strings (not case sensitive) + int StrICmp(const RakWString &right) const; + + /// Clear the string + void Clear(void); + + /// Print the string to the screen + void Printf(void); + + /// Print the string to a file + void FPrintf(FILE *fp); + + /// Serialize to a bitstream, uncompressed (slightly faster) + /// \param[out] bs Bitstream to serialize to + void Serialize(BitStream *bs) const; + + /// Static version of the Serialize function + static void Serialize(const wchar_t * const str, BitStream *bs); + + /// Deserialize what was written by Serialize + /// \param[in] bs Bitstream to serialize from + /// \return true if the deserialization was successful + bool Deserialize(BitStream *bs); + + /// Static version of the Deserialize() function + static bool Deserialize(wchar_t *str, BitStream *bs); + static bool Deserialize(wchar_t *str, size_t strLength, BitStream *bs); + + + protected: + wchar_t* c_str; + size_t c_strCharLength; + }; +} + +const MafiaNet::RakWString RAK_DLL_EXPORT operator+(const MafiaNet::RakWString &lhs, const MafiaNet::RakWString &rhs); + +#endif diff --git a/Source/include/mafianet/RefCountedObj.h b/Source/include/mafianet/RefCountedObj.h index 4d5ba7a42..36dfed9a2 100644 --- a/Source/include/mafianet/RefCountedObj.h +++ b/Source/include/mafianet/RefCountedObj.h @@ -22,7 +22,7 @@ #ifndef __REF_COUNTED_OBJ_H #define __REF_COUNTED_OBJ_H -#include "memoryoverride.h" +#include "RakMemoryOverride.h" /// World's simplest class :) class RefCountedObj diff --git a/Source/include/mafianet/RelayPlugin.h b/Source/include/mafianet/RelayPlugin.h index 18fa910e8..0504dbfa4 100644 --- a/Source/include/mafianet/RelayPlugin.h +++ b/Source/include/mafianet/RelayPlugin.h @@ -25,7 +25,7 @@ #define __RELAY_PLUGIN_H #include "PluginInterface2.h" -#include "string.h" +#include "RakString.h" #include "DS_Hash.h" /// \defgroup RELAY_PLUGIN_GROUP RelayPlugin diff --git a/Source/include/mafianet/ReliabilityLayer.h b/Source/include/mafianet/ReliabilityLayer.h index 9ccfb0b53..1bdd23fda 100644 --- a/Source/include/mafianet/ReliabilityLayer.h +++ b/Source/include/mafianet/ReliabilityLayer.h @@ -21,7 +21,7 @@ #ifndef __RELIABILITY_LAYER_H #define __RELIABILITY_LAYER_H -#include "memoryoverride.h" +#include "RakMemoryOverride.h" #include "MTUSize.h" #include "DS_LinkedList.h" #include "DS_List.h" @@ -30,20 +30,20 @@ #include "DS_Queue.h" #include "BitStream.h" #include "InternalPacket.h" -#include "statistics.h" +#include "RakNetStatistics.h" #include "DR_SHA1.h" #include "DS_OrderedList.h" #include "DS_RangeList.h" #include "DS_BPlusTree.h" #include "DS_MemoryPool.h" -#include "defines.h" +#include "RakNetDefines.h" #include "DS_Heap.h" #include "BitStream.h" #include "NativeFeatureIncludes.h" #include "SecureHandshake.h" #include "PluginInterface2.h" #include "Rand.h" -#include "socket2.h" +#include "RakNetSocket2.h" #if USE_SLIDING_WINDOW_CONGESTION_CONTROL!=1 #include "CCRakNetUDT.h" diff --git a/Source/include/mafianet/ReplicaManager3.h b/Source/include/mafianet/ReplicaManager3.h index 6a187b7c5..1f6a78383 100644 --- a/Source/include/mafianet/ReplicaManager3.h +++ b/Source/include/mafianet/ReplicaManager3.h @@ -24,8 +24,8 @@ #ifndef __REPLICA_MANAGER_3 #define __REPLICA_MANAGER_3 -#include "types.h" -#include "time.h" +#include "RakNetTypes.h" +#include "RakNetTime.h" #include "BitStream.h" #include "PacketPriority.h" #include "PluginInterface2.h" diff --git a/Source/include/mafianet/Router2.h b/Source/include/mafianet/Router2.h index 879aa27a4..8c522de87 100644 --- a/Source/include/mafianet/Router2.h +++ b/Source/include/mafianet/Router2.h @@ -24,7 +24,7 @@ #ifndef __ROUTER_2_PLUGIN_H #define __ROUTER_2_PLUGIN_H -#include "types.h" +#include "RakNetTypes.h" #include "PluginInterface2.h" #include "PacketPriority.h" #include "Export.h" diff --git a/Source/include/mafianet/SendToThread.h b/Source/include/mafianet/SendToThread.h index a34676955..77c234657 100644 --- a/Source/include/mafianet/SendToThread.h +++ b/Source/include/mafianet/SendToThread.h @@ -16,7 +16,7 @@ #ifndef __SENDTO_THREAD #define __SENDTO_THREAD -#include "defines.h" +#include "RakNetDefines.h" #ifdef USE_THREADED_SEND diff --git a/Source/include/mafianet/SimpleMutex.h b/Source/include/mafianet/SimpleMutex.h index ed3444f55..20a4c7e7f 100644 --- a/Source/include/mafianet/SimpleMutex.h +++ b/Source/include/mafianet/SimpleMutex.h @@ -22,7 +22,7 @@ #ifndef __SIMPLE_MUTEX_H #define __SIMPLE_MUTEX_H -#include "memoryoverride.h" +#include "RakMemoryOverride.h" #if defined(_WIN32) diff --git a/Source/include/mafianet/SingleProducerConsumer.h b/Source/include/mafianet/SingleProducerConsumer.h index 094ebd2ab..f7cccaa1b 100644 --- a/Source/include/mafianet/SingleProducerConsumer.h +++ b/Source/include/mafianet/SingleProducerConsumer.h @@ -22,11 +22,11 @@ #ifndef __SINGLE_PRODUCER_CONSUMER_H #define __SINGLE_PRODUCER_CONSUMER_H -#include "assert.h" +#include "RakAssert.h" static const int MINIMUM_LIST_SIZE=8; -#include "memoryoverride.h" +#include "RakMemoryOverride.h" #include "Export.h" /// The namespace DataStructures was only added to avoid compiler errors for commonly named data structures diff --git a/Source/include/mafianet/SocketIncludes.h b/Source/include/mafianet/SocketIncludes.h index b6f02da34..fa0b17aa9 100644 --- a/Source/include/mafianet/SocketIncludes.h +++ b/Source/include/mafianet/SocketIncludes.h @@ -32,7 +32,7 @@ #include #include - //#include "memoryoverride.h" + //#include "RakMemoryOverride.h" /// Unix/Linux uses ints for sockets typedef int __UDPSOCKET__; typedef int __TCPSOCKET__; diff --git a/Source/include/mafianet/SocketLayer.h b/Source/include/mafianet/SocketLayer.h index 9ab04dd06..b62330f6c 100644 --- a/Source/include/mafianet/SocketLayer.h +++ b/Source/include/mafianet/SocketLayer.h @@ -23,13 +23,13 @@ #ifndef __SOCKET_LAYER_H #define __SOCKET_LAYER_H -#include "memoryoverride.h" -#include "types.h" -#include "smartptr.h" +#include "RakMemoryOverride.h" +#include "RakNetTypes.h" +#include "RakNetSmartPtr.h" //#include "socket.h" #include "Export.h" #include "MTUSize.h" -#include "string.h" +#include "RakString.h" //#include "ClientContextStruct.h" diff --git a/Source/include/mafianet/StatisticsHistory.h b/Source/include/mafianet/StatisticsHistory.h index 15bf38348..f8f0f87c3 100644 --- a/Source/include/mafianet/StatisticsHistory.h +++ b/Source/include/mafianet/StatisticsHistory.h @@ -24,12 +24,12 @@ #define __STATISTICS_HISTORY_H #include "PluginInterface2.h" -#include "memoryoverride.h" +#include "RakMemoryOverride.h" #include "NativeTypes.h" #include "DS_List.h" -#include "types.h" +#include "RakNetTypes.h" #include "DS_OrderedList.h" -#include "string.h" +#include "RakString.h" #include "DS_Queue.h" #include "DS_Hash.h" #include diff --git a/Source/include/mafianet/StringCompressor.h b/Source/include/mafianet/StringCompressor.h index b9ecc80dc..edfdae558 100644 --- a/Source/include/mafianet/StringCompressor.h +++ b/Source/include/mafianet/StringCompressor.h @@ -24,7 +24,7 @@ #include "Export.h" #include "DS_Map.h" -#include "memoryoverride.h" +#include "RakMemoryOverride.h" #include "NativeTypes.h" #ifdef _STD_STRING_COMPRESSOR diff --git a/Source/include/mafianet/StringTable.h b/Source/include/mafianet/StringTable.h index 91a33fe9f..91bc4167d 100644 --- a/Source/include/mafianet/StringTable.h +++ b/Source/include/mafianet/StringTable.h @@ -24,7 +24,7 @@ #include "DS_OrderedList.h" #include "Export.h" -#include "memoryoverride.h" +#include "RakMemoryOverride.h" /// Forward declaration namespace MafiaNet diff --git a/Source/include/mafianet/TCPInterface.h b/Source/include/mafianet/TCPInterface.h index 3281358c1..eefcf3195 100644 --- a/Source/include/mafianet/TCPInterface.h +++ b/Source/include/mafianet/TCPInterface.h @@ -24,14 +24,14 @@ #ifndef __SIMPLE_TCP_SERVER #define __SIMPLE_TCP_SERVER -#include "memoryoverride.h" +#include "RakMemoryOverride.h" #include "DS_List.h" -#include "types.h" +#include "RakNetTypes.h" #include "Export.h" -#include "thread.h" +#include "RakThread.h" #include "DS_Queue.h" #include "SimpleMutex.h" -#include "defines.h" +#include "RakNetDefines.h" #include "SocketIncludes.h" #include "DS_ByteQueue.h" #include "DS_ThreadsafeAllocatingQueue.h" diff --git a/Source/include/mafianet/TableSerializer.h b/Source/include/mafianet/TableSerializer.h index 2989f4b1c..2e9203d8f 100644 --- a/Source/include/mafianet/TableSerializer.h +++ b/Source/include/mafianet/TableSerializer.h @@ -16,7 +16,7 @@ #ifndef __TABLE_SERIALIZER_H #define __TABLE_SERIALIZER_H -#include "memoryoverride.h" +#include "RakMemoryOverride.h" #include "DS_Table.h" #include "Export.h" diff --git a/Source/include/mafianet/TeamBalancer.h b/Source/include/mafianet/TeamBalancer.h index 0cd337f20..915aa599f 100644 --- a/Source/include/mafianet/TeamBalancer.h +++ b/Source/include/mafianet/TeamBalancer.h @@ -27,10 +27,10 @@ #define __TEAM_BALANCER_H #include "PluginInterface2.h" -#include "memoryoverride.h" +#include "RakMemoryOverride.h" #include "NativeTypes.h" #include "DS_List.h" -#include "string.h" +#include "RakString.h" namespace MafiaNet { diff --git a/Source/include/mafianet/TeamManager.h b/Source/include/mafianet/TeamManager.h index 5867a116e..e6749f215 100644 --- a/Source/include/mafianet/TeamManager.h +++ b/Source/include/mafianet/TeamManager.h @@ -31,10 +31,10 @@ #define __TEAM_MANAGER_H #include "PluginInterface2.h" -#include "memoryoverride.h" +#include "RakMemoryOverride.h" #include "NativeTypes.h" #include "DS_List.h" -#include "types.h" +#include "RakNetTypes.h" #include "DS_Hash.h" #include "DS_OrderedList.h" diff --git a/Source/include/mafianet/ThreadPool.h b/Source/include/mafianet/ThreadPool.h index dfada3175..69a88268a 100644 --- a/Source/include/mafianet/ThreadPool.h +++ b/Source/include/mafianet/ThreadPool.h @@ -16,11 +16,11 @@ #ifndef __THREAD_POOL_H #define __THREAD_POOL_H -#include "memoryoverride.h" +#include "RakMemoryOverride.h" #include "DS_Queue.h" #include "SimpleMutex.h" #include "Export.h" -#include "thread.h" +#include "RakThread.h" #include "SignaledEvent.h" class ThreadDataInterface @@ -191,7 +191,7 @@ struct RAK_DLL_EXPORT ThreadPool }; #include "ThreadPool.h" -#include "sleep.h" +#include "RakSleep.h" #ifdef _WIN32 #else diff --git a/Source/include/mafianet/TransportInterface.h b/Source/include/mafianet/TransportInterface.h index af48fd0a6..5a04dd133 100644 --- a/Source/include/mafianet/TransportInterface.h +++ b/Source/include/mafianet/TransportInterface.h @@ -22,9 +22,9 @@ #ifndef __TRANSPORT_INTERFACE_H #define __TRANSPORT_INTERFACE_H -#include "types.h" +#include "RakNetTypes.h" #include "Export.h" -#include "memoryoverride.h" +#include "RakMemoryOverride.h" #define REMOTE_MAX_TEXT_INPUT 2048 diff --git a/Source/include/mafianet/TwoWayAuthentication.h b/Source/include/mafianet/TwoWayAuthentication.h index 65dc1d5ae..5b148b506 100644 --- a/Source/include/mafianet/TwoWayAuthentication.h +++ b/Source/include/mafianet/TwoWayAuthentication.h @@ -47,9 +47,9 @@ #endif #include "PluginInterface2.h" -#include "memoryoverride.h" +#include "RakMemoryOverride.h" #include "NativeTypes.h" -#include "string.h" +#include "RakString.h" #include "DS_Hash.h" #include "DS_Queue.h" diff --git a/Source/include/mafianet/UDPForwarder.h b/Source/include/mafianet/UDPForwarder.h index 6e0914764..bf0b2bea3 100644 --- a/Source/include/mafianet/UDPForwarder.h +++ b/Source/include/mafianet/UDPForwarder.h @@ -26,12 +26,12 @@ #define __UDP_FORWARDER_H #include "Export.h" -#include "types.h" +#include "RakNetTypes.h" #include "SocketIncludes.h" #include "UDPProxyCommon.h" #include "SimpleMutex.h" -#include "string.h" -#include "thread.h" +#include "RakString.h" +#include "RakThread.h" #include "DS_Queue.h" #include "DS_OrderedList.h" #include "LocklessTypes.h" diff --git a/Source/include/mafianet/UDPProxyClient.h b/Source/include/mafianet/UDPProxyClient.h index 7bd5b2cfc..fbf4d77cc 100644 --- a/Source/include/mafianet/UDPProxyClient.h +++ b/Source/include/mafianet/UDPProxyClient.h @@ -24,7 +24,7 @@ #define __UDP_PROXY_CLIENT_H #include "Export.h" -#include "types.h" +#include "RakNetTypes.h" #include "PluginInterface2.h" #include "DS_List.h" diff --git a/Source/include/mafianet/UDPProxyCoordinator.h b/Source/include/mafianet/UDPProxyCoordinator.h index 12148e710..6da970173 100644 --- a/Source/include/mafianet/UDPProxyCoordinator.h +++ b/Source/include/mafianet/UDPProxyCoordinator.h @@ -25,9 +25,9 @@ #define __UDP_PROXY_COORDINATOR_H #include "Export.h" -#include "types.h" +#include "RakNetTypes.h" #include "PluginInterface2.h" -#include "string.h" +#include "RakString.h" #include "BitStream.h" #include "DS_Queue.h" #include "DS_OrderedList.h" diff --git a/Source/include/mafianet/UDPProxyServer.h b/Source/include/mafianet/UDPProxyServer.h index fbb70af87..1d9c83634 100644 --- a/Source/include/mafianet/UDPProxyServer.h +++ b/Source/include/mafianet/UDPProxyServer.h @@ -25,10 +25,10 @@ #define __UDP_PROXY_SERVER_H #include "Export.h" -#include "types.h" +#include "RakNetTypes.h" #include "PluginInterface2.h" #include "UDPForwarder.h" -#include "string.h" +#include "RakString.h" namespace MafiaNet { diff --git a/Source/include/mafianet/VariableListDeltaTracker.h b/Source/include/mafianet/VariableListDeltaTracker.h index 0f466ee14..18f1d0254 100644 --- a/Source/include/mafianet/VariableListDeltaTracker.h +++ b/Source/include/mafianet/VariableListDeltaTracker.h @@ -15,7 +15,7 @@ #include "NativeTypes.h" #include "DS_List.h" -#include "memoryoverride.h" +#include "RakMemoryOverride.h" #include "BitStream.h" #ifndef __VARIABLE_LIST_DELTA_TRACKER diff --git a/Source/include/mafianet/version.h b/Source/include/mafianet/Version.h similarity index 100% rename from Source/include/mafianet/version.h rename to Source/include/mafianet/Version.h diff --git a/Source/include/mafianet/_FindFirst.h b/Source/include/mafianet/_FindFirst.h index b0dc9c88e..f66b78610 100644 --- a/Source/include/mafianet/_FindFirst.h +++ b/Source/include/mafianet/_FindFirst.h @@ -20,7 +20,7 @@ #include -#include "string.h" +#include "RakString.h" #define _A_NORMAL 0x00 // Normal file #define _A_RDONLY 0x01 // Read-only file diff --git a/Source/include/mafianet/alloca.h b/Source/include/mafianet/alloca.h index 7767c5f96..5939d987e 100644 --- a/Source/include/mafianet/alloca.h +++ b/Source/include/mafianet/alloca.h @@ -1,26 +1,14 @@ -/* - * Copyright (c) 2014, Oculus VR, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * RakNet License.txt file in the licenses directory of this source tree. An additional grant - * of patent rights can be found in the RakNet Patents.txt file in the same directory. - * - */ - -#if defined(__FreeBSD__) -#include - - - - -#elif defined ( __APPLE__ ) || defined ( __APPLE_CC__ ) -#include -#include -#elif defined(_WIN32) -#include -#else -#include -// Alloca needed on Ubuntu apparently -#include -#endif +/* + * Copyright (c) 2026, MafiaHub + * Licensed under MIT-style license + * + * Deprecated include path. "mafianet/alloca.h" was renamed to "mafianet/RakAlloca.h" so + * every header follows the PascalCase name of the class it declares. This + * forwarding header is kept for one release cycle and will then be removed. + * Define MAFIANET_SILENCE_DEPRECATED_INCLUDES to suppress the message. + */ +#pragma once +#ifndef MAFIANET_SILENCE_DEPRECATED_INCLUDES +#pragma message("mafianet/alloca.h is deprecated; include mafianet/RakAlloca.h instead") +#endif +#include "RakAlloca.h" diff --git a/Source/include/mafianet/assert.h b/Source/include/mafianet/assert.h index c495a013a..767fc28bd 100644 --- a/Source/include/mafianet/assert.h +++ b/Source/include/mafianet/assert.h @@ -1,17 +1,14 @@ -/* - * Copyright (c) 2014, Oculus VR, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * RakNet License.txt file in the licenses directory of this source tree. An additional grant - * of patent rights can be found in the RakNet Patents.txt file in the same directory. - * - * - * Modified work: Copyright (c) 2017, SLikeSoft UG (haftungsbeschränkt) - * - * This source code was modified by SLikeSoft. Modifications are licensed under the MIT-style - * license found in the license.txt file in the root directory of this source tree. - */ - -#include -#include "defines.h" +/* + * Copyright (c) 2026, MafiaHub + * Licensed under MIT-style license + * + * Deprecated include path. "mafianet/assert.h" was renamed to "mafianet/RakAssert.h" so + * every header follows the PascalCase name of the class it declares. This + * forwarding header is kept for one release cycle and will then be removed. + * Define MAFIANET_SILENCE_DEPRECATED_INCLUDES to suppress the message. + */ +#pragma once +#ifndef MAFIANET_SILENCE_DEPRECATED_INCLUDES +#pragma message("mafianet/assert.h is deprecated; include mafianet/RakAssert.h instead") +#endif +#include "RakAssert.h" diff --git a/Source/include/mafianet/commandparser.h b/Source/include/mafianet/commandparser.h index d54ba8ef0..0bc2dc50a 100644 --- a/Source/include/mafianet/commandparser.h +++ b/Source/include/mafianet/commandparser.h @@ -1,75 +1,14 @@ -/* - * Original work: Copyright (c) 2014, Oculus VR, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * RakNet License.txt file in the licenses directory of this source tree. An additional grant - * of patent rights can be found in the RakNet Patents.txt file in the same directory. - * - * - * Modified work: Copyright (c) 2017, SLikeSoft UG (haftungsbeschränkt) - * - * This source code was modified by SLikeSoft. Modifications are licensed under the MIT-style - * license found in the license.txt file in the root directory of this source tree. - */ - -/// \file -/// \brief Contains RakNetCommandParser , used to send commands to an instance of RakPeer -/// - -#include "NativeFeatureIncludes.h" -#if _RAKNET_SUPPORT_RakNetCommandParser==1 - -#ifndef __RAKNET_COMMAND_PARSER -#define __RAKNET_COMMAND_PARSER - -#include "CommandParserInterface.h" -#include "Export.h" - -namespace MafiaNet -{ -class RakPeerInterface; - -/// \brief This allows a console client to call most of the functions in RakPeer -class RAK_DLL_EXPORT RakNetCommandParser : public CommandParserInterface -{ -public: - // GetInstance() and DestroyInstance(instance*) - STATIC_FACTORY_DECLARATIONS(RakNetCommandParser) - - RakNetCommandParser(); - ~RakNetCommandParser(); - - /// Given \a command with parameters \a parameterList , do whatever processing you wish. - /// \param[in] command The command to process - /// \param[in] numParameters How many parameters were passed along with the command - /// \param[in] parameterList The list of parameters. parameterList[0] is the first parameter and so on. - /// \param[in] transport The transport interface we can use to write to - /// \param[in] systemAddress The player that sent this command. - /// \param[in] originalString The string that was actually sent over the network, in case you want to do your own parsing - bool OnCommand(const char *command, unsigned numParameters, char **parameterList, TransportInterface *transport, const SystemAddress &systemAddress, const char *originalString); - - /// You are responsible for overriding this function and returning a static string, which will identifier your parser. - /// This should return a static string - /// \return The name that you return. - const char *GetName(void) const; - - /// A callback for when you are expected to send a brief description of your parser to \a systemAddress - /// \param[in] transport The transport interface we can use to write to - /// \param[in] systemAddress The player that requested help. - void SendHelp(TransportInterface *transport, const SystemAddress &systemAddress); - - /// Records the instance of RakPeer to perform the desired commands on - /// \param[in] rakPeer The RakPeer instance, or a derived class (e.g. RakPeer or RakPeer) - void SetRakPeerInterface(MafiaNet::RakPeerInterface *rakPeer); -protected: - - /// Which instance of RakPeer we are working on. Set from SetRakPeerInterface() - RakPeerInterface *peer; -}; - -} // namespace MafiaNet - -#endif - -#endif // _RAKNET_SUPPORT_* +/* + * Copyright (c) 2026, MafiaHub + * Licensed under MIT-style license + * + * Deprecated include path. "mafianet/commandparser.h" was renamed to "mafianet/RakNetCommandParser.h" so + * every header follows the PascalCase name of the class it declares. This + * forwarding header is kept for one release cycle and will then be removed. + * Define MAFIANET_SILENCE_DEPRECATED_INCLUDES to suppress the message. + */ +#pragma once +#ifndef MAFIANET_SILENCE_DEPRECATED_INCLUDES +#pragma message("mafianet/commandparser.h is deprecated; include mafianet/RakNetCommandParser.h instead") +#endif +#include "RakNetCommandParser.h" diff --git a/Source/include/mafianet/defineoverrides.h b/Source/include/mafianet/defineoverrides.h index f3e874fe4..48637a293 100644 --- a/Source/include/mafianet/defineoverrides.h +++ b/Source/include/mafianet/defineoverrides.h @@ -1,12 +1,14 @@ -/* - * Copyright (c) 2014, Oculus VR, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * RakNet License.txt file in the licenses directory of this source tree. An additional grant - * of patent rights can be found in the RakNet Patents.txt file in the same directory. - * - */ - -// USER EDITABLE FILE - +/* + * Copyright (c) 2026, MafiaHub + * Licensed under MIT-style license + * + * Deprecated include path. "mafianet/defineoverrides.h" was renamed to "mafianet/RakNetDefinesOverrides.h" so + * every header follows the PascalCase name of the class it declares. This + * forwarding header is kept for one release cycle and will then be removed. + * Define MAFIANET_SILENCE_DEPRECATED_INCLUDES to suppress the message. + */ +#pragma once +#ifndef MAFIANET_SILENCE_DEPRECATED_INCLUDES +#pragma message("mafianet/defineoverrides.h is deprecated; include mafianet/RakNetDefinesOverrides.h instead") +#endif +#include "RakNetDefinesOverrides.h" diff --git a/Source/include/mafianet/defines.h b/Source/include/mafianet/defines.h index b4d863e61..4aaf257c6 100644 --- a/Source/include/mafianet/defines.h +++ b/Source/include/mafianet/defines.h @@ -1,227 +1,14 @@ -/* - * Original work: Copyright (c) 2014, Oculus VR, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * RakNet License.txt file in the licenses directory of this source tree. An additional grant - * of patent rights can be found in the RakNet Patents.txt file in the same directory. - * - * - * Modified work: Copyright (c) 2016-2018, SLikeSoft UG (haftungsbeschränkt) - * - * This source code was modified by SLikeSoft. Modifications are licensed under the MIT-style - * license found in the license.txt file in the root directory of this source tree. - */ - -#ifndef __RAKNET_DEFINES_H -#define __RAKNET_DEFINES_H - -#ifdef _RETAIL -// retail builds imply release configurations -#define _RELEASE -#endif - -// If you want to change these defines, put them in RakNetDefinesOverrides so your changes are not lost when updating RakNet -// The user should not edit this file -#include "defineoverrides.h" - -/// Define __GET_TIME_64BIT to have MafiaNet::TimeMS use a 64, rather than 32 bit value. A 32 bit value will overflow after about 5 weeks. -/// However, this doubles the bandwidth use for sending times, so don't do it unless you have a reason to. -/// Comment out if you are using the iPod Touch TG. See http://www.jenkinssoftware.com/forum/index.php?topic=2717.0 -/// This must be the same on all systems, or they won't connect -#ifndef __GET_TIME_64BIT -#define __GET_TIME_64BIT 1 -#endif - -// Define _FILE_AND_LINE_ to "",0 if you want to strip out file and line info for memory tracking from the EXE -// SWIG: This macro must be excluded from generating C# wrappers/interfaces since SWIG would try to handle the -// macro as a constant definition and fail to convert it, issuing the following warning: -// "warning 305: Bad constant value (ignored)." - see SLNET-227 for details -// Since this is not a constant definition at all, the correct solution is to exclude this macro therefore. -#ifndef _FILE_AND_LINE_ -#ifndef SWIG -#ifdef _RETAIL -// retail builds do not contain source-code related information in order to reduce the overall EXE size -#define _FILE_AND_LINE_ "",0 -#else -#define _FILE_AND_LINE_ __FILE__,__LINE__ -#endif // _RETAIL -#endif // SWIG -#endif // _FILE_AND_LINE_ - -/// Define RAKNET_COMPATIBILITY to enable API compatibility with RakNet. -/// This allows you to keep existing code which was compatible with RakNet 4.082 unmodified and -/// use MafiaNet as an in-place replacement for the RakNet library without having to modify any -/// of your code. -// #define RAKNET_COMPATIBILITY - -/// Define __BITSTREAM_NATIVE_END to NOT support endian swapping in the BitStream class. This is faster and is what you should use -/// unless you actually plan to have different endianness systems connect to each other -/// Enabled by default. -// #define __BITSTREAM_NATIVE_END - -/// Maximum (stack) size to use with _alloca before using new and delete instead. -#ifndef MAX_ALLOCA_STACK_ALLOCATION -#define MAX_ALLOCA_STACK_ALLOCATION 1048576 -#endif - -// Use WaitForSingleObject instead of sleep. -// Defining it plays nicer with other systems, and uses less CPU, but gives worse RakNet performance -// Undefining it uses more CPU time, but is more responsive and faster. -#define USE_WAIT_FOR_MULTIPLE_EVENTS - -/// Uncomment to use RakMemoryOverride for custom memory tracking -/// See memoryoverride.h. -#ifndef _USE_RAK_MEMORY_OVERRIDE -#define _USE_RAK_MEMORY_OVERRIDE 0 -#endif - -/// If defined, OpenSSL is enabled for the class TCPInterface -/// This is necessary to use the SendEmail class with Google POP servers -/// Note that OpenSSL carries its own license restrictions that you should be aware of. If you don't agree, don't enable this define -/// This also requires that you enable header search paths to DependentExtensions/openssl/include/[platform] -#ifndef OPEN_SSL_CLIENT_SUPPORT -#define OPEN_SSL_CLIENT_SUPPORT 0 -#endif - -/// Threshold at which to do a malloc / free rather than pushing data onto a fixed stack for the bitstream class -/// Arbitrary size, just picking something likely to be larger than most packets -#ifndef BITSTREAM_STACK_ALLOCATION_SIZE -#define BITSTREAM_STACK_ALLOCATION_SIZE 256 -#endif - -// Redefine if you want to disable or change the target for debug RAKNET_DEBUG_PRINTF -#ifndef RAKNET_DEBUG_PRINTF -#define RAKNET_DEBUG_PRINTF printf -#endif - -#ifndef RAKNET_DEBUG_TPRINTF -#define RAKNET_DEBUG_TPRINTF _tprintf -#endif - -// Maximum number of local IP addresses supported -#ifndef MAXIMUM_NUMBER_OF_INTERNAL_IDS -#define MAXIMUM_NUMBER_OF_INTERNAL_IDS 10 -#endif - -// Maximum size in bytes of a session-handshake payload (see RakPeerInterface::SetSessionConfig). -// Enforced on both send and receive; an oversized inbound payload is a protocol violation and -// closes the connection. The payload rides the reliability layer after MTU negotiation, so it is -// split into ordinary reliable datagrams rather than sent as one oversized burst. -#ifndef MAXIMUM_SESSION_CONFIG_SIZE -#define MAXIMUM_SESSION_CONFIG_SIZE 65536 -#endif - -#ifndef RakAssert -#if defined(_DEBUG) -#define RakAssert(x) assert(x); -#else -#define RakAssert(x) -#endif -#endif - -#if !defined(_DEBUG) -#define SLNET_VERIFY(x) ((void)(x)) -#else -#define SLNET_VERIFY(x) RakAssert(x) -#endif - -/// This controls the amount of memory used per connection. -/// This many datagrams are tracked by datagramNumber. If more than this many datagrams are sent, then an ack for an older datagram would be ignored -/// This results in an unnecessary resend in that case -#ifndef DATAGRAM_MESSAGE_ID_ARRAY_LENGTH -#define DATAGRAM_MESSAGE_ID_ARRAY_LENGTH 512 -#endif - -/// This is the maximum number of reliable user messages that can be on the wire at a time -/// If this is too low, then high ping connections with a large throughput will be underutilized -/// This will be evident because RakNetStatistics::messagesInSend buffer will increase over time, yet at the same time the outgoing bandwidth per second is less than your connection supports -#ifndef RESEND_BUFFER_ARRAY_LENGTH -#define RESEND_BUFFER_ARRAY_LENGTH 512 -#define RESEND_BUFFER_ARRAY_MASK 511 -#endif - -/// Uncomment if you want to link in the DLMalloc library to use with RakMemoryOverride -// #define _LINK_DL_MALLOC - -#ifndef GET_TIME_SPIKE_LIMIT -/// Workaround for http://support.microsoft.com/kb/274323 -/// If two calls between MafiaNet::GetTime() happen farther apart than this time in microseconds, this delta will be returned instead -/// Note: This will cause ID_TIMESTAMP to be temporarily inaccurate if you set a breakpoint that pauses the UpdateNetworkLoop() thread in RakPeer -/// Define in definesoverrides.h to enable (non-zero) or disable (0) -#define GET_TIME_SPIKE_LIMIT 0 -#endif - -// Use sliding window congestion control instead of ping based congestion control -#ifndef USE_SLIDING_WINDOW_CONGESTION_CONTROL -#define USE_SLIDING_WINDOW_CONGESTION_CONTROL 1 -#endif - -// When a large message is arriving, preallocate the memory for the entire block -// This results in large messages not taking up time to reassembly with memcpy, but is vulnerable to attackers causing the host to run out of memory -#ifndef PREALLOCATE_LARGE_MESSAGES -#define PREALLOCATE_LARGE_MESSAGES 0 -#endif - -#ifndef RAKNET_SUPPORT_IPV6 -#define RAKNET_SUPPORT_IPV6 0 -#endif - -#ifndef RAKSTRING_TYPE -#if defined(_UNICODE) -#define RAKSTRING_TYPE RakWString -#define RAKSTRING_TYPE_IS_UNICODE 1 -#else -#define RAKSTRING_TYPE RakString -#define RAKSTRING_TYPE_IS_UNICODE 0 -#endif -#endif - -#ifndef RPC4_GLOBAL_REGISTRATION_MAX_FUNCTIONS -#define RPC4_GLOBAL_REGISTRATION_MAX_FUNCTIONS 48 -#endif - -#ifndef RPC4_GLOBAL_REGISTRATION_MAX_FUNCTION_NAME_LENGTH -#define RPC4_GLOBAL_REGISTRATION_MAX_FUNCTION_NAME_LENGTH 48 -#endif - -// Controls how many allocations occur at once for the memory pool of incoming datagrams waiting to be transferred between the recvfrom thread and the main update thread -// Has large effect on memory usage, per instance of RakPeer. Approximately MAXIMUM_MTU_SIZE*BUFFERED_PACKETS_PAGE_SIZE bytes, once after calling RakPeer::Startup() -#ifndef BUFFERED_PACKETS_PAGE_SIZE -#define BUFFERED_PACKETS_PAGE_SIZE 8 -#endif - -// Controls how many allocations occur at once for the memory pool of incoming or outgoing datagrams. -// Has small effect on memory usage per connection. Uses about 256 bytes*INTERNAL_PACKET_PAGE_SIZE per connection -#ifndef INTERNAL_PACKET_PAGE_SIZE -#define INTERNAL_PACKET_PAGE_SIZE 8 -#endif - -// If defined to 1, the user is responsible for calling RakPeer::RunUpdateCycle and RakPeer::RunRecvfrom -#ifndef RAKPEER_USER_THREADED -#define RAKPEER_USER_THREADED 0 -#endif - -#ifndef USE_ALLOCA -#define USE_ALLOCA 1 -#endif - -//#define USE_THREADED_SEND - -// @since 0.1.1: added -// Controls the maximum retrievable filesize for incoming files using FileListTransfer. -// The configured limit only applies for files which are transferred incrementally (which basically applies to any larger file). -// Note that this also impacts the upper limit for memory allocations. It's suggested to redefine the value to a reasonable smaller size in the defineoverrides.h header file. -// For backwards compatibility with RakNet, the default is set to 4 GiB-1. -// #low - consider introducing GiB/MiB/KiB-functions and then define as GiB(4)? -#ifndef SLNET_MAX_RETRIEVABLE_FILESIZE -#define SLNET_MAX_RETRIEVABLE_FILESIZE (0xFFFFFFFF) -#endif - -// Short-hand alias for the MafiaNet namespace. -// note: we use a preprocessor macro rather than a namespace alias to ensure ABI compatibility with shared -// libraries/DLLs. With a namespace alias the names in the DLLs would still point to the actual namespace -// (MafiaNet) rather than the alias namespace, so the macro simply rewrites MNet to the real MafiaNet namespace. -#define MNet MafiaNet - -#endif // __RAKNET_DEFINES_H +/* + * Copyright (c) 2026, MafiaHub + * Licensed under MIT-style license + * + * Deprecated include path. "mafianet/defines.h" was renamed to "mafianet/RakNetDefines.h" so + * every header follows the PascalCase name of the class it declares. This + * forwarding header is kept for one release cycle and will then be removed. + * Define MAFIANET_SILENCE_DEPRECATED_INCLUDES to suppress the message. + */ +#pragma once +#ifndef MAFIANET_SILENCE_DEPRECATED_INCLUDES +#pragma message("mafianet/defines.h is deprecated; include mafianet/RakNetDefines.h instead") +#endif +#include "RakNetDefines.h" diff --git a/Source/include/mafianet/guid_util.h b/Source/include/mafianet/guid_util.h index c1d47cd34..2883a7708 100644 --- a/Source/include/mafianet/guid_util.h +++ b/Source/include/mafianet/guid_util.h @@ -1,48 +1,14 @@ /* - * Copyright (c) 2024, MafiaHub + * Copyright (c) 2026, MafiaHub + * Licensed under MIT-style license * - * This source code is licensed under the MIT-style license found in the - * license.txt file in the root directory of this source tree. + * Deprecated include path. "mafianet/guid_util.h" was renamed to "mafianet/GuidUtil.h" so + * every header follows the PascalCase name of the class it declares. This + * forwarding header is kept for one release cycle and will then be removed. + * Define MAFIANET_SILENCE_DEPRECATED_INCLUDES to suppress the message. */ - -/// \file -/// \brief Modern, additive value-type accessors layered over the legacy -/// RakNet/SLikeNet value types (\a RakNetGUID, \a SystemAddress). -/// -/// These free functions live alongside the legacy struct methods rather than -/// inside them, so they don't touch the wire-transmitted ABI of \a RakNetGUID. -/// They favour ownership over shared static buffers and \a std::optional over -/// sentinel return values, giving callers thread-safe, leak-free primitives to -/// build cleaner APIs on top of. - -#ifndef __MAFIANET_GUID_UTIL_H -#define __MAFIANET_GUID_UTIL_H - -#include -#include - -#include "types.h" -#include "peerinterface.h" - -namespace MafiaNet { - -/// Return the GUID as an owned \a std::string. -/// -/// Unlike the legacy \a RakNetGUID::ToString() member (which returned a pointer -/// into a rotating, process-wide static buffer and was explicitly NOT thread -/// safe), this allocates a fresh string on every call and shares no state, so -/// it is safe to call concurrently from multiple threads. It is implemented on -/// top of the thread-safe \a RakNetGUID::ToString(char*, size_t) member. -RAK_DLL_EXPORT std::string to_string(const RakNetGUID& g); - -/// Look up the SystemAddress currently connected to \a g. -/// -/// A thin facade over \a RakPeerInterface::GetSystemAddressFromGuid that maps -/// the legacy \a UNASSIGNED_SYSTEM_ADDRESS "none" sentinel to \a std::nullopt, -/// so callers can use ordinary optional handling instead of comparing against a -/// magic value. -RAK_DLL_EXPORT std::optional connected_address(RakPeerInterface& peer, const RakNetGUID& g); - -} // namespace MafiaNet - -#endif // __MAFIANET_GUID_UTIL_H +#pragma once +#ifndef MAFIANET_SILENCE_DEPRECATED_INCLUDES +#pragma message("mafianet/guid_util.h is deprecated; include mafianet/GuidUtil.h instead") +#endif +#include "GuidUtil.h" diff --git a/Source/include/mafianet/linux_adapter.h b/Source/include/mafianet/linux_adapter.h index ee83d384f..dd411f31b 100644 --- a/Source/include/mafianet/linux_adapter.h +++ b/Source/include/mafianet/linux_adapter.h @@ -1,88 +1,14 @@ /* - * Copyright (c) 2016-2019, SLikeSoft UG (haftungsbeschränkt) + * Copyright (c) 2026, MafiaHub + * Licensed under MIT-style license * - * This source code is licensed under the MIT-style license found in the - * license.txt file in the root directory of this source tree. - * - * - * This file declares adapters for all MS-specific functions used throughout MafiaNet. + * Deprecated include path. "mafianet/linux_adapter.h" was renamed to "mafianet/LinuxAdapter.h" so + * every header follows the PascalCase name of the class it declares. This + * forwarding header is kept for one release cycle and will then be removed. + * Define MAFIANET_SILENCE_DEPRECATED_INCLUDES to suppress the message. */ #pragma once - -#ifdef __linux__ -#define _TRUNCATE ((size_t)-1) -typedef int errno_t; - -#include // for va_start, va_end, va_list -#include // for FILE -#include // for time_t - -// MS specific security enhanced functions -errno_t fopen_s(FILE **pfile, const char *filename, const char *mode); -errno_t localtime_s(struct tm* _tm, const time_t *time); -errno_t mbstowcs_s(size_t *pReturnValue, wchar_t *wcstr, size_t sizeInWords, const char *mbstr, size_t count); -int sprintf_s(char *buffer, size_t sizeOfBuffer, const char *format, ...); -errno_t strcat_s(char *strDestination, size_t numberOfElements, const char *strSource); -errno_t strcpy_s(char* strDestination, size_t numberOfElements, const char *strSource); -errno_t strerror_s(char* buffer, size_t numberOfElements, int errnum); -errno_t strncat_s(char *strDest, size_t numberOfElements, const char *strSource, size_t count); -errno_t strncpy_s(char *strDest, size_t numberOfElements, const char *strSource, size_t count); -int vsnprintf_s(char *buffer, size_t sizeOfBuffer, size_t count, const char *format, va_list argptr); -errno_t wcscat_s(wchar_t *strDestination, size_t numberOfElements, const wchar_t *strSource); -errno_t wcscpy_s(wchar_t* strDestination, size_t numberOfElements, const wchar_t *strSource); - -// corresponding template overloads -template errno_t mbstowcs_s(size_t *pReturnValue, wchar_t(&wcstr)[BufferSize], const char *mbstr, size_t count) -{ - return mbstowcs_s(pReturnValue, wcstr, BufferSize, mbstr, count); -} - -template int sprintf_s(char (&buffer)[BufferSize], const char* format, ...) -{ - va_list arglist; - va_start(arglist, format); - int numCharsWritten = vsnprintf_s(buffer, BufferSize, BufferSize - 1, format, arglist); - va_end(arglist); - - return numCharsWritten; -} - -template errno_t strcat_s(char (&strDestination)[BufferSize], const char* strSource) -{ - return strcat_s(strDestination, BufferSize, strSource); -} - -template errno_t strcpy_s(char (&strDestination)[BufferSize], const char* strSource) -{ - return strcpy_s(strDestination, BufferSize, strSource); -} - -template errno_t strerror_s(char(&buffer)[BufferSize], int errnum) -{ - return strerror_s(buffer, BufferSize, errnum); -} - -template errno_t strncat_s(char(&strDest)[BufferSize], const char *strSource, size_t count) -{ - return strncat_s(strDest, BufferSize, strSource, count); -} - -template errno_t strncpy_s(char(&strDest)[BufferSize], const char *strSource, size_t count) -{ - return strncpy_s(strDest, BufferSize, strSource, count); -} - -template int vsnprintf_s(char (&buffer)[BufferSize], size_t count, const char *format, va_list argptr) -{ - return vsnprintf_s(buffer, BufferSize, count, format, argptr); -} - -// MS gets_s function adapter - wraps MafiaNet's Gets function -// Note: Samples should include this header for gets_s support on Linux -#include "Gets.h" -template char* gets_s(char (&buffer)[BufferSize]) -{ - return Gets(buffer, static_cast(BufferSize)); -} - +#ifndef MAFIANET_SILENCE_DEPRECATED_INCLUDES +#pragma message("mafianet/linux_adapter.h is deprecated; include mafianet/LinuxAdapter.h instead") #endif +#include "LinuxAdapter.h" diff --git a/Source/include/mafianet/mafianet.h b/Source/include/mafianet/mafianet.h index 6e4e4b58e..82f8d0ccb 100644 --- a/Source/include/mafianet/mafianet.h +++ b/Source/include/mafianet/mafianet.h @@ -22,15 +22,15 @@ #pragma once -#include "mafianet/peerinterface.h" // RakPeerInterface — main entry point -#include "mafianet/types.h" // Packet, SystemAddress, RakNetGUID, enums +#include "mafianet/RakPeerInterface.h" // RakPeerInterface — main entry point +#include "mafianet/RakNetTypes.h" // Packet, SystemAddress, RakNetGUID, enums #include "mafianet/MessageIdentifiers.h" // ID_* message IDs + ID_USER_PACKET_ENUM #include "mafianet/PacketPriority.h" // MafiaNet::Priority / MafiaNet::Reliability -#include "mafianet/statistics.h" // RakNetStatistics — return type of GetStatistics() +#include "mafianet/RakNetStatistics.h" // RakNetStatistics — return type of GetStatistics() #include "mafianet/BitStream.h" // binary serialization #include "mafianet/Archive.h" // serialize() convention over BitStream #include "mafianet/GetTime.h" // MafiaNet::GetTime / TimeMS -#include "mafianet/guid_util.h" // MafiaNet::to_string / connected_address -#include "mafianet/aliases.h" // canonical aliases: PeerInterface, Guid, Statistics +#include "mafianet/GuidUtil.h" // MafiaNet::to_string / connected_address +#include "mafianet/Aliases.h" // canonical aliases: PeerInterface, Guid, Statistics #include "mafianet/PeerHandle.h" // RAII handles: Peer, PacketPtr #include "mafianet/Dispatcher.h" // typed message dispatcher: Dispatcher, Sender diff --git a/Source/include/mafianet/memoryoverride.h b/Source/include/mafianet/memoryoverride.h index e8fb0dbd1..00e0d0a9b 100644 --- a/Source/include/mafianet/memoryoverride.h +++ b/Source/include/mafianet/memoryoverride.h @@ -1,249 +1,14 @@ -/* - * Original work: Copyright (c) 2014, Oculus VR, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * RakNet License.txt file in the licenses directory of this source tree. An additional grant - * of patent rights can be found in the RakNet Patents.txt file in the same directory. - * - * - * Modified work: Copyright (c) 2017, SLikeSoft UG (haftungsbeschränkt) - * - * This source code was modified by SLikeSoft. Modifications are licensed under the MIT-style - * license found in the license.txt file in the root directory of this source tree. - */ - -/// \file -/// \brief If _USE_RAK_MEMORY_OVERRIDE is defined, memory allocations go through rakMalloc, rakRealloc, and rakFree -/// - - - -#ifndef __RAK_MEMORY_H -#define __RAK_MEMORY_H - -#include "Export.h" -#include "defines.h" -#include - - - - - - - -#include "alloca.h" - -// #if _USE_RAK_MEMORY_OVERRIDE==1 -// #if defined(new) -// #pragma push_macro("new") -// #undef new -// #define RMO_NEW_UNDEF -// #endif -// #endif - - -// These pointers are statically and globally defined in RakMemoryOverride.cpp -// Change them to point to your own allocators if you want. -// Use the functions for a DLL, or just reassign the variable if using source -extern RAK_DLL_EXPORT void * (*rakMalloc) (size_t size); -extern RAK_DLL_EXPORT void * (*rakRealloc) (void *p, size_t size); -extern RAK_DLL_EXPORT void (*rakFree) (void *p); -extern RAK_DLL_EXPORT void * (*rakMalloc_Ex) (size_t size, const char *file, unsigned int line); -extern RAK_DLL_EXPORT void * (*rakRealloc_Ex) (void *p, size_t size, const char *file, unsigned int line); -extern RAK_DLL_EXPORT void (*rakFree_Ex) (void *p, const char *file, unsigned int line); -extern RAK_DLL_EXPORT void (*notifyOutOfMemory) (const char *file, const long line); -extern RAK_DLL_EXPORT void * (*dlMallocMMap) (size_t size); -extern RAK_DLL_EXPORT void * (*dlMallocDirectMMap) (size_t size); -extern RAK_DLL_EXPORT int (*dlMallocMUnmap) (void* ptr, size_t size); - -// Change to a user defined allocation function -void RAK_DLL_EXPORT SetMalloc( void* (*userFunction)(size_t size) ); -void RAK_DLL_EXPORT SetRealloc( void* (*userFunction)(void *p, size_t size) ); -void RAK_DLL_EXPORT SetFree( void (*userFunction)(void *p) ); -void RAK_DLL_EXPORT SetMalloc_Ex( void* (*userFunction)(size_t size, const char *file, unsigned int line) ); -void RAK_DLL_EXPORT SetRealloc_Ex( void* (*userFunction)(void *p, size_t size, const char *file, unsigned int line) ); -void RAK_DLL_EXPORT SetFree_Ex( void (*userFunction)(void *p, const char *file, unsigned int line) ); -// Change to a user defined out of memory function -void RAK_DLL_EXPORT SetNotifyOutOfMemory( void (*userFunction)(const char *file, const long line) ); -void RAK_DLL_EXPORT SetDLMallocMMap( void* (*userFunction)(size_t size) ); -void RAK_DLL_EXPORT SetDLMallocDirectMMap( void* (*userFunction)(size_t size) ); -void RAK_DLL_EXPORT SetDLMallocMUnmap( int (*userFunction)(void* ptr, size_t size) ); - -extern RAK_DLL_EXPORT void * (*GetMalloc()) (size_t size); -extern RAK_DLL_EXPORT void * (*GetRealloc()) (void *p, size_t size); -extern RAK_DLL_EXPORT void (*GetFree()) (void *p); -extern RAK_DLL_EXPORT void * (*GetMalloc_Ex()) (size_t size, const char *file, unsigned int line); -extern RAK_DLL_EXPORT void * (*GetRealloc_Ex()) (void *p, size_t size, const char *file, unsigned int line); -extern RAK_DLL_EXPORT void (*GetFree_Ex()) (void *p, const char *file, unsigned int line); -extern RAK_DLL_EXPORT void *(*GetDLMallocMMap())(size_t size); -extern RAK_DLL_EXPORT void *(*GetDLMallocDirectMMap())(size_t size); -extern RAK_DLL_EXPORT int (*GetDLMallocMUnmap())(void* ptr, size_t size); - -namespace MafiaNet -{ - - template - RAK_DLL_EXPORT Type* OP_NEW(const char *file, unsigned int line) - { -#if _USE_RAK_MEMORY_OVERRIDE==1 - char *buffer = (char *) (GetMalloc_Ex())(sizeof(Type), file, line); - Type *t = new (buffer) Type; - return t; -#else - (void) file; - (void) line; - return new Type; -#endif - } - - template - RAK_DLL_EXPORT Type* OP_NEW_1(const char *file, unsigned int line, const P1 &p1) - { -#if _USE_RAK_MEMORY_OVERRIDE==1 - char *buffer = (char *) (GetMalloc_Ex())(sizeof(Type), file, line); - Type *t = new (buffer) Type(p1); - return t; -#else - (void) file; - (void) line; - return new Type(p1); -#endif - } - - template - RAK_DLL_EXPORT Type* OP_NEW_2(const char *file, unsigned int line, const P1 &p1, const P2 &p2) - { -#if _USE_RAK_MEMORY_OVERRIDE==1 - char *buffer = (char *) (GetMalloc_Ex())(sizeof(Type), file, line); - Type *t = new (buffer) Type(p1, p2); - return t; -#else - (void) file; - (void) line; - return new Type(p1, p2); -#endif - } - - template - RAK_DLL_EXPORT Type* OP_NEW_3(const char *file, unsigned int line, const P1 &p1, const P2 &p2, const P3 &p3) - { -#if _USE_RAK_MEMORY_OVERRIDE==1 - char *buffer = (char *) (GetMalloc_Ex())(sizeof(Type), file, line); - Type *t = new (buffer) Type(p1, p2, p3); - return t; -#else - (void) file; - (void) line; - return new Type(p1, p2, p3); -#endif - } - - template - RAK_DLL_EXPORT Type* OP_NEW_4(const char *file, unsigned int line, const P1 &p1, const P2 &p2, const P3 &p3, const P4 &p4) - { -#if _USE_RAK_MEMORY_OVERRIDE==1 - char *buffer = (char *) (GetMalloc_Ex())(sizeof(Type), file, line); - Type *t = new (buffer) Type(p1, p2, p3, p4); - return t; -#else - (void) file; - (void) line; - return new Type(p1, p2, p3, p4); -#endif - } - - - template - RAK_DLL_EXPORT Type* OP_NEW_ARRAY(const int count, const char *file, unsigned int line) - { - if (count==0) - return 0; - -#if _USE_RAK_MEMORY_OVERRIDE==1 -// Type *t; - char *buffer = (char *) (GetMalloc_Ex())(sizeof(int)+sizeof(Type)*count, file, line); - ((int*)buffer)[0]=count; - for (int i=0; i - RAK_DLL_EXPORT void OP_DELETE(Type *buff, const char *file, unsigned int line) - { -#if _USE_RAK_MEMORY_OVERRIDE==1 - if (buff==0) return; - buff->~Type(); - (GetFree_Ex())((char*)buff, file, line ); -#else - (void) file; - (void) line; - delete buff; -#endif - - } - - template - RAK_DLL_EXPORT void OP_DELETE_ARRAY(Type *buff, const char *file, unsigned int line) - { -#if _USE_RAK_MEMORY_OVERRIDE==1 - if (buff==0) - return; - - int count = ((int*)((char*)buff-sizeof(int)))[0]; - Type *t; - for (int i=0; i~Type(); - } - (GetFree_Ex())((char*)buff-sizeof(int), file, line ); -#else - (void) file; - (void) line; - delete [] buff; -#endif - - } - - void RAK_DLL_EXPORT * _RakMalloc (size_t size); - void RAK_DLL_EXPORT * _RakRealloc (void *p, size_t size); - void RAK_DLL_EXPORT _RakFree (void *p); - void RAK_DLL_EXPORT * _RakMalloc_Ex (size_t size, const char *file, unsigned int line); - void RAK_DLL_EXPORT * _RakRealloc_Ex (void *p, size_t size, const char *file, unsigned int line); - void RAK_DLL_EXPORT _RakFree_Ex (void *p, const char *file, unsigned int line); - void RAK_DLL_EXPORT * _DLMallocMMap (size_t size); - void RAK_DLL_EXPORT * _DLMallocDirectMMap (size_t size); - int RAK_DLL_EXPORT _DLMallocMUnmap (void *p, size_t size); - -} - -// Call to make RakNet allocate a large block of memory, and do all subsequent allocations in that memory block -// Initial and reallocations will be done through whatever function is pointed to by yourMMapFunction, and yourDirectMMapFunction (default is malloc) -// Allocations will be freed through whatever function is pointed to by yourMUnmapFunction (default free) -void UseRaknetFixedHeap(size_t initialCapacity, - void * (*yourMMapFunction) (size_t size) = MafiaNet::_DLMallocMMap, - void * (*yourDirectMMapFunction) (size_t size) = MafiaNet::_DLMallocDirectMMap, - int (*yourMUnmapFunction) (void *p, size_t size) = MafiaNet::_DLMallocMUnmap); - -// Free memory allocated from UseRaknetFixedHeap -void FreeRakNetFixedHeap(void); - -// #if _USE_RAK_MEMORY_OVERRIDE==1 -// #if defined(RMO_NEW_UNDEF) -// #pragma pop_macro("new") -// #undef RMO_NEW_UNDEF -// #endif -// #endif - -#endif +/* + * Copyright (c) 2026, MafiaHub + * Licensed under MIT-style license + * + * Deprecated include path. "mafianet/memoryoverride.h" was renamed to "mafianet/RakMemoryOverride.h" so + * every header follows the PascalCase name of the class it declares. This + * forwarding header is kept for one release cycle and will then be removed. + * Define MAFIANET_SILENCE_DEPRECATED_INCLUDES to suppress the message. + */ +#pragma once +#ifndef MAFIANET_SILENCE_DEPRECATED_INCLUDES +#pragma message("mafianet/memoryoverride.h is deprecated; include mafianet/RakMemoryOverride.h instead") +#endif +#include "RakMemoryOverride.h" diff --git a/Source/include/mafianet/osx_adapter.h b/Source/include/mafianet/osx_adapter.h index 1b0273b57..fabe372e3 100644 --- a/Source/include/mafianet/osx_adapter.h +++ b/Source/include/mafianet/osx_adapter.h @@ -1,91 +1,14 @@ /* - * Copyright (c) 2016-2019, SLikeSoft UG (haftungsbeschränkt) + * Copyright (c) 2026, MafiaHub + * Licensed under MIT-style license * - * This source code is licensed under the MIT-style license found in the - * license.txt file in the root directory of this source tree. - * - * - * This file declares adapters for all MS-specific functions used throughout MafiaNet. + * Deprecated include path. "mafianet/osx_adapter.h" was renamed to "mafianet/OsxAdapter.h" so + * every header follows the PascalCase name of the class it declares. This + * forwarding header is kept for one release cycle and will then be removed. + * Define MAFIANET_SILENCE_DEPRECATED_INCLUDES to suppress the message. */ #pragma once - -#ifdef __APPLE__ -#define _TRUNCATE ((size_t)-1) -typedef int errno_t; - -#include // for va_start, va_end, va_list -#include // for FILE -#include // for time_t - -// MS specific string functions -char *_strlwr(char *str); - -// MS specific security enhanced functions -errno_t fopen_s(FILE **pfile, const char *filename, const char *mode); -errno_t localtime_s(struct tm* _tm, const time_t *time); -errno_t mbstowcs_s(size_t *pReturnValue, wchar_t *wcstr, size_t sizeInWords, const char *mbstr, size_t count); -int sprintf_s(char *buffer, size_t sizeOfBuffer, const char *format, ...); -errno_t strcat_s(char *strDestination, size_t numberOfElements, const char *strSource); -errno_t strcpy_s(char* strDestination, size_t numberOfElements, const char *strSource); -errno_t strerror_s(char* buffer, size_t numberOfElements, int errnum); -errno_t strncat_s(char *strDest, size_t numberOfElements, const char *strSource, size_t count); -errno_t strncpy_s(char *strDest, size_t numberOfElements, const char *strSource, size_t count); -int vsnprintf_s(char *buffer, size_t sizeOfBuffer, size_t count, const char *format, va_list argptr); -errno_t wcscat_s(wchar_t *strDestination, size_t numberOfElements, const wchar_t *strSource); -errno_t wcscpy_s(wchar_t* strDestination, size_t numberOfElements, const wchar_t *strSource); - -// corresponding template overloads -template errno_t mbstowcs_s(size_t *pReturnValue, wchar_t(&wcstr)[BufferSize], const char *mbstr, size_t count) -{ - return mbstowcs_s(pReturnValue, wcstr, BufferSize, mbstr, count); -} - -template int sprintf_s(char (&buffer)[BufferSize], const char* format, ...) -{ - va_list arglist; - va_start(arglist, format); - int numCharsWritten = vsnprintf_s(buffer, BufferSize, BufferSize - 1, format, arglist); - va_end(arglist); - - return numCharsWritten; -} - -template errno_t strcat_s(char (&strDestination)[BufferSize], const char* strSource) -{ - return strcat_s(strDestination, BufferSize, strSource); -} - -template errno_t strcpy_s(char (&strDestination)[BufferSize], const char* strSource) -{ - return strcpy_s(strDestination, BufferSize, strSource); -} - -template errno_t strerror_s(char(&buffer)[BufferSize], int errnum) -{ - return strerror_s(buffer, BufferSize, errnum); -} - -template errno_t strncat_s(char (&strDest)[BufferSize], const char *strSource, size_t count) -{ - return strncat_s(strDest, BufferSize, strSource, count); -} - -template errno_t strncpy_s(char (&strDest)[BufferSize], const char *strSource, size_t count) -{ - return strncpy_s(strDest, BufferSize, strSource, count); -} - -template int vsnprintf_s(char (&buffer)[BufferSize], size_t count, const char *format, va_list argptr) -{ - return vsnprintf_s(buffer, BufferSize, count, format, argptr); -} - -// MS gets_s function adapter - wraps MafiaNet's Gets function -// Note: Samples should include this header for gets_s support on macOS -#include "Gets.h" -template char* gets_s(char (&buffer)[BufferSize]) -{ - return Gets(buffer, static_cast(BufferSize)); -} - +#ifndef MAFIANET_SILENCE_DEPRECATED_INCLUDES +#pragma message("mafianet/osx_adapter.h is deprecated; include mafianet/OsxAdapter.h instead") #endif +#include "OsxAdapter.h" diff --git a/Source/include/mafianet/peer.h b/Source/include/mafianet/peer.h index d8eac5694..593ed8c87 100644 --- a/Source/include/mafianet/peer.h +++ b/Source/include/mafianet/peer.h @@ -1,1178 +1,14 @@ -/* - * Original work: Copyright (c) 2014, Oculus VR, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * RakNet License.txt file in the licenses directory of this source tree. An additional grant - * of patent rights can be found in the RakNet Patents.txt file in the same directory. - * - * - * Modified work: Copyright (c) 2017-2018, SLikeSoft UG (haftungsbeschränkt) - * - * This source code was modified by SLikeSoft. Modifications are licensed under the MIT-style - * license found in the license.txt file in the root directory of this source tree. - */ - -/// \file -/// \brief Declares RakPeer class. -/// - - -// TODO - RakNet 4 - Add network simulator -// TODO - RakNet 4 - Enable disabling flow control per connections - -#ifndef __RAK_PEER_H -#define __RAK_PEER_H - -#include "ReliabilityLayer.h" -#include "peerinterface.h" -#include "BitStream.h" -#include "SingleProducerConsumer.h" -#include "SimpleMutex.h" -#include "DS_OrderedList.h" -#include "Export.h" -#include "string.h" -#include "thread.h" -//#include "socket.h" -#include "smartptr.h" -#include "DS_ThreadsafeAllocatingQueue.h" -#include "SignaledEvent.h" -#include "NativeFeatureIncludes.h" -#include "SecureHandshake.h" -#include "LocklessTypes.h" -#include "DS_Queue.h" - -namespace MafiaNet { -/// Forward declarations -class HuffmanEncodingTree; -class PluginInterface2; - -// Sucks but this struct has to be outside the class. Inside and DevCPP won't let you refer to the struct as RakPeer::RemoteSystemIndex while GCC -// forces you to do RakPeer::RemoteSystemIndex -struct RemoteSystemIndex{unsigned index; RemoteSystemIndex *next;}; -//int RAK_DLL_EXPORT SystemAddressAndIndexComp( const SystemAddress &key, const RemoteSystemIndex &data ); // GCC requires RakPeer::RemoteSystemIndex or it won't compile - -///\brief Main interface for network communications. -/// \details It implements most of RakNet's functionality and is the primary interface for RakNet. -/// -/// Inherits RakPeerInterface. -/// -/// See the individual functions for what the class can do. -/// -class RAK_DLL_EXPORT RakPeer : public RakPeerInterface, public RNS2EventHandler -{ -public: - ///Constructor - RakPeer(); - - ///Destructor - virtual ~RakPeer(); - - // --------------------------------------------------------------------------------------------Major Low Level Functions - Functions needed by most users-------------------------------------------------------------------------------------------- - /// \brief Starts the network threads and opens the listen port. - /// \details You must call this before calling Connect(). - /// \pre On the PS3, call Startup() after Client_Login() - /// \note Multiple calls while already active are ignored. To call this function again with different settings, you must first call Shutdown(). - /// \note Call SetMaximumIncomingConnections if you want to accept incoming connections. - /// \param[in] maxConnections Maximum number of connections between this instance of RakPeer and another instance of RakPeer. Required so that the network can preallocate and for thread safety. A pure client would set this to 1. A pure server would set it to the number of allowed clients.A hybrid would set it to the sum of both types of connections. - /// \param[in] localPort The port to listen for connections on. On linux the system may be set up so thast ports under 1024 are restricted for everything but the root user. Use a higher port for maximum compatibility. - /// \param[in] socketDescriptors An array of SocketDescriptor structures to force RakNet to listen on a particular IP address or port (or both). Each SocketDescriptor will represent one unique socket. Do not pass redundant structures. To listen on a specific port, you can pass SocketDescriptor(myPort,0); such as for a server. For a client, it is usually OK to just pass SocketDescriptor(); - /// \param[in] socketDescriptorCount The size of the \a socketDescriptors array. Pass 1 if you are not sure what to pass. - /// \param[in] threadPriority Passed to the thread creation routine. Use THREAD_PRIORITY_NORMAL for Windows. For Linux based systems, you MUST pass something reasonable based on the thread priorities for your application. - /// \return RAKNET_STARTED on success, otherwise appropriate failure enumeration. - StartupResult Startup( unsigned int maxConnections, SocketDescriptor *socketDescriptors, unsigned socketDescriptorCount, int threadPriority=-99999 ); - - /// If you accept connections, you must call this or else security will not be enabled for incoming connections. - /// This feature requires more round trips, bandwidth, and CPU time for the connection handshake - /// x64 builds require under 25% of the CPU time of other builds - /// See the Encryption sample for example usage - /// \pre Must be called while offline - /// \pre LIBCAT_SECURITY must be defined to 1 in NativeFeatureIncludes.h for this function to have any effect - /// \param[in] publicKey A pointer to the public key for accepting new connections - /// \param[in] privateKey A pointer to the private key for accepting new connections - /// \param[in] bRequireClientKey: Should be set to false for most servers. Allows the server to accept a public key from connecting clients as a proof of identity but eats twice as much CPU time as a normal connection - bool InitializeSecurity( const char *publicKey, const char *privateKey, bool bRequireClientKey = false ); - - /// Disables security for incoming connections. - /// \note Must be called while offline - void DisableSecurity( void ); - - /// \brief This is useful if you have a fixed-address internal server behind a LAN. - /// - /// Secure connections are determined by the recipient of an incoming connection. This has no effect if called on the system attempting to connect. - /// \note If secure connections are on, do not use secure connections for a specific IP address. - /// \param[in] ip IP address to add. * wildcards are supported. - void AddToSecurityExceptionList(const char *ip); - - /// \brief Remove a specific connection previously added via AddToSecurityExceptionList. - /// \param[in] ip IP address to remove. Pass 0 to remove all IP addresses. * wildcards are supported. - void RemoveFromSecurityExceptionList(const char *ip); - - /// \brief Checks to see if a given IP is in the security exception list. - /// \param[in] IP address to check. - /// \return True if the IP address is found in security exception list, else returns false. - bool IsInSecurityExceptionList(const char *ip); - - /// \brief Sets the maximum number of incoming connections allowed. - /// \details If the number of incoming connections is less than the number of players currently connected, - /// no more players will be allowed to connect. If this is greater than the maximum number of peers allowed, - /// it will be reduced to the maximum number of peers allowed. - /// - /// Defaults to 0, meaning by default, nobody can connect to you - /// \param[in] numberAllowed Maximum number of incoming connections allowed. - void SetMaximumIncomingConnections( unsigned short numberAllowed ); - - /// \brief Returns the value passed to SetMaximumIncomingConnections(). - /// \return Maximum number of incoming connections, which is always <= maxConnections - unsigned int GetMaximumIncomingConnections( void ) const; - - /// \brief Returns how many open connections exist at this time. - /// \return Number of open connections. - unsigned short NumberOfConnections(void) const; - - /// \brief Sets the password for the incoming connections. - /// \details The password must match in the call to Connect (defaults to none). - /// Pass 0 to passwordData to specify no password. - /// This is a way to set a low level password for all incoming connections. To selectively reject connections, implement your own scheme using CloseConnection() to remove unwanted connections. - /// \param[in] passwordData A data block that incoming connections must match. This can be just a password, or can be a stream of data. Specify 0 for no password data - /// \param[in] passwordDataLength The length in bytes of passwordData - void SetIncomingPassword( const char* passwordData, int passwordDataLength ); - - /// \brief Gets the password passed to SetIncomingPassword - /// \param[out] passwordData Should point to a block large enough to hold the password data you passed to SetIncomingPassword() - /// \param[in,out] passwordDataLength Maximum size of the passwordData array. Modified to hold the number of bytes actually written. - void GetIncomingPassword( char* passwordData, int *passwordDataLength ); - - /// \brief Connect to the specified host (ip or domain name) and server port. - /// \details Calling Connect and not calling SetMaximumIncomingConnections acts as a dedicated client. - /// Calling both acts as a true peer. - /// - /// This is a non-blocking connection. - /// - /// The connection is successful when GetConnectionState() returns IS_CONNECTED or Receive() gets a message with the type identifier ID_CONNECTION_REQUEST_ACCEPTED. - /// If the connection is not successful, such as a rejected connection or no response then neither of these things will happen. - /// \pre Requires that you first call Startup(). - /// \param[in] host Either a dotted IP address or a domain name. - /// \param[in] remotePort Port to connect to on the remote machine. - /// \param[in] passwordData A data block that must match the data block on the server passed to SetIncomingPassword(). This can be a string or can be a stream of data. Use 0 for no password. - /// \param[in] passwordDataLength The length in bytes of passwordData. - /// \param[in] publicKey The public key the server is using. If 0, the server is not using security. If non-zero, the publicKeyMode member determines how to connect - /// \param[in] connectionSocketIndex Index into the array of socket descriptors passed to socketDescriptors in RakPeer::Startup() to determine the one to send on. - /// \param[in] sendConnectionAttemptCount Number of datagrams to send to the other system to try to connect. - /// \param[in] timeBetweenSendConnectionAttemptsMS Time to elapse before a datagram is sent to the other system to try to connect. After sendConnectionAttemptCount number of attempts, ID_CONNECTION_ATTEMPT_FAILED is returned. Under low bandwidth conditions with multiple simultaneous outgoing connections, this value should be raised to 1000 or higher, or else the MTU detection can overrun the available bandwidth. - /// \param[in] timeoutTime Time to elapse before dropping the connection if a reliable message could not be sent. 0 to use the default value from SetTimeoutTime(UNASSIGNED_SYSTEM_ADDRESS); - /// \return CONNECTION_ATTEMPT_STARTED on successful initiation. Otherwise, an appropriate enumeration indicating failure. - /// \note CONNECTION_ATTEMPT_STARTED does not mean you are already connected! - /// \note It is possible to immediately get back ID_CONNECTION_ATTEMPT_FAILED if you exceed the maxConnections parameter passed to Startup(). This could happen if you call CloseConnection() with sendDisconnectionNotificaiton true, then immediately call Connect() before the connection has closed. - ConnectionAttemptResult Connect( const char* host, unsigned short remotePort, const char *passwordData, int passwordDataLength, PublicKey *publicKey=0, unsigned connectionSocketIndex=0, unsigned sendConnectionAttemptCount=6, unsigned timeBetweenSendConnectionAttemptsMS=1000, MafiaNet::TimeMS timeoutTime=0 ); - - /// \brief Connect to the specified host (ip or domain name) and server port. - /// \param[in] host Either a dotted IP address or a domain name. - /// \param[in] remotePort Which port to connect to on the remote machine. - /// \param[in] passwordData A data block that must match the data block on the server passed to SetIncomingPassword(). This can be a string or can be a stream of data. Use 0 for no password. - /// \param[in] passwordDataLength The length in bytes of passwordData. - /// \param[in] socket A bound socket returned by another instance of RakPeerInterface. - /// \param[in] sendConnectionAttemptCount Number of datagrams to send to the other system to try to connect. - /// \param[in] timeBetweenSendConnectionAttemptsMS Time to elapse before a datagram is sent to the other system to try to connect. After sendConnectionAttemptCount number of attempts, ID_CONNECTION_ATTEMPT_FAILED is returned.. Under low bandwidth conditions with multiple simultaneous outgoing connections, this value should be raised to 1000 or higher, or else the MTU detection can overrun the available bandwidth. - /// \param[in] timeoutTime Time to elapse before dropping the connection if a reliable message could not be sent. 0 to use the default from SetTimeoutTime(UNASSIGNED_SYSTEM_ADDRESS); - /// \return CONNECTION_ATTEMPT_STARTED on successful initiation. Otherwise, an appropriate enumeration indicating failure. - /// \note CONNECTION_ATTEMPT_STARTED does not mean you are already connected! - virtual ConnectionAttemptResult ConnectWithSocket(const char* host, unsigned short remotePort, const char *passwordData, int passwordDataLength, RakNetSocket2* socket, PublicKey *publicKey=0, unsigned sendConnectionAttemptCount=6, unsigned timeBetweenSendConnectionAttemptsMS=1000, MafiaNet::TimeMS timeoutTime=0); - - /* /// \brief Connect to the specified network ID (Platform specific console function) - /// \details Does built-in NAT traversal - /// \param[in] networkServiceId Network ID structure for the online service - /// \param[in] passwordData A data block that must match the data block on the server passed to SetIncomingPassword(). This can be a string or can be a stream of data. Use 0 for no password. - /// \param[in] passwordDataLength The length in bytes of passwordData. - //bool Console2LobbyConnect( void *networkServiceId, const char *passwordData, int passwordDataLength );*/ - - /// \brief Stops the network threads and closes all connections. - /// \param[in] blockDuration Wait time(milli seconds) for all remaining messages to go out, including ID_DISCONNECTION_NOTIFICATION. If 0, it doesn't wait at all. - /// \param[in] orderingChannel Channel on which ID_DISCONNECTION_NOTIFICATION will be sent, if blockDuration > 0. - /// \param[in] disconnectionNotificationPriority Priority at which ID_DISCONNECTION_NOTIFICATION is sent. Note that a blockDuration of 0 means the threads stop without waiting for it to flush. - void Shutdown( unsigned int blockDuration, unsigned char orderingChannel=0, MafiaNet::Priority disconnectionNotificationPriority=MafiaNet::Priority::Low ); - - /// \brief Returns true if the network thread is running. - /// \return True if the network thread is running, False otherwise - bool IsActive( void ) const; - - /// \brief Fills the array remoteSystems with the SystemAddress of all the systems we are connected to. - /// \param[out] remoteSystems An array of SystemAddress structures, to be filled with the SystemAddresss of the systems we are connected to. Pass 0 to remoteSystems to get the number of systems we are connected to. - /// \param[in, out] numberOfSystems As input, the size of remoteSystems array. As output, the number of elements put into the array. - bool GetConnectionList( SystemAddress *remoteSystems, unsigned short *numberOfSystems ) const; - - /// Returns the next uint32_t that Send() will return - /// \note If using RakPeer from multiple threads, this may not be accurate for your thread. Use IncrementNextSendReceipt() in that case. - /// \return The next uint32_t that Send() or SendList will return - virtual uint32_t GetNextSendReceipt(void); - - /// Returns the next uint32_t that Send() will return, and increments the value by one - /// \note If using RakPeer from multiple threads, pass this to forceReceipt in the send function - /// \return The next uint32_t that Send() or SendList will return - virtual uint32_t IncrementNextSendReceipt(void); - - /// \brief Sends a block of data to the specified system that you are connected to. - /// \note This function only works while connected. - /// \note The first byte should be a message identifier starting at ID_USER_PACKET_ENUM. - /// \param[in] data Block of data to send. - /// \param[in] length Size in bytes of the data to send. - /// \param[in] priority Priority level to send on. See PacketPriority.h - /// \param[in] reliability How reliably to send this data. See PacketPriority.h - /// \param[in] orderingChannel When using ordered or sequenced messages, the channel to order these on. Messages are only ordered relative to other messages on the same stream. - /// \param[in] systemIdentifier Who to send this packet to, or in the case of broadcasting who not to send it to. Pass either a SystemAddress structure or a RakNetGUID structure. Use UNASSIGNED_SYSTEM_ADDRESS or to specify none - /// \param[in] broadcast True to send this packet to all connected systems. If true, then systemAddress specifies who not to send the packet to. - /// \param[in] forceReceipt If 0, will automatically determine the receipt number to return. If non-zero, will return what you give it. - /// \return 0 on bad input. Otherwise a number that identifies this message. If \a reliability is a type that returns a receipt, on a later call to Receive() you will get ID_SND_RECEIPT_ACKED or ID_SND_RECEIPT_LOSS with bytes 1-4 inclusive containing this number - uint32_t Send( const char *data, const int length, MafiaNet::Priority priority, MafiaNet::Reliability reliability, char orderingChannel, const AddressOrGUID systemIdentifier, bool broadcast, uint32_t forceReceiptNumber=0 ); - - /// \brief "Send" to yourself rather than a remote system. - /// \details The message will be processed through the plugins and returned to the game as usual. - /// This function works anytime - /// \note The first byte should be a message identifier starting at ID_USER_PACKET_ENUM - /// \param[in] data Block of data to send. - /// \param[in] length Size in bytes of the data to send. - void SendLoopback( const char *data, const int length ); - - /// \brief Sends a block of data to the specified system that you are connected to. - /// - /// Same as the above version, but takes a BitStream as input. - /// \param[in] bitStream Bitstream to send - /// \param[in] priority Priority level to send on. See PacketPriority.h - /// \param[in] reliability How reliably to send this data. See PacketPriority.h - /// \param[in] orderingChannel Channel to order the messages on, when using ordered or sequenced messages. Messages are only ordered relative to other messages on the same stream. - /// \param[in] systemIdentifier System Address or RakNetGUID to send this packet to, or in the case of broadcasting, the address not to send it to. Use UNASSIGNED_SYSTEM_ADDRESS to specify none. - /// \param[in] broadcast True to send this packet to all connected systems. If true, then systemAddress specifies who not to send the packet to. - /// \param[in] forceReceipt If 0, will automatically determine the receipt number to return. If non-zero, will return what you give it. - /// \return 0 on bad input. Otherwise a number that identifies this message. If \a reliability is a type that returns a receipt, on a later call to Receive() you will get ID_SND_RECEIPT_ACKED or ID_SND_RECEIPT_LOSS with bytes 1-4 inclusive containing this number - /// \note COMMON MISTAKE: When writing the first byte, bitStream->Write((unsigned char) ID_MY_TYPE) be sure it is casted to a byte, and you are not writing a 4 byte enumeration. - uint32_t Send( const MafiaNet::BitStream * bitStream, MafiaNet::Priority priority, MafiaNet::Reliability reliability, char orderingChannel, const AddressOrGUID systemIdentifier, bool broadcast, uint32_t forceReceiptNumber=0 ); - - /// \brief Sends multiple blocks of data, concatenating them automatically. - /// - /// This is equivalent to: - /// MafiaNet::BitStream bs; - /// bs.WriteAlignedBytes(block1, blockLength1); - /// bs.WriteAlignedBytes(block2, blockLength2); - /// bs.WriteAlignedBytes(block3, blockLength3); - /// Send(&bs, ...) - /// - /// This function only works when connected. - /// \param[in] data An array of pointers to blocks of data - /// \param[in] lengths An array of integers indicating the length of each block of data - /// \param[in] numParameters Length of the arrays data and lengths - /// \param[in] priority Priority level to send on. See PacketPriority.h - /// \param[in] reliability How reliably to send this data. See PacketPriority.h - /// \param[in] orderingChannel Channel to order the messages on, when using ordered or sequenced messages. Messages are only ordered relative to other messages on the same stream. - /// \param[in] systemIdentifier System Address or RakNetGUID to send this packet to, or in the case of broadcasting, the address not to send it to. Use UNASSIGNED_SYSTEM_ADDRESS to specify none. - /// \param[in] broadcast True to send this packet to all connected systems. If true, then systemAddress specifies who not to send the packet to. - /// \param[in] forceReceipt If 0, will automatically determine the receipt number to return. If non-zero, will return what you give it. - /// \return 0 on bad input. Otherwise a number that identifies this message. If \a reliability is a type that returns a receipt, on a later call to Receive() you will get ID_SND_RECEIPT_ACKED or ID_SND_RECEIPT_LOSS with bytes 1-4 inclusive containing this number - uint32_t SendList( const char **data, const int *lengths, const int numParameters, MafiaNet::Priority priority, MafiaNet::Reliability reliability, char orderingChannel, const AddressOrGUID systemIdentifier, bool broadcast, uint32_t forceReceiptNumber=0 ); - - /// \brief Gets a message from the incoming message queue. - /// \details Use DeallocatePacket() to deallocate the message after you are done with it. - /// User-thread functions, such as RPC calls and the plugin function PluginInterface::Update occur here. - /// \return 0 if no packets are waiting to be handled, otherwise a pointer to a packet. - /// \note COMMON MISTAKE: Be sure to call this in a loop, once per game tick, until it returns 0. If you only process one packet per game tick they will buffer up. - /// \sa types.h contains struct Packet. - Packet* Receive( void ); - - /// \brief Call this to deallocate a message returned by Receive() when you are done handling it. - /// \param[in] packet Message to deallocate. - void DeallocatePacket( Packet *packet ); - - /// \brief Return the total number of connections we are allowed. - /// \return Total number of connections allowed. - unsigned int GetMaximumNumberOfPeers( void ) const; - - // -------------------------------------------------------------------------------------------- Connection Management Functions-------------------------------------------------------------------------------------------- - /// \brief Close the connection to another host (if we initiated the connection it will disconnect, if they did it will kick them out). - /// \details This method closes the connection irrespective of who initiated the connection. - /// \param[in] target Which system to close the connection to. - /// \param[in] sendDisconnectionNotification True to send ID_DISCONNECTION_NOTIFICATION to the recipient. False to close it silently. - /// \param[in] channel Which ordering channel to send the disconnection notification on, if any - /// \param[in] disconnectionNotificationPriority Priority to send ID_DISCONNECTION_NOTIFICATION on. - void CloseConnection( const AddressOrGUID target, bool sendDisconnectionNotification, unsigned char orderingChannel=0, MafiaNet::Priority disconnectionNotificationPriority=MafiaNet::Priority::Low, const MafiaNet::BitStream *reasonData=nullptr ); - - /// \brief Cancel a pending connection attempt. - /// \details If we are already connected, the connection stays open - /// \param[in] target Target system to cancel. - void CancelConnectionAttempt( const SystemAddress target ); - /// Returns if a system is connected, disconnected, connecting in progress, or various other states - /// \param[in] systemIdentifier The system we are referring to - /// \note This locks a mutex, do not call too frequently during connection attempts or the attempt will take longer and possibly even timeout - /// \return What state the remote system is in - ConnectionState GetConnectionState(const AddressOrGUID systemIdentifier); - - /// \brief Given \a systemAddress, returns its index into remoteSystemList. - /// \details Values range from 0 to the maximum number of players allowed - 1. - /// This includes systems which were formerly connected, but are now not connected. - /// \param[in] systemAddress The SystemAddress we are referring to - /// \return The index of this SystemAddress or -1 on system not found. - int GetIndexFromSystemAddress( const SystemAddress systemAddress ) const; - - /// \brief Given \a index into remoteSystemList, will return a SystemAddress. - /// This function is only useful for looping through all systems. - /// - /// \param[in] index Index should range between 0 and the maximum number of players allowed - 1. - /// \return The SystemAddress structure corresponding to \a index in remoteSystemList. - SystemAddress GetSystemAddressFromIndex( unsigned int index ); - - /// \brief Same as GetSystemAddressFromIndex but returns RakNetGUID - /// \param[in] index Index should range between 0 and the maximum number of players allowed - 1. - /// \return The RakNetGUID - RakNetGUID GetGUIDFromIndex( unsigned int index ); - - /// \brief Same as calling GetSystemAddressFromIndex and GetGUIDFromIndex for all systems, but more efficient - /// Indices match each other, so \a addresses[0] and \a guids[0] refer to the same system - /// \param[out] addresses All system addresses. Size of the list is the number of connections. Size of the \a addresses list will match the size of the \a guids list. - /// \param[out] guids All guids. Size of the list is the number of connections. Size of the list will match the size of the \a addresses list. - void GetSystemList(DataStructures::List &addresses, DataStructures::List &guids) const; - - /// \brief Bans an IP from connecting. - /// \details Banned IPs persist between connections but are not saved on shutdown nor loaded on startup. - /// \param[in] IP Dotted IP address. You can use * for a wildcard address, such as 128.0.0. * will ban all IP addresses starting with 128.0.0. - /// \param[in] milliseconds Gives time in milli seconds for a temporary ban of the IP address. Use 0 for a permanent ban. - void AddToBanList( const char *IP, MafiaNet::TimeMS milliseconds=0 ); - - /// \brief Allows a previously banned IP to connect. - /// param[in] Dotted IP address. You can use * as a wildcard. An IP such as 128.0.0.* will ban all IP addresses starting with 128.0.0. - void RemoveFromBanList( const char *IP ); - - /// \brief Allows all previously banned IPs to connect. - void ClearBanList( void ); - - /// \brief Returns true or false indicating if a particular IP is banned. - /// \param[in] IP Dotted IP address. - /// \return True if IP matches any IPs in the ban list, accounting for any wildcards. False otherwise. - bool IsBanned( const char *IP ); - - /// \brief Enable or disable allowing frequent connections from the same IP adderss - /// \details This is a security measure which is disabled by default, but can be set to true to prevent attackers from using up all connection slots. - /// \param[in] b True to limit connections from the same ip to at most 1 per 100 milliseconds. - void SetLimitIPConnectionFrequency(bool b); - - // --------------------------------------------------------------------------------------------Pinging Functions - Functions dealing with the automatic ping mechanism-------------------------------------------------------------------------------------------- - /// Send a ping to the specified connected system. - /// \pre The sender and recipient must already be started via a successful call to Startup() - /// \param[in] target Which system to ping - void Ping( const SystemAddress target ); - - /// \brief Send a ping to the specified unconnected system. - /// \details The remote system, if it is Initialized, will respond with ID_PONG followed by sizeof(MafiaNet::TimeMS) containing the system time the ping was sent. Default is 4 bytes - See __GET_TIME_64BIT in types.h - /// System should reply with ID_PONG if it is active - /// \param[in] host Either a dotted IP address or a domain name. Can be 255.255.255.255 for LAN broadcast. - /// \param[in] remotePort Which port to connect to on the remote machine. - /// \param[in] onlyReplyOnAcceptingConnections Only request a reply if the remote system is accepting connections - /// \param[in] connectionSocketIndex Index into the array of socket descriptors passed to socketDescriptors in RakPeer::Startup() to send on. - /// \return true on success, false on failure (unknown hostname) - bool Ping( const char* host, unsigned short remotePort, bool onlyReplyOnAcceptingConnections, unsigned connectionSocketIndex=0 ); - - /// \brief Returns the average of all ping times read for the specific system or -1 if none read yet - /// \param[in] systemAddress Which system we are referring to - /// \return The ping time for this system, or -1 - int GetAveragePing( const AddressOrGUID systemIdentifier ); - - /// \brief Returns the last ping time read for the specific system or -1 if none read yet. - /// \param[in] systemAddress Which system we are referring to - /// \return The last ping time for this system, or -1. - int GetLastPing( const AddressOrGUID systemIdentifier ) const; - - /// \brief Returns the lowest ping time read or -1 if none read yet. - /// \param[in] systemIdentifier Which system we are referring to - /// \return The lowest ping time for this system, or -1. - int GetLowestPing( const AddressOrGUID systemIdentifier ) const; - - /// Ping the remote systems every so often, or not. Can be called anytime. - /// By default this is true. Recommended to leave on, because congestion control uses it to determine how often to resend lost packets. - /// It would be true by default to prevent timestamp drift, since in the event of a clock spike, the timestamp deltas would no longer be accurate - /// \param[in] doPing True to start occasional pings. False to stop them. - void SetOccasionalPing( bool doPing ); - - /// Return the clock difference between your system and the specified system - /// Subtract GetClockDifferential() from a time returned by the remote system to get that time relative to your own system - /// Returns 0 if the system is unknown - /// \param[in] systemIdentifier Which system we are referring to - MafiaNet::Time GetClockDifferential( const AddressOrGUID systemIdentifier ); - - // --------------------------------------------------------------------------------------------Static Data Functions - Functions dealing with API defined synchronized memory-------------------------------------------------------------------------------------------- - /// \brief Sets the data to send along with a LAN server discovery or offline ping reply. - /// \param[in] data Block of data to send, or 0 for none - /// \param[in] length Length of the data in bytes, or 0 for none - /// \note \a length should be under 400 bytes, as a security measure against flood attacks - /// \sa Ping.cpp - void SetOfflinePingResponse( const char *data, const unsigned int length ); - - /// \brief Returns pointers to a copy of the \a data passed to SetOfflinePingResponse. - /// \param[out] data A pointer to a copy of the data passed to SetOfflinePingResponse() - /// \param[out] length A pointer filled in with the length parameter passed to SetOfflinePingResponse() - /// \sa SetOfflinePingResponse - void GetOfflinePingResponse( char **data, unsigned int *length ); - - // -------------------------------------------------------------------------------------------------------------- - // Session handshake - // -------------------------------------------------------------------------------------------------------------- - /// \brief Sets this peer's session-handshake payload. - /// \details Exchanged before either side reports a connection: a client sends it in - /// ID_SESSION_CONFIG_REQUEST, a server answers with it in ID_SESSION_CONFIG. The bytes are opaque to - /// MafiaNet. Call before Startup()/Connect(). - /// \param[in] data Payload to send, or 0 for none. - /// \param[in] length Length of \a data in bytes; must not exceed MAXIMUM_SESSION_CONFIG_SIZE. - void SetSessionConfig( const char *data, unsigned int length ); - - /// \brief Returns a pointer to the payload passed to SetSessionConfig. - void GetSessionConfig( char **data, unsigned int *length ); - - /// \brief Returns the remote peer's session payload. - /// \details Valid from the moment ID_CONNECTION_REQUEST_ACCEPTED or ID_NEW_INCOMING_CONNECTION - /// surfaces for \a systemIdentifier, for the lifetime of that connection. - /// \param[in] systemIdentifier The connection to read. - /// \param[out] length Filled in with the payload length; 0 when there is none. - /// \return Pointer to the payload owned by the connection, or 0 when there is none. - const char *GetRemoteSessionConfig( const AddressOrGUID systemIdentifier, unsigned int *length ); - - /// \brief Server: decide each client's session answer individually instead of replying automatically. - /// \details With this on, ID_SESSION_CONFIG_REQUEST is surfaced to the application and the connection - /// stays unreported until AcceptSession() or RejectSession() is called for that peer. Off by default, - /// in which case the payload set by SetSessionConfig() answers every client and no application code is - /// required. - void SetSessionConfigInteractive( bool interactive ); - - /// \brief Server: accept a pending session request, sending \a data as this connection's payload. - /// \details Only meaningful for a peer that surfaced ID_SESSION_CONFIG_REQUEST. Completes the - /// handshake and surfaces the withheld ID_NEW_INCOMING_CONNECTION. - void AcceptSession( const AddressOrGUID systemIdentifier, const char *data, unsigned int length ); - - /// \brief Server: refuse a pending session request. - /// \details The client reports ID_CONNECTION_ATTEMPT_FAILED and neither side ever reports a - /// connection. \a reason is delivered to the client in ID_SESSION_CONFIG_REJECTED; it may be 0. - void RejectSession( const AddressOrGUID systemIdentifier, const char *reason ); - - /// rief Server: hold peers in the session handshake in a pool of their own instead of in the incoming limit. - /// \details See RakPeerInterface::SetMaximumPendingSessions. - void SetMaximumPendingSessions( unsigned short total, unsigned short perAddress ); - - /// rief Bounds how long a session handshake may wait for its answer; 0 uses the connection timeout. - void SetSessionTimeout( MafiaNet::TimeMS timeMS ); - - /// rief Server: send ID_SESSION_CONFIG_STATUS to a peer awaiting a session decision. - void SendSessionStatus( const AddressOrGUID systemIdentifier, const char *data, unsigned int length ); - - //--------------------------------------------------------------------------------------------Network Functions - Functions dealing with the network in general-------------------------------------------------------------------------------------------- - /// \brief Returns the unique address identifier that represents you or another system on the the network - /// \param[in] systemAddress Use UNASSIGNED_SYSTEM_ADDRESS to get your behind-LAN address. Use a connected system to get their behind-LAN address. This does not return the port. - /// \param[in] index When you have multiple internal IDs, which index to return? Currently limited to MAXIMUM_NUMBER_OF_INTERNAL_IDS (so the maximum value of this variable is MAXIMUM_NUMBER_OF_INTERNAL_IDS-1) - /// \return Identifier of your system internally, which may not be how other systems see if you if you are behind a NAT or proxy. - SystemAddress GetInternalID( const SystemAddress systemAddress=UNASSIGNED_SYSTEM_ADDRESS, const int index=0 ) const; - - /// \brief Sets your internal IP address, for platforms that do not support reading it, or to override a value - /// \param[in] systemAddress. The address to set. Use SystemAddress::FromString() if you want to use a dotted string - /// \param[in] index When you have multiple internal IDs, which index to set? - void SetInternalID(SystemAddress systemAddress, int index=0); - - /// \brief Returns the unique address identifier that represents the target on the the network and is based on the target's external IP / port. - /// \param[in] target The SystemAddress of the remote system. Usually the same for all systems, unless you have two or more network cards. - SystemAddress GetExternalID( const SystemAddress target ) const; - - /// Return my own GUID - const RakNetGUID GetMyGUID(void) const; - - /// Return the address bound to a socket at the specified index - SystemAddress GetMyBoundAddress(const int socketIndex=0); - - /// \brief Given a connected system address, this method gives the unique GUID representing that instance of RakPeer. - /// This will be the same on all systems connected to that instance of RakPeer, even if the external system addresses are different. - /// Complexity is O(log2(n)). - /// If \a input is UNASSIGNED_SYSTEM_ADDRESS, will return your own GUID - /// \pre Call Startup() first, or the function will return UNASSIGNED_RAKNET_GUID - /// \param[in] input The system address of the target system we are connected to. - const RakNetGUID& GetGuidFromSystemAddress( const SystemAddress input ) const; - - /// \brief Gives the system address of a connected system, given its GUID. - /// The GUID will be the same on all systems connected to that instance of RakPeer, even if the external system addresses are different. - /// Currently O(log(n)), but this may be improved in the future - /// If \a input is UNASSIGNED_RAKNET_GUID, UNASSIGNED_SYSTEM_ADDRESS is returned. - /// \param[in] input The RakNetGUID of the target system. - SystemAddress GetSystemAddressFromGuid( const RakNetGUID input ) const; - - /// Given the SystemAddress of a connected system, get the public key they provided as an identity - /// Returns false if system address was not found or client public key is not known - /// \param[in] input The RakNetGUID of the system - /// \param[in] client_public_key The connected client's public key is copied to this address. Buffer must be cat::EasyHandshake::PUBLIC_KEY_BYTES bytes in length. - bool GetClientPublicKeyFromSystemAddress( const SystemAddress input, char *client_public_key ) const; - - /// \brief Set the time, in MS, to use before considering ourselves disconnected after not being able to deliver a reliable message. - - /// Set the time, in MS, to use before considering ourselves disconnected after not being able to deliver a reliable message. - /// Default time is 10,000 or 10 seconds in release and 30,000 or 30 seconds in debug. - /// Do not set different values for different computers that are connected to each other, or you won't be able to reconnect after ID_CONNECTION_LOST - /// \param[in] timeMS Time, in MS - /// \param[in] target SystemAddress structure of the target system. Pass UNASSIGNED_SYSTEM_ADDRESS for all systems. - void SetTimeoutTime(MafiaNet::TimeMS timeMS, const SystemAddress target ); - - /// \brief Returns the Timeout time for the given system. - /// \param[in] target Target system to get the TimeoutTime for. Pass UNASSIGNED_SYSTEM_ADDRESS to get the default value. - /// \return Timeout time for a given system. - MafiaNet::TimeMS GetTimeoutTime( const SystemAddress target ); - - /// \brief Returns the current MTU size - /// \param[in] target Which system to get MTU for. UNASSIGNED_SYSTEM_ADDRESS to get the default - /// \return The current MTU size of the target system. - int GetMTUSize( const SystemAddress target ) const; - - /// \brief Returns the number of IP addresses this system has internally. - /// \details Get the actual addresses from GetLocalIP() - unsigned GetNumberOfAddresses( void ); - - /// Returns an IP address at index 0 to GetNumberOfAddresses-1 in ipList array. - /// \param[in] index index into the list of IP addresses - /// \return The local IP address at this index - const char* GetLocalIP( unsigned int index ); - - /// Is this a local IP? - /// Checks if this ip is in the ipList array. - /// \param[in] An IP address to check, excluding the port. - /// \return True if this is one of the IP addresses returned by GetLocalIP - bool IsLocalIP( const char *ip ); - - /// \brief Allow or disallow connection responses from any IP. - /// \details Normally this should be false, but may be necessary when connecting to servers with multiple IP addresses. - /// \param[in] allow - True to allow this behavior, false to not allow. Defaults to false. Value persists between connections. - void AllowConnectionResponseIPMigration( bool allow ); - - /// \brief Sends a one byte message ID_ADVERTISE_SYSTEM to the remote unconnected system. - /// This will send our external IP outside the LAN along with some user data to the remote system. - /// \pre The sender and recipient must already be started via a successful call to Initialize - /// \param[in] host Either a dotted IP address or a domain name - /// \param[in] remotePort Which port to connect to on the remote machine. - /// \param[in] data Optional data to append to the packet. - /// \param[in] dataLength Length of data in bytes. Use 0 if no data. - /// \param[in] connectionSocketIndex Index into the array of socket descriptors passed to socketDescriptors in RakPeer::Startup() to send on. - /// \return False if IsActive()==false or the host is unresolvable. True otherwise. - bool AdvertiseSystem( const char *host, unsigned short remotePort, const char *data, int dataLength, unsigned connectionSocketIndex=0 ); - - /// \brief Controls how often to return ID_DOWNLOAD_PROGRESS for large message downloads. - /// \details ID_DOWNLOAD_PROGRESS is returned to indicate a new partial message chunk, roughly the MTU size, has arrived. - /// As it can be slow or cumbersome to get this notification for every chunk, you can set the interval at which it is returned. - /// Defaults to 0 (never return this notification). - /// \param[in] interval How many messages to use as an interval before a download progress notification is returned. - void SetSplitMessageProgressInterval(int interval); - - /// \brief Returns what was passed to SetSplitMessageProgressInterval(). - /// \return Number of messages to be recieved before a download progress notification is returned. Default to 0. - int GetSplitMessageProgressInterval(void) const; - - /// \brief Set how long to wait before giving up on sending an unreliable message. - /// Useful if the network is clogged up. - /// Set to 0 or less to never timeout. Defaults to 0. - /// \param[in] timeoutMS How many ms to wait before simply not sending an unreliable message. - void SetUnreliableTimeout(MafiaNet::TimeMS timeoutMS); - - /// \brief Send a message to a host, with the IP socket option TTL set to 3. - /// \details This message will not reach the host, but will open the router. - /// \param[in] host The address of the remote host in dotted notation. - /// \param[in] remotePort The port number to send to. - /// \param[in] ttl Max hops of datagram, set to 3 - /// \param[in] connectionSocketIndex userConnectionSocketIndex. - /// \remarks Used for NAT-Punchthrough - void SendTTL( const char* host, unsigned short remotePort, int ttl, unsigned connectionSocketIndex=0 ); - - // -------------------------------------------------------------------------------------------- Plugin Functions-------------------------------------------------------------------------------------------- - /// \brief Attaches a Plugin interface to an instance of the base class (RakPeer or PacketizedTCP) to run code automatically on message receipt in the Receive call. - /// If the plugin returns false from PluginInterface::UsesReliabilityLayer(), which is the case for all plugins except PacketLogger, you can call AttachPlugin() and DetachPlugin() for this plugin while RakPeer is active. - /// \param[in] messageHandler Pointer to the plugin to attach. - void AttachPlugin( PluginInterface2 *plugin ); - - /// \brief Detaches a Plugin interface from the instance of the base class (RakPeer or PacketizedTCP) it is attached to. - /// \details This method disables the plugin code from running automatically on base class's updates or message receipt. - /// If the plugin returns false from PluginInterface::UsesReliabilityLayer(), which is the case for all plugins except PacketLogger, you can call AttachPlugin() and DetachPlugin() for this plugin while RakPeer is active. - /// \param[in] messageHandler Pointer to a plugin to detach. - void DetachPlugin( PluginInterface2 *messageHandler ); - - // --------------------------------------------------------------------------------------------Miscellaneous Functions-------------------------------------------------------------------------------------------- - /// \brief Puts a message back in the receive queue in case you don't want to deal with it immediately. - /// \param[in] packet The pointer to the packet you want to push back. - /// \param[in] pushAtHead True to push the packet at the start of the queue so that the next receive call returns it. False to push it at the end of the queue. - /// \note Setting pushAtHead to false end makes the packets out of order. - void PushBackPacket( Packet *packet, bool pushAtHead ); - - /// \internal - /// \brief For a given system identified by \a guid, change the SystemAddress to send to. - /// \param[in] guid The connection we are referring to - /// \param[in] systemAddress The new address to send to - void ChangeSystemAddress(RakNetGUID guid, const SystemAddress &systemAddress); - - /// \brief Returns a packet for you to write to if you want to create a Packet for some reason. - /// You can add it to the receive buffer with PushBackPacket - /// \param[in] dataSize How many bytes to allocate for the buffer - /// \return A packet. - Packet* AllocatePacket(unsigned dataSize); - - /// \brief Get the socket used with a particular active connection. - /// The smart pointer reference counts the RakNetSocket object, so the socket will remain active as long as the smart pointer does, even if RakNet were to shutdown or close the connection. - /// \note This sends a query to the thread and blocks on the return value for up to one second. In practice it should only take a millisecond or so. - /// \param[in] target Which system. - /// \return A smart pointer object containing the socket information about the target. Be sure to check IsNull() which is returned if the update thread is unresponsive, shutting down, or if this system is not connected. - virtual RakNetSocket2* GetSocket( const SystemAddress target ); - - /// \brief Gets all sockets in use. - /// \note This sends a query to the thread and blocks on the return value for up to one second. In practice it should only take a millisecond or so. - /// \param[out] sockets List of RakNetSocket structures in use. - virtual void GetSockets( DataStructures::List &sockets ); - virtual void ReleaseSockets( DataStructures::List &sockets ); - - /// \internal - virtual void WriteOutOfBandHeader(MafiaNet::BitStream *bitStream); - - /// If you need code to run in the same thread as RakNet's update thread, this function can be used for that - /// \param[in] _userUpdateThreadPtr C callback function - /// \param[in] _userUpdateThreadData Passed to C callback function - virtual void SetUserUpdateThread(void (*_userUpdateThreadPtr)(RakPeerInterface *, void *), void *_userUpdateThreadData); - - /// Set a C callback to be called whenever a datagram arrives - /// Return true from the callback to have RakPeer handle the datagram. Return false and RakPeer will ignore the datagram. - /// This can be used to filter incoming datagrams by system, or to share a recvfrom socket with RakPeer - /// RNS2RecvStruct will only remain valid for the duration of the call - virtual void SetIncomingDatagramEventHandler( bool (*_incomingDatagramEventHandler)(RNS2RecvStruct *) ); - - // --------------------------------------------------------------------------------------------Network Simulator Functions-------------------------------------------------------------------------------------------- - /// Adds simulated ping and packet loss to the outgoing data flow. - /// To simulate bi-directional ping and packet loss, you should call this on both the sender and the recipient, with half the total ping and packetloss value on each. - /// You can exclude network simulator code with the _RELEASE #define to decrease code size - /// \deprecated Use http://www.jenkinssoftware.com/forum/index.php?topic=1671.0 instead. - /// \note Doesn't work past version 3.6201 - /// \param[in] packetloss Chance to lose a packet. Ranges from 0 to 1. - /// \param[in] minExtraPing The minimum time to delay sends. - /// \param[in] extraPingVariance The additional random time to delay sends. - virtual void ApplyNetworkSimulator( float packetloss, unsigned short minExtraPing, unsigned short extraPingVariance); - - /// Limits how much outgoing bandwidth can be sent per-connection. - /// This limit does not apply to the sum of all connections! - /// Exceeding the limit queues up outgoing traffic - /// \param[in] maxBitsPerSecond Maximum bits per second to send. Use 0 for unlimited (default). Once set, it takes effect immedately and persists until called again. - virtual void SetPerConnectionOutgoingBandwidthLimit( unsigned maxBitsPerSecond ); - - /// Returns if you previously called ApplyNetworkSimulator - /// \return If you previously called ApplyNetworkSimulator - virtual bool IsNetworkSimulatorActive( void ); - - // --------------------------------------------------------------------------------------------Statistical Functions - Functions dealing with API performance-------------------------------------------------------------------------------------------- - - /// \brief Returns a structure containing a large set of network statistics for the specified system. - /// You can map this data to a string using the C style StatisticsToString() function - /// \param[in] systemAddress Which connected system to get statistics for. - /// \param[in] rns If you supply this structure,the network statistics will be written to it. Otherwise the method uses a static struct to write the data, which is not threadsafe. - /// \return 0 if the specified system can't be found. Otherwise a pointer to the struct containing the specified system's network statistics. - /// \sa statistics.h - RakNetStatistics * GetStatistics( const SystemAddress systemAddress, RakNetStatistics *rns=0 ); - /// \brief Returns the network statistics of the system at the given index in the remoteSystemList. - /// \return True if the index is less than the maximum number of peers allowed and the system is active. False otherwise. - bool GetStatistics( const unsigned int index, RakNetStatistics *rns ); - /// \brief Returns the list of systems, and statistics for each of those systems - /// Each system has one entry in each of the lists, in the same order - /// \param[out] addresses SystemAddress for each connected system - /// \param[out] guids RakNetGUID for each connected system - /// \param[out] statistics Calculated RakNetStatistics for each connected system - virtual void GetStatisticsList(DataStructures::List &addresses, DataStructures::List &guids, DataStructures::List &statistics); - - /// \Returns how many messages are waiting when you call Receive() - virtual unsigned int GetReceiveBufferSize(void); - - // --------------------------------------------------------------------------------------------EVERYTHING AFTER THIS COMMENT IS FOR INTERNAL USE ONLY-------------------------------------------------------------------------------------------- - - - /// \internal - // Call manually if RAKPEER_USER_THREADED==1 at least every 30 milliseconds. - // updateBitStream should be: - // BitStream updateBitStream( MAXIMUM_MTU_SIZE - // #if LIBCAT_SECURITY==1 - // + cat::AuthenticatedEncryption::OVERHEAD_BYTES - // #endif - // ); - bool RunUpdateCycle( BitStream &updateBitStream ); - - /// \internal - // Call manually if RAKPEER_USER_THREADED==1 at least every 30 milliseconds. - // Call in a loop until returns false if the socket is non-blocking - // extraSocketOptions is from SocketDescriptor when the socket was created - // bool RunRecvFromOnce( RakNetSocket *s ); - - /// \internal - bool SendOutOfBand(const char *host, unsigned short remotePort, const char *data, BitSize_t dataLength, unsigned connectionSocketIndex=0 ); - - // static Packet *AllocPacket(unsigned dataSize, const char *file, unsigned int line); - - /// \internal - /// \brief Holds the clock differences between systems, along with the ping - struct PingAndClockDifferential - { - unsigned short pingTime; - MafiaNet::Time clockDifferential; - }; - - /// \internal - /// \brief All the information representing a connected system - struct RemoteSystemStruct - { - bool isActive; // Is this structure in use? - SystemAddress systemAddress; /// Their external IP on the internet - SystemAddress myExternalSystemAddress; /// Your external IP on the internet, from their perspective - SystemAddress theirInternalSystemAddress[MAXIMUM_NUMBER_OF_INTERNAL_IDS]; /// Their internal IP, behind the LAN - ReliabilityLayer reliabilityLayer; /// The reliability layer associated with this player - bool weInitiatedTheConnection; /// True if we started this connection via Connect. False if someone else connected to us. - PingAndClockDifferential pingAndClockDifferential[ PING_TIMES_ARRAY_SIZE ]; /// last x ping times and calculated clock differentials with it - MafiaNet::Time pingAndClockDifferentialWriteIndex; /// The index we are writing into the pingAndClockDifferential circular buffer - unsigned short lowestPing; ///The lowest ping value encountered - MafiaNet::Time nextPingTime; /// When to next ping this player - MafiaNet::Time lastReliableSend; /// When did the last reliable send occur. Reliable sends must occur at least once every timeoutTime/2 units to notice disconnects - MafiaNet::Time connectionTime; /// connection time, if active. -// int connectionSocketIndex; // index into connectionSockets to send back on. - RakNetGUID guid; - int MTUSize; - // Reference counted socket to send back on - RakNetSocket2* rakNetSocket; - SystemIndex remoteSystemIndex; - - // Optional disconnect-reason payload received with an incoming ID_DISCONNECTION_NOTIFICATION. The payload is - // stashed here when the notification arrives and copied into the user-facing notification packet that is - // synthesized after outstanding ACKs are flushed (the raw reliability-layer buffer is freed in between, so it - // cannot be delivered directly). null/0 when the remote sent no reason. Owned by this struct; copied out at - // delivery and freed via ClearDisconnectReason() on every slot teardown (including the immediate close that - // directly follows delivery) and on slot reuse. - unsigned char* disconnectReasonData; - unsigned int disconnectReasonLength; - -#if LIBCAT_SECURITY==1 - // Cached answer used internally by RakPeer to prevent DoS attacks based on the connexion handshake - char answer[cat::EasyHandshake::ANSWER_BYTES]; - - // If the server has bRequireClientKey = true, then this is set to the validated public key of the connected client - // Valid after connectMode reaches HANDLING_CONNECTION_REQUEST - char client_public_key[cat::EasyHandshake::PUBLIC_KEY_BYTES]; -#endif - - // Session-handshake payload received from the remote peer (see RakPeerInterface::SetSessionConfig). - // null/0 until the exchange completes. Owned by this struct; freed via ClearSessionConfig() on every - // slot teardown and on slot reuse, exactly like disconnectReasonData above. - unsigned char* remoteSessionConfigData; - unsigned int remoteSessionConfigLength; - - // Set while connectMode==EXCHANGING_SESSION_DATA and SetSessionConfigInteractive(true) is in effect: - // the server surfaced ID_SESSION_CONFIG_REQUEST and is waiting for AcceptSession()/RejectSession(). - bool sessionConfigAwaitingLocalDecision; - - // True when WE initiated this connection, i.e. we are the peer that will report - // ID_CONNECTION_REQUEST_ACCEPTED. Recorded explicitly rather than inferred from the withheld - // packet so it stays correct even if that allocation failed, and so the session-handshake - // messages can be bound to the role that is allowed to send them. In a simultaneous - // (cross-connection) handshake both peers legitimately have this set. - bool sessionConfigIsConnectingSide; - - // True once the withheld connection packet has actually been handed to the application. A - // connection refused by RejectSession(), or dropped while still exchanging session data, never - // reaches this point on the accepting side -- and a close notification for a connection the - // application was never told about would be a lie. - bool connectionReportedToApplication; - - // GetTimeMS() at which this connection entered EXCHANGING_SESSION_DATA, so a handshake that never - // completes is timed out instead of pinning the slot forever. - MafiaNet::TimeMS sessionConfigStartTime; - - // The ID_CONNECTION_REQUEST_ACCEPTED / ID_NEW_INCOMING_CONNECTION bytes held back while the session - // handshake runs, replayed verbatim by ProduceWithheldConnectionPacket() once it completes. Owned by - // this struct; freed via ClearSessionConfig(). - unsigned char* withheldConnectionPacketData; - unsigned int withheldConnectionPacketLength; - - // EXCHANGING_SESSION_DATA sits between HANDLING_CONNECTION_REQUEST and CONNECTED: the reliability - // layer is fully up (MTU negotiated, acks flowing) but the application has NOT been told a - // connection exists. ID_CONNECTION_REQUEST_ACCEPTED / ID_NEW_INCOMING_CONNECTION are withheld until - // the session payloads have been exchanged, so those packets mean "the remote's session payload is - // in hand" and an application can never observe a connection without it. - enum ConnectMode {NO_ACTION, DISCONNECT_ASAP, DISCONNECT_ASAP_SILENTLY, DISCONNECT_ON_NO_ACK, REQUESTED_CONNECTION, HANDLING_CONNECTION_REQUEST, UNVERIFIED_SENDER, EXCHANGING_SESSION_DATA, CONNECTED} connectMode; - }; - - // DS_APR - //void ProcessChromePacket(RakNetSocket2 *s, const char *buffer, int dataSize, const SystemAddress& recvFromAddress, MafiaNet::TimeUS timeRead); - // /DS_APR -protected: - - friend RAK_THREAD_DECLARATION(UpdateNetworkLoop); - //friend RAK_THREAD_DECLARATION(RecvFromLoop); - friend RAK_THREAD_DECLARATION(UDTConnect); - - friend bool ProcessOfflineNetworkPacket( SystemAddress systemAddress, const char *data, const int length, RakPeer *rakPeer, RakNetSocket2* rakNetSocket, bool *isOfflineMessage, MafiaNet::TimeUS timeRead ); - friend void ProcessNetworkPacket( const SystemAddress systemAddress, const char *data, const int length, RakPeer *rakPeer, MafiaNet::TimeUS timeRead, BitStream &updateBitStream ); - friend void ProcessNetworkPacket( const SystemAddress systemAddress, const char *data, const int length, RakPeer *rakPeer, RakNetSocket2* rakNetSocket, MafiaNet::TimeUS timeRead, BitStream &updateBitStream ); - - int GetIndexFromSystemAddress( const SystemAddress systemAddress, bool calledFromNetworkThread ) const; - int GetIndexFromGuid( const RakNetGUID guid ); - - //void RemoveFromRequestedConnectionsList( const SystemAddress systemAddress ); - // Two versions needed because some buggy compilers strip the last parameter if unused, and crashes - ConnectionAttemptResult SendConnectionRequest( const char* host, unsigned short remotePort, const char *passwordData, int passwordDataLength, PublicKey *publicKey, unsigned connectionSocketIndex, unsigned int extraData, unsigned sendConnectionAttemptCount, unsigned timeBetweenSendConnectionAttemptsMS, MafiaNet::TimeMS timeoutTime, RakNetSocket2* socket ); - ConnectionAttemptResult SendConnectionRequest( const char* host, unsigned short remotePort, const char *passwordData, int passwordDataLength, PublicKey *publicKey, unsigned connectionSocketIndex, unsigned int extraData, unsigned sendConnectionAttemptCount, unsigned timeBetweenSendConnectionAttemptsMS, MafiaNet::TimeMS timeoutTime ); - ///Get the reliability layer associated with a systemAddress. - /// \param[in] systemAddress The player identifier - /// \return 0 if none - RemoteSystemStruct *GetRemoteSystemFromSystemAddress( const SystemAddress systemAddress, bool calledFromNetworkThread, bool onlyActive ) const; - RakPeer::RemoteSystemStruct *GetRemoteSystem( const AddressOrGUID systemIdentifier, bool calledFromNetworkThread, bool onlyActive ) const; - void ValidateRemoteSystemLookup(void) const; - RemoteSystemStruct *GetRemoteSystemFromGUID( const RakNetGUID guid, bool onlyActive ) const; - ///Parse out a connection request packet - void ParseConnectionRequestPacket( RakPeer::RemoteSystemStruct *remoteSystem, const SystemAddress &systemAddress, const char *data, int byteSize); - void OnConnectionRequest( RakPeer::RemoteSystemStruct *remoteSystem, MafiaNet::Time incomingTimestamp ); - ///Send a reliable disconnect packet to this player and disconnect them when it is delivered - void NotifyAndFlagForShutdown( const SystemAddress systemAddress, bool performImmediate, unsigned char orderingChannel, MafiaNet::Priority disconnectionNotificationPriority, const MafiaNet::BitStream *reasonData=nullptr ); - ///Returns how many remote systems initiated a connection to us - unsigned int GetNumberOfRemoteInitiatedConnections( void ) const; - /// \brief Get a free remote system from the list and assign our systemAddress to it. - /// \note Should only be called from the update thread - not the user thread. - /// \param[in] systemAddress systemAddress to be assigned - /// \param[in] connectionMode connection mode of the RemoteSystem. - /// \param[in] rakNetSocket - /// \param[in] thisIPConnectedRecently Is this IP connected recently? set to False; - /// \param[in] bindingAddress Address to be binded with the remote system - /// \param[in] incomingMTU MTU for the remote system - RemoteSystemStruct * AssignSystemAddressToRemoteSystemList( const SystemAddress systemAddress, RemoteSystemStruct::ConnectMode connectionMode, RakNetSocket2* incomingRakNetSocket, bool *thisIPConnectedRecently, SystemAddress bindingAddress, int incomingMTU, RakNetGUID guid, bool useSecurity ); - /// \brief Adjust the timestamp of the incoming packet to be relative to this system. - /// \param[in] data Data in the incoming packet. - /// \param[in] systemAddress Sender of the incoming packet. - void ShiftIncomingTimestamp( unsigned char *data, const SystemAddress &systemAddress ) const; - /// Get the most accurate clock differential for a certain player. - /// \param[in] systemAddress The player with whose clock the time difference is calculated. - /// \returns The clock differential for a certain player. - MafiaNet::Time GetBestClockDifferential( const SystemAddress systemAddress ) const; - - bool IsLoopbackAddress(const AddressOrGUID &systemIdentifier, bool matchPort) const; - SystemAddress GetLoopbackAddress(void) const; - - ///Set this to true to terminate the Peer thread execution - volatile bool endThreads; - ///true if the peer thread is active. - volatile bool isMainLoopThreadActive; - - // MafiaNet::LocklessUint32_t isRecvFromLoopThreadActive; - - - bool occasionalPing; /// Do we occasionally ping the other systems?*/ - ///Store the maximum number of peers allowed to connect - unsigned int maximumNumberOfPeers; - //05/02/06 Just using maximumNumberOfPeers instead - ///Store the maximum number of peers able to connect, including reserved connection slots for pings, etc. - //unsigned short remoteSystemListSize; - ///Store the maximum incoming connection allowed - unsigned int maximumIncomingConnections; - MafiaNet::BitStream offlinePingResponse; - /// Our own session-handshake payload (see SetSessionConfig). On a client it is sent in - /// ID_SESSION_CONFIG_REQUEST; on a server it is the default answer in ID_SESSION_CONFIG. - MafiaNet::BitStream sessionConfig; - /// When true a server surfaces ID_SESSION_CONFIG_REQUEST and waits for AcceptSession()/RejectSession() - /// instead of answering automatically with sessionConfig. - bool sessionConfigInteractive; - /// SetMaximumPendingSessions(). 0 total keeps peers mid-handshake in the incoming limit. - unsigned short maximumPendingSessions; - unsigned short maximumPendingSessionsPerAddress; - /// SetSessionTimeout(). 0 uses the connection timeout. - MafiaNet::TimeMS sessionTimeout; - ///Local Player ID - // SystemAddress mySystemAddress[MAXIMUM_NUMBER_OF_INTERNAL_IDS]; - char incomingPassword[256]; - unsigned char incomingPasswordLength; - - /// This is an array of pointers to RemoteSystemStruct - /// This allows us to preallocate the list when starting, so we don't have to allocate or delete at runtime. - /// Another benefit is that is lets us add and remove active players simply by setting systemAddress - /// and moving elements in the list by copying pointers variables without affecting running threads, even if they are in the reliability layer - RemoteSystemStruct* remoteSystemList; - /// activeSystemList holds a list of pointers and is preallocated to be the same size as remoteSystemList. It is updated only by the network thread, but read by both threads - /// When the isActive member of RemoteSystemStruct is set to true or false, that system is added to this list of pointers - /// Threadsafe because RemoteSystemStruct is preallocated, and the list is only added to, not removed from - RemoteSystemStruct** activeSystemList; - unsigned int activeSystemListSize; - - // Use a hash, with binaryAddress plus port mod length as the index - RemoteSystemIndex **remoteSystemLookup; - unsigned int RemoteSystemLookupHashIndex(const SystemAddress &sa) const; - void ReferenceRemoteSystem(const SystemAddress &sa, unsigned int remoteSystemListIndex); - void DereferenceRemoteSystem(const SystemAddress &sa); - RemoteSystemStruct* GetRemoteSystem(const SystemAddress &sa) const; - unsigned int GetRemoteSystemIndex(const SystemAddress &sa) const; - void ClearRemoteSystemLookup(void); - DataStructures::MemoryPool remoteSystemIndexPool; - - void AddToActiveSystemList(unsigned int remoteSystemListIndex); - void RemoveFromActiveSystemList(const SystemAddress &sa); - -// unsigned int LookupIndexUsingHashIndex(const SystemAddress &sa) const; -// unsigned int RemoteSystemListIndexUsingHashIndex(const SystemAddress &sa) const; -// unsigned int FirstFreeRemoteSystemLookupIndex(const SystemAddress &sa) const; - - enum - { - // Only put these mutexes in user thread functions! - requestedConnectionList_Mutex, - offlinePingResponse_Mutex, - sessionConfig_Mutex, - NUMBER_OF_RAKPEER_MUTEXES - }; - SimpleMutex rakPeerMutexes[ NUMBER_OF_RAKPEER_MUTEXES ]; - ///RunUpdateCycle is not thread safe but we don't need to mutex calls. Just skip calls if it is running already - - bool updateCycleIsRunning; - ///The list of people we have tried to connect to recently - - //DataStructures::Queue requestedConnectionsList; - ///Data that both the client and the server needs - - unsigned int bytesSentPerSecond, bytesReceivedPerSecond; - // bool isSocketLayerBlocking; - // bool continualPing,isRecvfromThreadActive,isMainLoopThreadActive, endThreads, isSocketLayerBlocking; - unsigned int validationInteger; - SimpleMutex incomingQueueMutex, banListMutex; //,synchronizedMemoryQueueMutex, automaticVariableSynchronizationMutex; - //DataStructures::Queue incomingpacketSingleProducerConsumer; //, synchronizedMemorypacketSingleProducerConsumer; - // BitStream enumerationData; - - struct BanStruct - { - char *IP; - MafiaNet::TimeMS timeout; // 0 for none - }; - - struct RequestedConnectionStruct - { - SystemAddress systemAddress; - MafiaNet::Time nextRequestTime; - unsigned char requestsMade; - char *data; - unsigned short dataLength; - char outgoingPassword[256]; - unsigned char outgoingPasswordLength; - unsigned socketIndex; - unsigned int extraData; - unsigned sendConnectionAttemptCount; - unsigned timeBetweenSendConnectionAttemptsMS; - MafiaNet::TimeMS timeoutTime; - PublicKeyMode publicKeyMode; - RakNetSocket2* socket; - enum {CONNECT=1, /*PING=2, PING_OPEN_CONNECTIONS=4,*/ /*ADVERTISE_SYSTEM=2*/} actionToTake; - -#if LIBCAT_SECURITY==1 - char handshakeChallenge[cat::EasyHandshake::CHALLENGE_BYTES]; - cat::ClientEasyHandshake *client_handshake; - char remote_public_key[cat::EasyHandshake::PUBLIC_KEY_BYTES]; -// char remote_challenge[cat::EasyHandshake::CHALLENGE_BYTES]; - // char random[16]; -#endif - }; -#if LIBCAT_SECURITY==1 - bool GenerateConnectionRequestChallenge(RequestedConnectionStruct *rcs,PublicKey *publicKey); -#endif - - //DataStructures::List* > automaticVariableSynchronizationList; - DataStructures::List banList; - // Threadsafe, and not thread safe - DataStructures::List pluginListTS, pluginListNTS; - - DataStructures::Queue requestedConnectionQueue; - SimpleMutex requestedConnectionQueueMutex; - - // void RunMutexedUpdateCycle(void); - - struct BufferedCommandStruct - { - BitSize_t numberOfBitsToSend; - MafiaNet::Priority priority; - MafiaNet::Reliability reliability; - char orderingChannel; - AddressOrGUID systemIdentifier; - bool broadcast; - RemoteSystemStruct::ConnectMode connectionMode; - NetworkID networkID; - bool blockingCommand; // Only used for RPC - char *data; - bool haveRakNetCloseSocket; - unsigned connectionSocketIndex; - unsigned int extraSocketOptions; - RakNetSocket2* socket; - unsigned short port; - uint32_t receipt; - // BCS_SESSION_ACCEPT / BCS_SESSION_REJECT carry an application's answer to ID_SESSION_CONFIG_REQUEST - // from the user thread to the network thread: data holds the payload (accept) or reason (reject) and - // numberOfBitsToSend its length. The decision must not be applied inline because it sends on the - // connection and mutates connectMode, both of which belong to the network thread. - enum {BCS_SEND, BCS_CLOSE_CONNECTION, BCS_GET_SOCKET, BCS_CHANGE_SYSTEM_ADDRESS,/* BCS_USE_USER_SOCKET, BCS_REBIND_SOCKET_ADDRESS, BCS_RPC, BCS_RPC_SHIFT,*/ BCS_SESSION_ACCEPT, BCS_SESSION_REJECT, BCS_SESSION_STATUS, BCS_DO_NOTHING} command; - }; - - // Single producer single consumer queue using a linked list - //BufferedCommandStruct* bufferedCommandReadIndex, bufferedCommandWriteIndex; - - DataStructures::ThreadsafeAllocatingQueue bufferedCommands; - - - // DataStructures::ThreadsafeAllocatingQueue bufferedPackets; - - DataStructures::Queue bufferedPacketsFreePool; - MafiaNet::SimpleMutex bufferedPacketsFreePoolMutex; - DataStructures::Queue bufferedPacketsQueue; - MafiaNet::SimpleMutex bufferedPacketsQueueMutex; - - virtual void DeallocRNS2RecvStruct(RNS2RecvStruct *s, const char *file, unsigned int line); - virtual RNS2RecvStruct *AllocRNS2RecvStruct(const char *file, unsigned int line); - void SetupBufferedPackets(void); - void PushBufferedPacket(RNS2RecvStruct * p); - RNS2RecvStruct *PopBufferedPacket(void); - - struct SocketQueryOutput - { - SocketQueryOutput() {} - ~SocketQueryOutput() {} - DataStructures::List sockets; - }; - - DataStructures::ThreadsafeAllocatingQueue socketQueryOutput; - - - bool AllowIncomingConnections(void) const; - /// Admission for one new remote-initiated peer from  address, by SessionAdmission's rules. - bool AllowIncomingConnection(const SystemAddress &address) const; - /// How long  remoteSystem's session handshake may wait: sessionTimeout, or its connection timeout. - MafiaNet::TimeMS GetSessionTimeoutFor(RemoteSystemStruct *remoteSystem) const; - - void PingInternal( const SystemAddress target, bool performImmediate, MafiaNet::Reliability reliability ); - // This stores the user send calls to be handled by the update thread. This way we don't have thread contention over systemAddresss - void CloseConnectionInternal( const AddressOrGUID& systemIdentifier, bool sendDisconnectionNotification, bool performImmediate, unsigned char orderingChannel, MafiaNet::Priority disconnectionNotificationPriority ); - void SendBuffered( const char *data, BitSize_t numberOfBitsToSend, MafiaNet::Priority priority, MafiaNet::Reliability reliability, char orderingChannel, const AddressOrGUID systemIdentifier, bool broadcast, RemoteSystemStruct::ConnectMode connectionMode, uint32_t receipt ); - void SendBufferedList( const char **data, const int *lengths, const int numParameters, MafiaNet::Priority priority, MafiaNet::Reliability reliability, char orderingChannel, const AddressOrGUID systemIdentifier, bool broadcast, RemoteSystemStruct::ConnectMode connectionMode, uint32_t receipt ); - bool SendImmediate( char *data, BitSize_t numberOfBitsToSend, MafiaNet::Priority priority, MafiaNet::Reliability reliability, char orderingChannel, const AddressOrGUID systemIdentifier, bool broadcast, bool useCallerDataAllocation, MafiaNet::TimeUS currentTime, uint32_t receipt ); - //bool HandleBufferedRPC(BufferedCommandStruct *bcs, MafiaNet::TimeMS time); - void ClearBufferedCommands(void); - void ClearBufferedPackets(void); - void ClearSocketQueryOutput(void); - void ClearRequestedConnectionList(void); - void AddPacketToProducer(MafiaNet::Packet *p); - unsigned int GenerateSeedFromGuid(void); - MafiaNet::Time GetClockDifferentialInt(RemoteSystemStruct *remoteSystem) const; - SimpleMutex securityExceptionMutex; - - //DataStructures::AVLBalancedBinarySearchTree rpcTree; - int defaultMTUSize; - bool trackFrequencyTable; - - // Smart pointer so I can return the object to the user - DataStructures::List socketList; - void DerefAllSockets(void); - unsigned int GetRakNetSocketFromUserConnectionSocketIndex(unsigned int userIndex) const; - // Used for RPC replies - MafiaNet::BitStream *replyFromTargetBS; - SystemAddress replyFromTargetPlayer; - bool replyFromTargetBroadcast; - - MafiaNet::TimeMS defaultTimeoutTime; - - // Generate and store a unique GUID - void GenerateGUID(void); - unsigned int GetSystemIndexFromGuid( const RakNetGUID input ) const; - RakNetGUID myGuid; - - unsigned maxOutgoingBPS; - - // Nobody would use the internet simulator in a final build. -#ifdef _DEBUG - double _packetloss; - unsigned short _minExtraPing, _extraPingVariance; -#endif - - ///How long it has been since things were updated by a call to receiveUpdate thread uses this to determine how long to sleep for - //unsigned int lastUserUpdateCycle; - /// True to allow connection accepted packets from anyone. False to only allow these packets from servers we requested a connection to. - bool allowConnectionResponseIPMigration; - - SystemAddress firstExternalID; - int splitMessageProgressInterval; - MafiaNet::TimeMS unreliableTimeout; - - bool (*incomingDatagramEventHandler)(RNS2RecvStruct *); - - // Systems in this list will not go through the secure connection process, even when secure connections are turned on. Wildcards are accepted. - DataStructures::List securityExceptionList; - - SystemAddress ipList[ MAXIMUM_NUMBER_OF_INTERNAL_IDS ]; - - bool allowInternalRouting; - - void (*userUpdateThreadPtr)(RakPeerInterface *, void *); - void *userUpdateThreadData; - - - SignaledEvent quitAndDataEvents; - bool limitConnectionFrequencyFromTheSameIP; - - SimpleMutex packetAllocationPoolMutex; - DataStructures::MemoryPool packetAllocationPool; - - SimpleMutex packetReturnMutex; - DataStructures::Queue packetReturnQueue; - Packet *AllocPacket(unsigned dataSize, const char *file, unsigned int line); - Packet *AllocPacket(unsigned dataSize, unsigned char *data, const char *file, unsigned int line); - - /// This is used to return a number to the user when they call Send identifying the message - /// This number will be returned back with ID_SND_RECEIPT_ACKED or ID_SND_RECEIPT_LOSS and is only returned - /// with the reliability types that contain RECEIPT in the name - SimpleMutex sendReceiptSerialMutex; - uint32_t sendReceiptSerial; - void ResetSendReceipt(void); - void OnConnectedPong(MafiaNet::Time sendPingTime, MafiaNet::Time sendPongTime, RemoteSystemStruct *remoteSystem); - void CallPluginCallbacks(DataStructures::List &pluginList, Packet *packet); - -#if LIBCAT_SECURITY==1 - // Encryption and security - bool _using_security, _require_client_public_key; - char my_public_key[cat::EasyHandshake::PUBLIC_KEY_BYTES]; - cat::ServerEasyHandshake *_server_handshake; - cat::CookieJar *_cookie_jar; - bool InitializeClientSecurity(RequestedConnectionStruct *rcs, const char *public_key); -#endif - - - - - - - virtual void OnRNS2Recv(RNS2RecvStruct *recvStruct); - void FillIPList(void); - - private: - // internal helpers - void CloseConnectionInternal2(const AddressOrGUID& systemIdentifier, bool sendDisconnectionNotification, bool performImmediate, unsigned char orderingChannel, MafiaNet::Priority disconnectionNotificationPriority, RakNetSocket2& socket, const MafiaNet::BitStream *reasonData=nullptr); - // Free and null any stashed disconnect-reason payload for the given remote system (safe on null). - void ClearDisconnectReason(RemoteSystemStruct *remoteSystem); - /// Free any stashed session payload on this slot. - void ClearSessionConfig(RemoteSystemStruct *remoteSystem); - /// Store a received session payload on the slot, enforcing MAXIMUM_SESSION_CONFIG_SIZE. - /// Returns false if the payload is oversized (a protocol violation). - bool StoreRemoteSessionConfig(RemoteSystemStruct *remoteSystem, const unsigned char *data, unsigned int length); - /// Send our session payload to a peer that is waiting in EXCHANGING_SESSION_DATA and, on the - /// server, promote the slot to CONNECTED and surface the withheld ID_NEW_INCOMING_CONNECTION. - void SendSessionConfigResponse(RemoteSystemStruct *remoteSystem, const char *data, unsigned int length); - /// Refuse a pending session request and drop the connection once the refusal is acknowledged. - void SendSessionConfigRejection(RemoteSystemStruct *remoteSystem, const char *reason, unsigned int reasonLength); - /// Queue an application session decision for the network thread (see BCS_SESSION_ACCEPT). - void QueueSessionDecision(const AddressOrGUID systemIdentifier, bool accept, const char *data, unsigned int length); - /// Queue any session command (accept, reject, status) with a copy of its payload. - /// Server: tell the application a session request it was holding is gone (ID_SESSION_CONFIG_ABANDONED). - void ProduceSessionAbandoned(RemoteSystemStruct *remoteSystem); - void QueueSessionCommand(const AddressOrGUID systemIdentifier, int command, const char *data, unsigned int length); - /// Counts remote-initiated peers for SessionAdmission; pendingFromAddress is for \a address, or 0 when unassigned. - void CountRemoteInitiatedPeers(const SystemAddress &address, unsigned int &connected, unsigned int &exchanging, unsigned int &pending, unsigned int &pendingFromAddress) const; - /// True when a directed application send must be refused because the target is still running the - /// session handshake and so has not been reported to the application yet. - bool IsExchangingSessionData(const AddressOrGUID systemIdentifier); - /// Produce the connection packet that was withheld while the session handshake ran. - void ProduceWithheldConnectionPacket(RemoteSystemStruct *remoteSystem, MessageID messageId); -} -; - -} // namespace MafiaNet - -#endif +/* + * Copyright (c) 2026, MafiaHub + * Licensed under MIT-style license + * + * Deprecated include path. "mafianet/peer.h" was renamed to "mafianet/RakPeer.h" so + * every header follows the PascalCase name of the class it declares. This + * forwarding header is kept for one release cycle and will then be removed. + * Define MAFIANET_SILENCE_DEPRECATED_INCLUDES to suppress the message. + */ +#pragma once +#ifndef MAFIANET_SILENCE_DEPRECATED_INCLUDES +#pragma message("mafianet/peer.h is deprecated; include mafianet/RakPeer.h instead") +#endif +#include "RakPeer.h" diff --git a/Source/include/mafianet/peerinterface.h b/Source/include/mafianet/peerinterface.h index 1a1822414..378076bad 100644 --- a/Source/include/mafianet/peerinterface.h +++ b/Source/include/mafianet/peerinterface.h @@ -1,698 +1,14 @@ -/* - * Original work: Copyright (c) 2014, Oculus VR, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * RakNet License.txt file in the licenses directory of this source tree. An additional grant - * of patent rights can be found in the RakNet Patents.txt file in the same directory. - * - * - * Modified work: Copyright (c) 2017, SLikeSoft UG (haftungsbeschränkt) - * - * This source code was modified by SLikeSoft. Modifications are licensed under the MIT-style - * license found in the license.txt file in the root directory of this source tree. - */ - -/// \file -/// \brief An interface for RakPeer. Simply contains all user functions as pure virtuals. -/// - - - -#ifndef __RAK_PEER_INTERFACE_H -#define __RAK_PEER_INTERFACE_H - -#include "PacketPriority.h" -#include "types.h" -#include "memoryoverride.h" -#include "Export.h" -#include "DS_List.h" -#include "smartptr.h" -#include "socket2.h" - -namespace MafiaNet -{ -// Forward declarations -class BitStream; -class PluginInterface2; -struct RPCMap; -struct RakNetStatistics; -struct RakNetBandwidth; -class RouterInterface; -class NetworkIDManager; - -/// The primary interface for RakNet, RakPeer contains all major functions for the library. -/// See the individual functions for what the class can do. -/// \brief The main interface for network communications -class RAK_DLL_EXPORT RakPeerInterface -{ -public: - // GetInstance() and DestroyInstance(instance*) - STATIC_FACTORY_DECLARATIONS(RakPeerInterface) - - ///Destructor - virtual ~RakPeerInterface() {} - - // --------------------------------------------------------------------------------------------Major Low Level Functions - Functions needed by most users-------------------------------------------------------------------------------------------- - /// \brief Starts the network threads, opens the listen port. - /// \details You must call this before calling Connect(). - /// \pre On the PS3, call Startup() after Client_Login() - /// \pre On Android, add the necessary permission to your application's androidmanifest.xml: - /// Multiple calls while already active are ignored. To call this function again with different settings, you must first call Shutdown(). - /// \note Call SetMaximumIncomingConnections if you want to accept incoming connections - /// \param[in] maxConnections The maximum number of connections between this instance of RakPeer and another instance of RakPeer. Required so the network can preallocate and for thread safety. A pure client would set this to 1. A pure server would set it to the number of allowed clients.- A hybrid would set it to the sum of both types of connections - /// \param[in] localPort The port to listen for connections on. On linux the system may be set up so thast ports under 1024 are restricted for everything but the root user. Use a higher port for maximum compatibility. - /// \param[in] socketDescriptors An array of SocketDescriptor structures to force RakNet to listen on a particular IP address or port (or both). Each SocketDescriptor will represent one unique socket. Do not pass redundant structures. To listen on a specific port, you can pass SocketDescriptor(myPort,0); such as for a server. For a client, it is usually OK to just pass SocketDescriptor(); - /// \param[in] socketDescriptorCount The size of the \a socketDescriptors array. Pass 1 if you are not sure what to pass. - /// \param[in] threadPriority Passed to the thread creation routine. Use THREAD_PRIORITY_NORMAL for Windows. For Linux based systems, you MUST pass something reasonable based on the thread priorities for your application. - /// \return RAKNET_STARTED on success, otherwise appropriate failure enumeration. - virtual StartupResult Startup( unsigned int maxConnections, SocketDescriptor *socketDescriptors, unsigned socketDescriptorCount, int threadPriority=-99999 )=0; - - /// If you accept connections, you must call this or else security will not be enabled for incoming connections. - /// This feature requires more round trips, bandwidth, and CPU time for the connection handshake - /// x64 builds require under 25% of the CPU time of other builds - /// See the Encryption sample for example usage - /// \pre Must be called while offline - /// \pre LIBCAT_SECURITY must be defined to 1 in NativeFeatureIncludes.h for this function to have any effect - /// \param[in] publicKey A pointer to the public key for accepting new connections - /// \param[in] privateKey A pointer to the private key for accepting new connections - /// \param[in] bRequireClientKey: Should be set to false for most servers. Allows the server to accept a public key from connecting clients as a proof of identity but eats twice as much CPU time as a normal connection - virtual bool InitializeSecurity( const char *publicKey, const char *privateKey, bool bRequireClientKey = false )=0; - - /// Disables security for incoming connections. - /// \note Must be called while offline - virtual void DisableSecurity( void )=0; - - /// If secure connections are on, do not use secure connections for a specific IP address. - /// This is useful if you have a fixed-address internal server behind a LAN. - /// \note Secure connections are determined by the recipient of an incoming connection. This has no effect if called on the system attempting to connect. - /// \param[in] ip IP address to add. * wildcards are supported. - virtual void AddToSecurityExceptionList(const char *ip)=0; - - /// Remove a specific connection previously added via AddToSecurityExceptionList - /// \param[in] ip IP address to remove. Pass 0 to remove all IP addresses. * wildcards are supported. - virtual void RemoveFromSecurityExceptionList(const char *ip)=0; - - /// Checks to see if a given IP is in the security exception list - /// \param[in] IP address to check. - virtual bool IsInSecurityExceptionList(const char *ip)=0; - - /// Sets how many incoming connections are allowed. If this is less than the number of players currently connected, - /// no more players will be allowed to connect. If this is greater than the maximum number of peers allowed, - /// it will be reduced to the maximum number of peers allowed. - /// Defaults to 0, meaning by default, nobody can connect to you - /// \param[in] numberAllowed Maximum number of incoming connections allowed. - virtual void SetMaximumIncomingConnections( unsigned short numberAllowed )=0; - - /// Returns the value passed to SetMaximumIncomingConnections() - /// \return the maximum number of incoming connections, which is always <= maxConnections - virtual unsigned int GetMaximumIncomingConnections( void ) const=0; - - /// Returns how many open connections there are at this time - /// \return the number of open connections - virtual unsigned short NumberOfConnections(void) const=0; - - /// Sets the password incoming connections must match in the call to Connect (defaults to none). Pass 0 to passwordData to specify no password - /// This is a way to set a low level password for all incoming connections. To selectively reject connections, implement your own scheme using CloseConnection() to remove unwanted connections - /// \param[in] passwordData A data block that incoming connections must match. This can be just a password, or can be a stream of data. Specify 0 for no password data - /// \param[in] passwordDataLength The length in bytes of passwordData - virtual void SetIncomingPassword( const char* passwordData, int passwordDataLength )=0; - - /// Gets the password passed to SetIncomingPassword - /// \param[out] passwordData Should point to a block large enough to hold the password data you passed to SetIncomingPassword() - /// \param[in,out] passwordDataLength Maximum size of the array passwordData. Modified to hold the number of bytes actually written - virtual void GetIncomingPassword( char* passwordData, int *passwordDataLength )=0; - - /// \brief Connect to the specified host (ip or domain name) and server port. - /// Calling Connect and not calling SetMaximumIncomingConnections acts as a dedicated client. - /// Calling both acts as a true peer. This is a non-blocking connection. - /// You know the connection is successful when GetConnectionState() returns IS_CONNECTED or Receive() gets a message with the type identifier ID_CONNECTION_REQUEST_ACCEPTED. - /// If the connection is not successful, such as a rejected connection or no response then neither of these things will happen. - /// \pre Requires that you first call Startup() - /// \param[in] host Either a dotted IP address or a domain name - /// \param[in] remotePort Which port to connect to on the remote machine. - /// \param[in] passwordData A data block that must match the data block on the server passed to SetIncomingPassword. This can be a string or can be a stream of data. Use 0 for no password. - /// \param[in] passwordDataLength The length in bytes of passwordData - /// \param[in] publicKey The public key the server is using. If 0, the server is not using security. If non-zero, the publicKeyMode member determines how to connect - /// \param[in] connectionSocketIndex Index into the array of socket descriptors passed to socketDescriptors in RakPeer::Startup() to send on. - /// \param[in] sendConnectionAttemptCount How many datagrams to send to the other system to try to connect. - /// \param[in] timeBetweenSendConnectionAttemptsMS Time to elapse before a datagram is sent to the other system to try to connect. After sendConnectionAttemptCount number of attempts, ID_CONNECTION_ATTEMPT_FAILED is returned. Under low bandwidth conditions with multiple simultaneous outgoing connections, this value should be raised to 1000 or higher, or else the MTU detection can overrun the available bandwidth. - /// \param[in] timeoutTime How long to keep the connection alive before dropping it on unable to send a reliable message. 0 to use the default from SetTimeoutTime(UNASSIGNED_SYSTEM_ADDRESS); - /// \return CONNECTION_ATTEMPT_STARTED on successful initiation. Otherwise, an appropriate enumeration indicating failure. - /// \note CONNECTION_ATTEMPT_STARTED does not mean you are already connected! - /// \note It is possible to immediately get back ID_CONNECTION_ATTEMPT_FAILED if you exceed the maxConnections parameter passed to Startup(). This could happen if you call CloseConnection() with sendDisconnectionNotificaiton true, then immediately call Connect() before the connection has closed. - virtual ConnectionAttemptResult Connect( const char* host, unsigned short remotePort, const char *passwordData, int passwordDataLength, PublicKey *publicKey=0, unsigned connectionSocketIndex=0, unsigned sendConnectionAttemptCount=12, unsigned timeBetweenSendConnectionAttemptsMS=500, MafiaNet::TimeMS timeoutTime=0 )=0; - - /// \brief Connect to the specified host (ip or domain name) and server port, using a shared socket from another instance of RakNet - /// \param[in] host Either a dotted IP address or a domain name - /// \param[in] remotePort Which port to connect to on the remote machine. - /// \param[in] passwordData A data block that must match the data block on the server passed to SetIncomingPassword. This can be a string or can be a stream of data. Use 0 for no password. - /// \param[in] passwordDataLength The length in bytes of passwordData - /// \param[in] socket A bound socket returned by another instance of RakPeerInterface - /// \param[in] sendConnectionAttemptCount How many datagrams to send to the other system to try to connect. - /// \param[in] timeBetweenSendConnectionAttemptsMS Time to elapse before a datagram is sent to the other system to try to connect. After sendConnectionAttemptCount number of attempts, ID_CONNECTION_ATTEMPT_FAILED is returned. Under low bandwidth conditions with multiple simultaneous outgoing connections, this value should be raised to 1000 or higher, or else the MTU detection can overrun the available bandwidth. - /// \param[in] timeoutTime How long to keep the connection alive before dropping it on unable to send a reliable message. 0 to use the default from SetTimeoutTime(UNASSIGNED_SYSTEM_ADDRESS); - /// \return CONNECTION_ATTEMPT_STARTED on successful initiation. Otherwise, an appropriate enumeration indicating failure. - /// \note CONNECTION_ATTEMPT_STARTED does not mean you are already connected! - virtual ConnectionAttemptResult ConnectWithSocket(const char* host, unsigned short remotePort, const char *passwordData, int passwordDataLength, RakNetSocket2* socket, PublicKey *publicKey=0, unsigned sendConnectionAttemptCount=12, unsigned timeBetweenSendConnectionAttemptsMS=500, MafiaNet::TimeMS timeoutTime=0)=0; - - /// \brief Connect to the specified network ID (Platform specific console function) - /// \details Does built-in NAt traversal - /// \param[in] passwordData A data block that must match the data block on the server passed to SetIncomingPassword. This can be a string or can be a stream of data. Use 0 for no password. - /// \param[in] passwordDataLength The length in bytes of passwordData - //virtual bool Console2LobbyConnect( void *networkServiceId, const char *passwordData, int passwordDataLength )=0; - - /// \brief Stops the network threads and closes all connections. - /// \param[in] blockDuration How long, in milliseconds, you should wait for all remaining messages to go out, including ID_DISCONNECTION_NOTIFICATION. If 0, it doesn't wait at all. - /// \param[in] orderingChannel If blockDuration > 0, ID_DISCONNECTION_NOTIFICATION will be sent on this channel - /// \param[in] disconnectionNotificationPriority Priority at which ID_DISCONNECTION_NOTIFICATION is sent. Note that a blockDuration of 0 means the threads stop without waiting for it to flush. - virtual void Shutdown( unsigned int blockDuration, unsigned char orderingChannel=0, MafiaNet::Priority disconnectionNotificationPriority=MafiaNet::Priority::Low )=0; - - /// Returns if the network thread is running - /// \return true if the network thread is running, false otherwise - virtual bool IsActive( void ) const=0; - - /// Fills the array remoteSystems with the SystemAddress of all the systems we are connected to - /// \param[out] remoteSystems An array of SystemAddress structures to be filled with the SystemAddresss of the systems we are connected to. Pass 0 to remoteSystems to only get the number of systems we are connected to - /// \param[in, out] numberOfSystems As input, the size of remoteSystems array. As output, the number of elements put into the array - virtual bool GetConnectionList( SystemAddress *remoteSystems, unsigned short *numberOfSystems ) const=0; - - /// Returns the next uint32_t that Send() will return - /// \note If using RakPeer from multiple threads, this may not be accurate for your thread. Use IncrementNextSendReceipt() in that case. - /// \return The next uint32_t that Send() or SendList will return - virtual uint32_t GetNextSendReceipt(void)=0; - - /// Returns the next uint32_t that Send() will return, and increments the value by one - /// \note If using RakPeer from multiple threads, pass this to forceReceipt in the send function - /// \return The next uint32_t that Send() or SendList will return - virtual uint32_t IncrementNextSendReceipt(void)=0; - - /// Sends a block of data to the specified system that you are connected to. - /// This function only works while connected - /// The first byte should be a message identifier starting at ID_USER_PACKET_ENUM - /// \param[in] data The block of data to send - /// \param[in] length The size in bytes of the data to send - /// \param[in] priority What priority level to send on. See PacketPriority.h - /// \param[in] reliability How reliability to send this data. See PacketPriority.h - /// \param[in] orderingChannel When using ordered or sequenced messages, what channel to order these on. Messages are only ordered relative to other messages on the same stream - /// \param[in] systemIdentifier Who to send this packet to, or in the case of broadcasting who not to send it to. Pass either a SystemAddress structure or a RakNetGUID structure. Use UNASSIGNED_SYSTEM_ADDRESS or to specify none - /// \param[in] broadcast True to send this packet to all connected systems. If true, then systemAddress specifies who not to send the packet to. - /// \param[in] forceReceipt If 0, will automatically determine the receipt number to return. If non-zero, will return what you give it. - /// \return 0 on bad input. Otherwise a number that identifies this message. If \a reliability is a type that returns a receipt, on a later call to Receive() you will get ID_SND_RECEIPT_ACKED or ID_SND_RECEIPT_LOSS with bytes 1-4 inclusive containing this number - virtual uint32_t Send( const char *data, const int length, MafiaNet::Priority priority, MafiaNet::Reliability reliability, char orderingChannel, const AddressOrGUID systemIdentifier, bool broadcast, uint32_t forceReceiptNumber=0 )=0; - - /// "Send" to yourself rather than a remote system. The message will be processed through the plugins and returned to the game as usual - /// This function works anytime - /// The first byte should be a message identifier starting at ID_USER_PACKET_ENUM - /// \param[in] data The block of data to send - /// \param[in] length The size in bytes of the data to send - virtual void SendLoopback( const char *data, const int length )=0; - - /// Sends a block of data to the specified system that you are connected to. Same as the above version, but takes a BitStream as input. - /// \param[in] bitStream The bitstream to send - /// \param[in] priority What priority level to send on. See PacketPriority.h - /// \param[in] reliability How reliability to send this data. See PacketPriority.h - /// \param[in] orderingChannel When using ordered or sequenced messages, what channel to order these on. Messages are only ordered relative to other messages on the same stream - /// \param[in] systemIdentifier Who to send this packet to, or in the case of broadcasting who not to send it to. Pass either a SystemAddress structure or a RakNetGUID structure. Use UNASSIGNED_SYSTEM_ADDRESS or to specify none - /// \param[in] broadcast True to send this packet to all connected systems. If true, then systemAddress specifies who not to send the packet to. - /// \param[in] forceReceipt If 0, will automatically determine the receipt number to return. If non-zero, will return what you give it. - /// \return 0 on bad input. Otherwise a number that identifies this message. If \a reliability is a type that returns a receipt, on a later call to Receive() you will get ID_SND_RECEIPT_ACKED or ID_SND_RECEIPT_LOSS with bytes 1-4 inclusive containing this number - /// \note COMMON MISTAKE: When writing the first byte, bitStream->Write((unsigned char) ID_MY_TYPE) be sure it is casted to a byte, and you are not writing a 4 byte enumeration. - virtual uint32_t Send( const MafiaNet::BitStream * bitStream, MafiaNet::Priority priority, MafiaNet::Reliability reliability, char orderingChannel, const AddressOrGUID systemIdentifier, bool broadcast, uint32_t forceReceiptNumber=0 )=0; - - /// Sends multiple blocks of data, concatenating them automatically. - /// - /// This is equivalent to: - /// MafiaNet::BitStream bs; - /// bs.WriteAlignedBytes(block1, blockLength1); - /// bs.WriteAlignedBytes(block2, blockLength2); - /// bs.WriteAlignedBytes(block3, blockLength3); - /// Send(&bs, ...) - /// - /// This function only works while connected - /// \param[in] data An array of pointers to blocks of data - /// \param[in] lengths An array of integers indicating the length of each block of data - /// \param[in] numParameters Length of the arrays data and lengths - /// \param[in] priority What priority level to send on. See PacketPriority.h - /// \param[in] reliability How reliability to send this data. See PacketPriority.h - /// \param[in] orderingChannel When using ordered or sequenced messages, what channel to order these on. Messages are only ordered relative to other messages on the same stream - /// \param[in] systemIdentifier Who to send this packet to, or in the case of broadcasting who not to send it to. Pass either a SystemAddress structure or a RakNetGUID structure. Use UNASSIGNED_SYSTEM_ADDRESS or to specify none - /// \param[in] broadcast True to send this packet to all connected systems. If true, then systemAddress specifies who not to send the packet to. - /// \param[in] forceReceipt If 0, will automatically determine the receipt number to return. If non-zero, will return what you give it. - /// \return 0 on bad input. Otherwise a number that identifies this message. If \a reliability is a type that returns a receipt, on a later call to Receive() you will get ID_SND_RECEIPT_ACKED or ID_SND_RECEIPT_LOSS with bytes 1-4 inclusive containing this number - virtual uint32_t SendList( const char **data, const int *lengths, const int numParameters, MafiaNet::Priority priority, MafiaNet::Reliability reliability, char orderingChannel, const AddressOrGUID systemIdentifier, bool broadcast, uint32_t forceReceiptNumber=0 )=0; - - /// Gets a message from the incoming message queue. - /// Use DeallocatePacket() to deallocate the message after you are done with it. - /// User-thread functions, such as RPC calls and the plugin function PluginInterface::Update occur here. - /// \return 0 if no packets are waiting to be handled, otherwise a pointer to a packet. - /// \note COMMON MISTAKE: Be sure to call this in a loop, once per game tick, until it returns 0. If you only process one packet per game tick they will buffer up. - /// sa types.h contains struct Packet - virtual Packet* Receive( void )=0; - - /// Call this to deallocate a message returned by Receive() when you are done handling it. - /// \param[in] packet The message to deallocate. - virtual void DeallocatePacket( Packet *packet )=0; - - /// Return the total number of connections we are allowed - virtual unsigned int GetMaximumNumberOfPeers( void ) const=0; - - // -------------------------------------------------------------------------------------------- Connection Management Functions-------------------------------------------------------------------------------------------- - /// Close the connection to another host (if we initiated the connection it will disconnect, if they did it will kick them out). - /// \param[in] target Which system to close the connection to. - /// \param[in] sendDisconnectionNotification True to send ID_DISCONNECTION_NOTIFICATION to the recipient. False to close it silently. - /// \param[in] channel Which ordering channel to send the disconnection notification on, if any - /// \param[in] disconnectionNotificationPriority Priority to send ID_DISCONNECTION_NOTIFICATION on. - /// \param[in] reasonData Optional payload appended after the ID_DISCONNECTION_NOTIFICATION message ID so the - /// remote peer can learn *why* it was dropped (e.g. an enum + custom string). The receiver reads it - /// from packet->data+1 (length packet->length-1), exactly like any other message body. Only graceful - /// disconnects (sendDisconnectionNotification==true) carry a reason; locally-synthesized notifications - /// (ID_CONNECTION_LOST and timeout/dead-connection paths) stay payload-less, so consumers must tolerate - /// a zero-length body. Pass nullptr (the default) for no reason. Appending bytes after the 1-byte ID is - /// wire-backward-compatible: peers that only read data[0] are unaffected. - virtual void CloseConnection( const AddressOrGUID target, bool sendDisconnectionNotification, unsigned char orderingChannel=0, MafiaNet::Priority disconnectionNotificationPriority=MafiaNet::Priority::Low, const MafiaNet::BitStream *reasonData=nullptr )=0; - - /// Returns if a system is connected, disconnected, connecting in progress, or various other states - /// \param[in] systemIdentifier The system we are referring to - /// \note This locks a mutex, do not call too frequently during connection attempts or the attempt will take longer and possibly even timeout - /// \return What state the remote system is in - virtual ConnectionState GetConnectionState(const AddressOrGUID systemIdentifier)=0; - - /// Cancel a pending connection attempt - /// If we are already connected, the connection stays open - /// \param[in] target Which system to cancel - virtual void CancelConnectionAttempt( const SystemAddress target )=0; - - /// Given a systemAddress, returns an index from 0 to the maximum number of players allowed - 1. - /// \param[in] systemAddress The SystemAddress we are referring to - /// \return The index of this SystemAddress or -1 on system not found. - virtual int GetIndexFromSystemAddress( const SystemAddress systemAddress ) const=0; - - /// This function is only useful for looping through all systems - /// Given an index, will return a SystemAddress. - /// \param[in] index Index should range between 0 and the maximum number of players allowed - 1. - /// \return The SystemAddress - virtual SystemAddress GetSystemAddressFromIndex( unsigned int index )=0; - - /// Same as GetSystemAddressFromIndex but returns RakNetGUID - /// \param[in] index Index should range between 0 and the maximum number of players allowed - 1. - /// \return The RakNetGUID - virtual RakNetGUID GetGUIDFromIndex( unsigned int index )=0; - - /// Same as calling GetSystemAddressFromIndex and GetGUIDFromIndex for all systems, but more efficient - /// Indices match each other, so \a addresses[0] and \a guids[0] refer to the same system - /// \param[out] addresses All system addresses. Size of the list is the number of connections. Size of the list will match the size of the \a guids list. - /// \param[out] guids All guids. Size of the list is the number of connections. Size of the list will match the size of the \a addresses list. - virtual void GetSystemList(DataStructures::List &addresses, DataStructures::List &guids) const=0; - - /// Bans an IP from connecting. Banned IPs persist between connections but are not saved on shutdown nor loaded on startup. - /// param[in] IP Dotted IP address. Can use * as a wildcard, such as 128.0.0.* will ban all IP addresses starting with 128.0.0 - /// \param[in] milliseconds how many ms for a temporary ban. Use 0 for a permanent ban - virtual void AddToBanList( const char *IP, MafiaNet::TimeMS milliseconds=0 )=0; - - /// Allows a previously banned IP to connect. - /// param[in] Dotted IP address. Can use * as a wildcard, such as 128.0.0.* will banAll IP addresses starting with 128.0.0 - virtual void RemoveFromBanList( const char *IP )=0; - - /// Allows all previously banned IPs to connect. - virtual void ClearBanList( void )=0; - - /// Returns true or false indicating if a particular IP is banned. - /// \param[in] IP - Dotted IP address. - /// \return true if IP matches any IPs in the ban list, accounting for any wildcards. False otherwise. - virtual bool IsBanned( const char *IP )=0; - - /// Enable or disable allowing frequent connections from the same IP adderss - /// This is a security measure which is disabled by default, but can be set to true to prevent attackers from using up all connection slots - /// \param[in] b True to limit connections from the same ip to at most 1 per 100 milliseconds. - virtual void SetLimitIPConnectionFrequency(bool b)=0; - - // --------------------------------------------------------------------------------------------Pinging Functions - Functions dealing with the automatic ping mechanism-------------------------------------------------------------------------------------------- - /// Send a ping to the specified connected system. - /// \pre The sender and recipient must already be started via a successful call to Startup() - /// \param[in] target Which system to ping - virtual void Ping( const SystemAddress target )=0; - - /// Send a ping to the specified unconnected system. The remote system, if it is Initialized, will respond with ID_PONG followed by sizeof(MafiaNet::TimeMS) containing the system time the ping was sent.(Default is 4 bytes - See __GET_TIME_64BIT in types.h - /// System should reply with ID_PONG if it is active - /// \param[in] host Either a dotted IP address or a domain name. Can be 255.255.255.255 for LAN broadcast. - /// \param[in] remotePort Which port to connect to on the remote machine. - /// \param[in] onlyReplyOnAcceptingConnections Only request a reply if the remote system is accepting connections - /// \param[in] connectionSocketIndex Index into the array of socket descriptors passed to socketDescriptors in RakPeer::Startup() to send on. - /// \return true on success, false on failure (unknown hostname) - virtual bool Ping( const char* host, unsigned short remotePort, bool onlyReplyOnAcceptingConnections, unsigned connectionSocketIndex=0 )=0; - - /// Returns the average of all ping times read for the specific system or -1 if none read yet - /// \param[in] systemAddress Which system we are referring to - /// \return The ping time for this system, or -1 - virtual int GetAveragePing( const AddressOrGUID systemIdentifier )=0; - - /// Returns the last ping time read for the specific system or -1 if none read yet - /// \param[in] systemAddress Which system we are referring to - /// \return The last ping time for this system, or -1 - virtual int GetLastPing( const AddressOrGUID systemIdentifier ) const=0; - - /// Returns the lowest ping time read or -1 if none read yet - /// \param[in] systemAddress Which system we are referring to - /// \return The lowest ping time for this system, or -1 - virtual int GetLowestPing( const AddressOrGUID systemIdentifier ) const=0; - - /// Ping the remote systems every so often, or not. Can be called anytime. - /// By default this is true. Recommended to leave on, because congestion control uses it to determine how often to resend lost packets. - /// It would be true by default to prevent timestamp drift, since in the event of a clock spike, the timestamp deltas would no longer be accurate - /// \param[in] doPing True to start occasional pings. False to stop them. - virtual void SetOccasionalPing( bool doPing )=0; - - /// Return the clock difference between your system and the specified system - /// Subtract GetClockDifferential() from a time returned by the remote system to get that time relative to your own system - /// Returns 0 if the system is unknown - /// \param[in] systemIdentifier Which system we are referring to - virtual MafiaNet::Time GetClockDifferential( const AddressOrGUID systemIdentifier )=0; - - // --------------------------------------------------------------------------------------------Static Data Functions - Functions dealing with API defined synchronized memory-------------------------------------------------------------------------------------------- - /// Sets the data to send along with a LAN server discovery or offline ping reply. - /// \a length should be under 400 bytes, as a security measure against flood attacks - /// \param[in] data a block of data to store, or 0 for none - /// \param[in] length The length of data in bytes, or 0 for none - /// \sa Ping.cpp - virtual void SetOfflinePingResponse( const char *data, const unsigned int length )=0; - - /// Returns pointers to a copy of the data passed to SetOfflinePingResponse - /// \param[out] data A pointer to a copy of the data passed to \a SetOfflinePingResponse() - /// \param[out] length A pointer filled in with the length parameter passed to SetOfflinePingResponse() - /// \sa SetOfflinePingResponse - virtual void GetOfflinePingResponse( char **data, unsigned int *length )=0; - - // --------------------------------------------------------------------------------------------Session Handshake - Payloads exchanged before a connection is reported-------------------------------------------------------------------------------------------- - /// Sets this peer's session-handshake payload. - /// \details The session handshake runs after the transport connection is up but before either side - /// reports it: a client sends this payload in ID_SESSION_CONFIG_REQUEST, a server answers with it in - /// ID_SESSION_CONFIG. Neither peer produces ID_CONNECTION_REQUEST_ACCEPTED / ID_NEW_INCOMING_CONNECTION - /// until the exchange completes, so those packets mean "the remote's session payload is in hand". - /// The bytes are opaque to MafiaNet. Call before Startup()/Connect(). - /// \param[in] data A block of data to send, or 0 for none - /// \param[in] length The length of data in bytes, or 0 for none; at most MAXIMUM_SESSION_CONFIG_SIZE - virtual void SetSessionConfig( const char *data, unsigned int length )=0; - - /// Returns a pointer to the payload passed to SetSessionConfig - /// \param[out] data A pointer to the data passed to SetSessionConfig() - /// \param[out] length A pointer filled in with the length of that data - /// \sa SetSessionConfig - virtual void GetSessionConfig( char **data, unsigned int *length )=0; - - /// Returns the session payload the remote peer sent during the handshake. - /// \details Valid from the moment ID_CONNECTION_REQUEST_ACCEPTED or ID_NEW_INCOMING_CONNECTION surfaces - /// for this system, for the lifetime of that connection. - /// \param[in] systemIdentifier The connection to read - /// \param[out] length Filled in with the payload length, or 0 when there is none - /// \return Pointer to the payload owned by that connection, or 0 when there is none - virtual const char *GetRemoteSessionConfig( const AddressOrGUID systemIdentifier, unsigned int *length )=0; - - /// Server: decide each client's session answer individually instead of replying automatically. - /// \details With this on, ID_SESSION_CONFIG_REQUEST is surfaced to the application and the connection - /// stays unreported until AcceptSession() or RejectSession() is called for that peer. Off by default, in - /// which case the payload set by SetSessionConfig() answers every client and no application code is - /// required. A peer that is never answered is timed out like any other incomplete connection attempt. - /// \param[in] interactive Whether to surface ID_SESSION_CONFIG_REQUEST for a per-client decision - virtual void SetSessionConfigInteractive( bool interactive )=0; - - /// Server: accept a pending session request, sending \a data as this connection's payload. - /// \details Completes the handshake and surfaces the withheld ID_NEW_INCOMING_CONNECTION. Only - /// meaningful for a peer that surfaced ID_SESSION_CONFIG_REQUEST; ignored otherwise. - /// \param[in] systemIdentifier The peer whose request to accept - /// \param[in] data This connection's session payload, or 0 for none - /// \param[in] length The length of data in bytes, at most MAXIMUM_SESSION_CONFIG_SIZE - virtual void AcceptSession( const AddressOrGUID systemIdentifier, const char *data, unsigned int length )=0; - - /// Server: refuse a pending session request. - /// \details The client reports ID_CONNECTION_ATTEMPT_FAILED and neither side ever reports a connection. - /// \param[in] systemIdentifier The peer whose request to refuse - /// \param[in] reason Delivered to the client in ID_SESSION_CONFIG_REJECTED; may be 0 - virtual void RejectSession( const AddressOrGUID systemIdentifier, const char *reason )=0; - - /// Server: hold peers in the session handshake in a pool of their own instead of in the incoming limit. - /// \details By default a peer mid-handshake counts against SetMaximumIncomingConnections(), so peers that - /// stall the handshake take the slots of the players it is meant for. With a pool, every remote-initiated - /// peer that is not yet CONNECTED -- from its first open-connection request until the application - /// answers -- counts against  total instead, and at most  perAddress of them may come from one IP. - /// SetMaximumIncomingConnections() then bounds CONNECTED peers only: a handshake starts even while it is - /// full, so an interactive server can queue, and an AcceptSession() that would exceed it refuses the peer - /// instead. Startup()'s maxConnections must leave room for both, i.e. at least incoming +  total. - /// \param[in] total Peers that may be in the handshake at once; 0 restores the default accounting - /// \param[in] perAddress Of those, how many may share one IP address; 0 for no per-address bound - virtual void SetMaximumPendingSessions( unsigned short total, unsigned short perAddress )=0; - - /// Bounds how long a session handshake may wait for its answer, instead of the connection timeout. - /// \details On a server it is how long an interactive decision may take; on a client how long it waits - /// for the server's answer. Every SendSessionStatus() restarts it on both ends, so a server that keeps a - /// queued peer informed is never timed out by it. Set both ends: a client that gives up first fails the - /// attempt however long the server is prepared to wait. - /// \param[in] timeMS Milliseconds, or 0 to use the connection timeout (the default) - virtual void SetSessionTimeout( MafiaNet::TimeMS timeMS )=0; - - /// Server: send a status to a peer whose session request awaits AcceptSession()/RejectSession(). - /// \details The client receives it as ID_SESSION_CONFIG_STATUS with the payload after the id, and the - /// session timeout restarts on both ends. Ignored for a peer that is not awaiting a decision. - /// \param[in] systemIdentifier The waiting peer - /// \param[in] data Payload, opaque to MafiaNet - /// \param[in] length The length of data in bytes, at most MAXIMUM_SESSION_CONFIG_SIZE - virtual void SendSessionStatus( const AddressOrGUID systemIdentifier, const char *data, unsigned int length )=0; - - //--------------------------------------------------------------------------------------------Network Functions - Functions dealing with the network in general-------------------------------------------------------------------------------------------- - /// Return the unique address identifier that represents you or another system on the the network and is based on your local IP / port. - /// \param[in] systemAddress Use UNASSIGNED_SYSTEM_ADDRESS to get your behind-LAN address. Use a connected system to get their behind-LAN address - /// \param[in] index When you have multiple internal IDs, which index to return? Currently limited to MAXIMUM_NUMBER_OF_INTERNAL_IDS (so the maximum value of this variable is MAXIMUM_NUMBER_OF_INTERNAL_IDS-1) - /// \return the identifier of your system internally, which may not be how other systems see if you if you are behind a NAT or proxy - virtual SystemAddress GetInternalID( const SystemAddress systemAddress=UNASSIGNED_SYSTEM_ADDRESS, const int index=0 ) const=0; - - /// \brief Sets your internal IP address, for platforms that do not support reading it, or to override a value - /// \param[in] systemAddress. The address to set. Use SystemAddress::FromString() if you want to use a dotted string - /// \param[in] index When you have multiple internal IDs, which index to set? - virtual void SetInternalID(SystemAddress systemAddress, int index=0)=0; - - /// Return the unique address identifier that represents you on the the network and is based on your externalIP / port - /// (the IP / port the specified player uses to communicate with you) - /// \param[in] target Which remote system you are referring to for your external ID. Usually the same for all systems, unless you have two or more network cards. - virtual SystemAddress GetExternalID( const SystemAddress target ) const=0; - - /// Return my own GUID - virtual const RakNetGUID GetMyGUID(void) const=0; - - /// Return the address bound to a socket at the specified index - virtual SystemAddress GetMyBoundAddress(const int socketIndex=0)=0; - - /// Get a random number (to generate a GUID) - static uint64_t Get64BitUniqueRandomNumber(void); - - /// Given a connected system, give us the unique GUID representing that instance of RakPeer. - /// This will be the same on all systems connected to that instance of RakPeer, even if the external system addresses are different - /// Currently O(log(n)), but this may be improved in the future. If you use this frequently, you may want to cache the value as it won't change. - /// Returns UNASSIGNED_RAKNET_GUID if system address can't be found. - /// If \a input is UNASSIGNED_SYSTEM_ADDRESS, will return your own GUID - /// \pre Call Startup() first, or the function will return UNASSIGNED_RAKNET_GUID - /// \param[in] input The system address of the system we are connected to - virtual const RakNetGUID& GetGuidFromSystemAddress( const SystemAddress input ) const=0; - - /// Given the GUID of a connected system, give us the system address of that system. - /// The GUID will be the same on all systems connected to that instance of RakPeer, even if the external system addresses are different - /// Currently O(log(n)), but this may be improved in the future. If you use this frequently, you may want to cache the value as it won't change. - /// If \a input is UNASSIGNED_RAKNET_GUID, will return UNASSIGNED_SYSTEM_ADDRESS - /// \param[in] input The RakNetGUID of the system we are checking to see if we are connected to - virtual SystemAddress GetSystemAddressFromGuid( const RakNetGUID input ) const=0; - - /// Given the SystemAddress of a connected system, get the public key they provided as an identity - /// Returns false if system address was not found or client public key is not known - /// \param[in] input The RakNetGUID of the system - /// \param[in] client_public_key The connected client's public key is copied to this address. Buffer must be cat::EasyHandshake::PUBLIC_KEY_BYTES bytes in length. - virtual bool GetClientPublicKeyFromSystemAddress( const SystemAddress input, char *client_public_key ) const=0; - - /// Set the time, in MS, to use before considering ourselves disconnected after not being able to deliver a reliable message. - /// Default time is 10,000 or 10 seconds in release and 30,000 or 30 seconds in debug. - /// Do not set different values for different computers that are connected to each other, or you won't be able to reconnect after ID_CONNECTION_LOST - /// \param[in] timeMS Time, in MS - /// \param[in] target Which system to do this for. Pass UNASSIGNED_SYSTEM_ADDRESS for all systems. - virtual void SetTimeoutTime(MafiaNet::TimeMS timeMS, const SystemAddress target )=0; - - /// \param[in] target Which system to do this for. Pass UNASSIGNED_SYSTEM_ADDRESS to get the default value - /// \return timeoutTime for a given system. - virtual MafiaNet::TimeMS GetTimeoutTime( const SystemAddress target )=0; - - /// Returns the current MTU size - /// \param[in] target Which system to get this for. UNASSIGNED_SYSTEM_ADDRESS to get the default - /// \return The current MTU size - virtual int GetMTUSize( const SystemAddress target ) const=0; - - /// Returns the number of IP addresses this system has internally. Get the actual addresses from GetLocalIP() - virtual unsigned GetNumberOfAddresses( void )=0; - - /// Returns an IP address at index 0 to GetNumberOfAddresses-1 - /// \param[in] index index into the list of IP addresses - /// \return The local IP address at this index - virtual const char* GetLocalIP( unsigned int index )=0; - - /// Is this a local IP? - /// \param[in] An IP address to check, excluding the port - /// \return True if this is one of the IP addresses returned by GetLocalIP - virtual bool IsLocalIP( const char *ip )=0; - - /// Allow or disallow connection responses from any IP. Normally this should be false, but may be necessary - /// when connecting to servers with multiple IP addresses. - /// \param[in] allow - True to allow this behavior, false to not allow. Defaults to false. Value persists between connections - virtual void AllowConnectionResponseIPMigration( bool allow )=0; - - /// Sends a one byte message ID_ADVERTISE_SYSTEM to the remote unconnected system. - /// This will tell the remote system our external IP outside the LAN along with some user data. - /// \pre The sender and recipient must already be started via a successful call to Initialize - /// \param[in] host Either a dotted IP address or a domain name - /// \param[in] remotePort Which port to connect to on the remote machine. - /// \param[in] data Optional data to append to the packet. - /// \param[in] dataLength length of data in bytes. Use 0 if no data. - /// \param[in] connectionSocketIndex Index into the array of socket descriptors passed to socketDescriptors in RakPeer::Startup() to send on. - /// \return false if IsActive()==false or the host is unresolvable. True otherwise - virtual bool AdvertiseSystem( const char *host, unsigned short remotePort, const char *data, int dataLength, unsigned connectionSocketIndex=0 )=0; - - /// Controls how often to return ID_DOWNLOAD_PROGRESS for large message downloads. - /// ID_DOWNLOAD_PROGRESS is returned to indicate a new partial message chunk, roughly the MTU size, has arrived - /// As it can be slow or cumbersome to get this notification for every chunk, you can set the interval at which it is returned. - /// Defaults to 0 (never return this notification) - /// \param[in] interval How many messages to use as an interval - virtual void SetSplitMessageProgressInterval(int interval)=0; - - /// Returns what was passed to SetSplitMessageProgressInterval() - /// \return What was passed to SetSplitMessageProgressInterval(). Default to 0. - virtual int GetSplitMessageProgressInterval(void) const=0; - - /// Set how long to wait before giving up on sending an unreliable message - /// Useful if the network is clogged up. - /// Set to 0 or less to never timeout. Defaults to 0. - /// \param[in] timeoutMS How many ms to wait before simply not sending an unreliable message. - virtual void SetUnreliableTimeout(MafiaNet::TimeMS timeoutMS)=0; - - /// Send a message to host, with the IP socket option TTL set to 3 - /// This message will not reach the host, but will open the router. - /// Used for NAT-Punchthrough - virtual void SendTTL( const char* host, unsigned short remotePort, int ttl, unsigned connectionSocketIndex=0 )=0; - - // -------------------------------------------------------------------------------------------- Plugin Functions-------------------------------------------------------------------------------------------- - /// \brief Attaches a Plugin interface to an instance of the base class (RakPeer or PacketizedTCP) to run code automatically on message receipt in the Receive call. - /// If the plugin returns false from PluginInterface::UsesReliabilityLayer(), which is the case for all plugins except PacketLogger, you can call AttachPlugin() and DetachPlugin() for this plugin while RakPeer is active. - /// \param[in] messageHandler Pointer to the plugin to attach. - virtual void AttachPlugin( PluginInterface2 *plugin )=0; - - /// \brief Detaches a Plugin interface from the instance of the base class (RakPeer or PacketizedTCP) it is attached to. - /// \details This method disables the plugin code from running automatically on base class's updates or message receipt. - /// If the plugin returns false from PluginInterface::UsesReliabilityLayer(), which is the case for all plugins except PacketLogger, you can call AttachPlugin() and DetachPlugin() for this plugin while RakPeer is active. - /// \param[in] messageHandler Pointer to a plugin to detach. - virtual void DetachPlugin( PluginInterface2 *messageHandler )=0; - - // --------------------------------------------------------------------------------------------Miscellaneous Functions-------------------------------------------------------------------------------------------- - /// Put a message back at the end of the receive queue in case you don't want to deal with it immediately - /// \param[in] packet The packet you want to push back. - /// \param[in] pushAtHead True to push the packet so that the next receive call returns it. False to push it at the end of the queue (obviously pushing it at the end makes the packets out of order) - virtual void PushBackPacket( Packet *packet, bool pushAtHead )=0; - - /// \internal - /// \brief For a given system identified by \a guid, change the SystemAddress to send to. - /// \param[in] guid The connection we are referring to - /// \param[in] systemAddress The new address to send to - virtual void ChangeSystemAddress(RakNetGUID guid, const SystemAddress &systemAddress)=0; - - /// \returns a packet for you to write to if you want to create a Packet for some reason. - /// You can add it to the receive buffer with PushBackPacket - /// \param[in] dataSize How many bytes to allocate for the buffer - /// \return A packet you can write to - virtual Packet* AllocatePacket(unsigned dataSize)=0; - - /// Get the socket used with a particular active connection - /// The smart pointer reference counts the RakNetSocket2 object, so the socket will remain active as long as the smart pointer does, even if RakNet were to shutdown or close the connection. - /// \note This sends a query to the thread and blocks on the return value for up to one second. In practice it should only take a millisecond or so. - /// \param[in] target Which system - /// \return A smart pointer object containing the socket information about the socket. Be sure to check IsNull() which is returned if the update thread is unresponsive, shutting down, or if this system is not connected - virtual RakNetSocket2* GetSocket( const SystemAddress target )=0; - - /// Get all sockets in use - /// \note This sends a query to the thread and blocks on the return value for up to one second. In practice it should only take a millisecond or so. - /// \param[out] sockets List of RakNetSocket2 structures in use. Sockets will not be closed until \a sockets goes out of scope - virtual void GetSockets( DataStructures::List &sockets )=0; - virtual void ReleaseSockets( DataStructures::List &sockets )=0; - - virtual void WriteOutOfBandHeader(MafiaNet::BitStream *bitStream)=0; - - /// If you need code to run in the same thread as RakNet's update thread, this function can be used for that - /// \param[in] _userUpdateThreadPtr C callback function - /// \param[in] _userUpdateThreadData Passed to C callback function - virtual void SetUserUpdateThread(void (*_userUpdateThreadPtr)(RakPeerInterface *, void *), void *_userUpdateThreadData)=0; - - /// Set a C callback to be called whenever a datagram arrives - /// Return true from the callback to have RakPeer handle the datagram. Return false and RakPeer will ignore the datagram. - /// This can be used to filter incoming datagrams by system, or to share a recvfrom socket with RakPeer - /// RNS2RecvStruct will only remain valid for the duration of the call - /// If the incoming datagram is not from your game at all, it is a RakNet packet. - /// If the incoming datagram has an IP address that matches a known address from your game, then check the first byte of data. - /// For RakNet connected systems, the first bit is always 1. So for your own game packets, make sure the first bit is always 0. - virtual void SetIncomingDatagramEventHandler( bool (*_incomingDatagramEventHandler)(RNS2RecvStruct *) )=0; - - // --------------------------------------------------------------------------------------------Network Simulator Functions-------------------------------------------------------------------------------------------- - /// Adds simulated ping and packet loss to the outgoing data flow. - /// To simulate bi-directional ping and packet loss, you should call this on both the sender and the recipient, with half the total ping and packetloss value on each. - /// You can exclude network simulator code with the _RELEASE #define to decrease code size - /// \deprecated Use http://www.jenkinssoftware.com/forum/index.php?topic=1671.0 instead. - /// \note Doesn't work past version 3.6201 - /// \param[in] packetloss Chance to lose a packet. Ranges from 0 to 1. - /// \param[in] minExtraPing The minimum time to delay sends. - /// \param[in] extraPingVariance The additional random time to delay sends. - virtual void ApplyNetworkSimulator( float packetloss, unsigned short minExtraPing, unsigned short extraPingVariance)=0; - - /// Limits how much outgoing bandwidth can be sent per-connection. - /// This limit does not apply to the sum of all connections! - /// Exceeding the limit queues up outgoing traffic - /// \param[in] maxBitsPerSecond Maximum bits per second to send. Use 0 for unlimited (default). Once set, it takes effect immedately and persists until called again. - virtual void SetPerConnectionOutgoingBandwidthLimit( unsigned maxBitsPerSecond )=0; - - /// Returns if you previously called ApplyNetworkSimulator - /// \return If you previously called ApplyNetworkSimulator - virtual bool IsNetworkSimulatorActive( void )=0; - - // --------------------------------------------------------------------------------------------Statistical Functions - Functions dealing with API performance-------------------------------------------------------------------------------------------- - - /// Returns a structure containing a large set of network statistics for the specified system. - /// You can map this data to a string using the C style StatisticsToString() function - /// \param[in] systemAddress: Which connected system to get statistics for - /// \param[in] rns If you supply this structure, it will be written to it. Otherwise it will use a static struct, which is not threadsafe - /// \return 0 on can't find the specified system. A pointer to a set of data otherwise. - /// \sa statistics.h - virtual RakNetStatistics * GetStatistics( const SystemAddress systemAddress, RakNetStatistics *rns=0 )=0; - /// \brief Returns the network statistics of the system at the given index in the remoteSystemList. - /// \return True if the index is less than the maximum number of peers allowed and the system is active. False otherwise. - virtual bool GetStatistics( const unsigned int index, RakNetStatistics *rns )=0; - /// \brief Returns the list of systems, and statistics for each of those systems - /// Each system has one entry in each of the lists, in the same order - /// \param[out] addresses SystemAddress for each connected system - /// \param[out] guids RakNetGUID for each connected system - /// \param[out] statistics Calculated RakNetStatistics for each connected system - virtual void GetStatisticsList(DataStructures::List &addresses, DataStructures::List &guids, DataStructures::List &statistics)=0; - - /// \Returns how many messages are waiting when you call Receive() - virtual unsigned int GetReceiveBufferSize(void)=0; - - // --------------------------------------------------------------------------------------------EVERYTHING AFTER THIS COMMENT IS FOR INTERNAL USE ONLY-------------------------------------------------------------------------------------------- - - /// \internal - // Call manually if RAKPEER_USER_THREADED==1 at least every 30 milliseconds. - // updateBitStream should be: - // BitStream updateBitStream( MAXIMUM_MTU_SIZE - // #if LIBCAT_SECURITY==1 - // + cat::AuthenticatedEncryption::OVERHEAD_BYTES - // #endif - // ); - virtual bool RunUpdateCycle( BitStream &updateBitStream )=0; - - /// \internal - virtual bool SendOutOfBand(const char *host, unsigned short remotePort, const char *data, BitSize_t dataLength, unsigned connectionSocketIndex=0 )=0; - -} -; - -} // namespace MafiaNet - -#endif +/* + * Copyright (c) 2026, MafiaHub + * Licensed under MIT-style license + * + * Deprecated include path. "mafianet/peerinterface.h" was renamed to "mafianet/RakPeerInterface.h" so + * every header follows the PascalCase name of the class it declares. This + * forwarding header is kept for one release cycle and will then be removed. + * Define MAFIANET_SILENCE_DEPRECATED_INCLUDES to suppress the message. + */ +#pragma once +#ifndef MAFIANET_SILENCE_DEPRECATED_INCLUDES +#pragma message("mafianet/peerinterface.h is deprecated; include mafianet/RakPeerInterface.h instead") +#endif +#include "RakPeerInterface.h" diff --git a/Source/include/mafianet/sleep.h b/Source/include/mafianet/sleep.h index 83f825787..ad4a744d3 100644 --- a/Source/include/mafianet/sleep.h +++ b/Source/include/mafianet/sleep.h @@ -1,18 +1,14 @@ -/* - * Copyright (c) 2014, Oculus VR, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * RakNet License.txt file in the licenses directory of this source tree. An additional grant - * of patent rights can be found in the RakNet Patents.txt file in the same directory. - * - */ - -#ifndef __RAK_SLEEP_H -#define __RAK_SLEEP_H - -#include "Export.h" - -void RAK_DLL_EXPORT RakSleep(unsigned int ms); - -#endif +/* + * Copyright (c) 2026, MafiaHub + * Licensed under MIT-style license + * + * Deprecated include path. "mafianet/sleep.h" was renamed to "mafianet/RakSleep.h" so + * every header follows the PascalCase name of the class it declares. This + * forwarding header is kept for one release cycle and will then be removed. + * Define MAFIANET_SILENCE_DEPRECATED_INCLUDES to suppress the message. + */ +#pragma once +#ifndef MAFIANET_SILENCE_DEPRECATED_INCLUDES +#pragma message("mafianet/sleep.h is deprecated; include mafianet/RakSleep.h instead") +#endif +#include "RakSleep.h" diff --git a/Source/include/mafianet/smartptr.h b/Source/include/mafianet/smartptr.h index fd4e0f966..dabda0d25 100644 --- a/Source/include/mafianet/smartptr.h +++ b/Source/include/mafianet/smartptr.h @@ -1,188 +1,14 @@ -/* - * Original work: Copyright (c) 2014, Oculus VR, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * RakNet License.txt file in the licenses directory of this source tree. An additional grant - * of patent rights can be found in the RakNet Patents.txt file in the same directory. - * - * - * Modified work: Copyright (c) 2017, SLikeSoft UG (haftungsbeschränkt) - * - * This source code was modified by SLikeSoft. Modifications are licensed under the MIT-style - * license found in the license.txt file in the root directory of this source tree. - */ - -#ifndef __RAKNET_SMART_PTR_H -#define __RAKNET_SMART_PTR_H - -// From http://www.codeproject.com/KB/cpp/SmartPointers.aspx -// with bugs fixed - -#include "memoryoverride.h" -#include "Export.h" - -//static int allocCount=0; -//static int deallocCount=0; - -namespace MafiaNet -{ - -class RAK_DLL_EXPORT ReferenceCounter -{ -private: - int refCount; - -public: - ReferenceCounter() {refCount=0;} - ~ReferenceCounter() {} - void AddRef() {refCount++;} - int Release() {return --refCount;} - int GetRefCount(void) const {return refCount;} -}; - -template < typename T > class RAK_DLL_EXPORT RakNetSmartPtr -{ -private: - T* ptr; // pointer - ReferenceCounter* reference; // Reference refCount - -public: - RakNetSmartPtr() : ptr(0), reference(0) - { - // Do not allocate by default, wasteful if we just have a list of preallocated and unassigend smart pointers - } - - RakNetSmartPtr(T* pValue) : ptr(pValue) - { - reference = MafiaNet::OP_NEW(_FILE_AND_LINE_); - reference->AddRef(); - -// allocCount+=2; -// printf("allocCount=%i deallocCount=%i Line=%i\n",allocCount, deallocCount, __LINE__); - } - - RakNetSmartPtr(const RakNetSmartPtr& sp) : ptr(sp.ptr), reference(sp.reference) - { - if (reference) - reference->AddRef(); - } - - ~RakNetSmartPtr() - { - if(reference && reference->Release() == 0) - { - MafiaNet::OP_DELETE(ptr, _FILE_AND_LINE_); - MafiaNet::OP_DELETE(reference, _FILE_AND_LINE_); - -// deallocCount+=2; -// printf("allocCount=%i deallocCount=%i Line=%i\n",allocCount, deallocCount, __LINE__); - } - } - - bool IsNull(void) const - { - return ptr==0; - } - - void SetNull(void) - { - if(reference && reference->Release() == 0) - { - MafiaNet::OP_DELETE(ptr, _FILE_AND_LINE_); - MafiaNet::OP_DELETE(reference, _FILE_AND_LINE_); - -// deallocCount+=2; -// printf("allocCount=%i deallocCount=%i Line=%i\n",allocCount, deallocCount, __LINE__); - } - ptr=0; - reference=0; - } - - bool IsUnique(void) const - { - return reference->GetRefCount()==1; - } - - // Allow you to change the values of the internal contents of the pointer, without changing what is pointed to by other instances of the smart pointer - void Clone(bool copyContents) - { - if (IsUnique()==false) - { - reference->Release(); - - reference = MafiaNet::OP_NEW(_FILE_AND_LINE_); - reference->AddRef(); - T* oldPtr=ptr; - ptr= MafiaNet::OP_NEW(_FILE_AND_LINE_); - if (copyContents) - *ptr=*oldPtr; - } - } - - int GetRefCount(void) const - { - return reference->GetRefCount(); - } - - T& operator* () - { - return *ptr; - } - - const T& operator* () const - { - return *ptr; - } - - T* operator-> () - { - return ptr; - } - - const T* operator-> () const - { - return ptr; - } - - bool operator == (const RakNetSmartPtr& sp) - { - return ptr == sp.ptr; - } - bool operator<( const RakNetSmartPtr &right ) {return ptr < right.ptr;} - bool operator>( const RakNetSmartPtr &right ) {return ptr > right.ptr;} - - bool operator != (const RakNetSmartPtr& sp) - { - return ptr != sp.ptr; - } - - RakNetSmartPtr& operator = (const RakNetSmartPtr& sp) - { - // Assignment operator - - if (this != &sp) // Avoid self assignment - { - if(reference && reference->Release() == 0) - { - MafiaNet::OP_DELETE(ptr, _FILE_AND_LINE_); - MafiaNet::OP_DELETE(reference, _FILE_AND_LINE_); - -// deallocCount+=2; -// printf("allocCount=%i deallocCount=%i Line=%i\n",allocCount, deallocCount, __LINE__); - } - - ptr = sp.ptr; - reference = sp.reference; - if (reference) - reference->AddRef(); - } - return *this; - } - - -}; - -} // namespace MafiaNet - -#endif +/* + * Copyright (c) 2026, MafiaHub + * Licensed under MIT-style license + * + * Deprecated include path. "mafianet/smartptr.h" was renamed to "mafianet/RakNetSmartPtr.h" so + * every header follows the PascalCase name of the class it declares. This + * forwarding header is kept for one release cycle and will then be removed. + * Define MAFIANET_SILENCE_DEPRECATED_INCLUDES to suppress the message. + */ +#pragma once +#ifndef MAFIANET_SILENCE_DEPRECATED_INCLUDES +#pragma message("mafianet/smartptr.h is deprecated; include mafianet/RakNetSmartPtr.h instead") +#endif +#include "RakNetSmartPtr.h" diff --git a/Source/include/mafianet/socket2.h b/Source/include/mafianet/socket2.h index 046af477f..e8acf72ab 100644 --- a/Source/include/mafianet/socket2.h +++ b/Source/include/mafianet/socket2.h @@ -1,342 +1,14 @@ -/* - * Original work: Copyright (c) 2014, Oculus VR, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * RakNet License.txt file in the licenses directory of this source tree. An additional grant - * of patent rights can be found in the RakNet Patents.txt file in the same directory. - * - * - * Modified work: Copyright (c) 2016-2017, SLikeSoft UG (haftungsbeschränkt) - * - * This source code was modified by SLikeSoft. Modifications are licensed under the MIT-style - * license found in the license.txt file in the root directory of this source tree. - */ - -#ifndef __RAKNET_SOCKET_2_H -#define __RAKNET_SOCKET_2_H - -#include "types.h" -#include "MTUSize.h" -#include "LocklessTypes.h" -#include "thread.h" -#include "DS_ThreadsafeAllocatingQueue.h" -#include "Export.h" - -// Batched datagram I/O (recvmmsg / sendmmsg) is guarded by a plain -// `#if defined(__linux__)` wherever it appears. There is no macro and no build -// option for it: the syscalls exist on Linux and nowhere else MafiaNet targets, -// so it is simply always on there. Every other platform compiles the portable -// fallbacks instead -- RakNetSocket2::SendBatch loops Send(), and the scalar -// recvfrom loop drains the socket. -// -// Delivery semantics are identical either way: the same datagrams arrive, in -// the same order, with the same reliability, and nothing differs that -// application code can observe. Two internals DO differ -- the number of -// system calls, and how SendBatch reports a transient send failure: the -// batched override classifies errno and can return 0 ("nothing sent, retry -// later"), whereas the portable loop cannot read errno through Send() and -// reports every failure as permanent. See the SendBatch contract below. -// Either way the datagrams are dropped and the reliability layer resends. - -// For CFSocket -// https://developer.apple.com/library/mac/#documentation/CoreFOundation/Reference/CFSocketRef/Reference/reference.html -// Reason: http://sourceforge.net/p/open-dis/discussion/683284/thread/0929d6a0 -#if defined(__APPLE__) -#import -#include -#include -#endif - -namespace MafiaNet -{ - -class RakNetSocket2; -struct RNS2_BerkleyBindParameters; -struct RNS2_SendParameters; -#ifdef WIN32 -typedef SOCKET RNS2Socket; -#else -// #low determine whether we cannot use SOCKET on all platforms... -typedef int RNS2Socket; -#endif - -enum RNS2BindResult -{ - BR_SUCCESS, - BR_REQUIRES_RAKNET_SUPPORT_IPV6_DEFINE, - BR_FAILED_TO_BIND_SOCKET, - BR_FAILED_SEND_TEST, -}; - -typedef int RNS2SendResult; - -/// The last socket error the calling thread raised, as WSAGetLastError() on -/// Windows and errno everywhere else. -/// -/// Send() collapses every failure to a single negative RNS2SendResult (sendto's -/// own return value), which loses the reason. Call this immediately after a -/// failing socket call on the same thread to recover it -- any intervening -/// socket call may overwrite it. -int RNS2_GetLastSocketError(void); - -/// Does \a err mean "that datagram was larger than the outgoing interface's -/// MTU"? WSAEMSGSIZE on Windows, EMSGSIZE elsewhere. -/// -/// This is a local refusal, not a network event: the stack rejected the send -/// outright, so every retry at that size fails identically and instantly. The -/// connection handshake uses it to abandon an MTU rung the moment the local -/// interface refuses it -- a VPN or PPPoE adapter with a small MTU -- instead of -/// spending that rung's whole attempt budget on sends that never leave the -/// machine. -/// -/// Split out as a free function taking a plain int so the classification is -/// unit testable without provoking a real socket failure. -bool RNS2_IsDatagramTooLargeError(int err); - -enum RNS2Type -{ - RNS2T_WINDOWS, - RNS2T_LINUX -}; - -struct RNS2_SendParameters -{ - RNS2_SendParameters() {ttl=0;} - char *data; - int length; - SystemAddress systemAddress; - int ttl; -}; - -struct RNS2RecvStruct -{ - - char data[MAXIMUM_MTU_SIZE]; - - int bytesRead; - SystemAddress systemAddress; - MafiaNet::TimeUS timeRead; - RakNetSocket2 *socket; -}; - -class RakNetSocket2Allocator -{ -public: - static RakNetSocket2* AllocRNS2(void); - static void DeallocRNS2(RakNetSocket2 *s); -}; - -class RAK_DLL_EXPORT RNS2EventHandler -{ -public: - RNS2EventHandler() {} - virtual ~RNS2EventHandler() {} - - // bufferedPackets.Push(recvFromStruct); - // quitAndDataEvents.SetEvent(); - virtual void OnRNS2Recv(RNS2RecvStruct *recvStruct)=0; - virtual void DeallocRNS2RecvStruct(RNS2RecvStruct *s, const char *file, unsigned int line)=0; - virtual RNS2RecvStruct *AllocRNS2RecvStruct(const char *file, unsigned int line)=0; - - // recvFromStruct=bufferedPackets.Allocate( _FILE_AND_LINE_ ); - // DataStructures::ThreadsafeAllocatingQueue bufferedPackets; -}; - -class RakNetSocket2 -{ -public: - RakNetSocket2(); - virtual ~RakNetSocket2(); - - // In order for the handler to trigger, some platforms must call PollRecvFrom, some platforms this create an internal thread. - void SetRecvEventHandler(RNS2EventHandler *_eventHandler); - virtual RNS2SendResult Send( RNS2_SendParameters *sendParameters, const char *file, unsigned int line )=0; - // Batched send. The base implementation simply loops Send() so every socket - // type has a working default; RNS2_Linux overrides it with sendmmsg where the - // syscall exists (Linux). - // Returns a datagram COUNT, NOT the byte total Send() returns: - // > 0 datagrams accepted (may be < count -- see the drop rule below) - // 0 nothing went out, but nothing is permanently wrong: a transient - // socket-wide condition (send buffer full, interrupted call). - // Retry on a later tick. - // < 0 nothing went out and at least one datagram failed permanently; - // the value is the first such error, mirroring sendmmsg(2)'s - // "an error is returned only if no datagrams could be sent". - // A datagram that fails on its own (bad destination, oversized) is dropped and - // the rest of the batch is still sent, so the count may be short without an - // error being reported. - // Both implementations agree on the sign convention above, but NOT on how they - // detect the transient case: the sendmmsg override classifies errno - // (ClassifySendmmsgErrno) and so can return 0, whereas the base loop cannot - // portably read errno through Send() and reports every failure as permanent. - // A caller must therefore treat "0" and "negative" alike as "these datagrams - // did not go out"; only the diagnostics differ. See MmsgBatchTests. - // RNS2_SendParameters::ttl is honoured either way: sendmmsg has no per-message - // TTL, so the override defers a batch carrying one to this base loop. - virtual RNS2SendResult SendBatch( RNS2_SendParameters *sends, unsigned count, const char *file, unsigned int line ); - RNS2Type GetSocketType(void) const; - void SetSocketType(RNS2Type t); - bool IsBerkleySocket(void) const; - SystemAddress GetBoundAddress(void) const; - unsigned int GetUserConnectionSocketIndex(void) const; - void SetUserConnectionSocketIndex(unsigned int i); - RNS2EventHandler * GetEventHandler(void) const; - - // ----------- STATICS ------------ - static void GetMyIP( SystemAddress addresses[MAXIMUM_NUMBER_OF_INTERNAL_IDS] ); - static void DomainNameToIP( const char *domainName, char ip[65] ); - -protected: - RNS2EventHandler *eventHandler; - RNS2Type socketType; - SystemAddress boundAddress; - unsigned int userConnectionSocketIndex; -}; - -struct RNS2_BerkleyBindParameters -{ - // Input parameters - unsigned short port; - char *hostAddress; - unsigned short addressFamily; // AF_INET or AF_INET6 - int type; // SOCK_DGRAM - int protocol; // 0 - bool nonBlockingSocket; - int setBroadcast; - int setIPHdrIncl; - int doNotFragment; - int pollingThreadPriority; - RNS2EventHandler *eventHandler; -}; - -// Berkeley sockets interface - base class for all platforms -class IRNS2_Berkley : public RakNetSocket2 -{ -public: - // ----------- STATICS ------------ - // For addressFamily, use AF_INET - // For type, use SOCK_DGRAM - static bool IsPortInUse(unsigned short port, const char *hostAddress, unsigned short addressFamily, int type ); - - // ----------- MEMBERS ------------ - virtual RNS2BindResult Bind( RNS2_BerkleyBindParameters *bindParameters, const char *file, unsigned int line )=0; -}; -// Common Berkeley socket implementation for Windows and Linux -class RNS2_Berkley : public IRNS2_Berkley -{ -public: - RNS2_Berkley(); - virtual ~RNS2_Berkley(); - int CreateRecvPollingThread(int threadPriority); - void SignalStopRecvPollingThread(void); - void BlockOnStopRecvPollingThread(void); - const RNS2_BerkleyBindParameters *GetBindings(void) const; - RNS2Socket GetSocket(void) const; - void SetDoNotFragment( int opt ); - -protected: - // Used by other classes - RNS2BindResult BindShared( RNS2_BerkleyBindParameters *bindParameters, const char *file, unsigned int line ); - RNS2BindResult BindSharedIPV4( RNS2_BerkleyBindParameters *bindParameters, const char *file, unsigned int line ); - RNS2BindResult BindSharedIPV4And6( RNS2_BerkleyBindParameters *bindParameters, const char *file, unsigned int line ); - - static void GetSystemAddressIPV4 ( RNS2Socket rns2Socket, SystemAddress *systemAddressOut ); - static void GetSystemAddressIPV4And6 ( RNS2Socket rns2Socket, SystemAddress *systemAddressOut ); - - // Internal - void SetNonBlockingSocket(unsigned long nonblocking); - void SetSocketOptions(void); - void SetBroadcastSocket(int broadcast); - void SetIPHdrIncl(int ipHdrIncl); - void RecvFromBlocking(RNS2RecvStruct *recvFromStruct); - void RecvFromBlockingIPV4(RNS2RecvStruct *recvFromStruct); - void RecvFromBlockingIPV4And6(RNS2RecvStruct *recvFromStruct); - - RNS2Socket rns2Socket; - RNS2_BerkleyBindParameters binding; - - unsigned RecvFromLoopInt(void); - // Batched drain of the recv socket via recvmmsg (Linux). - // Declared unconditionally; only ever called from RecvFromLoopInt under the - // same guard, and only defined on that platform. - void RecvFromBatchedLoop(void); - MafiaNet::LocklessUint32_t isRecvFromLoopThreadActive; - volatile bool endThreads; - // Constructor not called! - -#if defined(__APPLE__) - // http://sourceforge.net/p/open-dis/discussion/683284/thread/0929d6a0 - CFSocketRef _cfSocket; -#endif - - static RAK_THREAD_DECLARATION(RecvFromLoop); -}; - -#if defined(_WIN32) || defined(__GNUC__) || defined(__GCCXML__) || defined(__S3E__) -class RNS2_Windows_Linux -{ -public: -protected: - static RNS2SendResult Send_Windows_Linux( RNS2Socket rns2Socket, RNS2_SendParameters *sendParameters, const char *file, unsigned int line ); -}; -#endif - -#if defined(_WIN32) - -class RAK_DLL_EXPORT SocketLayerOverride -{ -public: - SocketLayerOverride() {} - virtual ~SocketLayerOverride() {} - - /// Called when SendTo would otherwise occur. - virtual int RakNetSendTo( const char *data, int length, const SystemAddress &systemAddress )=0; - - /// Called when RecvFrom would otherwise occur. Return number of bytes read. Write data into dataOut - // Return -1 to use RakNet's normal recvfrom, 0 to abort RakNet's normal recvfrom, and positive to return data - virtual int RakNetRecvFrom( char dataOut[ MAXIMUM_MTU_SIZE ], SystemAddress *senderOut, bool calledFromMainThread )=0; -}; - -class RNS2_Windows : public RNS2_Berkley, public RNS2_Windows_Linux -{ -public: - RNS2_Windows(); - virtual ~RNS2_Windows(); - RNS2BindResult Bind( RNS2_BerkleyBindParameters *bindParameters, const char *file, unsigned int line ); - RNS2SendResult Send( RNS2_SendParameters *sendParameters, const char *file, unsigned int line ); - void SetSocketLayerOverride(SocketLayerOverride *_slo); - SocketLayerOverride* GetSocketLayerOverride(void); - // ----------- STATICS ------------ - static void GetMyIP( SystemAddress addresses[MAXIMUM_NUMBER_OF_INTERNAL_IDS] ); -protected: - static void GetMyIPIPV4( SystemAddress addresses[MAXIMUM_NUMBER_OF_INTERNAL_IDS] ); - static void GetMyIPIPV4And6( SystemAddress addresses[MAXIMUM_NUMBER_OF_INTERNAL_IDS] ); - SocketLayerOverride *slo; -}; - -#else -class RNS2_Linux : public RNS2_Berkley, public RNS2_Windows_Linux -{ -public: - RNS2BindResult Bind( RNS2_BerkleyBindParameters *bindParameters, const char *file, unsigned int line ); - RNS2SendResult Send( RNS2_SendParameters *sendParameters, const char *file, unsigned int line ); - // Guarded because RNS2_Linux is the non-Windows socket class: macOS and the - // BSDs compile it too, and sendmmsg/mmsghdr do not exist there. Those - // platforms inherit the portable base SendBatch (a Send() loop). -#if defined(__linux__) - RNS2SendResult SendBatch( RNS2_SendParameters *sends, unsigned count, const char *file, unsigned int line ); -#endif - - // ----------- STATICS ------------ - static void GetMyIP( SystemAddress addresses[MAXIMUM_NUMBER_OF_INTERNAL_IDS] ); -protected: - static void GetMyIPIPV4( SystemAddress addresses[MAXIMUM_NUMBER_OF_INTERNAL_IDS] ); - static void GetMyIPIPV4And6( SystemAddress addresses[MAXIMUM_NUMBER_OF_INTERNAL_IDS] ); -}; - -#endif // Linux - -} // namespace MafiaNet - -#endif // __RAKNET_SOCKET_2_H +/* + * Copyright (c) 2026, MafiaHub + * Licensed under MIT-style license + * + * Deprecated include path. "mafianet/socket2.h" was renamed to "mafianet/RakNetSocket2.h" so + * every header follows the PascalCase name of the class it declares. This + * forwarding header is kept for one release cycle and will then be removed. + * Define MAFIANET_SILENCE_DEPRECATED_INCLUDES to suppress the message. + */ +#pragma once +#ifndef MAFIANET_SILENCE_DEPRECATED_INCLUDES +#pragma message("mafianet/socket2.h is deprecated; include mafianet/RakNetSocket2.h instead") +#endif +#include "RakNetSocket2.h" diff --git a/Source/include/mafianet/statistics.h b/Source/include/mafianet/statistics.h index d66fc930d..c24b3f5e8 100644 --- a/Source/include/mafianet/statistics.h +++ b/Source/include/mafianet/statistics.h @@ -1,140 +1,14 @@ -/* - * Original work: Copyright (c) 2014, Oculus VR, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * RakNet License.txt file in the licenses directory of this source tree. An additional grant - * of patent rights can be found in the RakNet Patents.txt file in the same directory. - * - * - * Modified work: Copyright (c) 2016-2018, SLikeSoft UG (haftungsbeschränkt) - * - * This source code was modified by SLikeSoft. Modifications are licensed under the MIT-style - * license found in the license.txt file in the root directory of this source tree. - */ - -/// \file -/// \brief A structure that holds all statistical data returned by RakNet. -/// - - - -#ifndef __RAK_NET_STATISTICS_H -#define __RAK_NET_STATISTICS_H - -#include "PacketPriority.h" -#include "Export.h" -#include "types.h" - -namespace MafiaNet -{ - -enum RNSPerSecondMetrics -{ - /// How many bytes per pushed via a call to RakPeerInterface::Send() - USER_MESSAGE_BYTES_PUSHED, - - /// How many user message bytes were sent via a call to RakPeerInterface::Send(). This is less than or equal to USER_MESSAGE_BYTES_PUSHED. - /// A message would be pushed, but not yet sent, due to congestion control - USER_MESSAGE_BYTES_SENT, - - /// How many user message bytes were resent. A message is resent if it is marked as reliable, and either the message didn't arrive or the message ack didn't arrive. - USER_MESSAGE_BYTES_RESENT, - - /// How many user message bytes were received, and returned to the user successfully. - USER_MESSAGE_BYTES_RECEIVED_PROCESSED, - - /// How many user message bytes were received, but ignored due to data format errors. This will usually be 0. - USER_MESSAGE_BYTES_RECEIVED_IGNORED, - - /// How many actual bytes were sent, including per-message and per-datagram overhead, and reliable message acks - ACTUAL_BYTES_SENT, - - /// How many actual bytes were received, including overead and acks. - ACTUAL_BYTES_RECEIVED, - - /// \internal - RNS_PER_SECOND_METRICS_COUNT -}; - -/// \brief Network Statisics Usage -/// -/// Store Statistics information related to network usage -struct RAK_DLL_EXPORT RakNetStatistics -{ - /// For each type in RNSPerSecondMetrics, what is the value over the last 1 second? - uint64_t valueOverLastSecond[RNS_PER_SECOND_METRICS_COUNT]; - - /// For each type in RNSPerSecondMetrics, what is the total value over the lifetime of the connection? - uint64_t runningTotal[RNS_PER_SECOND_METRICS_COUNT]; - - /// When did the connection start? - /// \sa MafiaNet::GetTimeUS() - MafiaNet::TimeUS connectionStartTime; - - /// Is our current send rate throttled by congestion control? - /// This value should be true if you send more data per second than your bandwidth capacity - bool isLimitedByCongestionControl; - - /// If \a isLimitedByCongestionControl is true, what is the limit, in bytes per second? - uint64_t BPSLimitByCongestionControl; - - /// Is our current send rate throttled by a call to RakPeer::SetPerConnectionOutgoingBandwidthLimit()? - bool isLimitedByOutgoingBandwidthLimit; - - /// If \a isLimitedByOutgoingBandwidthLimit is true, what is the limit, in bytes per second? - uint64_t BPSLimitByOutgoingBandwidthLimit; - - /// For each priority level, how many messages are waiting to be sent out? - unsigned int messageInSendBuffer[MafiaNet::NUMBER_OF_PRIORITIES]; - - /// For each priority level, how many bytes are waiting to be sent out? - double bytesInSendBuffer[MafiaNet::NUMBER_OF_PRIORITIES]; - - /// How many messages are waiting in the resend buffer? This includes messages waiting for an ack, so should normally be a small value - /// If the value is rising over time, you are exceeding the bandwidth capacity. See BPSLimitByCongestionControl - unsigned int messagesInResendBuffer; - - /// How many bytes are waiting in the resend buffer. See also messagesInResendBuffer - uint64_t bytesInResendBuffer; - - /// Over the last second, what was our packetloss? This number will range from 0.0 (for none) to 1.0 (for 100%) - float packetlossLastSecond; - - /// What is the average total packetloss over the lifetime of the connection? - float packetlossTotal; - - RakNetStatistics& operator +=(const RakNetStatistics& other) - { - unsigned i; - for (i=0; i < MafiaNet::NUMBER_OF_PRIORITIES; i++) - { - messageInSendBuffer[i]+=other.messageInSendBuffer[i]; - bytesInSendBuffer[i]+=other.bytesInSendBuffer[i]; - } - - for (i=0; i < RNS_PER_SECOND_METRICS_COUNT; i++) - { - valueOverLastSecond[i]+=other.valueOverLastSecond[i]; - runningTotal[i]+=other.runningTotal[i]; - } - - return *this; - } -}; - -/// Verbosity level currently supports 0 (low), 1 (medium), 2 (high) -/// \param[in] s The Statistical information to format out -/// \param[in] buffer The buffer containing a formated report -/// \param[in] bufferLength The size (in characters) of the buffer -/// \param[in] verbosityLevel -/// 0 low -/// 1 medium -/// 2 high -/// 3 debugging congestion control -void RAK_DLL_EXPORT StatisticsToString(RakNetStatistics *s, char *buffer, int verbosityLevel); -void RAK_DLL_EXPORT StatisticsToString( RakNetStatistics *s, char *buffer, size_t bufferLength, int verbosityLevel ); - -} // namespace MafiaNet - -#endif +/* + * Copyright (c) 2026, MafiaHub + * Licensed under MIT-style license + * + * Deprecated include path. "mafianet/statistics.h" was renamed to "mafianet/RakNetStatistics.h" so + * every header follows the PascalCase name of the class it declares. This + * forwarding header is kept for one release cycle and will then be removed. + * Define MAFIANET_SILENCE_DEPRECATED_INCLUDES to suppress the message. + */ +#pragma once +#ifndef MAFIANET_SILENCE_DEPRECATED_INCLUDES +#pragma message("mafianet/statistics.h is deprecated; include mafianet/RakNetStatistics.h instead") +#endif +#include "RakNetStatistics.h" diff --git a/Source/include/mafianet/string.h b/Source/include/mafianet/string.h index e2325deec..4974b4f38 100644 --- a/Source/include/mafianet/string.h +++ b/Source/include/mafianet/string.h @@ -1,354 +1,14 @@ -/* - * Original work: Copyright (c) 2014, Oculus VR, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * RakNet License.txt file in the licenses directory of this source tree. An additional grant - * of patent rights can be found in the RakNet Patents.txt file in the same directory. - * - * - * Modified work: Copyright (c) 2016-2019, SLikeSoft UG (haftungsbeschränkt) - * - * This source code was modified by SLikeSoft. Modifications are licensed under the MIT-style - * license found in the license.txt file in the root directory of this source tree. - */ - -#ifndef __RAK_STRING_H -#define __RAK_STRING_H - -#include "Export.h" -#include "DS_List.h" -#include "types.h" // int64_t -#include -#include "stdarg.h" - -#ifdef _WIN32 -#include "WindowsIncludes.h" -#endif - -namespace MafiaNet -{ -/// Forward declarations -class SimpleMutex; -class BitStream; - -/// \brief String class -/// \details Has the following improvements over std::string -/// -Reference counting: Suitable to store in lists -/// -Variadic assignment operator -/// -Doesn't cause linker errors -class RAK_DLL_EXPORT RakString -{ -public: - // Constructors - RakString(); - RakString(char input); - RakString(unsigned char input); - RakString(const unsigned char *format, ...); - RakString(const char *format, ...); - ~RakString(); - RakString( const RakString & rhs); - - /// Implicit return of const char* - operator const char* () const {return sharedString->c_str;} - - /// Same as std::string::c_str - const char *C_String(void) const {return sharedString->c_str;} - - // Lets you modify the string. Do not make the string longer - however, you can make it shorter, or change the contents. - // Pointer is only valid in the scope of RakString itself - char *C_StringUnsafe(void) {Clone(); return sharedString->c_str;} - - /// Assigment operators - RakString& operator = ( const RakString& rhs ); - RakString& operator = ( const char *str ); - RakString& operator = ( char *str ); - RakString& operator = ( const unsigned char *str ); - RakString& operator = ( char unsigned *str ); - RakString& operator = ( const char c ); - - /// Concatenation - RakString& operator +=( const RakString& rhs); - RakString& operator += ( const char *str ); - RakString& operator += ( char *str ); - RakString& operator += ( const unsigned char *str ); - RakString& operator += ( char unsigned *str ); - RakString& operator += ( const char c ); - - /// Character index. Do not use to change the string however. - unsigned char operator[] ( const unsigned int position ) const; - -#ifdef _WIN32 - // Return as Wide char - // Deallocate with DeallocWideChar - WCHAR * ToWideChar(void); - void DeallocWideChar(WCHAR * w); - - void FromWideChar(const wchar_t *source); - static MafiaNet::RakString FromWideChar_S(const wchar_t *source); -#endif - - /// String class find replacement - /// Searches the string for the content specified in stringToFind and returns the position of the first occurrence in the string. - /// Search only includes characters on or after position pos, ignoring any possible occurrences in previous locations. - /// \param[in] stringToFind The string to find inside of this object's string - /// \param[in] pos The position in the string to start the search - /// \return Returns the position of the first occurrence in the string. - size_t Find(const char *stringToFind,size_t pos = 0 ); - - /// Equality - bool operator==(const RakString &rhs) const; - bool operator==(const char *str) const; - bool operator==(char *str) const; - - // Comparison - bool operator < ( const RakString& right ) const; - bool operator <= ( const RakString& right ) const; - bool operator > ( const RakString& right ) const; - bool operator >= ( const RakString& right ) const; - - /// Inequality - bool operator!=(const RakString &rhs) const; - bool operator!=(const char *str) const; - bool operator!=(char *str) const; - - /// Change all characters to lowercase - const char * ToLower(void); - - /// Change all characters to uppercase - const char * ToUpper(void); - - /// Set the value of the string - void Set(const char *format, ...); - - /// Sets a copy of a substring of str as the new content. The substring is the portion of str - /// that begins at the character position pos and takes up to n characters - /// (it takes less than n if the end of str is reached before). - /// \param[in] str The string to copy in - /// \param[in] pos The position on str to start the copy - /// \param[in] n How many chars to copy - /// \return Returns the string, note that the current string is set to that value as well - RakString Assign(const char *str,size_t pos, size_t n ); - - /// Returns if the string is empty. Also, C_String() would return "" - bool IsEmpty(void) const; - - /// Returns the length of the string - size_t GetLength(void) const; - size_t GetLengthUTF8(void) const; - - /// Replace character(s) in starting at index, for count, with c - void Replace(unsigned index, unsigned count, unsigned char c); - - /// Replace character at index with c - void SetChar( unsigned index, unsigned char c ); - - /// Replace character at index with string s - void SetChar( unsigned index, MafiaNet::RakString s ); - - /// Make sure string is no longer than \a length - void Truncate(unsigned int length); - void TruncateUTF8(unsigned int length); - - // Gets the substring starting at index for count characters - RakString SubStr(unsigned int index, size_t count) const; - - /// Erase characters out of the string at index for count - void Erase(unsigned int index, unsigned int count); - - /// Set the first instance of c with a null-terminator - void TerminateAtFirstCharacter(char c); - /// Set the last instance of c with a null-terminator - void TerminateAtLastCharacter(char c); - - void StartAfterFirstCharacter(char c); - void StartAfterLastCharacter(char c); - - /// Returns how many occurances there are of \a c in the string - int GetCharacterCount(char c); - - /// Remove all instances of c - void RemoveCharacter(char c); - - /// Create a RakString with a value, without doing printf style parsing - /// Equivalent to assignment operator - static MafiaNet::RakString NonVariadic(const char *str); - - /// Hash the string into an unsigned int - static unsigned long ToInteger(const char *str); - static unsigned long ToInteger(const RakString &rs); - - /// \brief Read an integer out of a substring - /// \param[in] str The string - /// \param[in] pos The position on str where the integer starts - /// \param[in] n How many chars to copy - static int ReadIntFromSubstring(const char *str, size_t pos, size_t n); - - // Like strncat, but for a fixed length - void AppendBytes(const char *bytes, size_t count); - - /// Compare strings (case sensitive) - int StrCmp(const RakString &rhs) const; - - /// Compare strings (case sensitive), up to num characters - int StrNCmp(const RakString &rhs, size_t num) const; - - /// Compare strings (not case sensitive) - int StrICmp(const RakString &rhs) const; - - /// Clear the string - void Clear(void); - - /// Print the string to the screen - void Printf(void); - - /// Print the string to a file - void FPrintf(FILE *fp); - - /// Does the given IP address match the IP address encoded into this string, accounting for wildcards? - bool IPAddressMatch(const char *IP); - - /// Does the string contain non-printable characters other than spaces? - bool ContainsNonprintableExceptSpaces(void) const; - - /// Is this a valid email address? - bool IsEmailAddress(void) const; - - /// URL Encode the string. See http://www.codeguru.com/cpp/cpp/cpp_mfc/article.php/c4029/ - MafiaNet::RakString& URLEncode(void); - - /// URL decode the string - MafiaNet::RakString& URLDecode(void); - - /// https://servers.api.rackspacecloud.com/v1.0 to https://, servers.api.rackspacecloud.com, /v1.0 - void SplitURI(MafiaNet::RakString &header, MafiaNet::RakString &domain, MafiaNet::RakString &path); - - /// Scan for quote, double quote, and backslash and prepend with backslash - MafiaNet::RakString& SQLEscape(void); - - /// Format as a POST command that can be sent to a webserver - /// \param[in] uri For example, masterserver2.raknet.com/testServer - /// \param[in] contentType For example, text/plain; charset=UTF-8 - /// \param[in] body Body of the post - /// \return Formatted string - static MafiaNet::RakString FormatForPOST(const char* uri, const char* contentType, const char* body, const char* extraHeaders=""); - static MafiaNet::RakString FormatForPUT(const char* uri, const char* contentType, const char* body, const char* extraHeaders=""); - - /// Format as a GET command that can be sent to a webserver - /// \param[in] uri For example, masterserver2.raknet.com/testServer?__gameId=comprehensivePCGame - /// \return Formatted string - static MafiaNet::RakString FormatForGET(const char* uri, const char* extraHeaders=""); - - /// Format as a DELETE command that can be sent to a webserver - /// \param[in] uri For example, masterserver2.raknet.com/testServer?__gameId=comprehensivePCGame&__rowId=1 - /// \return Formatted string - static MafiaNet::RakString FormatForDELETE(const char* uri, const char* extraHeaders=""); - - /// Fix to be a file path, ending with / - MafiaNet::RakString& MakeFilePath(void); - - /// RakString uses a freeList of old no-longer used strings - /// Call this function to clear this memory on shutdown - static void FreeMemory(void); - /// \internal - static void FreeMemoryNoMutex(void); - - /// Serialize to a bitstream, uncompressed (slightly faster) - /// \param[out] bs Bitstream to serialize to - void Serialize(BitStream *bs) const; - - /// Static version of the Serialize function - static void Serialize(const char *str, BitStream *bs); - - /// Serialize to a bitstream, compressed (better bandwidth usage) - /// \param[out] bs Bitstream to serialize to - /// \param[in] languageId languageId to pass to the StringCompressor class - /// \param[in] writeLanguageId encode the languageId variable in the stream. If false, 0 is assumed, and DeserializeCompressed will not look for this variable in the stream (saves bandwidth) - /// \pre StringCompressor::AddReference must have been called to instantiate the class (Happens automatically from RakPeer::Startup()) - void SerializeCompressed(BitStream *bs, uint8_t languageId=0, bool writeLanguageId=false) const; - - /// Static version of the SerializeCompressed function - static void SerializeCompressed(const char *str, BitStream *bs, uint8_t languageId=0, bool writeLanguageId=false); - - /// Deserialize what was written by Serialize - /// \param[in] bs Bitstream to serialize from - /// \return true if the deserialization was successful - bool Deserialize(BitStream *bs); - - /// Static version of the Deserialize() function - static bool Deserialize(char *str, BitStream *bs); - - /// Deserialize compressed string, written by SerializeCompressed - /// \param[in] bs Bitstream to serialize from - /// \param[in] readLanguageId If true, looks for the variable langaugeId in the data stream. Must match what was passed to SerializeCompressed - /// \return true if the deserialization was successful - /// \pre StringCompressor::AddReference must have been called to instantiate the class (Happens automatically from RakPeer::Startup()) - bool DeserializeCompressed(BitStream *bs, bool readLanguageId=false); - - /// Static version of the DeserializeCompressed() function - static bool DeserializeCompressed(char *str, BitStream *bs, bool readLanguageId=false); - - static const char *ToString(int64_t i); - static const char *ToString(uint64_t i); - - /// \internal - static size_t GetSizeToAllocate(size_t bytes) - { - const size_t smallStringSize = 128-sizeof(unsigned int)-sizeof(size_t)-sizeof(char*)*2; - if (bytes<=smallStringSize) - return smallStringSize; - else - return bytes*2; - } - - /// \internal - struct SharedString - { - SimpleMutex *refCountMutex; - unsigned int refCount; - size_t bytesUsed; - char *bigString; - char *c_str; - char smallString[128-sizeof(unsigned int)-sizeof(size_t)-sizeof(char*)*2]; - }; - - /// \internal - RakString( SharedString *_sharedString ); - - /// \internal - SharedString *sharedString; - -// static SimpleMutex poolMutex; -// static DataStructures::MemoryPool pool; - /// \internal - static SharedString emptyString; - - //static SharedString *sharedStringFreeList; - //static unsigned int sharedStringFreeListAllocationCount; - /// \internal - /// List of free objects to reduce memory reallocations - static DataStructures::List freeList; - - static int RakStringComp( RakString const &key, RakString const &data ); - - static void LockMutex(void); - static void UnlockMutex(void); - -protected: - static MafiaNet::RakString FormatForPUTOrPost(const char* type, const char* uri, const char* contentType, const char* body, const char* extraHeaders); - void Allocate(size_t len); - void Assign(const char *str); - void Assign(const char *str, va_list ap); - - void Clone(void); - void Free(void); - unsigned char ToLower(unsigned char c); - unsigned char ToUpper(unsigned char c); - void Realloc(SharedString *inSharedString, size_t bytes); -}; - -} - -const MafiaNet::RakString RAK_DLL_EXPORT operator+(const MafiaNet::RakString &lhs, const MafiaNet::RakString &rhs); - -#endif +/* + * Copyright (c) 2026, MafiaHub + * Licensed under MIT-style license + * + * Deprecated include path. "mafianet/string.h" was renamed to "mafianet/RakString.h" so + * every header follows the PascalCase name of the class it declares. This + * forwarding header is kept for one release cycle and will then be removed. + * Define MAFIANET_SILENCE_DEPRECATED_INCLUDES to suppress the message. + */ +#pragma once +#ifndef MAFIANET_SILENCE_DEPRECATED_INCLUDES +#pragma message("mafianet/string.h is deprecated; include mafianet/RakString.h instead") +#endif +#include "RakString.h" diff --git a/Source/include/mafianet/thread.h b/Source/include/mafianet/thread.h index af0a3423f..2050ea8b5 100644 --- a/Source/include/mafianet/thread.h +++ b/Source/include/mafianet/thread.h @@ -1,57 +1,14 @@ -/* - * Original work: Copyright (c) 2014, Oculus VR, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * RakNet License.txt file in the licenses directory of this source tree. An additional grant - * of patent rights can be found in the RakNet Patents.txt file in the same directory. - * - * - * Modified work: Copyright (c) 2017-2018, SLikeSoft UG (haftungsbeschränkt) - * - * This source code was modified by SLikeSoft. Modifications are licensed under the MIT-style - * license found in the license.txt file in the root directory of this source tree. - */ - -#ifndef __RAK_THREAD_H -#define __RAK_THREAD_H - -#include "Export.h" - -namespace MafiaNet -{ -/// To define a thread, use RAK_THREAD_DECLARATION(functionName); -#if defined(_WIN32) -#define RAK_THREAD_DECLARATION(functionName) unsigned __stdcall functionName( void* arguments ) - -#else -#define RAK_THREAD_DECLARATION(functionName) void* functionName( void* arguments ) -#endif - -class RAK_DLL_EXPORT RakThread -{ -public: - /// Create a thread, simplified to be cross platform without all the extra junk - /// To then start that thread, call RakCreateThread(functionName, arguments); - /// \param[in] start_address Function you want to call - /// \param[in] arglist Arguments to pass to the function - /// \return 0=success. >0 = error code - - /* - nice value Win32 Priority - -20 to -16 THREAD_PRIORITY_HIGHEST - -15 to -6 THREAD_PRIORITY_ABOVE_NORMAL - -5 to +4 THREAD_PRIORITY_NORMAL - +5 to +14 THREAD_PRIORITY_BELOW_NORMAL - +15 to +19 THREAD_PRIORITY_LOWEST - */ -#if defined(_WIN32) - static int Create( unsigned __stdcall start_address( void* ), void *arglist, int priority=0); -#else - static int Create( void* start_address( void* ), void *arglist, int priority=0); -#endif -}; - -} - -#endif +/* + * Copyright (c) 2026, MafiaHub + * Licensed under MIT-style license + * + * Deprecated include path. "mafianet/thread.h" was renamed to "mafianet/RakThread.h" so + * every header follows the PascalCase name of the class it declares. This + * forwarding header is kept for one release cycle and will then be removed. + * Define MAFIANET_SILENCE_DEPRECATED_INCLUDES to suppress the message. + */ +#pragma once +#ifndef MAFIANET_SILENCE_DEPRECATED_INCLUDES +#pragma message("mafianet/thread.h is deprecated; include mafianet/RakThread.h instead") +#endif +#include "RakThread.h" diff --git a/Source/include/mafianet/time.h b/Source/include/mafianet/time.h index 7b9ecb919..d289f2bca 100644 --- a/Source/include/mafianet/time.h +++ b/Source/include/mafianet/time.h @@ -1,40 +1,14 @@ -/* - * Original work: Copyright (c) 2014, Oculus VR, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * RakNet License.txt file in the licenses directory of this source tree. An additional grant - * of patent rights can be found in the RakNet Patents.txt file in the same directory. - * - * - * Modified work: Copyright (c) 2016-2017, SLikeSoft UG (haftungsbeschränkt) - * - * This source code was modified by SLikeSoft. Modifications are licensed under the MIT-style - * license found in the license.txt file in the root directory of this source tree. - */ - -#ifndef __RAKNET_TIME_H -#define __RAKNET_TIME_H - -#include "NativeTypes.h" -#include "defines.h" - -namespace MafiaNet { - -// Define __GET_TIME_64BIT if you want to use large types for GetTime (takes more bandwidth when you transmit time though!) -// You would want to do this if your system is going to run long enough to overflow the millisecond counter (over a month) -#if __GET_TIME_64BIT==1 -typedef uint64_t Time; -#define RAK_TIME_FORMAT_STRING "%llu" -typedef uint32_t TimeMS; -typedef uint64_t TimeUS; -#else -typedef uint32_t Time; -#define RAK_TIME_FORMAT_STRING "%u" -typedef uint32_t TimeMS; -typedef uint64_t TimeUS; -#endif - -} // namespace MafiaNet - -#endif +/* + * Copyright (c) 2026, MafiaHub + * Licensed under MIT-style license + * + * Deprecated include path. "mafianet/time.h" was renamed to "mafianet/RakNetTime.h" so + * every header follows the PascalCase name of the class it declares. This + * forwarding header is kept for one release cycle and will then be removed. + * Define MAFIANET_SILENCE_DEPRECATED_INCLUDES to suppress the message. + */ +#pragma once +#ifndef MAFIANET_SILENCE_DEPRECATED_INCLUDES +#pragma message("mafianet/time.h is deprecated; include mafianet/RakNetTime.h instead") +#endif +#include "RakNetTime.h" diff --git a/Source/include/mafianet/transport2.h b/Source/include/mafianet/transport2.h index ea88bba9a..b449c80fd 100644 --- a/Source/include/mafianet/transport2.h +++ b/Source/include/mafianet/transport2.h @@ -1,115 +1,14 @@ -/* - * Original work: Copyright (c) 2014, Oculus VR, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * RakNet License.txt file in the licenses directory of this source tree. An additional grant - * of patent rights can be found in the RakNet Patents.txt file in the same directory. - * - * - * Modified work: Copyright (c) 2017, SLikeSoft UG (haftungsbeschränkt) - * - * This source code was modified by SLikeSoft. Modifications are licensed under the MIT-style - * license found in the license.txt file in the root directory of this source tree. - */ - -/// \file -/// \brief Contains RakNetTransportCommandParser and RakNetTransport used to provide a secure console connection. -/// - - -#include "NativeFeatureIncludes.h" -#if _RAKNET_SUPPORT_TelnetTransport==1 - -#ifndef __RAKNET_TRANSPORT_2 -#define __RAKNET_TRANSPORT_2 - -#include "TransportInterface.h" -#include "DS_Queue.h" -#include "CommandParserInterface.h" -#include "PluginInterface2.h" -#include "Export.h" - -namespace MafiaNet -{ -/// Forward declarations -class BitStream; -class RakPeerInterface; -class RakNetTransport; - -/// \defgroup RAKNET_TRANSPORT_GROUP RakNetTransport -/// \brief UDP based transport implementation for the ConsoleServer -/// \details -/// \ingroup PLUGINS_GROUP - -/// \brief Use RakNetTransport if you need a secure connection between the client and the console server. -/// \details RakNetTransport automatically initializes security for the system. Use the project CommandConsoleClient to connect -/// To the ConsoleServer if you use RakNetTransport -/// \ingroup RAKNET_TRANSPORT_GROUP -class RAK_DLL_EXPORT RakNetTransport2 : public TransportInterface, public PluginInterface2 -{ -public: - // GetInstance() and DestroyInstance(instance*) - STATIC_FACTORY_DECLARATIONS(RakNetTransport2) - - RakNetTransport2(); - virtual ~RakNetTransport2(); - - /// Start the transport provider on the indicated port. - /// \param[in] port The port to start the transport provider on - /// \param[in] serverMode If true, you should allow incoming connections (I don't actually use this anywhere) - /// \return Return true on success, false on failure. - bool Start(unsigned short port, bool serverMode); - - /// Stop the transport provider. You can clear memory and shutdown threads here. - void Stop(void); - - /// Send a null-terminated string to \a systemAddress - /// If your transport method requires particular formatting of the outgoing data (e.g. you don't just send strings) you can do it here - /// and parse it out in Receive(). - /// \param[in] systemAddress The player to send the string to - /// \param[in] data format specifier - same as RAKNET_DEBUG_PRINTF - /// \param[in] ... format specification arguments - same as RAKNET_DEBUG_PRINTF - void Send( SystemAddress systemAddress, const char *data, ... ); - - /// Disconnect \a systemAddress . The binary address and port defines the SystemAddress structure. - /// \param[in] systemAddress The player/address to disconnect - void CloseConnection( SystemAddress systemAddress ); - - /// Return a string. The string should be allocated and written to Packet::data . - /// The byte length should be written to Packet::length . The player/address should be written to Packet::systemAddress - /// If your transport protocol adds special formatting to the data stream you should parse it out before returning it in the packet - /// and thus only return a string in Packet::data - /// \return The packet structure containing the result of Receive, or 0 if no data is available - Packet* Receive( void ); - - /// Deallocate the Packet structure returned by Receive - /// \param[in] The packet to deallocate - void DeallocatePacket( Packet *packet ); - - /// If a new system connects to you, you should queue that event and return the systemAddress/address of that player in this function. - /// \return The SystemAddress/address of the system - SystemAddress HasNewIncomingConnection(void); - - /// If a system loses the connection, you should queue that event and return the systemAddress/address of that player in this function. - /// \return The SystemAddress/address of the system - SystemAddress HasLostConnection(void); - - virtual CommandParserInterface* GetCommandParser(void) {return 0;} - - /// \internal - virtual PluginReceiveResult OnReceive(Packet *packet); - /// \internal - virtual void OnClosedConnection(const SystemAddress &systemAddress, RakNetGUID rakNetGUID, PI2_LostConnectionReason lostConnectionReason ); - /// \internal - virtual void OnNewConnection(const SystemAddress &systemAddress, RakNetGUID rakNetGUID, bool isIncoming); -protected: - DataStructures::Queue newConnections, lostConnections; - DataStructures::Queue packetQueue; -}; - -} // namespace MafiaNet - -#endif - -#endif // _RAKNET_SUPPORT_* +/* + * Copyright (c) 2026, MafiaHub + * Licensed under MIT-style license + * + * Deprecated include path. "mafianet/transport2.h" was renamed to "mafianet/RakNetTransport2.h" so + * every header follows the PascalCase name of the class it declares. This + * forwarding header is kept for one release cycle and will then be removed. + * Define MAFIANET_SILENCE_DEPRECATED_INCLUDES to suppress the message. + */ +#pragma once +#ifndef MAFIANET_SILENCE_DEPRECATED_INCLUDES +#pragma message("mafianet/transport2.h is deprecated; include mafianet/RakNetTransport2.h instead") +#endif +#include "RakNetTransport2.h" diff --git a/Source/include/mafianet/types.h b/Source/include/mafianet/types.h index 2631e66c6..13c53d395 100644 --- a/Source/include/mafianet/types.h +++ b/Source/include/mafianet/types.h @@ -1,487 +1,14 @@ -/* - * Original work: Copyright (c) 2014, Oculus VR, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * RakNet License.txt file in the licenses directory of this source tree. An additional grant - * of patent rights can be found in the RakNet Patents.txt file in the same directory. - * - * - * Modified work: Copyright (c) 2016-2019, SLikeSoft UG (haftungsbeschränkt) - * - * This source code was modified by SLikeSoft. Modifications are licensed under the MIT-style - * license found in the license.txt file in the root directory of this source tree. - */ - -/// \file -/// \brief Types used by RakNet, most of which involve user code. -/// -#ifndef __NETWORK_TYPES_H -#define __NETWORK_TYPES_H - -#include "defines.h" -#include "NativeTypes.h" -#include "time.h" -#include "Export.h" -#include "WindowsIncludes.h" -#include "SocketIncludes.h" - -namespace MafiaNet { -/// Forward declarations -class RakPeerInterface; -class BitStream; -struct Packet; - -enum StartupResult -{ - RAKNET_STARTED, - RAKNET_ALREADY_STARTED, - INVALID_SOCKET_DESCRIPTORS, - INVALID_MAX_CONNECTIONS, - SOCKET_FAMILY_NOT_SUPPORTED, - SOCKET_PORT_ALREADY_IN_USE, - SOCKET_FAILED_TO_BIND, - SOCKET_FAILED_TEST_SEND, - PORT_CANNOT_BE_ZERO, - FAILED_TO_CREATE_NETWORK_THREAD, - COULD_NOT_GENERATE_GUID, - STARTUP_OTHER_FAILURE -}; - - -enum ConnectionAttemptResult -{ - CONNECTION_ATTEMPT_STARTED, - INVALID_PARAMETER, - CANNOT_RESOLVE_DOMAIN_NAME, - ALREADY_CONNECTED_TO_ENDPOINT, - CONNECTION_ATTEMPT_ALREADY_IN_PROGRESS, - SECURITY_INITIALIZATION_FAILED -}; - -/// Returned from RakPeerInterface::GetConnectionState() -enum ConnectionState -{ - /// Connect() was called, but the process hasn't started yet - IS_PENDING, - /// Processing the connection attempt - IS_CONNECTING, - /// Is connected and able to communicate - IS_CONNECTED, - /// Was connected, but will disconnect as soon as the remaining messages are delivered - IS_DISCONNECTING, - /// A connection attempt failed and will be aborted - IS_SILENTLY_DISCONNECTING, - /// No longer connected - IS_DISCONNECTED, - /// Was never connected, or else was disconnected long enough ago that the entry has been discarded - IS_NOT_CONNECTED -}; - -/// Given a number of bits, return how many bytes are needed to represent that. -#define BITS_TO_BYTES(x) (((x)+7)>>3) -#define BYTES_TO_BITS(x) ((x)<<3) - -/// \sa NetworkIDObject.h -typedef unsigned char UniqueIDType; -typedef unsigned short SystemIndex; -typedef unsigned char RPCIndex; -const int MAX_RPC_MAP_SIZE=((RPCIndex)-1)-1; -const int UNDEFINED_RPC_INDEX=((RPCIndex)-1); - -/// First byte of a network message -typedef unsigned char MessageID; - -typedef uint32_t BitSize_t; - -#define PRINTF_64_BIT_MODIFIER "ll" - -/// Used with the PublicKey structure -enum PublicKeyMode -{ - /// The connection is insecure. You can also just pass 0 for the pointer to PublicKey in RakPeerInterface::Connect() - PKM_INSECURE_CONNECTION, - - /// Accept whatever public key the server gives us. This is vulnerable to man in the middle, but does not require - /// distribution of the public key in advance of connecting. - PKM_ACCEPT_ANY_PUBLIC_KEY, - - /// Use a known remote server public key. PublicKey::remoteServerPublicKey must be non-zero. - /// This is the recommended mode for secure connections. - PKM_USE_KNOWN_PUBLIC_KEY, - - /// Use a known remote server public key AND provide a public key for the connecting client. - /// PublicKey::remoteServerPublicKey, myPublicKey and myPrivateKey must be all be non-zero. - /// The server must cooperate for this mode to work. - /// I recommend not using this mode except for server-to-server communication as it significantly increases the CPU requirements during connections for both sides. - /// Furthermore, when it is used, a connection password should be used as well to avoid DoS attacks. - PKM_USE_TWO_WAY_AUTHENTICATION -}; - -/// Passed to RakPeerInterface::Connect() -struct RAK_DLL_EXPORT PublicKey -{ - /// How to interpret the public key, see above - PublicKeyMode publicKeyMode; - - /// Pointer to a public key of length cat::EasyHandshake::PUBLIC_KEY_BYTES. See the Encryption sample. - char *remoteServerPublicKey; - - /// (Optional) Pointer to a public key of length cat::EasyHandshake::PUBLIC_KEY_BYTES - char *myPublicKey; - - /// (Optional) Pointer to a private key of length cat::EasyHandshake::PRIVATE_KEY_BYTES - char *myPrivateKey; -}; - -/// Describes the local socket to use for RakPeer::Startup -struct RAK_DLL_EXPORT SocketDescriptor -{ - SocketDescriptor(); - SocketDescriptor(unsigned short _port, const char *_hostAddress); - - /// The local port to bind to. Pass 0 to have the OS autoassign a port. - unsigned short port; - - /// The local network card address to bind to, such as "127.0.0.1". Pass an empty string to use INADDR_ANY. - char hostAddress[32]; - - /// IP version: For IPV4, use AF_INET (default). For IPV6, use AF_INET6. To autoselect, use AF_UNSPEC. - /// IPV6 is the newer internet protocol. Instead of addresses such as natpunch.slikesoft.com, you may have an address such as fe80::7c:31f7:fec4:27de%14. - /// Encoding takes 16 bytes instead of 4, so IPV6 is less efficient for bandwidth. - /// On the positive side, NAT Punchthrough is not needed and should not be used with IPV6 because there are enough addresses that routers do not need to create address mappings. - /// RakPeer::Startup() will fail if this IP version is not supported. - /// \pre RAKNET_SUPPORT_IPV6 must be set to 1 in RakNetDefines.h for AF_INET6 - short socketFamily; - - // Set to true to use a blocking socket (default, do not change unless you have a reason to) - bool blockingSocket; - - /// Protocol argument passed to socket(). Leave 0 (the default) for plain UDP. - unsigned int extraSocketOptions; -}; - -extern bool NonNumericHostString( const char *host ); - -/// \brief Network address for a system -/// \details Corresponds to a network address
-/// This is not necessarily a unique identifier. For example, if a system has both LAN and internet connections, the system may be identified by either one, depending on who is communicating
-/// Therefore, you should not transmit the SystemAddress over the network and expect it to identify a system, or use it to connect to that system, except in the case where that system is not behind a NAT (such as with a dedciated server) -/// Use RakNetGUID for a unique per-instance of RakPeer to identify systems -struct RAK_DLL_EXPORT SystemAddress -{ - /// Constructors - SystemAddress(); - SystemAddress(const char *str); - SystemAddress(const char *str, unsigned short port); - - /// SystemAddress, with RAKNET_SUPPORT_IPV6 defined, holds both an sockaddr_in6 and a sockaddr_in - union// In6OrIn4 - { -#if RAKNET_SUPPORT_IPV6==1 - struct sockaddr_storage sa_stor; - sockaddr_in6 addr6; -#endif - - sockaddr_in addr4; - } address; - - /// This is not used internally, but holds a copy of the port held in the address union, so for debugging it's easier to check what port is being held - unsigned short debugPort; - - /// \internal Return the size to write to a bitStream - static int size(void); - - /// Hash the system address - static unsigned long ToInteger(const SystemAddress &sa); - - /// Return the IP version, either IPV4 or IPV6 - /// \return Either 4 or 6 - unsigned char GetIPVersion(void) const; - - /// \internal Returns either IPPROTO_IP or IPPROTO_IPV6 - /// \sa GetIPVersion - unsigned int GetIPPROTO(void) const; - - /// Call SetToLoopback(), with whatever IP version is currently held. Defaults to IPV4 - void SetToLoopback(void); - - /// Call SetToLoopback() with a specific IP version - /// \param[in] ipVersion Either 4 for IPV4 or 6 for IPV6 - void SetToLoopback(unsigned char ipVersion); - - /// \return If was set to 127.0.0.1 or ::1 - bool IsLoopback(void) const; - - // Return the systemAddress as a string in the format | - // Returns a static string - // NOT THREADSAFE - // portDelineator should not be '.', ':', '%', '-', '/', a number, or a-f - const char *ToString(bool writePort=true, char portDelineator='|') const; - - // Return the systemAddress as a string in the format | - // dest must be large enough to hold the output - // portDelineator should not be '.', ':', '%', '-', '/', a number, or a-f - // THREADSAFE - void ToString(bool writePort, char *dest, char portDelineator = '|') const; - void ToString(bool writePort, char *dest, size_t destLength, char portDelineator='|') const; - - /// Set the system address from a printable IP string, for example "192.0.2.1" or "2001:db8:63b3:1::3490" - /// You can write the port as well, using the portDelineator, for example "192.0.2.1|1234" - /// \param[in] str A printable IP string, for example "192.0.2.1" or "2001:db8:63b3:1::3490". Pass 0 for \a str to set to UNASSIGNED_SYSTEM_ADDRESS - /// \param[in] portDelineator if \a str contains a port, delineate the port with this character. portDelineator should not be '.', ':', '%', '-', '/', a number, or a-f - /// \param[in] ipVersion Only used if str is a pre-defined address in the wrong format, such as 127.0.0.1 but you want ip version 6, so you can pass 6 here to do the conversion - /// \note The current port is unchanged if a port is not specified in \a str - /// \return True on success, false on ipVersion does not match type of passed string - bool FromString(const char *str, char portDelineator='|', int ipVersion=0); - - /// Same as FromString(), but you explicitly set a port at the same time - bool FromStringExplicitPort(const char *str, unsigned short port, int ipVersion=0); - - /// Copy the port from another SystemAddress structure - void CopyPort( const SystemAddress& right ); - - /// Returns if two system addresses have the same IP (port is not checked) - bool EqualsExcludingPort( const SystemAddress& right ) const; - - /// Returns the port in host order (this is what you normally use) - unsigned short GetPort(void) const; - - /// \internal Returns the port in network order - unsigned short GetPortNetworkOrder(void) const; - - /// Sets the port. The port value should be in host order (this is what you normally use) - /// Renamed from SetPort because of winspool.h http://edn.embarcadero.com/article/21494 - void SetPortHostOrder(unsigned short s); - - /// \internal Sets the port. The port value should already be in network order. - void SetPortNetworkOrder(unsigned short s); - - /// Old version, for crap platforms that don't support newer socket functions - bool SetBinaryAddress(const char *str, char portDelineator=':'); - /// Old version, for crap platforms that don't support newer socket functions - void ToString_Old(bool writePort, char *dest, char portDelineator = ':') const; - void ToString_Old(bool writePort, char *dest, size_t destLength, char portDelineator = ':') const; - - /// \internal sockaddr_in6 requires extra data beyond just the IP and port. Copy that extra data from an existing SystemAddress that already has it - void FixForIPVersion(const SystemAddress &boundAddressToSocket); - - bool IsLANAddress(void); - - SystemAddress& operator = ( const SystemAddress& input ); - bool operator==( const SystemAddress& right ) const; - bool operator!=( const SystemAddress& right ) const; - bool operator > ( const SystemAddress& right ) const; - bool operator < ( const SystemAddress& right ) const; - - /// \internal Used internally for fast lookup. Optional (use -1 to do regular lookup). Don't transmit this. - SystemIndex systemIndex; - - private: - -#if RAKNET_SUPPORT_IPV6==1 - void ToString_New(bool writePort, char *dest, char portDelineator) const; - void ToString_New(bool writePort, char *dest, size_t destLength, char portDelineator) const; -#endif -}; - -/// Uniquely identifies an instance of RakPeer. Use RakPeer::GetGuidFromSystemAddress() and RakPeer::GetSystemAddressFromGuid() to go between SystemAddress and RakNetGUID -/// Use RakPeer::GetGuidFromSystemAddress(UNASSIGNED_SYSTEM_ADDRESS) to get your own GUID -struct RAK_DLL_EXPORT RakNetGUID -{ - RakNetGUID(); - explicit RakNetGUID(uint64_t _g) {g=_g; systemIndex=(SystemIndex)-1;} -// uint32_t g[6]; - uint64_t g; - - // Return the GUID as a string. - // For an owning, thread-safe std::string use MafiaNet::to_string(guid) - // from "mafianet/guid_util.h". - // dest must be large enough to hold the output - // THREADSAFE - void ToString(char *dest) const; - void ToString(char *dest, size_t destSize) const; - - bool FromString(const char *source); - - static unsigned long ToUint32( const RakNetGUID &g ); - - RakNetGUID& operator = ( const RakNetGUID& input ) - { - g=input.g; - systemIndex=input.systemIndex; - return *this; - } - - // Used internally for fast lookup. Optional (use -1 to do regular lookup). Don't transmit this. - SystemIndex systemIndex; - static int size() {return (int) sizeof(uint64_t);} - - bool operator==( const RakNetGUID& right ) const; - bool operator!=( const RakNetGUID& right ) const; - bool operator > ( const RakNetGUID& right ) const; - bool operator < ( const RakNetGUID& right ) const; -}; - -/// Strong type for a peer's RakNetGUID value, distinct from NetworkID so the two -/// can't be passed interchangeably. Trivially copyable and 8 bytes, so it is -/// wire-compatible with the raw uint64_t it replaces. Convert with ToPeerGuid()/ToGuid(). -enum class PeerGuid : uint64_t {}; - -inline PeerGuid ToPeerGuid( const RakNetGUID& guid ) { return static_cast(guid.g); } -inline RakNetGUID ToGuid( PeerGuid guid ) { return RakNetGUID(static_cast(guid)); } - -constexpr PeerGuid UNASSIGNED_PEER_GUID = static_cast((uint64_t)-1); - -/// Index of an invalid SystemAddress -//const SystemAddress UNASSIGNED_SYSTEM_ADDRESS = -//{ -// 0xFFFFFFFF, 0xFFFF -//}; -#ifndef SWIG -extern const SystemAddress UNASSIGNED_SYSTEM_ADDRESS; -extern const RakNetGUID UNASSIGNED_RAKNET_GUID; -#endif -//{ -// {0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF} -// 0xFFFFFFFFFFFFFFFF -//}; - - -struct RAK_DLL_EXPORT AddressOrGUID -{ - RakNetGUID rakNetGuid; - SystemAddress systemAddress; - - SystemIndex GetSystemIndex(void) const {if (rakNetGuid!=UNASSIGNED_RAKNET_GUID) return rakNetGuid.systemIndex; else return systemAddress.systemIndex;} - bool IsUndefined(void) const {return rakNetGuid==UNASSIGNED_RAKNET_GUID && systemAddress==UNASSIGNED_SYSTEM_ADDRESS;} - void SetUndefined(void) {rakNetGuid=UNASSIGNED_RAKNET_GUID; systemAddress=UNASSIGNED_SYSTEM_ADDRESS;} - static unsigned long ToInteger( const AddressOrGUID &aog ); - const char *ToString(bool writePort=true) const; - void ToString(bool writePort, char *dest) const; - void ToString(bool writePort, char *dest, size_t destLength) const; - - AddressOrGUID() {} - AddressOrGUID( const AddressOrGUID& input ) - { - rakNetGuid=input.rakNetGuid; - systemAddress=input.systemAddress; - } - AddressOrGUID( const SystemAddress& input ) - { - rakNetGuid=UNASSIGNED_RAKNET_GUID; - systemAddress=input; - } - AddressOrGUID( Packet *packet ); - AddressOrGUID( const RakNetGUID& input ) - { - rakNetGuid=input; - systemAddress=UNASSIGNED_SYSTEM_ADDRESS; - } - AddressOrGUID& operator = ( const AddressOrGUID& input ) - { - rakNetGuid=input.rakNetGuid; - systemAddress=input.systemAddress; - return *this; - } - - AddressOrGUID& operator = ( const SystemAddress& input ) - { - rakNetGuid=UNASSIGNED_RAKNET_GUID; - systemAddress=input; - return *this; - } - - AddressOrGUID& operator = ( const RakNetGUID& input ) - { - rakNetGuid=input; - systemAddress=UNASSIGNED_SYSTEM_ADDRESS; - return *this; - } - - inline bool operator==( const AddressOrGUID& right ) const {return (rakNetGuid!=UNASSIGNED_RAKNET_GUID && rakNetGuid==right.rakNetGuid) || (systemAddress!=UNASSIGNED_SYSTEM_ADDRESS && systemAddress==right.systemAddress);} -}; - -typedef uint64_t NetworkID; - -/// This represents a user message from another system. -struct Packet -{ - /// The system that send this packet. - SystemAddress systemAddress; - - /// A unique identifier for the system that sent this packet, regardless of IP address (internal / external / remote system) - /// Only valid once a connection has been established (ID_CONNECTION_REQUEST_ACCEPTED, or ID_NEW_INCOMING_CONNECTION) - /// Until that time, will be UNASSIGNED_RAKNET_GUID - RakNetGUID guid; - - /// The length of the data in bytes - unsigned int length; - - /// The length of the data in bits - BitSize_t bitSize; - - /// The data from the sender - unsigned char* data; - - /// @internal - /// Indicates whether to delete the data, or to simply delete the packet. - bool deleteData; - - /// @internal - /// If true, this message is meant for the user, not for the plugins, so do not process it through plugins - bool wasGeneratedLocally; -}; - -/// Index of an unassigned player -const SystemIndex UNASSIGNED_PLAYER_INDEX = 65535; - -/// Unassigned object ID -const NetworkID UNASSIGNED_NETWORK_ID = (uint64_t) -1; - -const int PING_TIMES_ARRAY_SIZE = 5; - -struct RAK_DLL_EXPORT uint24_t -{ - uint32_t val; - - uint24_t() {} - inline operator uint32_t() { return val; } - inline operator uint32_t() const { return val; } - - inline uint24_t(const uint24_t& a) {val=a.val;} - inline uint24_t operator++() {++val; val&=0x00FFFFFF; return *this;} - inline uint24_t operator--() {--val; val&=0x00FFFFFF; return *this;} - inline uint24_t operator++(int) {uint24_t temp(val); ++val; val&=0x00FFFFFF; return temp;} - inline uint24_t operator--(int) {uint24_t temp(val); --val; val&=0x00FFFFFF; return temp;} - inline uint24_t operator&(const uint24_t& a) {return uint24_t(val&a.val);} - inline uint24_t& operator=(const uint24_t& a) { val=a.val; return *this; } - inline uint24_t& operator+=(const uint24_t& a) { val+=a.val; val&=0x00FFFFFF; return *this; } - inline uint24_t& operator-=(const uint24_t& a) { val-=a.val; val&=0x00FFFFFF; return *this; } - inline bool operator==( const uint24_t& right ) const {return val==right.val;} - inline bool operator!=( const uint24_t& right ) const {return val!=right.val;} - inline bool operator > ( const uint24_t& right ) const {return val>right.val;} - inline bool operator < ( const uint24_t& right ) const {return val ( const uint32_t& right ) const {return val>(right&0x00FFFFFF);} - inline bool operator < ( const uint32_t& right ) const {return val<(right&0x00FFFFFF);} - inline const uint24_t operator+( const uint32_t &other ) const { return uint24_t(val+other); } - inline const uint24_t operator-( const uint32_t &other ) const { return uint24_t(val-other); } - inline const uint24_t operator/( const uint32_t &other ) const { return uint24_t(val/other); } - inline const uint24_t operator*( const uint32_t &other ) const { return uint24_t(val*other); } -}; - -} // namespace MafiaNet - -#endif +/* + * Copyright (c) 2026, MafiaHub + * Licensed under MIT-style license + * + * Deprecated include path. "mafianet/types.h" was renamed to "mafianet/RakNetTypes.h" so + * every header follows the PascalCase name of the class it declares. This + * forwarding header is kept for one release cycle and will then be removed. + * Define MAFIANET_SILENCE_DEPRECATED_INCLUDES to suppress the message. + */ +#pragma once +#ifndef MAFIANET_SILENCE_DEPRECATED_INCLUDES +#pragma message("mafianet/types.h is deprecated; include mafianet/RakNetTypes.h instead") +#endif +#include "RakNetTypes.h" diff --git a/Source/include/mafianet/wstring.h b/Source/include/mafianet/wstring.h index bb5c9199d..bad3e4240 100644 --- a/Source/include/mafianet/wstring.h +++ b/Source/include/mafianet/wstring.h @@ -1,124 +1,14 @@ -/* - * Original work: Copyright (c) 2014, Oculus VR, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * RakNet License.txt file in the licenses directory of this source tree. An additional grant - * of patent rights can be found in the RakNet Patents.txt file in the same directory. - * - * - * Modified work: Copyright (c) 2016-2018, SLikeSoft UG (haftungsbeschränkt) - * - * This source code was modified by SLikeSoft. Modifications are licensed under the MIT-style - * license found in the license.txt file in the root directory of this source tree. - */ - -#ifndef __RAK_W_STRING_H -#define __RAK_W_STRING_H - -#include "Export.h" -#include "types.h" // int64_t -#include "string.h" - -#ifdef _WIN32 -#include "WindowsIncludes.h" -#endif - -namespace MafiaNet -{ - /// \brief String class for Unicode - class RAK_DLL_EXPORT RakWString - { - public: - // Constructors - RakWString(); - RakWString( const RakString &right ); - RakWString( const wchar_t *input ); - RakWString( const RakWString & right); - RakWString( const char *input ); - ~RakWString(); - - /// Implicit return of wchar_t* - operator wchar_t* () const {if (c_str) return c_str; return (wchar_t*) L"";} - - /// Same as std::string::c_str - const wchar_t* C_String(void) const {if (c_str) return c_str; return (const wchar_t*) L"";} - - /// Assignment operators - RakWString& operator = ( const RakWString& right ); - RakWString& operator = ( const RakString& right ); - RakWString& operator = ( const wchar_t * const str ); - RakWString& operator = ( wchar_t *str ); - RakWString& operator = ( const char * const str ); - RakWString& operator = ( char *str ); - - /// Concatenation - RakWString& operator +=( const RakWString& right); - RakWString& operator += ( const wchar_t * const right ); - RakWString& operator += ( wchar_t *right ); - - /// Equality - bool operator==(const RakWString &right) const; - - // Comparison - bool operator < ( const RakWString& right ) const; - bool operator <= ( const RakWString& right ) const; - bool operator > ( const RakWString& right ) const; - bool operator >= ( const RakWString& right ) const; - - /// Inequality - bool operator!=(const RakWString &right) const; - - /// Set the value of the string - void Set( wchar_t *str ); - - /// Returns if the string is empty. Also, C_String() would return "" - bool IsEmpty(void) const; - - /// Returns the length of the string - size_t GetLength(void) const; - - /// Has the string into an unsigned int - static unsigned long ToInteger(const RakWString &rs); - - /// Compare strings (case sensitive) - int StrCmp(const RakWString &right) const; - - /// Compare strings (not case sensitive) - int StrICmp(const RakWString &right) const; - - /// Clear the string - void Clear(void); - - /// Print the string to the screen - void Printf(void); - - /// Print the string to a file - void FPrintf(FILE *fp); - - /// Serialize to a bitstream, uncompressed (slightly faster) - /// \param[out] bs Bitstream to serialize to - void Serialize(BitStream *bs) const; - - /// Static version of the Serialize function - static void Serialize(const wchar_t * const str, BitStream *bs); - - /// Deserialize what was written by Serialize - /// \param[in] bs Bitstream to serialize from - /// \return true if the deserialization was successful - bool Deserialize(BitStream *bs); - - /// Static version of the Deserialize() function - static bool Deserialize(wchar_t *str, BitStream *bs); - static bool Deserialize(wchar_t *str, size_t strLength, BitStream *bs); - - - protected: - wchar_t* c_str; - size_t c_strCharLength; - }; -} - -const MafiaNet::RakWString RAK_DLL_EXPORT operator+(const MafiaNet::RakWString &lhs, const MafiaNet::RakWString &rhs); - -#endif +/* + * Copyright (c) 2026, MafiaHub + * Licensed under MIT-style license + * + * Deprecated include path. "mafianet/wstring.h" was renamed to "mafianet/RakWString.h" so + * every header follows the PascalCase name of the class it declares. This + * forwarding header is kept for one release cycle and will then be removed. + * Define MAFIANET_SILENCE_DEPRECATED_INCLUDES to suppress the message. + */ +#pragma once +#ifndef MAFIANET_SILENCE_DEPRECATED_INCLUDES +#pragma message("mafianet/wstring.h is deprecated; include mafianet/RakWString.h instead") +#endif +#include "RakWString.h" diff --git a/Source/src/Base64Encoder.cpp b/Source/src/Base64Encoder.cpp index 7808ffcdc..d0ac34cf5 100644 --- a/Source/src/Base64Encoder.cpp +++ b/Source/src/Base64Encoder.cpp @@ -14,7 +14,7 @@ */ #include "mafianet/Base64Encoder.h" -#include "mafianet/memoryoverride.h" +#include "mafianet/RakMemoryOverride.h" const char *Base64Map(void) {return "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";} const char *base64Map = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; diff --git a/Source/src/BitStream.cpp b/Source/src/BitStream.cpp index bfb9c6fa0..e7242a7cc 100644 --- a/Source/src/BitStream.cpp +++ b/Source/src/BitStream.cpp @@ -24,7 +24,7 @@ #include #include "mafianet/SocketIncludes.h" -#include "mafianet/defines.h" +#include "mafianet/RakNetDefines.h" #if defined(_WIN32) #include "mafianet/WindowsIncludes.h" @@ -37,8 +37,8 @@ #include #endif #endif -#include "mafianet/linux_adapter.h" -#include "mafianet/osx_adapter.h" +#include "mafianet/LinuxAdapter.h" +#include "mafianet/OsxAdapter.h" // MSWin uses _copysign, others use copysign... #ifndef _WIN32 diff --git a/Source/src/CCRakNetSlidingWindow.cpp b/Source/src/CCRakNetSlidingWindow.cpp index 6919254a4..2c2dcec9e 100644 --- a/Source/src/CCRakNetSlidingWindow.cpp +++ b/Source/src/CCRakNetSlidingWindow.cpp @@ -29,8 +29,8 @@ static const CCTimeType SYN=10000; #include #include #include -#include "mafianet/assert.h" -#include "mafianet/alloca.h" +#include "mafianet/RakAssert.h" +#include "mafianet/RakAlloca.h" using namespace MafiaNet; diff --git a/Source/src/CCRakNetUDT.cpp b/Source/src/CCRakNetUDT.cpp index a4c2181dd..336fd49d5 100644 --- a/Source/src/CCRakNetUDT.cpp +++ b/Source/src/CCRakNetUDT.cpp @@ -23,8 +23,8 @@ #include #include //#include -#include "mafianet/assert.h" -#include "mafianet/alloca.h" +#include "mafianet/RakAssert.h" +#include "mafianet/RakAlloca.h" using namespace MafiaNet; diff --git a/Source/src/CloudClient.cpp b/Source/src/CloudClient.cpp index df7e36ad1..a84f22cb5 100644 --- a/Source/src/CloudClient.cpp +++ b/Source/src/CloudClient.cpp @@ -20,7 +20,7 @@ #include "mafianet/GetTime.h" #include "mafianet/MessageIdentifiers.h" #include "mafianet/BitStream.h" -#include "mafianet/peerinterface.h" +#include "mafianet/RakPeerInterface.h" using namespace MafiaNet; diff --git a/Source/src/CloudServer.cpp b/Source/src/CloudServer.cpp index a19954fed..ead4a4f9c 100644 --- a/Source/src/CloudServer.cpp +++ b/Source/src/CloudServer.cpp @@ -20,7 +20,7 @@ #include "mafianet/GetTime.h" #include "mafianet/MessageIdentifiers.h" #include "mafianet/BitStream.h" -#include "mafianet/peerinterface.h" +#include "mafianet/RakPeerInterface.h" enum ServerToServerCommands { diff --git a/Source/src/CommandParserInterface.cpp b/Source/src/CommandParserInterface.cpp index 2076ff0b3..2a7df0d26 100644 --- a/Source/src/CommandParserInterface.cpp +++ b/Source/src/CommandParserInterface.cpp @@ -16,7 +16,7 @@ #include "mafianet/CommandParserInterface.h" #include "mafianet/TransportInterface.h" #include -#include "mafianet/assert.h" +#include "mafianet/RakAssert.h" #include diff --git a/Source/src/ConnectionGraph2.cpp b/Source/src/ConnectionGraph2.cpp index a17bdbea4..bf52b5cb0 100644 --- a/Source/src/ConnectionGraph2.cpp +++ b/Source/src/ConnectionGraph2.cpp @@ -17,7 +17,7 @@ #if _RAKNET_SUPPORT_ConnectionGraph2==1 #include "mafianet/ConnectionGraph2.h" -#include "mafianet/peerinterface.h" +#include "mafianet/RakPeerInterface.h" #include "mafianet/MessageIdentifiers.h" #include "mafianet/BitStream.h" diff --git a/Source/src/ConsoleServer.cpp b/Source/src/ConsoleServer.cpp index 41805b561..207e84372 100644 --- a/Source/src/ConsoleServer.cpp +++ b/Source/src/ConsoleServer.cpp @@ -26,8 +26,8 @@ #define COMMAND_DELINATOR_TOGGLE '"' #include "mafianet/LinuxStrings.h" -#include "mafianet/linux_adapter.h" -#include "mafianet/osx_adapter.h" +#include "mafianet/LinuxAdapter.h" +#include "mafianet/OsxAdapter.h" using namespace MafiaNet; diff --git a/Source/src/DS_BytePool.cpp b/Source/src/DS_BytePool.cpp index 2794fdc91..cbd2a978b 100644 --- a/Source/src/DS_BytePool.cpp +++ b/Source/src/DS_BytePool.cpp @@ -13,8 +13,10 @@ * license found in the license.txt file in the root directory of this source tree. */ +// The header is deprecated; this is its own implementation file. +#define MAFIANET_SILENCE_DEPRECATED_INCLUDES #include "mafianet/DS_BytePool.h" -#include "mafianet/assert.h" +#include "mafianet/RakAssert.h" #ifndef __APPLE__ // Use stdlib and not malloc for compatibility #include diff --git a/Source/src/DS_HuffmanEncodingTree.cpp b/Source/src/DS_HuffmanEncodingTree.cpp index 93a87b57a..ca9dfc0b9 100644 --- a/Source/src/DS_HuffmanEncodingTree.cpp +++ b/Source/src/DS_HuffmanEncodingTree.cpp @@ -16,7 +16,7 @@ #include "mafianet/DS_HuffmanEncodingTree.h" #include "mafianet/DS_Queue.h" #include "mafianet/BitStream.h" -#include "mafianet/assert.h" +#include "mafianet/RakAssert.h" using namespace MafiaNet; diff --git a/Source/src/DS_Table.cpp b/Source/src/DS_Table.cpp index ff130ff95..ae4bb5dc1 100644 --- a/Source/src/DS_Table.cpp +++ b/Source/src/DS_Table.cpp @@ -16,11 +16,11 @@ #include "mafianet/DS_Table.h" #include "mafianet/DS_OrderedList.h" #include -#include "mafianet/assert.h" -#include "mafianet/assert.h" +#include "mafianet/RakAssert.h" +#include "mafianet/RakAssert.h" #include "mafianet/Itoa.h" -#include "mafianet/linux_adapter.h" -#include "mafianet/osx_adapter.h" +#include "mafianet/LinuxAdapter.h" +#include "mafianet/OsxAdapter.h" using namespace DataStructures; diff --git a/Source/src/DataCompressor.cpp b/Source/src/DataCompressor.cpp index 913f5b20f..6e7e4b1ee 100644 --- a/Source/src/DataCompressor.cpp +++ b/Source/src/DataCompressor.cpp @@ -15,7 +15,7 @@ #include "mafianet/DataCompressor.h" #include "mafianet/DS_HuffmanEncodingTree.h" -#include "mafianet/assert.h" +#include "mafianet/RakAssert.h" #include // Use string.h rather than memory.h for a console using namespace MafiaNet; diff --git a/Source/src/DirectoryDeltaTransfer.cpp b/Source/src/DirectoryDeltaTransfer.cpp index d094308b1..805551730 100644 --- a/Source/src/DirectoryDeltaTransfer.cpp +++ b/Source/src/DirectoryDeltaTransfer.cpp @@ -19,7 +19,7 @@ #include "mafianet/DirectoryDeltaTransfer.h" #include "mafianet/FileList.h" #include "mafianet/StringCompressor.h" -#include "mafianet/peerinterface.h" +#include "mafianet/RakPeerInterface.h" #include "mafianet/FileListTransfer.h" #include "mafianet/FileListTransferCBInterface.h" #include "mafianet/BitStream.h" @@ -28,8 +28,8 @@ #include "mafianet/DS_List.h" #include "mafianet/SuperFastHash.h" #include "mafianet/IncrementalReadInterface.h" -#include "mafianet/linux_adapter.h" -#include "mafianet/osx_adapter.h" +#include "mafianet/LinuxAdapter.h" +#include "mafianet/OsxAdapter.h" using namespace MafiaNet; diff --git a/Source/src/DynDNS.cpp b/Source/src/DynDNS.cpp index c5383eef1..2233c3fc8 100644 --- a/Source/src/DynDNS.cpp +++ b/Source/src/DynDNS.cpp @@ -17,7 +17,7 @@ #if _RAKNET_SUPPORT_DynDNS==1 && _RAKNET_SUPPORT_TCPInterface==1 #include "mafianet/TCPInterface.h" -#include "mafianet/socket2.h" +#include "mafianet/RakNetSocket2.h" #include "mafianet/DynDNS.h" #include "mafianet/GetTime.h" #include "mafianet/Base64Encoder.h" diff --git a/Source/src/EmailSender.cpp b/Source/src/EmailSender.cpp index c4649157b..b8f7ddb89 100644 --- a/Source/src/EmailSender.cpp +++ b/Source/src/EmailSender.cpp @@ -28,14 +28,14 @@ #include "mafianet/BitStream.h" #include "mafianet/Base64Encoder.h" #include -#include "mafianet/linux_adapter.h" -#include "mafianet/osx_adapter.h" +#include "mafianet/LinuxAdapter.h" +#include "mafianet/OsxAdapter.h" -#include "mafianet/sleep.h" +#include "mafianet/RakSleep.h" using namespace MafiaNet; diff --git a/Source/src/EpochTimeToString.cpp b/Source/src/EpochTimeToString.cpp index 3d02e4dc5..f94d4c86f 100644 --- a/Source/src/EpochTimeToString.cpp +++ b/Source/src/EpochTimeToString.cpp @@ -21,8 +21,8 @@ // localtime #include #include "mafianet/LinuxStrings.h" -#include "mafianet/linux_adapter.h" -#include "mafianet/osx_adapter.h" +#include "mafianet/LinuxAdapter.h" +#include "mafianet/OsxAdapter.h" char * EpochTimeToString(long long time) { diff --git a/Source/src/FileList.cpp b/Source/src/FileList.cpp index 1ded75734..e21a095ce 100644 --- a/Source/src/FileList.cpp +++ b/Source/src/FileList.cpp @@ -18,7 +18,7 @@ #if _RAKNET_SUPPORT_FileOperations==1 #include // RAKNET_DEBUG_PRINTF -#include "mafianet/assert.h" +#include "mafianet/RakAssert.h" #if defined(ANDROID) #include #elif defined(_WIN32) || defined(__CYGWIN__) @@ -47,10 +47,10 @@ #include "mafianet/BitStream.h" #include "mafianet/FileOperations.h" #include "mafianet/SuperFastHash.h" -#include "mafianet/assert.h" +#include "mafianet/RakAssert.h" #include "mafianet/LinuxStrings.h" -#include "mafianet/linux_adapter.h" -#include "mafianet/osx_adapter.h" +#include "mafianet/LinuxAdapter.h" +#include "mafianet/OsxAdapter.h" #define MAX_FILENAME_LENGTH 512 static const unsigned HASH_LENGTH=4; @@ -74,7 +74,7 @@ using namespace MafiaNet; #include //defines intptr_t #endif -#include "mafianet/alloca.h" +#include "mafianet/RakAlloca.h" //int RAK_DLL_EXPORT FileListNodeComp( char * const &key, const FileListNode &data ) //{ diff --git a/Source/src/FileListTransfer.cpp b/Source/src/FileListTransfer.cpp index b4a6dff94..d656e1992 100644 --- a/Source/src/FileListTransfer.cpp +++ b/Source/src/FileListTransfer.cpp @@ -23,12 +23,12 @@ #include "mafianet/FileList.h" #include "mafianet/DS_Queue.h" #include "mafianet/MessageIdentifiers.h" -#include "mafianet/types.h" -#include "mafianet/peerinterface.h" -#include "mafianet/statistics.h" +#include "mafianet/RakNetTypes.h" +#include "mafianet/RakPeerInterface.h" +#include "mafianet/RakNetStatistics.h" #include "mafianet/IncrementalReadInterface.h" -#include "mafianet/assert.h" -#include "mafianet/alloca.h" +#include "mafianet/RakAssert.h" +#include "mafianet/RakAlloca.h" namespace MafiaNet { diff --git a/Source/src/FileOperations.cpp b/Source/src/FileOperations.cpp index 4c826391b..66f3465ce 100644 --- a/Source/src/FileOperations.cpp +++ b/Source/src/FileOperations.cpp @@ -15,7 +15,7 @@ #include "mafianet/FileOperations.h" #if _RAKNET_SUPPORT_FileOperations==1 -#include "mafianet/memoryoverride.h" +#include "mafianet/RakMemoryOverride.h" #include "mafianet/_FindFirst.h" // For linux #include #include @@ -29,8 +29,8 @@ #include "mafianet/_FindFirst.h" #endif #include "errno.h" -#include "mafianet/linux_adapter.h" -#include "mafianet/osx_adapter.h" +#include "mafianet/LinuxAdapter.h" +#include "mafianet/OsxAdapter.h" #ifndef MAX_PATH #define MAX_PATH 260 diff --git a/Source/src/FormatString.cpp b/Source/src/FormatString.cpp index afc5d60d2..011d4c45f 100644 --- a/Source/src/FormatString.cpp +++ b/Source/src/FormatString.cpp @@ -18,8 +18,8 @@ #include #include #include "mafianet/LinuxStrings.h" -#include "mafianet/linux_adapter.h" -#include "mafianet/osx_adapter.h" +#include "mafianet/LinuxAdapter.h" +#include "mafianet/OsxAdapter.h" char * FormatString(const char *format, ...) { diff --git a/Source/src/FullyConnectedMesh2.cpp b/Source/src/FullyConnectedMesh2.cpp index e22d1fe64..2bed19a88 100644 --- a/Source/src/FullyConnectedMesh2.cpp +++ b/Source/src/FullyConnectedMesh2.cpp @@ -21,10 +21,10 @@ #if _RAKNET_SUPPORT_FullyConnectedMesh2==1 #include "mafianet/FullyConnectedMesh2.h" -#include "mafianet/peerinterface.h" -#include "mafianet/guid_util.h" +#include "mafianet/RakPeerInterface.h" +#include "mafianet/GuidUtil.h" #include "mafianet/MessageIdentifiers.h" -#include "mafianet/assert.h" +#include "mafianet/RakAssert.h" #include "mafianet/GetTime.h" #include "mafianet/Rand.h" #include "mafianet/DS_OrderedList.h" diff --git a/Source/src/gettimeofday.cpp b/Source/src/GetTimeOfDay.cpp similarity index 94% rename from Source/src/gettimeofday.cpp rename to Source/src/GetTimeOfDay.cpp index 324d283a1..6da0b8612 100644 --- a/Source/src/gettimeofday.cpp +++ b/Source/src/GetTimeOfDay.cpp @@ -15,7 +15,7 @@ #if defined(_WIN32) && !defined(__GNUC__) &&!defined(__GCCXML__) -#include "mafianet/gettimeofday.h" +#include "mafianet/GetTimeOfDay.h" // From http://www.openasthra.com/c-tidbits/gettimeofday-function-for-windows/ diff --git a/Source/src/GridSectorizer.cpp b/Source/src/GridSectorizer.cpp index 0080bc28b..7580eec70 100644 --- a/Source/src/GridSectorizer.cpp +++ b/Source/src/GridSectorizer.cpp @@ -13,7 +13,7 @@ * license found in the license.txt file in the root directory of this source tree. */ -#include "mafianet/assert.h" +#include "mafianet/RakAssert.h" #include "mafianet/GridSectorizer.h" //#include #include diff --git a/Source/src/guid_util.cpp b/Source/src/GuidUtil.cpp similarity index 96% rename from Source/src/guid_util.cpp rename to Source/src/GuidUtil.cpp index 62ac484c1..a07c41037 100644 --- a/Source/src/guid_util.cpp +++ b/Source/src/GuidUtil.cpp @@ -5,7 +5,7 @@ * license.txt file in the root directory of this source tree. */ -#include "mafianet/guid_util.h" +#include "mafianet/GuidUtil.h" namespace MafiaNet { diff --git a/Source/src/HTTPConnection.cpp b/Source/src/HTTPConnection.cpp index 91748ee01..f6602b453 100644 --- a/Source/src/HTTPConnection.cpp +++ b/Source/src/HTTPConnection.cpp @@ -22,9 +22,9 @@ #include "mafianet/TCPInterface.h" #include "mafianet/HTTPConnection.h" -#include "mafianet/sleep.h" -#include "mafianet/string.h" -#include "mafianet/assert.h" +#include "mafianet/RakSleep.h" +#include "mafianet/RakString.h" +#include "mafianet/RakAssert.h" #include #include #include diff --git a/Source/src/IncrementalReadInterface.cpp b/Source/src/IncrementalReadInterface.cpp index 0bad8e857..b21f9a7ac 100644 --- a/Source/src/IncrementalReadInterface.cpp +++ b/Source/src/IncrementalReadInterface.cpp @@ -15,8 +15,8 @@ #include "mafianet/IncrementalReadInterface.h" #include -#include "mafianet/linux_adapter.h" -#include "mafianet/osx_adapter.h" +#include "mafianet/LinuxAdapter.h" +#include "mafianet/OsxAdapter.h" using namespace MafiaNet; diff --git a/Source/src/linux_adapter.cpp b/Source/src/LinuxAdapter.cpp similarity index 99% rename from Source/src/linux_adapter.cpp rename to Source/src/LinuxAdapter.cpp index cdb054815..7b58903b5 100644 --- a/Source/src/linux_adapter.cpp +++ b/Source/src/LinuxAdapter.cpp @@ -9,7 +9,7 @@ */ #ifdef __linux__ -#include "mafianet/linux_adapter.h" +#include "mafianet/LinuxAdapter.h" #include // for std::max, std::min #include // for errno diff --git a/Source/src/LogCommandParser.cpp b/Source/src/LogCommandParser.cpp index fdec20a93..cc7194b93 100644 --- a/Source/src/LogCommandParser.cpp +++ b/Source/src/LogCommandParser.cpp @@ -26,8 +26,8 @@ #include #include "mafianet/LinuxStrings.h" -#include "mafianet/linux_adapter.h" -#include "mafianet/osx_adapter.h" +#include "mafianet/LinuxAdapter.h" +#include "mafianet/OsxAdapter.h" using namespace MafiaNet; diff --git a/Source/src/MessageFilter.cpp b/Source/src/MessageFilter.cpp index ee4e1db98..b927a51fa 100644 --- a/Source/src/MessageFilter.cpp +++ b/Source/src/MessageFilter.cpp @@ -17,11 +17,11 @@ #if _RAKNET_SUPPORT_MessageFilter==1 #include "mafianet/MessageFilter.h" -#include "mafianet/assert.h" +#include "mafianet/RakAssert.h" #include "mafianet/GetTime.h" #include "mafianet/MessageIdentifiers.h" -#include "mafianet/assert.h" -#include "mafianet/peerinterface.h" +#include "mafianet/RakAssert.h" +#include "mafianet/RakPeerInterface.h" #include "mafianet/PacketizedTCP.h" #include "mafianet/BitStream.h" diff --git a/Source/src/NatPunchthroughClient.cpp b/Source/src/NatPunchthroughClient.cpp index bc917c4d4..0f03527d9 100644 --- a/Source/src/NatPunchthroughClient.cpp +++ b/Source/src/NatPunchthroughClient.cpp @@ -19,7 +19,7 @@ #include "mafianet/NatPunchthroughClient.h" #include "mafianet/BitStream.h" #include "mafianet/MessageIdentifiers.h" -#include "mafianet/peerinterface.h" +#include "mafianet/RakPeerInterface.h" #include "mafianet/GetTime.h" #include "mafianet/PacketLogger.h" #include "mafianet/Itoa.h" diff --git a/Source/src/NatPunchthroughServer.cpp b/Source/src/NatPunchthroughServer.cpp index 627ec6a85..49f49f9ae 100644 --- a/Source/src/NatPunchthroughServer.cpp +++ b/Source/src/NatPunchthroughServer.cpp @@ -20,12 +20,12 @@ #include "mafianet/SocketLayer.h" #include "mafianet/BitStream.h" #include "mafianet/MessageIdentifiers.h" -#include "mafianet/peerinterface.h" +#include "mafianet/RakPeerInterface.h" #include "mafianet/MTUSize.h" #include "mafianet/GetTime.h" #include "mafianet/PacketLogger.h" -#include "mafianet/linux_adapter.h" -#include "mafianet/osx_adapter.h" +#include "mafianet/LinuxAdapter.h" +#include "mafianet/OsxAdapter.h" using namespace MafiaNet; diff --git a/Source/src/NatTypeDetectionClient.cpp b/Source/src/NatTypeDetectionClient.cpp index 580ef4056..c852305a8 100644 --- a/Source/src/NatTypeDetectionClient.cpp +++ b/Source/src/NatTypeDetectionClient.cpp @@ -17,11 +17,11 @@ #if _RAKNET_SUPPORT_NatTypeDetectionClient==1 #include "mafianet/NatTypeDetectionClient.h" -#include "mafianet/smartptr.h" +#include "mafianet/RakNetSmartPtr.h" #include "mafianet/BitStream.h" #include "mafianet/SocketIncludes.h" -#include "mafianet/string.h" -#include "mafianet/peerinterface.h" +#include "mafianet/RakString.h" +#include "mafianet/RakPeerInterface.h" #include "mafianet/MessageIdentifiers.h" #include "mafianet/SocketLayer.h" #include "mafianet/SocketDefines.h" diff --git a/Source/src/NatTypeDetectionServer.cpp b/Source/src/NatTypeDetectionServer.cpp index 639043fca..6c4c0f7e2 100644 --- a/Source/src/NatTypeDetectionServer.cpp +++ b/Source/src/NatTypeDetectionServer.cpp @@ -18,15 +18,15 @@ #include "mafianet/NatTypeDetectionServer.h" #include "mafianet/SocketLayer.h" -#include "mafianet/smartptr.h" +#include "mafianet/RakNetSmartPtr.h" #include "mafianet/SocketIncludes.h" -#include "mafianet/peerinterface.h" +#include "mafianet/RakPeerInterface.h" #include "mafianet/MessageIdentifiers.h" #include "mafianet/GetTime.h" #include "mafianet/BitStream.h" #include "mafianet/SocketDefines.h" -#include "mafianet/linux_adapter.h" -#include "mafianet/osx_adapter.h" +#include "mafianet/LinuxAdapter.h" +#include "mafianet/OsxAdapter.h" // #define NTDS_VERBOSE diff --git a/Source/src/NetworkIDManager.cpp b/Source/src/NetworkIDManager.cpp index 4b8f5e9a2..55732a72c 100644 --- a/Source/src/NetworkIDManager.cpp +++ b/Source/src/NetworkIDManager.cpp @@ -19,11 +19,11 @@ #include "mafianet/NetworkIDManager.h" #include "mafianet/NetworkIDObject.h" -#include "mafianet/assert.h" +#include "mafianet/RakAssert.h" #include "mafianet/GetTime.h" -#include "mafianet/sleep.h" +#include "mafianet/RakSleep.h" #include "mafianet/SuperFastHash.h" -#include "mafianet/peerinterface.h" +#include "mafianet/RakPeerInterface.h" using namespace MafiaNet; diff --git a/Source/src/NetworkIDObject.cpp b/Source/src/NetworkIDObject.cpp index 462f5ad31..d54964dc2 100644 --- a/Source/src/NetworkIDObject.cpp +++ b/Source/src/NetworkIDObject.cpp @@ -19,8 +19,8 @@ #include "mafianet/NetworkIDObject.h" #include "mafianet/NetworkIDManager.h" -#include "mafianet/assert.h" -#include "mafianet/alloca.h" +#include "mafianet/RakAssert.h" +#include "mafianet/RakAlloca.h" using namespace MafiaNet; diff --git a/Source/src/osx_adapter.cpp b/Source/src/OsxAdapter.cpp similarity index 99% rename from Source/src/osx_adapter.cpp rename to Source/src/OsxAdapter.cpp index ad52e429d..ebdc79738 100644 --- a/Source/src/osx_adapter.cpp +++ b/Source/src/OsxAdapter.cpp @@ -9,7 +9,7 @@ */ #ifdef __APPLE__ -#include "mafianet/osx_adapter.h" +#include "mafianet/OsxAdapter.h" #include // for std::max, std::min #include // for errno diff --git a/Source/src/PacketFileLogger.cpp b/Source/src/PacketFileLogger.cpp index cd170f229..32996cbdf 100644 --- a/Source/src/PacketFileLogger.cpp +++ b/Source/src/PacketFileLogger.cpp @@ -18,9 +18,9 @@ #include "mafianet/PacketFileLogger.h" #include "mafianet/GetTime.h" -#include "mafianet/linux_adapter.h" -#include "mafianet/osx_adapter.h" -#include "mafianet/memoryoverride.h" +#include "mafianet/LinuxAdapter.h" +#include "mafianet/OsxAdapter.h" +#include "mafianet/RakMemoryOverride.h" using namespace MafiaNet; diff --git a/Source/src/PacketLogger.cpp b/Source/src/PacketLogger.cpp index cf6ae2b3b..92b56485b 100644 --- a/Source/src/PacketLogger.cpp +++ b/Source/src/PacketLogger.cpp @@ -20,7 +20,7 @@ #include "mafianet/BitStream.h" #include "mafianet/DS_List.h" #include "mafianet/InternalPacket.h" -#include "mafianet/peerinterface.h" +#include "mafianet/RakPeerInterface.h" #include "mafianet/MessageIdentifiers.h" #include "mafianet/StringCompressor.h" #include "mafianet/GetTime.h" @@ -30,9 +30,9 @@ #include "mafianet/Itoa.h" #include #include "mafianet/SocketIncludes.h" -#include "mafianet/gettimeofday.h" -#include "mafianet/linux_adapter.h" -#include "mafianet/osx_adapter.h" +#include "mafianet/GetTimeOfDay.h" +#include "mafianet/LinuxAdapter.h" +#include "mafianet/OsxAdapter.h" using namespace MafiaNet; diff --git a/Source/src/PacketOutputWindowLogger.cpp b/Source/src/PacketOutputWindowLogger.cpp index 6a9cd60b9..6a2e80561 100644 --- a/Source/src/PacketOutputWindowLogger.cpp +++ b/Source/src/PacketOutputWindowLogger.cpp @@ -17,11 +17,11 @@ #if _RAKNET_SUPPORT_PacketLogger==1 #if defined(UNICODE) -#include "mafianet/wstring.h" +#include "mafianet/RakWString.h" #endif #include "mafianet/PacketOutputWindowLogger.h" -#include "mafianet/string.h" +#include "mafianet/RakString.h" #if defined(_WIN32) #include "mafianet/WindowsIncludes.h" #endif diff --git a/Source/src/PacketizedTCP.cpp b/Source/src/PacketizedTCP.cpp index 665b10f70..3e0531410 100644 --- a/Source/src/PacketizedTCP.cpp +++ b/Source/src/PacketizedTCP.cpp @@ -21,7 +21,7 @@ #include "mafianet/NativeTypes.h" #include "mafianet/BitStream.h" #include "mafianet/MessageIdentifiers.h" -#include "mafianet/alloca.h" +#include "mafianet/RakAlloca.h" using namespace MafiaNet; diff --git a/Source/src/PluginInterface2.cpp b/Source/src/PluginInterface2.cpp index 451e30a9a..b680ee162 100644 --- a/Source/src/PluginInterface2.cpp +++ b/Source/src/PluginInterface2.cpp @@ -16,7 +16,7 @@ #include "mafianet/PluginInterface2.h" #include "mafianet/PacketizedTCP.h" -#include "mafianet/peerinterface.h" +#include "mafianet/RakPeerInterface.h" #include "mafianet/BitStream.h" using namespace MafiaNet; diff --git a/Source/src/RPC4Plugin.cpp b/Source/src/RPC4Plugin.cpp index 09fa0cdb5..f1dd13199 100644 --- a/Source/src/RPC4Plugin.cpp +++ b/Source/src/RPC4Plugin.cpp @@ -18,14 +18,14 @@ #include "mafianet/RPC4Plugin.h" #include "mafianet/MessageIdentifiers.h" -#include "mafianet/peerinterface.h" +#include "mafianet/RakPeerInterface.h" #include "mafianet/PacketizedTCP.h" -#include "mafianet/sleep.h" -#include "mafianet/defines.h" +#include "mafianet/RakSleep.h" +#include "mafianet/RakNetDefines.h" #include "mafianet/DS_Queue.h" //#include "mafianet/GetTime.h" -#include "mafianet/linux_adapter.h" -#include "mafianet/osx_adapter.h" +#include "mafianet/LinuxAdapter.h" +#include "mafianet/OsxAdapter.h" using namespace MafiaNet; diff --git a/Source/src/Rackspace.cpp b/Source/src/Rackspace.cpp index 4d57b92c1..d4049905d 100644 --- a/Source/src/Rackspace.cpp +++ b/Source/src/Rackspace.cpp @@ -17,7 +17,7 @@ #if _RAKNET_SUPPORT_Rackspace==1 && _RAKNET_SUPPORT_TCPInterface==1 #include "mafianet/Rackspace.h" -#include "mafianet/string.h" +#include "mafianet/RakString.h" #include "mafianet/TCPInterface.h" using namespace MafiaNet; diff --git a/Source/src/RakMemoryOverride.cpp b/Source/src/RakMemoryOverride.cpp index 0180a12ba..3039323b0 100644 --- a/Source/src/RakMemoryOverride.cpp +++ b/Source/src/RakMemoryOverride.cpp @@ -13,8 +13,8 @@ * license found in the license.txt file in the root directory of this source tree. */ -#include "mafianet/memoryoverride.h" -#include "mafianet/assert.h" +#include "mafianet/RakMemoryOverride.h" +#include "mafianet/RakAssert.h" #include #ifdef _RAKNET_SUPPORT_DL_MALLOC diff --git a/Source/src/RakNetCommandParser.cpp b/Source/src/RakNetCommandParser.cpp index eeefae661..aaf144bca 100644 --- a/Source/src/RakNetCommandParser.cpp +++ b/Source/src/RakNetCommandParser.cpp @@ -16,11 +16,11 @@ #include "mafianet/NativeFeatureIncludes.h" #if _RAKNET_SUPPORT_RakNetCommandParser==1 -#include "mafianet/commandparser.h" +#include "mafianet/RakNetCommandParser.h" #include "mafianet/TransportInterface.h" -#include "mafianet/peerinterface.h" +#include "mafianet/RakPeerInterface.h" #include "mafianet/BitStream.h" -#include "mafianet/assert.h" +#include "mafianet/RakAssert.h" #include #include #include diff --git a/Source/src/RakNetSocket2.cpp b/Source/src/RakNetSocket2.cpp index bbaa19c26..7b41935ff 100644 --- a/Source/src/RakNetSocket2.cpp +++ b/Source/src/RakNetSocket2.cpp @@ -13,11 +13,11 @@ * license found in the license.txt file in the root directory of this source tree. */ -#include "mafianet/socket2.h" +#include "mafianet/RakNetSocket2.h" #include "mafianet/MmsgBatch.h" -#include "mafianet/memoryoverride.h" -#include "mafianet/assert.h" -#include "mafianet/sleep.h" +#include "mafianet/RakMemoryOverride.h" +#include "mafianet/RakAssert.h" +#include "mafianet/RakSleep.h" #include "mafianet/SocketDefines.h" #include "mafianet/GetTime.h" #include diff --git a/Source/src/RakNetStatistics.cpp b/Source/src/RakNetStatistics.cpp index 4462a2a9f..e6337eeec 100644 --- a/Source/src/RakNetStatistics.cpp +++ b/Source/src/RakNetStatistics.cpp @@ -18,12 +18,12 @@ -#include "mafianet/statistics.h" +#include "mafianet/RakNetStatistics.h" #include // sprintf #include "mafianet/GetTime.h" -#include "mafianet/string.h" -#include "mafianet/linux_adapter.h" -#include "mafianet/osx_adapter.h" +#include "mafianet/RakString.h" +#include "mafianet/LinuxAdapter.h" +#include "mafianet/OsxAdapter.h" using namespace MafiaNet; diff --git a/Source/src/RakNetTransport2.cpp b/Source/src/RakNetTransport2.cpp index b29abf429..89e9c155d 100644 --- a/Source/src/RakNetTransport2.cpp +++ b/Source/src/RakNetTransport2.cpp @@ -16,17 +16,17 @@ #include "mafianet/NativeFeatureIncludes.h" #if _RAKNET_SUPPORT_TelnetTransport==1 -#include "mafianet/transport2.h" +#include "mafianet/RakNetTransport2.h" -#include "mafianet/peerinterface.h" +#include "mafianet/RakPeerInterface.h" #include "mafianet/BitStream.h" #include "mafianet/MessageIdentifiers.h" #include #include #include #include "mafianet/LinuxStrings.h" -#include "mafianet/linux_adapter.h" -#include "mafianet/osx_adapter.h" +#include "mafianet/LinuxAdapter.h" +#include "mafianet/OsxAdapter.h" using namespace MafiaNet; diff --git a/Source/src/RakNetTypes.cpp b/Source/src/RakNetTypes.cpp index 9ed7494b8..b39c57425 100644 --- a/Source/src/RakNetTypes.cpp +++ b/Source/src/RakNetTypes.cpp @@ -16,14 +16,14 @@ /// \file /// -#include "mafianet/types.h" -#include "mafianet/assert.h" +#include "mafianet/RakNetTypes.h" +#include "mafianet/RakAssert.h" #include #include #include "mafianet/WindowsIncludes.h" #include "mafianet/WSAStartupSingleton.h" #include "mafianet/SocketDefines.h" -#include "mafianet/socket2.h" +#include "mafianet/RakNetSocket2.h" #if defined(_WIN32) // extern __int64 _strtoui64(const char*, char**, int); // needed for Code::Blocks. Does not compile on Visual Studio 2010 @@ -42,8 +42,8 @@ #include "mafianet/SocketLayer.h" #include "mafianet/SuperFastHash.h" #include -#include "mafianet/linux_adapter.h" -#include "mafianet/osx_adapter.h" +#include "mafianet/LinuxAdapter.h" +#include "mafianet/OsxAdapter.h" using namespace MafiaNet; @@ -68,7 +68,7 @@ const char *AddressOrGUID::ToString(bool writePort) const { // Rotating static buffer, mirroring SystemAddress::ToString below. // NOT THREADSAFE — for an owning, thread-safe string use - // MafiaNet::to_string(guid) from "mafianet/guid_util.h". + // MafiaNet::to_string(guid) from "mafianet/GuidUtil.h". static unsigned char strIndex=0; static char str[8][64]; unsigned char lastStrIndex=strIndex; diff --git a/Source/src/RakPeer.cpp b/Source/src/RakPeer.cpp index 1164b4181..8f4035a26 100644 --- a/Source/src/RakPeer.cpp +++ b/Source/src/RakPeer.cpp @@ -20,10 +20,10 @@ #define CAT_NEUTER_EXPORT /* Neuter dllimport for libcat */ -#include "mafianet/defines.h" -#include "mafianet/peer.h" +#include "mafianet/RakNetDefines.h" +#include "mafianet/RakPeer.h" #include "mafianet/SessionAdmission.h" -#include "mafianet/types.h" +#include "mafianet/RakNetTypes.h" #ifdef _WIN32 @@ -51,19 +51,19 @@ #include "mafianet/StringCompressor.h" #include "mafianet/StringTable.h" #include "mafianet/NetworkIDObject.h" -#include "mafianet/types.h" +#include "mafianet/RakNetTypes.h" #include "mafianet/DR_SHA1.h" -#include "mafianet/sleep.h" -#include "mafianet/assert.h" -#include "mafianet/version.h" +#include "mafianet/RakSleep.h" +#include "mafianet/RakAssert.h" +#include "mafianet/Version.h" #include "mafianet/NetworkIDManager.h" -#include "mafianet/gettimeofday.h" +#include "mafianet/GetTimeOfDay.h" #include "mafianet/SignaledEvent.h" #include "mafianet/SuperFastHash.h" -#include "mafianet/alloca.h" +#include "mafianet/RakAlloca.h" #include "mafianet/WSAStartupSingleton.h" -#include "mafianet/linux_adapter.h" -#include "mafianet/osx_adapter.h" +#include "mafianet/LinuxAdapter.h" +#include "mafianet/OsxAdapter.h" #ifdef USE_THREADED_SEND #include "mafianet/SendToThread.h" diff --git a/Source/src/RakSleep.cpp b/Source/src/RakSleep.cpp index df28f9245..a2d821800 100644 --- a/Source/src/RakSleep.cpp +++ b/Source/src/RakSleep.cpp @@ -30,7 +30,7 @@ pthread_mutex_t fakeMutex = PTHREAD_MUTEX_INITIALIZER; pthread_cond_t fakeCond = PTHREAD_COND_INITIALIZER; #endif -#include "mafianet/sleep.h" +#include "mafianet/RakSleep.h" void RakSleep(unsigned int ms) { diff --git a/Source/src/RakString.cpp b/Source/src/RakString.cpp index a887add35..77e6a2400 100644 --- a/Source/src/RakString.cpp +++ b/Source/src/RakString.cpp @@ -13,9 +13,9 @@ * license found in the license.txt file in the root directory of this source tree. */ -#include "mafianet/string.h" -#include "mafianet/assert.h" -#include "mafianet/memoryoverride.h" +#include "mafianet/RakString.h" +#include "mafianet/RakAssert.h" +#include "mafianet/RakMemoryOverride.h" #include "mafianet/BitStream.h" #include #include @@ -25,8 +25,8 @@ #include #include "mafianet/Itoa.h" #include -#include "mafianet/linux_adapter.h" -#include "mafianet/osx_adapter.h" +#include "mafianet/LinuxAdapter.h" +#include "mafianet/OsxAdapter.h" using namespace MafiaNet; @@ -1573,7 +1573,7 @@ void RakString::UnlockMutex(void) } /* -#include "mafianet/string.h" +#include "mafianet/RakString.h" #include #include "mafianet/GetTime.h" diff --git a/Source/src/RakThread.cpp b/Source/src/RakThread.cpp index 77157e680..ff9b8920c 100644 --- a/Source/src/RakThread.cpp +++ b/Source/src/RakThread.cpp @@ -13,11 +13,11 @@ * license found in the license.txt file in the root directory of this source tree. */ -#include "mafianet/thread.h" -#include "mafianet/assert.h" -#include "mafianet/defines.h" -#include "mafianet/sleep.h" -#include "mafianet/memoryoverride.h" +#include "mafianet/RakThread.h" +#include "mafianet/RakAssert.h" +#include "mafianet/RakNetDefines.h" +#include "mafianet/RakSleep.h" +#include "mafianet/RakMemoryOverride.h" using namespace MafiaNet; diff --git a/Source/src/RakVoice.cpp b/Source/src/RakVoice.cpp index 5535e84a1..062c6b470 100644 --- a/Source/src/RakVoice.cpp +++ b/Source/src/RakVoice.cpp @@ -20,7 +20,7 @@ #include "mafianet/BitStream.h" #include "mafianet/PacketPriority.h" #include "mafianet/MessageIdentifiers.h" -#include "mafianet/peerinterface.h" +#include "mafianet/RakPeerInterface.h" #include "mafianet/ReliabilityLayer.h" #include #include diff --git a/Source/src/RakWString.cpp b/Source/src/RakWString.cpp index 4b11617b5..ccaab61fb 100644 --- a/Source/src/RakWString.cpp +++ b/Source/src/RakWString.cpp @@ -13,13 +13,13 @@ * license found in the license.txt file in the root directory of this source tree. */ -#include "mafianet/wstring.h" +#include "mafianet/RakWString.h" #include "mafianet/BitStream.h" #include #include #include -#include "mafianet/linux_adapter.h" -#include "mafianet/osx_adapter.h" +#include "mafianet/LinuxAdapter.h" +#include "mafianet/OsxAdapter.h" using namespace MafiaNet; diff --git a/Source/src/ReadyEvent.cpp b/Source/src/ReadyEvent.cpp index 73ae516e5..0cfbebbbd 100644 --- a/Source/src/ReadyEvent.cpp +++ b/Source/src/ReadyEvent.cpp @@ -17,10 +17,10 @@ #if _RAKNET_SUPPORT_ReadyEvent==1 #include "mafianet/ReadyEvent.h" -#include "mafianet/peerinterface.h" +#include "mafianet/RakPeerInterface.h" #include "mafianet/BitStream.h" #include "mafianet/MessageIdentifiers.h" -#include "mafianet/assert.h" +#include "mafianet/RakAssert.h" using namespace MafiaNet; diff --git a/Source/src/RelayPlugin.cpp b/Source/src/RelayPlugin.cpp index 82088248d..f0219294c 100644 --- a/Source/src/RelayPlugin.cpp +++ b/Source/src/RelayPlugin.cpp @@ -18,7 +18,7 @@ #include "mafianet/RelayPlugin.h" #include "mafianet/MessageIdentifiers.h" -#include "mafianet/peerinterface.h" +#include "mafianet/RakPeerInterface.h" #include "mafianet/BitStream.h" using namespace MafiaNet; diff --git a/Source/src/ReliabilityLayer.cpp b/Source/src/ReliabilityLayer.cpp index f058cd183..6350e0e61 100644 --- a/Source/src/ReliabilityLayer.cpp +++ b/Source/src/ReliabilityLayer.cpp @@ -24,15 +24,15 @@ #include "mafianet/GetTime.h" #include "mafianet/SocketLayer.h" #include "mafianet/PluginInterface2.h" -#include "mafianet/assert.h" +#include "mafianet/RakAssert.h" #include "mafianet/Rand.h" #include "mafianet/MessageIdentifiers.h" #ifdef USE_THREADED_SEND #include "mafianet/SendToThread.h" #endif #include -#include "mafianet/linux_adapter.h" -#include "mafianet/osx_adapter.h" +#include "mafianet/LinuxAdapter.h" +#include "mafianet/OsxAdapter.h" using namespace MafiaNet; diff --git a/Source/src/ReplicaManager3.cpp b/Source/src/ReplicaManager3.cpp index d57d717c7..c60be1e1a 100644 --- a/Source/src/ReplicaManager3.cpp +++ b/Source/src/ReplicaManager3.cpp @@ -20,7 +20,7 @@ #include "mafianet/VirtualWorldReplica3.h" #include "mafianet/GetTime.h" #include "mafianet/MessageIdentifiers.h" -#include "mafianet/peerinterface.h" +#include "mafianet/RakPeerInterface.h" #include "mafianet/NetworkIDManager.h" using namespace MafiaNet; diff --git a/Source/src/Router2.cpp b/Source/src/Router2.cpp index 43772edf4..6d4449d76 100644 --- a/Source/src/Router2.cpp +++ b/Source/src/Router2.cpp @@ -17,9 +17,9 @@ #if _RAKNET_SUPPORT_Router2==1 && _RAKNET_SUPPORT_UDPForwarder==1 #include "mafianet/Router2.h" -#include "mafianet/peerinterface.h" +#include "mafianet/RakPeerInterface.h" #include "mafianet/BitStream.h" -#include "mafianet/time.h" +#include "mafianet/RakNetTime.h" #include "mafianet/GetTime.h" #include "mafianet/DS_OrderedList.h" #include "mafianet/SocketLayer.h" diff --git a/Source/src/SendToThread.cpp b/Source/src/SendToThread.cpp index 12a5808ec..59ffc7bd8 100644 --- a/Source/src/SendToThread.cpp +++ b/Source/src/SendToThread.cpp @@ -15,7 +15,7 @@ #include "mafianet/SendToThread.h" #ifdef USE_THREADED_SEND -#include "mafianet/thread.h" +#include "mafianet/RakThread.h" #include "mafianet/InternalPacket.h" #include "mafianet/GetTime.h" diff --git a/Source/src/SignaledEvent.cpp b/Source/src/SignaledEvent.cpp index 5e4c2b9e2..3f409b3bc 100644 --- a/Source/src/SignaledEvent.cpp +++ b/Source/src/SignaledEvent.cpp @@ -14,8 +14,8 @@ */ #include "mafianet/SignaledEvent.h" -#include "mafianet/assert.h" -#include "mafianet/sleep.h" +#include "mafianet/RakAssert.h" +#include "mafianet/RakSleep.h" #if defined(__GNUC__) #include diff --git a/Source/src/SimpleMutex.cpp b/Source/src/SimpleMutex.cpp index 063f7243e..de6b96fe8 100644 --- a/Source/src/SimpleMutex.cpp +++ b/Source/src/SimpleMutex.cpp @@ -19,7 +19,7 @@ #include "mafianet/SimpleMutex.h" -#include "mafianet/assert.h" +#include "mafianet/RakAssert.h" using namespace MafiaNet; diff --git a/Source/src/SocketLayer.cpp b/Source/src/SocketLayer.cpp index ef14b6247..429154f61 100644 --- a/Source/src/SocketLayer.cpp +++ b/Source/src/SocketLayer.cpp @@ -18,14 +18,14 @@ /// #include "mafianet/SocketLayer.h" -#include "mafianet/assert.h" -#include "mafianet/types.h" -#include "mafianet/peer.h" +#include "mafianet/RakAssert.h" +#include "mafianet/RakNetTypes.h" +#include "mafianet/RakPeer.h" #include "mafianet/GetTime.h" #include "mafianet/LinuxStrings.h" #include "mafianet/SocketDefines.h" -#include "mafianet/linux_adapter.h" -#include "mafianet/osx_adapter.h" +#include "mafianet/LinuxAdapter.h" +#include "mafianet/OsxAdapter.h" #if (defined(__GNUC__) || defined(__GCCXML__)) && !defined(__WIN32__) #include #endif @@ -72,7 +72,7 @@ using namespace MafiaNet; #endif -#include "mafianet/sleep.h" +#include "mafianet/RakSleep.h" #include #include "mafianet/Itoa.h" diff --git a/Source/src/StatisticsHistory.cpp b/Source/src/StatisticsHistory.cpp index ee9327914..b63d7b271 100644 --- a/Source/src/StatisticsHistory.cpp +++ b/Source/src/StatisticsHistory.cpp @@ -18,8 +18,8 @@ #include "mafianet/StatisticsHistory.h" #include "mafianet/GetTime.h" -#include "mafianet/statistics.h" -#include "mafianet/peerinterface.h" +#include "mafianet/RakNetStatistics.h" +#include "mafianet/RakPeerInterface.h" using namespace MafiaNet; diff --git a/Source/src/StringCompressor.cpp b/Source/src/StringCompressor.cpp index 3153aae8a..7a7debd97 100644 --- a/Source/src/StringCompressor.cpp +++ b/Source/src/StringCompressor.cpp @@ -21,8 +21,8 @@ #include "mafianet/StringCompressor.h" #include "mafianet/DS_HuffmanEncodingTree.h" #include "mafianet/BitStream.h" -#include "mafianet/string.h" -#include "mafianet/assert.h" +#include "mafianet/RakString.h" +#include "mafianet/RakAssert.h" #include #include diff --git a/Source/src/StringTable.cpp b/Source/src/StringTable.cpp index 101ae1da7..bc0285623 100644 --- a/Source/src/StringTable.cpp +++ b/Source/src/StringTable.cpp @@ -15,12 +15,12 @@ #include "mafianet/StringTable.h" #include -#include "mafianet/assert.h" +#include "mafianet/RakAssert.h" #include #include "mafianet/BitStream.h" #include "mafianet/StringCompressor.h" -#include "mafianet/linux_adapter.h" -#include "mafianet/osx_adapter.h" +#include "mafianet/LinuxAdapter.h" +#include "mafianet/OsxAdapter.h" using namespace MafiaNet; StringTable* StringTable::instance=0; diff --git a/Source/src/SuperFastHash.cpp b/Source/src/SuperFastHash.cpp index 730b25244..d295e8fb4 100644 --- a/Source/src/SuperFastHash.cpp +++ b/Source/src/SuperFastHash.cpp @@ -20,8 +20,8 @@ #if !defined(_WIN32) #include #endif -#include "mafianet/linux_adapter.h" -#include "mafianet/osx_adapter.h" +#include "mafianet/LinuxAdapter.h" +#include "mafianet/OsxAdapter.h" #undef get16bits diff --git a/Source/src/TCPInterface.cpp b/Source/src/TCPInterface.cpp index d54c3c038..8c7d4767a 100644 --- a/Source/src/TCPInterface.cpp +++ b/Source/src/TCPInterface.cpp @@ -31,10 +31,10 @@ #include #endif #include -#include "mafianet/assert.h" +#include "mafianet/RakAssert.h" #include -#include "mafianet/assert.h" -#include "mafianet/sleep.h" +#include "mafianet/RakAssert.h" +#include "mafianet/RakSleep.h" #include "mafianet/StringCompressor.h" #include "mafianet/StringTable.h" #include "mafianet/Itoa.h" @@ -58,8 +58,8 @@ RAK_THREAD_DECLARATION(ConnectionAttemptLoop); #ifdef _MSC_VER #pragma warning( push ) #endif -#include "mafianet/linux_adapter.h" -#include "mafianet/osx_adapter.h" +#include "mafianet/LinuxAdapter.h" +#include "mafianet/OsxAdapter.h" using namespace MafiaNet; diff --git a/Source/src/TableSerializer.cpp b/Source/src/TableSerializer.cpp index 62956f749..1a8a2f062 100644 --- a/Source/src/TableSerializer.cpp +++ b/Source/src/TableSerializer.cpp @@ -17,7 +17,7 @@ #include "mafianet/DS_Table.h" #include "mafianet/BitStream.h" #include "mafianet/StringCompressor.h" -#include "mafianet/assert.h" +#include "mafianet/RakAssert.h" using namespace MafiaNet; diff --git a/Source/src/TeamBalancer.cpp b/Source/src/TeamBalancer.cpp index 31a08e0b1..069aef5b6 100644 --- a/Source/src/TeamBalancer.cpp +++ b/Source/src/TeamBalancer.cpp @@ -19,7 +19,7 @@ #include "mafianet/TeamBalancer.h" #include "mafianet/BitStream.h" #include "mafianet/MessageIdentifiers.h" -#include "mafianet/peerinterface.h" +#include "mafianet/RakPeerInterface.h" #include "mafianet/Rand.h" using namespace MafiaNet; diff --git a/Source/src/TelnetTransport.cpp b/Source/src/TelnetTransport.cpp index 1caea68e1..136aa9a56 100644 --- a/Source/src/TelnetTransport.cpp +++ b/Source/src/TelnetTransport.cpp @@ -22,8 +22,8 @@ #include #include #include "mafianet/LinuxStrings.h" -#include "mafianet/linux_adapter.h" -#include "mafianet/osx_adapter.h" +#include "mafianet/LinuxAdapter.h" +#include "mafianet/OsxAdapter.h" // #define _PRINTF_DEBUG diff --git a/Source/src/ThreadsafePacketLogger.cpp b/Source/src/ThreadsafePacketLogger.cpp index f730d2165..5f04bd03e 100644 --- a/Source/src/ThreadsafePacketLogger.cpp +++ b/Source/src/ThreadsafePacketLogger.cpp @@ -18,8 +18,8 @@ #include "mafianet/ThreadsafePacketLogger.h" #include -#include "mafianet/linux_adapter.h" -#include "mafianet/osx_adapter.h" +#include "mafianet/LinuxAdapter.h" +#include "mafianet/OsxAdapter.h" using namespace MafiaNet; diff --git a/Source/src/TwoWayAuthentication.cpp b/Source/src/TwoWayAuthentication.cpp index 317099c90..2823c4d97 100644 --- a/Source/src/TwoWayAuthentication.cpp +++ b/Source/src/TwoWayAuthentication.cpp @@ -21,7 +21,7 @@ #include "mafianet/GetTime.h" #include "mafianet/MessageIdentifiers.h" #include "mafianet/BitStream.h" -#include "mafianet/peerinterface.h" +#include "mafianet/RakPeerInterface.h" #if LIBCAT_SECURITY==1 static const int HASH_BITS = 256; diff --git a/Source/src/UDPForwarder.cpp b/Source/src/UDPForwarder.cpp index ceb06ae13..faa872a33 100644 --- a/Source/src/UDPForwarder.cpp +++ b/Source/src/UDPForwarder.cpp @@ -21,7 +21,7 @@ #include "mafianet/MTUSize.h" #include "mafianet/SocketLayer.h" #include "mafianet/WSAStartupSingleton.h" -#include "mafianet/sleep.h" +#include "mafianet/RakSleep.h" #include "mafianet/DS_OrderedList.h" #include "mafianet/LinuxStrings.h" #include "mafianet/SocketDefines.h" diff --git a/Source/src/UDPProxyClient.cpp b/Source/src/UDPProxyClient.cpp index a65d73a24..d9fefc0d1 100644 --- a/Source/src/UDPProxyClient.cpp +++ b/Source/src/UDPProxyClient.cpp @@ -19,7 +19,7 @@ #include "mafianet/UDPProxyClient.h" #include "mafianet/BitStream.h" #include "mafianet/UDPProxyCommon.h" -#include "mafianet/peerinterface.h" +#include "mafianet/RakPeerInterface.h" #include "mafianet/MessageIdentifiers.h" #include "mafianet/GetTime.h" diff --git a/Source/src/UDPProxyCoordinator.cpp b/Source/src/UDPProxyCoordinator.cpp index dab4277b5..6b23ea250 100644 --- a/Source/src/UDPProxyCoordinator.cpp +++ b/Source/src/UDPProxyCoordinator.cpp @@ -19,7 +19,7 @@ #include "mafianet/UDPProxyCoordinator.h" #include "mafianet/BitStream.h" #include "mafianet/UDPProxyCommon.h" -#include "mafianet/peerinterface.h" +#include "mafianet/RakPeerInterface.h" #include "mafianet/MessageIdentifiers.h" #include "mafianet/Rand.h" #include "mafianet/GetTime.h" diff --git a/Source/src/UDPProxyServer.cpp b/Source/src/UDPProxyServer.cpp index 28c8d0108..77fdde9ac 100644 --- a/Source/src/UDPProxyServer.cpp +++ b/Source/src/UDPProxyServer.cpp @@ -19,7 +19,7 @@ #include "mafianet/UDPProxyServer.h" #include "mafianet/BitStream.h" #include "mafianet/UDPProxyCommon.h" -#include "mafianet/peerinterface.h" +#include "mafianet/RakPeerInterface.h" #include "mafianet/MessageIdentifiers.h" using namespace MafiaNet; diff --git a/Source/src/WSAStartupSingleton.cpp b/Source/src/WSAStartupSingleton.cpp index 586871474..cea7dba79 100644 --- a/Source/src/WSAStartupSingleton.cpp +++ b/Source/src/WSAStartupSingleton.cpp @@ -28,7 +28,7 @@ #endif -#include "mafianet/defines.h" +#include "mafianet/RakNetDefines.h" #include #ifdef _WIN32 diff --git a/Source/src/_FindFirst.cpp b/Source/src/_FindFirst.cpp index 569b989b1..a796ce871 100644 --- a/Source/src/_FindFirst.cpp +++ b/Source/src/_FindFirst.cpp @@ -19,14 +19,14 @@ #include #include -#include "mafianet/linux_adapter.h" -#include "mafianet/osx_adapter.h" +#include "mafianet/LinuxAdapter.h" +#include "mafianet/OsxAdapter.h" static DataStructures::List< _findinfo_t* > fileInfo; -#include "mafianet/memoryoverride.h" -#include "mafianet/assert.h" +#include "mafianet/RakMemoryOverride.h" +#include "mafianet/RakAssert.h" /** * _findfirst - equivalent diff --git a/Source/src/crypto/cryptomanager.cpp b/Source/src/crypto/cryptomanager.cpp index 76acb1fa2..1bfd33bb3 100644 --- a/Source/src/crypto/cryptomanager.cpp +++ b/Source/src/crypto/cryptomanager.cpp @@ -6,7 +6,7 @@ */ #include "mafianet/crypto/cryptomanager.h" -#include "mafianet/assert.h" // used for RakAssert +#include "mafianet/RakAssert.h" // used for RakAssert #include // used for std::numeric_limits<> // prevent max/min macros getting defined (breaking numeric_limits<>::max() / ::min() usage) through the indirect windows.h include in the OpenSSL includes diff --git a/Source/src/crypto/fileencrypter.cpp b/Source/src/crypto/fileencrypter.cpp index a7272907f..1e7ddf92e 100644 --- a/Source/src/crypto/fileencrypter.cpp +++ b/Source/src/crypto/fileencrypter.cpp @@ -14,10 +14,10 @@ #include // used for RSA_xxxx #include "mafianet/crypto/cryptomanager.h" // used for MafiaNet::Experimental::Crypto::CCryptoManager -#include "mafianet/assert.h" // used for RakAssert +#include "mafianet/RakAssert.h" // used for RakAssert -#include "mafianet/linux_adapter.h" // used for strcpy_s -#include "mafianet/osx_adapter.h" // used for strcpy_s +#include "mafianet/LinuxAdapter.h" // used for strcpy_s +#include "mafianet/OsxAdapter.h" // used for strcpy_s namespace MafiaNet { diff --git a/Source/src/crypto/securestring.cpp b/Source/src/crypto/securestring.cpp index a014df590..50c7c490a 100644 --- a/Source/src/crypto/securestring.cpp +++ b/Source/src/crypto/securestring.cpp @@ -8,8 +8,8 @@ // #med - review the include order - defines.h defines SLNET_VERIFY but doesn't enforce including assert.h which it honestly should #include "mafianet/crypto/cryptomanager.h" // used for CCryptoManager -#include "mafianet/assert.h" // used for assert() (via SLNET_VERIFY) -#include "mafianet/memoryoverride.h" // used for OP_NEW_ARRAY +#include "mafianet/RakAssert.h" // used for assert() (via SLNET_VERIFY) +#include "mafianet/RakMemoryOverride.h" // used for OP_NEW_ARRAY #include // used for std::memcpy #include // used for std::numeric_limits diff --git a/Tests/Integration/ComprehensiveConvertTests.cpp b/Tests/Integration/ComprehensiveConvertTests.cpp index 5073137fa..248b5668d 100644 --- a/Tests/Integration/ComprehensiveConvertTests.cpp +++ b/Tests/Integration/ComprehensiveConvertTests.cpp @@ -7,12 +7,12 @@ #include -#include "mafianet/peerinterface.h" +#include "mafianet/RakPeerInterface.h" #include "mafianet/MessageIdentifiers.h" -#include "mafianet/sleep.h" +#include "mafianet/RakSleep.h" #include "mafianet/GetTime.h" #include "mafianet/Rand.h" -#include "mafianet/statistics.h" +#include "mafianet/RakNetStatistics.h" #include "CommonFunctions.h" diff --git a/Tests/Integration/ConnectWithSocketTests.cpp b/Tests/Integration/ConnectWithSocketTests.cpp index 0cbb5123c..7c8fd30b5 100644 --- a/Tests/Integration/ConnectWithSocketTests.cpp +++ b/Tests/Integration/ConnectWithSocketTests.cpp @@ -7,13 +7,13 @@ #include -#include "mafianet/string.h" -#include "mafianet/peerinterface.h" +#include "mafianet/RakString.h" +#include "mafianet/RakPeerInterface.h" #include "mafianet/MessageIdentifiers.h" #include "mafianet/BitStream.h" -#include "mafianet/peer.h" -#include "mafianet/sleep.h" -#include "mafianet/time.h" +#include "mafianet/RakPeer.h" +#include "mafianet/RakSleep.h" +#include "mafianet/RakNetTime.h" #include "mafianet/GetTime.h" #include "TestHelpers.h" #include "CommonFunctions.h" diff --git a/Tests/Integration/CrossConnectionConvertTests.cpp b/Tests/Integration/CrossConnectionConvertTests.cpp index 7c48f0b71..44b48574d 100644 --- a/Tests/Integration/CrossConnectionConvertTests.cpp +++ b/Tests/Integration/CrossConnectionConvertTests.cpp @@ -7,10 +7,10 @@ #include -#include "mafianet/peerinterface.h" +#include "mafianet/RakPeerInterface.h" #include "mafianet/MessageIdentifiers.h" #include "mafianet/BitStream.h" -#include "mafianet/sleep.h" +#include "mafianet/RakSleep.h" #include "mafianet/GetTime.h" #include // For getenv diff --git a/Tests/Integration/DirectoryDeltaTransferStreamingLiveTests.cpp b/Tests/Integration/DirectoryDeltaTransferStreamingLiveTests.cpp index 647e49607..bddf18de8 100644 --- a/Tests/Integration/DirectoryDeltaTransferStreamingLiveTests.cpp +++ b/Tests/Integration/DirectoryDeltaTransferStreamingLiveTests.cpp @@ -14,14 +14,14 @@ #include #include -#include "mafianet/peer.h" -#include "mafianet/peerinterface.h" +#include "mafianet/RakPeer.h" +#include "mafianet/RakPeerInterface.h" #include "mafianet/MessageIdentifiers.h" #include "mafianet/FileListTransfer.h" #include "mafianet/FileListTransferCBInterface.h" #include "mafianet/DirectoryDeltaTransfer.h" #include "mafianet/IncrementalReadInterface.h" -#include "mafianet/sleep.h" +#include "mafianet/RakSleep.h" #include "mafianet/GetTime.h" using namespace MafiaNet; diff --git a/Tests/Integration/DisconnectReasonTests.cpp b/Tests/Integration/DisconnectReasonTests.cpp index 7d94007d8..a0504fb6c 100644 --- a/Tests/Integration/DisconnectReasonTests.cpp +++ b/Tests/Integration/DisconnectReasonTests.cpp @@ -7,10 +7,10 @@ #include -#include "mafianet/peerinterface.h" +#include "mafianet/RakPeerInterface.h" #include "mafianet/MessageIdentifiers.h" #include "mafianet/BitStream.h" -#include "mafianet/sleep.h" +#include "mafianet/RakSleep.h" #include "CommonFunctions.h" using namespace MafiaNet; diff --git a/Tests/Integration/DispatcherLiveTests.cpp b/Tests/Integration/DispatcherLiveTests.cpp index fc6f3f43c..9fe0989e8 100644 --- a/Tests/Integration/DispatcherLiveTests.cpp +++ b/Tests/Integration/DispatcherLiveTests.cpp @@ -10,7 +10,7 @@ #include "mafianet/Dispatcher.h" #include "mafianet/PeerHandle.h" // Peer, PacketPtr (live round-trip) #include "mafianet/GetTime.h" // GetTime, GetTimeMS -#include "mafianet/sleep.h" // RakSleep +#include "mafianet/RakSleep.h" // RakSleep #include diff --git a/Tests/Integration/DroppedConnectionConvertTests.cpp b/Tests/Integration/DroppedConnectionConvertTests.cpp index 493c55cc4..472fbd536 100644 --- a/Tests/Integration/DroppedConnectionConvertTests.cpp +++ b/Tests/Integration/DroppedConnectionConvertTests.cpp @@ -7,9 +7,9 @@ #include -#include "mafianet/peerinterface.h" +#include "mafianet/RakPeerInterface.h" #include "mafianet/MessageIdentifiers.h" -#include "mafianet/sleep.h" +#include "mafianet/RakSleep.h" #include "mafianet/GetTime.h" #include "mafianet/Rand.h" // randomMT diff --git a/Tests/Integration/EightPeerTests.cpp b/Tests/Integration/EightPeerTests.cpp index 14b8e18cb..f8294a360 100644 --- a/Tests/Integration/EightPeerTests.cpp +++ b/Tests/Integration/EightPeerTests.cpp @@ -7,12 +7,12 @@ #include -#include "mafianet/peerinterface.h" +#include "mafianet/RakPeerInterface.h" #include "mafianet/MessageIdentifiers.h" #include "mafianet/BitStream.h" -#include "mafianet/peer.h" -#include "mafianet/sleep.h" -#include "mafianet/time.h" +#include "mafianet/RakPeer.h" +#include "mafianet/RakSleep.h" +#include "mafianet/RakNetTime.h" #include "mafianet/GetTime.h" #include diff --git a/Tests/Integration/FileListTransferWindowLiveTests.cpp b/Tests/Integration/FileListTransferWindowLiveTests.cpp index a072d1161..0d7fedfca 100644 --- a/Tests/Integration/FileListTransferWindowLiveTests.cpp +++ b/Tests/Integration/FileListTransferWindowLiveTests.cpp @@ -14,14 +14,14 @@ #include #include -#include "mafianet/peer.h" -#include "mafianet/peerinterface.h" +#include "mafianet/RakPeer.h" +#include "mafianet/RakPeerInterface.h" #include "mafianet/MessageIdentifiers.h" #include "mafianet/FileList.h" #include "mafianet/FileListTransfer.h" #include "mafianet/FileListTransferCBInterface.h" #include "mafianet/IncrementalReadInterface.h" -#include "mafianet/sleep.h" +#include "mafianet/RakSleep.h" #include "mafianet/GetTime.h" using namespace MafiaNet; diff --git a/Tests/Integration/LocalIsConnectedTests.cpp b/Tests/Integration/LocalIsConnectedTests.cpp index 0577c93f2..3657685a4 100644 --- a/Tests/Integration/LocalIsConnectedTests.cpp +++ b/Tests/Integration/LocalIsConnectedTests.cpp @@ -7,13 +7,13 @@ #include -#include "mafianet/string.h" -#include "mafianet/peerinterface.h" +#include "mafianet/RakString.h" +#include "mafianet/RakPeerInterface.h" #include "mafianet/MessageIdentifiers.h" #include "mafianet/BitStream.h" -#include "mafianet/peer.h" -#include "mafianet/sleep.h" -#include "mafianet/time.h" +#include "mafianet/RakPeer.h" +#include "mafianet/RakSleep.h" +#include "mafianet/RakNetTime.h" #include "mafianet/GetTime.h" #include "CommonFunctions.h" diff --git a/Tests/Integration/MTUNegotiationTests.cpp b/Tests/Integration/MTUNegotiationTests.cpp index 22bce8d43..f78926b7d 100644 --- a/Tests/Integration/MTUNegotiationTests.cpp +++ b/Tests/Integration/MTUNegotiationTests.cpp @@ -10,12 +10,12 @@ #include #include -#include "mafianet/peer.h" -#include "mafianet/peerinterface.h" +#include "mafianet/RakPeer.h" +#include "mafianet/RakPeerInterface.h" #include "mafianet/MessageIdentifiers.h" #include "mafianet/MTUSize.h" #include "mafianet/BitStream.h" -#include "mafianet/sleep.h" +#include "mafianet/RakSleep.h" #include "mafianet/GetTime.h" #ifdef _WIN32 diff --git a/Tests/Integration/ManyClientsOneServerBlockingTests.cpp b/Tests/Integration/ManyClientsOneServerBlockingTests.cpp index cb23855ec..75dc9e5ab 100644 --- a/Tests/Integration/ManyClientsOneServerBlockingTests.cpp +++ b/Tests/Integration/ManyClientsOneServerBlockingTests.cpp @@ -7,12 +7,12 @@ #include -#include "mafianet/peerinterface.h" +#include "mafianet/RakPeerInterface.h" #include "mafianet/MessageIdentifiers.h" #include "mafianet/BitStream.h" -#include "mafianet/peer.h" -#include "mafianet/sleep.h" -#include "mafianet/time.h" +#include "mafianet/RakPeer.h" +#include "mafianet/RakSleep.h" +#include "mafianet/RakNetTime.h" #include "mafianet/GetTime.h" #include "CommonFunctions.h" diff --git a/Tests/Integration/ManyClientsOneServerDeallocateBlockingTests.cpp b/Tests/Integration/ManyClientsOneServerDeallocateBlockingTests.cpp index ccd12d15a..f4d24f871 100644 --- a/Tests/Integration/ManyClientsOneServerDeallocateBlockingTests.cpp +++ b/Tests/Integration/ManyClientsOneServerDeallocateBlockingTests.cpp @@ -7,12 +7,12 @@ #include -#include "mafianet/peerinterface.h" +#include "mafianet/RakPeerInterface.h" #include "mafianet/MessageIdentifiers.h" #include "mafianet/BitStream.h" -#include "mafianet/peer.h" -#include "mafianet/sleep.h" -#include "mafianet/time.h" +#include "mafianet/RakPeer.h" +#include "mafianet/RakSleep.h" +#include "mafianet/RakNetTime.h" #include "mafianet/GetTime.h" #include "CommonFunctions.h" diff --git a/Tests/Integration/ManyClientsOneServerNonBlockingTests.cpp b/Tests/Integration/ManyClientsOneServerNonBlockingTests.cpp index e79250bea..97ddc4eca 100644 --- a/Tests/Integration/ManyClientsOneServerNonBlockingTests.cpp +++ b/Tests/Integration/ManyClientsOneServerNonBlockingTests.cpp @@ -7,12 +7,12 @@ #include -#include "mafianet/peerinterface.h" +#include "mafianet/RakPeerInterface.h" #include "mafianet/MessageIdentifiers.h" #include "mafianet/BitStream.h" -#include "mafianet/peer.h" -#include "mafianet/sleep.h" -#include "mafianet/time.h" +#include "mafianet/RakPeer.h" +#include "mafianet/RakSleep.h" +#include "mafianet/RakNetTime.h" #include "mafianet/GetTime.h" #include "CommonFunctions.h" diff --git a/Tests/Integration/MaximumConnectTests.cpp b/Tests/Integration/MaximumConnectTests.cpp index e38a2e59c..7d32599a6 100644 --- a/Tests/Integration/MaximumConnectTests.cpp +++ b/Tests/Integration/MaximumConnectTests.cpp @@ -7,12 +7,12 @@ #include -#include "mafianet/peerinterface.h" +#include "mafianet/RakPeerInterface.h" #include "mafianet/MessageIdentifiers.h" #include "mafianet/BitStream.h" -#include "mafianet/peer.h" -#include "mafianet/sleep.h" -#include "mafianet/time.h" +#include "mafianet/RakPeer.h" +#include "mafianet/RakSleep.h" +#include "mafianet/RakNetTime.h" #include "mafianet/GetTime.h" #include diff --git a/Tests/Integration/MmsgBatchLiveTests.cpp b/Tests/Integration/MmsgBatchLiveTests.cpp index dace14405..237e1bd6f 100644 --- a/Tests/Integration/MmsgBatchLiveTests.cpp +++ b/Tests/Integration/MmsgBatchLiveTests.cpp @@ -22,12 +22,12 @@ #include -#include "mafianet/peerinterface.h" +#include "mafianet/RakPeerInterface.h" #include "mafianet/MessageIdentifiers.h" #include "mafianet/BitStream.h" #include "mafianet/PeerHandle.h" // Peer, PacketPtr (RAII: survives a failed ASSERT) #include "mafianet/GetTime.h" -#include "mafianet/sleep.h" +#include "mafianet/RakSleep.h" #include "mafianet/MmsgBatch.h" // MMSG_BATCH_MAX #include diff --git a/Tests/Integration/PacketAndLowLevelTests.cpp b/Tests/Integration/PacketAndLowLevelTests.cpp index 45a31e812..92646e4b0 100644 --- a/Tests/Integration/PacketAndLowLevelTests.cpp +++ b/Tests/Integration/PacketAndLowLevelTests.cpp @@ -7,12 +7,12 @@ #include -#include "mafianet/string.h" -#include "mafianet/peerinterface.h" +#include "mafianet/RakString.h" +#include "mafianet/RakPeerInterface.h" #include "mafianet/MessageIdentifiers.h" #include "mafianet/BitStream.h" -#include "mafianet/sleep.h" -#include "mafianet/time.h" +#include "mafianet/RakSleep.h" +#include "mafianet/RakNetTime.h" #include "mafianet/GetTime.h" #include "DebugTools.h" #include "CommonFunctions.h" diff --git a/Tests/Integration/PeerBuilderTests.cpp b/Tests/Integration/PeerBuilderTests.cpp index 219033d42..a5d9326a6 100644 --- a/Tests/Integration/PeerBuilderTests.cpp +++ b/Tests/Integration/PeerBuilderTests.cpp @@ -7,14 +7,14 @@ #include -#include "mafianet/string.h" +#include "mafianet/RakString.h" #include "mafianet/DS_List.h" -#include "mafianet/peerinterface.h" +#include "mafianet/RakPeerInterface.h" #include "mafianet/PeerHandle.h" #include "mafianet/MessageIdentifiers.h" #include "mafianet/BitStream.h" -#include "mafianet/sleep.h" -#include "mafianet/time.h" +#include "mafianet/RakSleep.h" +#include "mafianet/RakNetTime.h" #include "mafianet/GetTime.h" #include // std::move diff --git a/Tests/Integration/PeerConnectDisconnectTests.cpp b/Tests/Integration/PeerConnectDisconnectTests.cpp index e3dfe8c37..1f0797773 100644 --- a/Tests/Integration/PeerConnectDisconnectTests.cpp +++ b/Tests/Integration/PeerConnectDisconnectTests.cpp @@ -7,12 +7,12 @@ #include -#include "mafianet/peerinterface.h" +#include "mafianet/RakPeerInterface.h" #include "mafianet/MessageIdentifiers.h" #include "mafianet/BitStream.h" -#include "mafianet/peer.h" -#include "mafianet/sleep.h" -#include "mafianet/time.h" +#include "mafianet/RakPeer.h" +#include "mafianet/RakSleep.h" +#include "mafianet/RakNetTime.h" #include "mafianet/GetTime.h" #include "CommonFunctions.h" diff --git a/Tests/Integration/PeerConnectDisconnectWithCancelPendingTests.cpp b/Tests/Integration/PeerConnectDisconnectWithCancelPendingTests.cpp index b07f80d6f..1a44fc2ab 100644 --- a/Tests/Integration/PeerConnectDisconnectWithCancelPendingTests.cpp +++ b/Tests/Integration/PeerConnectDisconnectWithCancelPendingTests.cpp @@ -7,12 +7,12 @@ #include -#include "mafianet/peerinterface.h" +#include "mafianet/RakPeerInterface.h" #include "mafianet/MessageIdentifiers.h" #include "mafianet/BitStream.h" -#include "mafianet/peer.h" -#include "mafianet/sleep.h" -#include "mafianet/time.h" +#include "mafianet/RakPeer.h" +#include "mafianet/RakSleep.h" +#include "mafianet/RakNetTime.h" #include "mafianet/GetTime.h" #include "CommonFunctions.h" diff --git a/Tests/Integration/PeerHandleTests.cpp b/Tests/Integration/PeerHandleTests.cpp index d058ba8b3..a7925ec1b 100644 --- a/Tests/Integration/PeerHandleTests.cpp +++ b/Tests/Integration/PeerHandleTests.cpp @@ -7,14 +7,14 @@ #include -#include "mafianet/string.h" +#include "mafianet/RakString.h" #include "mafianet/DS_List.h" -#include "mafianet/peerinterface.h" +#include "mafianet/RakPeerInterface.h" #include "mafianet/PeerHandle.h" #include "mafianet/MessageIdentifiers.h" #include "mafianet/BitStream.h" -#include "mafianet/sleep.h" -#include "mafianet/time.h" +#include "mafianet/RakSleep.h" +#include "mafianet/RakNetTime.h" #include "mafianet/GetTime.h" #include // std::move diff --git a/Tests/Integration/RPC4ContextTests.cpp b/Tests/Integration/RPC4ContextTests.cpp index fff437f44..68db537cc 100644 --- a/Tests/Integration/RPC4ContextTests.cpp +++ b/Tests/Integration/RPC4ContextTests.cpp @@ -7,13 +7,13 @@ #include -#include "mafianet/string.h" +#include "mafianet/RakString.h" #include "mafianet/DS_List.h" -#include "mafianet/peerinterface.h" +#include "mafianet/RakPeerInterface.h" #include "mafianet/RPC4Plugin.h" #include "mafianet/MessageIdentifiers.h" #include "mafianet/BitStream.h" -#include "mafianet/sleep.h" +#include "mafianet/RakSleep.h" #include #include diff --git a/Tests/Integration/ReliableOrderedConvertedTests.cpp b/Tests/Integration/ReliableOrderedConvertedTests.cpp index c226183d8..39580236c 100644 --- a/Tests/Integration/ReliableOrderedConvertedTests.cpp +++ b/Tests/Integration/ReliableOrderedConvertedTests.cpp @@ -7,13 +7,13 @@ #include -#include "mafianet/peerinterface.h" +#include "mafianet/RakPeerInterface.h" #include "mafianet/GetTime.h" #include "mafianet/MessageIdentifiers.h" #include "mafianet/BitStream.h" #include "mafianet/Rand.h" -#include "mafianet/statistics.h" -#include "mafianet/sleep.h" +#include "mafianet/RakNetStatistics.h" +#include "mafianet/RakSleep.h" #include // For atoi #include diff --git a/Tests/Integration/SecurityFunctionsTests.cpp b/Tests/Integration/SecurityFunctionsTests.cpp index 92eee4774..4ba116f5c 100644 --- a/Tests/Integration/SecurityFunctionsTests.cpp +++ b/Tests/Integration/SecurityFunctionsTests.cpp @@ -7,13 +7,13 @@ #include -#include "mafianet/string.h" -#include "mafianet/peerinterface.h" +#include "mafianet/RakString.h" +#include "mafianet/RakPeerInterface.h" #include "mafianet/MessageIdentifiers.h" #include "mafianet/BitStream.h" -#include "mafianet/peer.h" -#include "mafianet/sleep.h" -#include "mafianet/time.h" +#include "mafianet/RakPeer.h" +#include "mafianet/RakSleep.h" +#include "mafianet/RakNetTime.h" #include "mafianet/GetTime.h" #include "CommonFunctions.h" diff --git a/Tests/Integration/SessionConfigLiveTests.cpp b/Tests/Integration/SessionConfigLiveTests.cpp index 2d21e5dde..54f81f5f6 100644 --- a/Tests/Integration/SessionConfigLiveTests.cpp +++ b/Tests/Integration/SessionConfigLiveTests.cpp @@ -11,11 +11,11 @@ #include #include -#include "mafianet/peer.h" -#include "mafianet/peerinterface.h" +#include "mafianet/RakPeer.h" +#include "mafianet/RakPeerInterface.h" #include "mafianet/MessageIdentifiers.h" #include "mafianet/BitStream.h" -#include "mafianet/sleep.h" +#include "mafianet/RakSleep.h" #include "mafianet/GetTime.h" using namespace MafiaNet; diff --git a/Tests/Integration/TypedSendLiveTests.cpp b/Tests/Integration/TypedSendLiveTests.cpp index 5c44cd521..5e876624f 100644 --- a/Tests/Integration/TypedSendLiveTests.cpp +++ b/Tests/Integration/TypedSendLiveTests.cpp @@ -10,7 +10,7 @@ #include "mafianet/Dispatcher.h" #include "mafianet/PeerHandle.h" // Peer, PacketPtr, send()/broadcast() #include "mafianet/GetTime.h" // GetTimeMS -#include "mafianet/sleep.h" // RakSleep +#include "mafianet/RakSleep.h" // RakSleep #include diff --git a/Tests/Support/CommonFunctions.h b/Tests/Support/CommonFunctions.h index db527a5f8..4d89a3d3d 100644 --- a/Tests/Support/CommonFunctions.h +++ b/Tests/Support/CommonFunctions.h @@ -11,14 +11,14 @@ #pragma once -#include "mafianet/string.h" +#include "mafianet/RakString.h" -#include "mafianet/peerinterface.h" +#include "mafianet/RakPeerInterface.h" #include "mafianet/MessageIdentifiers.h" #include "mafianet/BitStream.h" -#include "mafianet/peer.h" -#include "mafianet/sleep.h" -#include "mafianet/time.h" +#include "mafianet/RakPeer.h" +#include "mafianet/RakSleep.h" +#include "mafianet/RakNetTime.h" #include "mafianet/GetTime.h" #include "DebugTools.h" #include "RakTimer.h" diff --git a/Tests/Support/DebugTools.h b/Tests/Support/DebugTools.h index d1b540a80..846e55bde 100644 --- a/Tests/Support/DebugTools.h +++ b/Tests/Support/DebugTools.h @@ -11,7 +11,7 @@ #pragma once -#include "mafianet/string.h" +#include "mafianet/RakString.h" using namespace MafiaNet; class DebugTools diff --git a/Tests/Support/PacketChangerPlugin.h b/Tests/Support/PacketChangerPlugin.h index f36ef7978..758ef0e1c 100644 --- a/Tests/Support/PacketChangerPlugin.h +++ b/Tests/Support/PacketChangerPlugin.h @@ -10,7 +10,7 @@ #pragma once -#include "mafianet/types.h" +#include "mafianet/RakNetTypes.h" #include "mafianet/PluginInterface2.h" #include "mafianet/PacketPriority.h" #include "mafianet/MessageIdentifiers.h" diff --git a/Tests/Support/PacketDropPlugin.h b/Tests/Support/PacketDropPlugin.h index dfda99657..b55198b55 100644 --- a/Tests/Support/PacketDropPlugin.h +++ b/Tests/Support/PacketDropPlugin.h @@ -11,7 +11,7 @@ #pragma once -#include "mafianet/types.h" +#include "mafianet/RakNetTypes.h" #include "mafianet/PluginInterface2.h" #include "mafianet/PacketPriority.h" #include "mafianet/MessageIdentifiers.h" diff --git a/Tests/Support/RakTimer.h b/Tests/Support/RakTimer.h index 36799e90f..4a77b1607 100644 --- a/Tests/Support/RakTimer.h +++ b/Tests/Support/RakTimer.h @@ -11,7 +11,7 @@ #pragma once -#include "mafianet/time.h" +#include "mafianet/RakNetTime.h" #include "mafianet/GetTime.h" using namespace MafiaNet; diff --git a/Tests/Support/TestHelpers.h b/Tests/Support/TestHelpers.h index 5babbafd1..7fd59c3bb 100644 --- a/Tests/Support/TestHelpers.h +++ b/Tests/Support/TestHelpers.h @@ -11,13 +11,13 @@ #pragma once -#include "mafianet/string.h" +#include "mafianet/RakString.h" -#include "mafianet/peerinterface.h" +#include "mafianet/RakPeerInterface.h" #include "mafianet/MessageIdentifiers.h" #include "mafianet/BitStream.h" -#include "mafianet/peer.h" -#include "mafianet/sleep.h" +#include "mafianet/RakPeer.h" +#include "mafianet/RakSleep.h" #include "DebugTools.h" #include "CommonFunctions.h" #include "RakTimer.h" diff --git a/Tests/Unit/ArchiveTests.cpp b/Tests/Unit/ArchiveTests.cpp index 6c24dcf4a..43eb248a6 100644 --- a/Tests/Unit/ArchiveTests.cpp +++ b/Tests/Unit/ArchiveTests.cpp @@ -7,7 +7,7 @@ #include -#include "mafianet/string.h" +#include "mafianet/RakString.h" #include "mafianet/BitStream.h" #include "mafianet/Archive.h" diff --git a/Tests/Unit/BitStreamStringTests.cpp b/Tests/Unit/BitStreamStringTests.cpp index ace1c759e..5957414cc 100644 --- a/Tests/Unit/BitStreamStringTests.cpp +++ b/Tests/Unit/BitStreamStringTests.cpp @@ -7,7 +7,7 @@ #include -#include "mafianet/string.h" +#include "mafianet/RakString.h" #include "mafianet/BitStream.h" #include diff --git a/Tests/Unit/GuidUtilTests.cpp b/Tests/Unit/GuidUtilTests.cpp index 7d7e2f1b2..485452b73 100644 --- a/Tests/Unit/GuidUtilTests.cpp +++ b/Tests/Unit/GuidUtilTests.cpp @@ -7,9 +7,9 @@ #include -#include "mafianet/guid_util.h" -#include "mafianet/types.h" -#include "mafianet/peerinterface.h" +#include "mafianet/GuidUtil.h" +#include "mafianet/RakNetTypes.h" +#include "mafianet/RakPeerInterface.h" #include #include diff --git a/Tests/Unit/LocalAddressTests.cpp b/Tests/Unit/LocalAddressTests.cpp index 0f258bcf5..de27e234e 100644 --- a/Tests/Unit/LocalAddressTests.cpp +++ b/Tests/Unit/LocalAddressTests.cpp @@ -7,8 +7,8 @@ #include -#include "mafianet/peerinterface.h" -#include "mafianet/types.h" +#include "mafianet/RakPeerInterface.h" +#include "mafianet/RakNetTypes.h" #include diff --git a/Tests/Unit/MmsgBatchTests.cpp b/Tests/Unit/MmsgBatchTests.cpp index 0fb397325..4841336a4 100644 --- a/Tests/Unit/MmsgBatchTests.cpp +++ b/Tests/Unit/MmsgBatchTests.cpp @@ -15,8 +15,8 @@ #include #include "mafianet/MmsgBatch.h" -#include "mafianet/socket2.h" -#include "mafianet/types.h" +#include "mafianet/RakNetSocket2.h" +#include "mafianet/RakNetTypes.h" #ifdef _WIN32 #include // inet_pton, htons (winsock2 pulled in via socket2.h) diff --git a/Tests/Unit/PeerGuidTests.cpp b/Tests/Unit/PeerGuidTests.cpp index e3d4e6520..f6ef9b99c 100644 --- a/Tests/Unit/PeerGuidTests.cpp +++ b/Tests/Unit/PeerGuidTests.cpp @@ -7,7 +7,7 @@ #include -#include "mafianet/types.h" +#include "mafianet/RakNetTypes.h" #include "mafianet/BitStream.h" #include diff --git a/Tests/Unit/RPC4GlobalRegistrationTests.cpp b/Tests/Unit/RPC4GlobalRegistrationTests.cpp index cea965d4b..85e6db3cf 100644 --- a/Tests/Unit/RPC4GlobalRegistrationTests.cpp +++ b/Tests/Unit/RPC4GlobalRegistrationTests.cpp @@ -8,7 +8,7 @@ #include #include "mafianet/RPC4Plugin.h" -#include "mafianet/peerinterface.h" +#include "mafianet/RakPeerInterface.h" #include diff --git a/Tests/Unit/RakVoiceRelayTests.cpp b/Tests/Unit/RakVoiceRelayTests.cpp index 7dac3ea22..86b357a9e 100644 --- a/Tests/Unit/RakVoiceRelayTests.cpp +++ b/Tests/Unit/RakVoiceRelayTests.cpp @@ -17,7 +17,7 @@ #include "mafianet/MessageIdentifiers.h" #include "mafianet/RakVoice.h" -#include "mafianet/types.h" +#include "mafianet/RakNetTypes.h" #include #include diff --git a/Tests/Unit/ReliabilityLayerBlackHoleTests.cpp b/Tests/Unit/ReliabilityLayerBlackHoleTests.cpp index 2f69e9ba0..cad447be1 100644 --- a/Tests/Unit/ReliabilityLayerBlackHoleTests.cpp +++ b/Tests/Unit/ReliabilityLayerBlackHoleTests.cpp @@ -32,7 +32,7 @@ #include "mafianet/PluginInterface2.h" #include "mafianet/Rand.h" #include "mafianet/ReliabilityLayer.h" -#include "mafianet/socket2.h" +#include "mafianet/RakNetSocket2.h" using namespace MafiaNet; diff --git a/Tests/Unit/ReplicaManager3SendSerializeTests.cpp b/Tests/Unit/ReplicaManager3SendSerializeTests.cpp index 65e2fcba2..d67c3a79b 100644 --- a/Tests/Unit/ReplicaManager3SendSerializeTests.cpp +++ b/Tests/Unit/ReplicaManager3SendSerializeTests.cpp @@ -11,7 +11,7 @@ #include "mafianet/BitStream.h" #include "mafianet/MessageIdentifiers.h" #include "mafianet/NetworkIDManager.h" -#include "mafianet/peerinterface.h" +#include "mafianet/RakPeerInterface.h" #include diff --git a/Tests/Unit/SessionAdmissionTests.cpp b/Tests/Unit/SessionAdmissionTests.cpp index 857c0dcd0..0837d87d6 100644 --- a/Tests/Unit/SessionAdmissionTests.cpp +++ b/Tests/Unit/SessionAdmissionTests.cpp @@ -10,9 +10,9 @@ #include #include "mafianet/SessionAdmission.h" -#include "mafianet/peerinterface.h" +#include "mafianet/RakPeerInterface.h" #include "mafianet/MessageIdentifiers.h" -#include "mafianet/defines.h" +#include "mafianet/RakNetDefines.h" using namespace MafiaNet; diff --git a/Tests/Unit/SessionConfigTests.cpp b/Tests/Unit/SessionConfigTests.cpp index 14d13f80a..27a1c025b 100644 --- a/Tests/Unit/SessionConfigTests.cpp +++ b/Tests/Unit/SessionConfigTests.cpp @@ -9,9 +9,9 @@ #include -#include "mafianet/peerinterface.h" +#include "mafianet/RakPeerInterface.h" #include "mafianet/MessageIdentifiers.h" -#include "mafianet/defines.h" +#include "mafianet/RakNetDefines.h" using namespace MafiaNet; diff --git a/Tests/Unit/SocketErrorTests.cpp b/Tests/Unit/SocketErrorTests.cpp index 4633ae3b2..336048155 100644 --- a/Tests/Unit/SocketErrorTests.cpp +++ b/Tests/Unit/SocketErrorTests.cpp @@ -17,7 +17,7 @@ #include -#include "mafianet/socket2.h" +#include "mafianet/RakNetSocket2.h" #include "mafianet/MTUSize.h" #include diff --git a/Tests/Unit/StatisticsHistorySamplingTests.cpp b/Tests/Unit/StatisticsHistorySamplingTests.cpp index 21fb21886..948ed4511 100644 --- a/Tests/Unit/StatisticsHistorySamplingTests.cpp +++ b/Tests/Unit/StatisticsHistorySamplingTests.cpp @@ -8,7 +8,7 @@ #include #include "mafianet/StatisticsHistory.h" -#include "mafianet/peerinterface.h" +#include "mafianet/RakPeerInterface.h" using namespace MafiaNet; diff --git a/Tests/Unit/TwoWayAuthenticationTimeoutTests.cpp b/Tests/Unit/TwoWayAuthenticationTimeoutTests.cpp index 2be98c13f..5df33b151 100644 --- a/Tests/Unit/TwoWayAuthenticationTimeoutTests.cpp +++ b/Tests/Unit/TwoWayAuthenticationTimeoutTests.cpp @@ -9,7 +9,7 @@ #include "mafianet/TwoWayAuthentication.h" #include "mafianet/MessageIdentifiers.h" -#include "mafianet/peerinterface.h" +#include "mafianet/RakPeerInterface.h" using namespace MafiaNet; diff --git a/Tests/Unit/VirtualWorldTests.cpp b/Tests/Unit/VirtualWorldTests.cpp index 215e49aaf..71de11606 100644 --- a/Tests/Unit/VirtualWorldTests.cpp +++ b/Tests/Unit/VirtualWorldTests.cpp @@ -11,7 +11,7 @@ #include "mafianet/VirtualWorld.h" #include "mafianet/VirtualWorldReplica3.h" #include "mafianet/BitStream.h" -#include "mafianet/peerinterface.h" +#include "mafianet/RakPeerInterface.h" using namespace MafiaNet; diff --git a/cmake/MafiaNetHelpers.cmake b/cmake/MafiaNetHelpers.cmake index 36687f865..92343c282 100644 --- a/cmake/MafiaNetHelpers.cmake +++ b/cmake/MafiaNetHelpers.cmake @@ -1,102 +1,105 @@ -# MafiaNet CMake Helper Functions -# -# Copyright (c) 2024, MafiaHub -# Licensed under MIT-style license - -include_guard(GLOBAL) - -# mafianet_add_sample( [FOLDER ] [SOURCES ] [LIBS ] [INCLUDES ]) -# -# Creates a sample executable linked against MafiaNet. -# If SOURCES is not provided, globs *.cpp and *.h from the current directory. -function(mafianet_add_sample) - cmake_parse_arguments(SAMPLE - "" # Boolean args - "NAME;FOLDER" # Single-value args - "SOURCES;LIBS;INCLUDES" # Multi-value args - ${ARGN} - ) - - if(NOT SAMPLE_NAME) - message(FATAL_ERROR "mafianet_add_sample: NAME is required") - endif() - - # Default: use all .cpp/.h in current directory - if(NOT SAMPLE_SOURCES) - file(GLOB SAMPLE_SOURCES - "${CMAKE_CURRENT_SOURCE_DIR}/*.cpp" - "${CMAKE_CURRENT_SOURCE_DIR}/*.c" - "${CMAKE_CURRENT_SOURCE_DIR}/*.h" - ) - endif() - - add_executable(${SAMPLE_NAME} ${SAMPLE_SOURCES}) - - target_link_libraries(${SAMPLE_NAME} PRIVATE - MafiaNet::MafiaNetStatic - ${SAMPLE_LIBS} - ) - - target_include_directories(${SAMPLE_NAME} PRIVATE - ${PROJECT_SOURCE_DIR}/Source/include # Public headers (mafianet/...) - ${PROJECT_SOURCE_DIR}/DependentExtensions - ) - - if(SAMPLE_INCLUDES) - target_include_directories(${SAMPLE_NAME} PRIVATE ${SAMPLE_INCLUDES}) - endif() - - # IDE folder organization - if(SAMPLE_FOLDER) - set_target_properties(${SAMPLE_NAME} PROPERTIES - FOLDER "Samples/${SAMPLE_FOLDER}" - ) - else() - set_target_properties(${SAMPLE_NAME} PROPERTIES - FOLDER "Samples" - ) - endif() -endfunction() - -# mafianet_add_extension( [SOURCES ] [LIBS ] [INCLUDES ]) -# -# Creates a static library extension for MafiaNet. -function(mafianet_add_extension) - cmake_parse_arguments(EXT - "" # Boolean args - "NAME" # Single-value args - "SOURCES;LIBS;INCLUDES" # Multi-value args - ${ARGN} - ) - - if(NOT EXT_NAME) - message(FATAL_ERROR "mafianet_add_extension: NAME is required") - endif() - - if(NOT EXT_SOURCES) - file(GLOB EXT_SOURCES - "${CMAKE_CURRENT_SOURCE_DIR}/*.cpp" - "${CMAKE_CURRENT_SOURCE_DIR}/*.c" - "${CMAKE_CURRENT_SOURCE_DIR}/*.h" - ) - endif() - - add_library(${EXT_NAME} STATIC ${EXT_SOURCES}) - - target_include_directories(${EXT_NAME} PUBLIC - ${CMAKE_CURRENT_SOURCE_DIR} - ${PROJECT_SOURCE_DIR}/Source/include - ) - - if(EXT_INCLUDES) - target_include_directories(${EXT_NAME} PUBLIC ${EXT_INCLUDES}) - endif() - - if(EXT_LIBS) - target_link_libraries(${EXT_NAME} PUBLIC ${EXT_LIBS}) - endif() - - set_target_properties(${EXT_NAME} PROPERTIES - FOLDER "Extensions" - ) -endfunction() +# MafiaNet CMake Helper Functions +# +# Copyright (c) 2024, MafiaHub +# Licensed under MIT-style license + +include_guard(GLOBAL) + +# mafianet_add_sample( [FOLDER ] [SOURCES ] [LIBS ] [INCLUDES ]) +# +# Creates a sample executable linked against MafiaNet. +# If SOURCES is not provided, globs *.cpp and *.h from the current directory. +function(mafianet_add_sample) + cmake_parse_arguments(SAMPLE + "" # Boolean args + "NAME;FOLDER" # Single-value args + "SOURCES;LIBS;INCLUDES" # Multi-value args + ${ARGN} + ) + + if(NOT SAMPLE_NAME) + message(FATAL_ERROR "mafianet_add_sample: NAME is required") + endif() + + # Default: use all .cpp/.h in current directory + if(NOT SAMPLE_SOURCES) + file(GLOB SAMPLE_SOURCES + "${CMAKE_CURRENT_SOURCE_DIR}/*.cpp" + "${CMAKE_CURRENT_SOURCE_DIR}/*.c" + "${CMAKE_CURRENT_SOURCE_DIR}/*.h" + ) + endif() + + add_executable(${SAMPLE_NAME} ${SAMPLE_SOURCES}) + + # Several samples use the extras plugins (EmailSender, HTTPConnection, + # console transports); MAFIANET_BUILD_SAMPLES forces that target on. It + # links the core PUBLIC, so link one or the other, never both. + target_link_libraries(${SAMPLE_NAME} PRIVATE + $,MafiaNet::MafiaNetExtras,MafiaNet::MafiaNetStatic> + ${SAMPLE_LIBS} + ) + + target_include_directories(${SAMPLE_NAME} PRIVATE + ${PROJECT_SOURCE_DIR}/Source/include # Public headers (mafianet/...) + ${PROJECT_SOURCE_DIR}/DependentExtensions + ) + + if(SAMPLE_INCLUDES) + target_include_directories(${SAMPLE_NAME} PRIVATE ${SAMPLE_INCLUDES}) + endif() + + # IDE folder organization + if(SAMPLE_FOLDER) + set_target_properties(${SAMPLE_NAME} PROPERTIES + FOLDER "Samples/${SAMPLE_FOLDER}" + ) + else() + set_target_properties(${SAMPLE_NAME} PROPERTIES + FOLDER "Samples" + ) + endif() +endfunction() + +# mafianet_add_extension( [SOURCES ] [LIBS ] [INCLUDES ]) +# +# Creates a static library extension for MafiaNet. +function(mafianet_add_extension) + cmake_parse_arguments(EXT + "" # Boolean args + "NAME" # Single-value args + "SOURCES;LIBS;INCLUDES" # Multi-value args + ${ARGN} + ) + + if(NOT EXT_NAME) + message(FATAL_ERROR "mafianet_add_extension: NAME is required") + endif() + + if(NOT EXT_SOURCES) + file(GLOB EXT_SOURCES + "${CMAKE_CURRENT_SOURCE_DIR}/*.cpp" + "${CMAKE_CURRENT_SOURCE_DIR}/*.c" + "${CMAKE_CURRENT_SOURCE_DIR}/*.h" + ) + endif() + + add_library(${EXT_NAME} STATIC ${EXT_SOURCES}) + + target_include_directories(${EXT_NAME} PUBLIC + ${CMAKE_CURRENT_SOURCE_DIR} + ${PROJECT_SOURCE_DIR}/Source/include + ) + + if(EXT_INCLUDES) + target_include_directories(${EXT_NAME} PUBLIC ${EXT_INCLUDES}) + endif() + + if(EXT_LIBS) + target_link_libraries(${EXT_NAME} PUBLIC ${EXT_LIBS}) + endif() + + set_target_properties(${EXT_NAME} PROPERTIES + FOLDER "Extensions" + ) +endfunction() diff --git a/docs/advanced/custom-memory-management.rst b/docs/advanced/custom-memory-management.rst index a45b9dc28..c8004aca0 100644 --- a/docs/advanced/custom-memory-management.rst +++ b/docs/advanced/custom-memory-management.rst @@ -21,7 +21,7 @@ Basic Usage .. code-block:: cpp - #include "mafianet/memoryoverride.h" + #include "mafianet/RakMemoryOverride.h" // Define custom allocation functions void* MyMalloc(size_t size) { diff --git a/docs/api/core.rst b/docs/api/core.rst index 2d833e97e..56ed50c19 100644 --- a/docs/api/core.rst +++ b/docs/api/core.rst @@ -153,7 +153,7 @@ opt-in via ``RakPeerInterface::InitializeSecurity()`` (see Canonical Type Aliases ---------------------- -``mafianet/aliases.h`` (also pulled in by the umbrella header) provides +``mafianet/Aliases.h`` (also pulled in by the umbrella header) provides canonical MafiaNet names over the legacy RakNet-named public types. They are ``using`` aliases denoting the *exact same* types/objects, so old and new names interoperate freely: @@ -374,7 +374,7 @@ identifier must be known), and the raw ``Send()`` remains untouched. Value-Type GUID Helpers ----------------------- -``mafianet/guid_util.h`` provides modern, thread-safe value-type accessors: +``mafianet/GuidUtil.h`` provides modern, thread-safe value-type accessors: * ``std::string MafiaNet::to_string(const RakNetGUID&)`` — owns its buffer and is thread-safe (replaces the removed ``RakNetGUID::ToString(void)``). diff --git a/docs/basics/startup.rst b/docs/basics/startup.rst index 881aa8d6c..c4e0838df 100644 --- a/docs/basics/startup.rst +++ b/docs/basics/startup.rst @@ -130,7 +130,7 @@ Example: Basic Server Startup .. code-block:: cpp - #include "mafianet/peerinterface.h" + #include "mafianet/RakPeerInterface.h" MafiaNet::RakPeerInterface* server = MafiaNet::RakPeerInterface::GetInstance(); diff --git a/docs/changelog.rst b/docs/changelog.rst index c4097eb5e..01e90876e 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -10,6 +10,12 @@ Unreleased * **New CMake options: ``MAFIANET_DISABLED_FEATURES`` and ``MAFIANET_MINIMAL``.** The ``_RAKNET_SUPPORT_`` plugin flags from ``NativeFeatureIncludes.h`` can now be set from CMake (``-DMAFIANET_DISABLED_FEATURES="ReplicaManager3;RPC4Plugin"`` or ``-DMAFIANET_MINIMAL=ON`` for the core transport alone). The definitions are ``PUBLIC`` on the library targets so consumers see the same configuration. Unknown names are a configure error. A ``linux-minimal`` CI job builds the ``MAFIANET_MINIMAL`` configuration. See :doc:`/getting-started/building`. +**Header names.** Every public header now carries the PascalCase name of the class or facility it declares, matching its ``.cpp``. The lowercase names inherited from SLikeNet were renamed (``peerinterface.h`` → ``RakPeerInterface.h``, ``peer.h`` → ``RakPeer.h``, ``types.h`` → ``RakNetTypes.h``, ``string.h`` → ``RakString.h``, ``wstring.h`` → ``RakWString.h``, ``time.h`` → ``RakNetTime.h``, ``sleep.h`` → ``RakSleep.h``, ``thread.h`` → ``RakThread.h``, ``assert.h`` → ``RakAssert.h``, ``alloca.h`` → ``RakAlloca.h``, ``defines.h`` → ``RakNetDefines.h``, ``defineoverrides.h`` → ``RakNetDefinesOverrides.h``, ``memoryoverride.h`` → ``RakMemoryOverride.h``, ``smartptr.h`` → ``RakNetSmartPtr.h``, ``socket2.h`` → ``RakNetSocket2.h``, ``statistics.h`` → ``RakNetStatistics.h``, ``transport2.h`` → ``RakNetTransport2.h``, ``commandparser.h`` → ``RakNetCommandParser.h``, ``guid_util.h`` → ``GuidUtil.h``, ``linux_adapter.h`` → ``LinuxAdapter.h``, ``osx_adapter.h`` → ``OsxAdapter.h``, ``gettimeofday.h`` → ``GetTimeOfDay.h``, ``aliases.h`` → ``Aliases.h``, ``version.h`` → ``Version.h``). The umbrella header stays ``mafianet/mafianet.h``. Every old name except ``aliases.h``, ``version.h`` and ``gettimeofday.h`` (which differ from the new name only by case and so cannot coexist on Windows or macOS) remains as a forwarding header that emits a ``#pragma message`` and will be removed in the next minor release; define ``MAFIANET_SILENCE_DEPRECATED_INCLUDES`` to quiet it. The matching sources were renamed too (``GuidUtil.cpp``, ``LinuxAdapter.cpp``, ``OsxAdapter.cpp``, ``GetTimeOfDay.cpp``). + +**Extras library.** ``EmailSender``, ``HTTPConnection``, ``HTTPConnection2``, ``TelnetTransport``, ``RakNetTransport2``, ``ConsoleServer``, ``CommandParserInterface``, ``RakNetCommandParser``, ``LogCommandParser`` and ``PacketConsoleLogger`` moved out of the core library into ``MafiaNetExtras`` (``MafiaNet::MafiaNetExtras``), built with ``MAFIANET_BUILD_EXTRAS=ON`` (forced on by ``MAFIANET_BUILD_SAMPLES``). Headers and include paths are unchanged; code using these classes must link the extras target. See :doc:`/getting-started/building`. + +**Deprecated containers.** ``DS_BinarySearchTree.h``, ``DS_QueueLinkedList.h``, ``DS_HuffmanEncodingTreeFactory.h``, ``DS_OrderedChannelHeap.h`` and ``DS_BytePool.h`` have no consumer in the library. They now emit a ``#pragma message`` on inclusion and will be removed in the next minor release; copy them into your project if you depend on them. + **Removed: dead platform code.** Xbox 360, PlayStation 3, PlayStation 4, PlayStation Vita and Google Native Client could not be targeted for years; their remaining headers were already empty. Removed in this release: * ``XBox360Includes.h``, ``PS3Includes.h``, ``PS4Includes.h``, ``VitaIncludes.h`` and the matching empty source files, plus ``Samples/nacl_sdk``. @@ -410,7 +416,7 @@ Version 0.10.0 headers are intentionally omitted; connection security stays opt-in via ``RakPeerInterface::InitializeSecurity()``. -* **Canonical type aliases** in ``mafianet/aliases.h`` over the legacy +* **Canonical type aliases** in ``mafianet/Aliases.h`` over the legacy RakNet-named public types: ``PeerInterface`` (``RakPeerInterface``), ``Guid`` (``RakNetGUID``), ``Statistics`` (``RakNetStatistics``) and ``UnassignedGuid`` (``UNASSIGNED_RAKNET_GUID``). These are ``using`` aliases denoting the exact @@ -425,7 +431,7 @@ Version 0.10.0 ``DestroyInstance`` / ``DeallocatePacket`` bookkeeping. The ChatExample client is rewritten to demonstrate them. -* **Thread-safe value-type GUID accessors** in ``mafianet/guid_util.h``: +* **Thread-safe value-type GUID accessors** in ``mafianet/GuidUtil.h``: ``std::string MafiaNet::to_string(const RakNetGUID&)`` owns its buffer and is thread-safe, and ``std::optional connected_address(...)`` maps the ``UNASSIGNED_SYSTEM_ADDRESS`` sentinel to ``std::nullopt``. @@ -611,7 +617,7 @@ Version 0.5.0 **Breaking Changes** -* Legacy include spellings are gone — include public headers via the ``mafianet/...`` path (e.g. ``mafianet/string.h`` instead of ``RakString.h``) +* Legacy include spellings are gone — include public headers via the ``mafianet/...`` path (e.g. ``mafianet/RakString.h`` instead of ``RakString.h``) * The ``SLNet`` namespace macro has been removed — use ``MafiaNet`` (or the new ``MNet`` shorthand) * Serializing a non-trivially-copyable type through the generic ``BitStream::Write``/``Read`` now fails to compile by design; provide an explicit ``Serialize()`` or a type specialization diff --git a/docs/getting-started/building.rst b/docs/getting-started/building.rst index dc5825a56..90018fa33 100644 --- a/docs/getting-started/building.rst +++ b/docs/getting-started/building.rst @@ -53,6 +53,9 @@ Configure build options with CMake: * - ``MAFIANET_BUILD_TESTS`` - OFF - Build GoogleTest suite (requires ``MAFIANET_BUILD_STATIC=ON``) + * - ``MAFIANET_BUILD_EXTRAS`` + - OFF + - Build ``MafiaNetExtras`` (SMTP, HTTP client, telnet/console transports). Forced ON by ``MAFIANET_BUILD_SAMPLES``. See `The extras library`_. * - ``MAFIANET_DISABLED_FEATURES`` - (empty) - Semicolon-separated plugin names to compile out, e.g. ``"ReplicaManager3;RPC4Plugin"``. See `Minimal builds`_. @@ -99,6 +102,31 @@ A minimal build is exercised in CI (the ``linux-minimal`` job), which configures with ``-DMAFIANET_MINIMAL=ON`` and builds both library targets. The test suites need the plugins, so they are not built in that configuration. +The extras library +------------------ + +Utilities that are not game networking live in a separate static library, +``MafiaNetExtras`` (``MafiaNet::MafiaNetExtras``), built only when +``MAFIANET_BUILD_EXTRAS=ON``: + +* ``EmailSender`` (SMTP client) +* ``HTTPConnection`` and ``HTTPConnection2`` (HTTP clients over ``TCPInterface``) +* ``TelnetTransport`` and ``RakNetTransport2`` (command transports) +* ``ConsoleServer``, ``CommandParserInterface``, ``RakNetCommandParser`` and ``LogCommandParser`` (remote console) +* ``PacketConsoleLogger`` (packet logger writing to a ``LogCommandParser``) + +Their headers stay under ``include/mafianet/``, so include paths are unchanged; +only the link line changes. The extras target links the core library +``PUBLIC``, so linking it alone is enough: + +.. code-block:: cmake + + find_package(MafiaNet REQUIRED) + target_link_libraries(my_tool PRIVATE MafiaNet::MafiaNetExtras) + +The classes still honour their ``_RAKNET_SUPPORT_`` flags, and +``MAFIANET_DISABLED_FEATURES`` applies to the extras target too. + Using ``NativeFeatureIncludesOverrides.h`` to set the same flags still works, but the CMake route keeps the configuration in the build system, where it is visible to consumers through the exported targets. @@ -167,7 +195,7 @@ figures. Reproduce with: The per-datagram column is the code every non-Linux platform runs. To reproduce it on Linux, flip the ``#if defined(__linux__)`` batching guards in ``RakNetSocket2.cpp``, ``RakNetSocket2_Berkley.cpp``, ``ReliabilityLayer.cpp`` and -``socket2.h`` to ``#if 0``. +``RakNetSocket2.h`` to ``#if 0``. Running Tests ------------- diff --git a/docs/getting-started/quickstart.rst b/docs/getting-started/quickstart.rst index d5837bb00..87bcbd6c4 100644 --- a/docs/getting-started/quickstart.rst +++ b/docs/getting-started/quickstart.rst @@ -65,7 +65,7 @@ Basic Server .. code-block:: cpp - #include "mafianet/peerinterface.h" + #include "mafianet/RakPeerInterface.h" #include "mafianet/MessageIdentifiers.h" int main() { @@ -108,7 +108,7 @@ Basic Client .. code-block:: cpp - #include "mafianet/peerinterface.h" + #include "mafianet/RakPeerInterface.h" #include "mafianet/MessageIdentifiers.h" int main() { diff --git a/docs/getting-started/system-overview.rst b/docs/getting-started/system-overview.rst index efc27400a..e61543223 100644 --- a/docs/getting-started/system-overview.rst +++ b/docs/getting-started/system-overview.rst @@ -123,7 +123,7 @@ Namespaces ---------- - ``MafiaNet::`` - Primary namespace for all classes -- ``MNet`` - Preprocessor macro shorthand that expands to ``MafiaNet`` (defined in ``mafianet/defines.h``) +- ``MNet`` - Preprocessor macro shorthand that expands to ``MafiaNet`` (defined in ``mafianet/RakNetDefines.h``) - ``DataStructures::`` - Container classes (DS_List, DS_Queue, etc.) Common Patterns diff --git a/docs/getting-started/tutorial.rst b/docs/getting-started/tutorial.rst index f6a492589..c363f8395 100644 --- a/docs/getting-started/tutorial.rst +++ b/docs/getting-started/tutorial.rst @@ -38,9 +38,9 @@ Create ``ChatServer.cpp``: .. code-block:: cpp - #include "mafianet/peerinterface.h" + #include "mafianet/RakPeerInterface.h" #include "mafianet/BitStream.h" - #include "mafianet/string.h" + #include "mafianet/RakString.h" #include "ChatCommon.h" #include @@ -112,9 +112,9 @@ Create ``ChatClient.cpp``: .. code-block:: cpp - #include "mafianet/peerinterface.h" + #include "mafianet/RakPeerInterface.h" #include "mafianet/BitStream.h" - #include "mafianet/string.h" + #include "mafianet/RakString.h" #include "mafianet/Gets.h" #include "ChatCommon.h" #include From d3cc2ae853e5b7ea570032ac067079a1de8e8654 Mon Sep 17 00:00:00 2001 From: Segfault <5221072+Segfaultd@users.noreply.github.com> Date: Thu, 8 Oct 2026 10:57:13 +0200 Subject: [PATCH 3/7] refactor(headers): PascalCase without the RakNet prefix Follow-up to the header rename: MafiaNet dropped the Rak/RakNet prefix on purpose, so the renamed headers use the bare PascalCase name (PeerInterface.h, String.h, Types.h, ...). The lowercase shims whose new name differs only by case are removed since they cannot coexist on case-insensitive file systems. --- CLAUDE.md | 16 +++--- .../Autopatcher/AutopatcherClient.cpp | 4 +- .../Autopatcher/AutopatcherClient.h | 2 +- .../AutopatcherMySQLRepository.cpp | 4 +- .../Autopatcher/AutopatcherServer.cpp | 4 +- .../Autopatcher/AutopatcherServer.h | 4 +- DependentExtensions/Lobby2/Lobby2Client.cpp | 2 +- DependentExtensions/Lobby2/Lobby2Message.h | 6 +-- DependentExtensions/Lobby2/Lobby2Plugin.h | 2 +- DependentExtensions/Lobby2/Lobby2Presence.h | 2 +- .../Lobby2/Lobby2ResultCode.cpp | 2 +- DependentExtensions/Lobby2/Lobby2ResultCode.h | 2 +- DependentExtensions/Lobby2/Lobby2Server.cpp | 2 +- DependentExtensions/Lobby2/Lobby2Server.h | 2 +- .../Lobby2/Rooms/IntervalTimer.h | 2 +- .../Lobby2/Rooms/ProfanityFilter.cpp | 2 +- .../Lobby2/Rooms/ProfanityFilter.h | 2 +- .../Lobby2/Rooms/RoomsContainer.cpp | 2 +- .../Lobby2/Rooms/RoomsContainer.h | 2 +- .../Lobby2/Rooms/RoomsErrorCodes.cpp | 2 +- .../Lobby2/Rooms/RoomsErrorCodes.h | 2 +- .../Lobby2/Rooms/RoomsPlugin.cpp | 4 +- .../Lobby2/Rooms/RoomsPlugin.h | 2 +- .../Lobby2/Steam/Lobby2Client_Steam.h | 2 +- .../MySQLInterface/MySQLInterface.cpp | 2 +- .../MySQLInterface/MySQLInterface.h | 2 +- .../PostgreSQLInterface.cpp | 4 +- .../PostgreSQLInterface/PostgreSQLInterface.h | 2 +- DependentExtensions/RPC3/RPC3.cpp | 6 +-- DependentExtensions/RPC3/RPC3.h | 4 +- .../SQLiteClientLogger_PacketLogger.cpp | 2 +- .../Optional/SQLiteClientLogger_RNSLogger.cpp | 6 +-- .../Samples/Ogre3D/BspCollision.cpp | 2 +- .../Simple/SQLiteClientLoggerSample.cpp | 6 +-- .../SQLite3Plugin/Logger/SQLiteLoggerCommon.h | 2 +- .../ServerOnly/SQLiteServerLoggerPlugin.cpp | 2 +- .../ServerOnly/SQLiteServerLoggerSample.cpp | 4 +- .../SQLite3Plugin/SQLite3ClientPlugin.h | 4 +- .../SQLite3Plugin/SQLite3PluginCommon.h | 2 +- .../SQLite3Plugin/SQLite3Sample.cpp | 4 +- .../SQLite3Plugin/SQLite3ServerPlugin.h | 4 +- README.md | 2 +- .../AutopatcherServerTest_MySQL.cpp | 2 +- .../AutopatcherClientTest.cpp | 4 +- .../AutopatcherClientGFx3Impl.cpp | 4 +- .../AutopatcherClientGFx3Impl.h | 2 +- .../AutopatcherClientTest.cpp | 6 +-- .../AutopatcherServerTest.cpp | 2 +- .../AutopatcherServer_SelfScaling/main.cpp | 6 +-- Samples/BigPacketTest/BigPacketTest.cpp | 6 +-- Samples/BurstTest/BurstTest.cpp | 10 ++-- .../Client/Chat Example Client.cpp | 8 +-- .../Server/Chat Example Server.cpp | 8 +-- Samples/CloudClient/CloudClientSample.cpp | 4 +- Samples/CloudServer/CloudServerHelper.cpp | 4 +- Samples/CloudServer/CloudServerSample.cpp | 4 +- Samples/CloudTest/CloudTest.cpp | 4 +- Samples/CommandConsoleClient/main.cpp | 2 +- Samples/CommandConsoleServer/main.cpp | 6 +-- .../ComprehensivePCGame.cpp | 6 +-- .../ComprehensiveTest/ComprehensiveTest.cpp | 4 +- Samples/CrashReporter/CrashReporter.h | 2 +- .../CrossConnectionTest.cpp | 4 +- .../DirectoryDeltaTransfer.cpp | 4 +- .../DirectoryDeltaTransferTest.cpp | 6 +-- .../DroppedConnectionTest.cpp | 4 +- Samples/Encryption/Encryption.cpp | 6 +-- Samples/FCMHost/FCM2HostTest.cpp | 6 +-- .../FCM2HostSimultaneousTest.cpp | 6 +-- .../FCM2VerifiedJoinSimultaneousTest.cpp | 6 +-- Samples/FileListTransfer/main.cpp | 6 +-- Samples/FlowControlTest/FlowControlTest.cpp | 4 +- Samples/FullyConnectedMesh/FCMTest.cpp | 4 +- .../LANServerDiscovery/LANServerDiscovery.cpp | 8 +-- Samples/Lobby2Client/Lobby2ClientSample.cpp | 4 +- .../Lobby2ClientGFx3Impl.cpp | 2 +- .../Lobby2ClientGFx3.0/Lobby2ClientGFx3Impl.h | 2 +- .../Lobby2ServerSample_PGSQL.cpp | 4 +- Samples/Lobby3/main.cpp | 4 +- .../LoopbackPerformanceTest.cpp | 4 +- Samples/MasterServer/MasterClient.cpp | 2 +- Samples/MasterServer/MasterClientMain.cpp | 2 +- Samples/MasterServer/MasterCommon.h | 2 +- Samples/MasterServer/MasterServer.cpp | 4 +- Samples/MasterServer/MasterServer.h | 2 +- Samples/MasterServer/MasterServerMain.cpp | 2 +- Samples/MasterServer/mastercommon.cpp | 4 +- Samples/MasterServer2/main.cpp | 4 +- Samples/MessageFilter/MessageFilterTest.cpp | 4 +- Samples/MessageSizeTest/MessageSizeTest.cpp | 8 +-- Samples/NATCompleteClient/main.cpp | 6 +-- Samples/NATCompleteServer/main.cpp | 8 +-- .../OfflineMessagesTest.cpp | 2 +- .../PHPDirectoryServer2.cpp | 8 +-- .../PHPDirectoryServer2/PHPDirectoryServer2.h | 4 +- Samples/PHPDirectoryServer2/main.cpp | 4 +- Samples/PacketConsoleLogger/main.cpp | 4 +- Samples/PacketLogger/PacketLoggerTest.cpp | 2 +- Samples/Ping/Ping.cpp | 6 +-- Samples/RPC3/RPC3Sample.cpp | 4 +- Samples/RPC4/RPC4Sample.cpp | 4 +- Samples/RackspaceConsole/main.cpp | 2 +- Samples/RakVoice/main.cpp | 4 +- Samples/RakVoiceDSound/DSoundVoiceAdapter.cpp | 4 +- Samples/RakVoiceDSound/main.cpp | 8 +-- Samples/RakVoiceFMOD/FMODVoiceAdapter.cpp | 2 +- Samples/RakVoiceFMOD/main.cpp | 8 +-- Samples/ReadyEvent/ReadyEventSample.cpp | 4 +- Samples/RelayPluginTest/main.cpp | 4 +- .../ReliableOrderedTest.cpp | 8 +-- Samples/ReplicaManager3/main.cpp | 6 +-- Samples/ReplicatedLogin/ReplicatedLogin.cpp | 6 +-- Samples/Rooms/RoomsSample.cpp | 2 +- .../RakNet/RoomsBrowserGFx3_RakNet.h | 2 +- Samples/RoomsBrowserGFx3/RoomsBrowserGFx3.h | 2 +- Samples/Router2/Router2Sample.cpp | 6 +-- .../ServerClientTest2/ServerClientTest2.cpp | 8 +-- .../StatisticsHistoryTest.cpp | 4 +- Samples/SteamLobby/main.cpp | 8 +-- Samples/TeamManager/TeamManagerTest.cpp | 6 +-- Samples/TestDLL/main.cpp | 8 +-- Samples/ThreadTest/ThreadTest.cpp | 8 +-- Samples/Timestamping/Timestamping.cpp | 4 +- .../TwoWayAuthenticationTest.cpp | 4 +- Samples/UDPForwarder/main.cpp | 6 +-- Samples/VirtualWorld/main.cpp | 4 +- .../ChatClient/ChatClient/ViewController.h | 8 +-- Source/CMakeLists.txt | 54 +++++++------------ Source/include/mafianet/Aliases.h | 6 +-- .../mafianet/{RakAlloca.h => Alloca.h} | 0 .../mafianet/{RakAssert.h => Assert.h} | 2 +- Source/include/mafianet/BitStream.h | 12 ++--- .../include/mafianet/CCRakNetSlidingWindow.h | 6 +-- Source/include/mafianet/CCRakNetUDT.h | 6 +-- Source/include/mafianet/CheckSum.h | 2 +- Source/include/mafianet/CloudClient.h | 2 +- Source/include/mafianet/CloudCommon.h | 4 +- Source/include/mafianet/CloudServer.h | 4 +- ...{RakNetCommandParser.h => CommandParser.h} | 0 .../include/mafianet/CommandParserInterface.h | 4 +- Source/include/mafianet/ConnectionGraph2.h | 4 +- Source/include/mafianet/ConsoleServer.h | 4 +- Source/include/mafianet/DR_SHA1.h | 2 +- Source/include/mafianet/DS_BPlusTree.h | 2 +- Source/include/mafianet/DS_BinarySearchTree.h | 2 +- Source/include/mafianet/DS_BytePool.h | 4 +- Source/include/mafianet/DS_ByteQueue.h | 2 +- Source/include/mafianet/DS_Hash.h | 6 +-- Source/include/mafianet/DS_Heap.h | 4 +- .../include/mafianet/DS_HuffmanEncodingTree.h | 2 +- .../mafianet/DS_HuffmanEncodingTreeFactory.h | 2 +- Source/include/mafianet/DS_LinkedList.h | 2 +- Source/include/mafianet/DS_List.h | 4 +- Source/include/mafianet/DS_Map.h | 4 +- Source/include/mafianet/DS_MemoryPool.h | 4 +- Source/include/mafianet/DS_Multilist.h | 4 +- .../include/mafianet/DS_OrderedChannelHeap.h | 2 +- Source/include/mafianet/DS_OrderedList.h | 2 +- Source/include/mafianet/DS_Queue.h | 4 +- Source/include/mafianet/DS_QueueLinkedList.h | 2 +- Source/include/mafianet/DS_RangeList.h | 4 +- Source/include/mafianet/DS_Table.h | 4 +- Source/include/mafianet/DS_Tree.h | 2 +- Source/include/mafianet/DS_WeightedGraph.h | 4 +- Source/include/mafianet/DataCompressor.h | 2 +- ...etDefinesOverrides.h => DefineOverrides.h} | 0 .../mafianet/{RakNetDefines.h => Defines.h} | 2 +- .../include/mafianet/DirectoryDeltaTransfer.h | 4 +- Source/include/mafianet/Dispatcher.h | 4 +- Source/include/mafianet/DynDNS.h | 2 +- Source/include/mafianet/EmailSender.h | 4 +- Source/include/mafianet/Export.h | 2 +- Source/include/mafianet/FileList.h | 6 +-- Source/include/mafianet/FileListTransfer.h | 6 +-- .../mafianet/FileListTransferCBInterface.h | 2 +- Source/include/mafianet/FullyConnectedMesh2.h | 4 +- Source/include/mafianet/GetTime.h | 2 +- Source/include/mafianet/GridSectorizer.h | 2 +- Source/include/mafianet/GuidUtil.h | 4 +- Source/include/mafianet/HTTPConnection.h | 6 +-- Source/include/mafianet/HTTPConnection2.h | 6 +-- Source/include/mafianet/InternalPacket.h | 8 +-- .../{RakMemoryOverride.h => MemoryOverride.h} | 4 +- Source/include/mafianet/MessageFilter.h | 2 +- Source/include/mafianet/MmsgBatch.h | 6 +-- .../include/mafianet/NatPunchthroughClient.h | 4 +- .../include/mafianet/NatPunchthroughServer.h | 4 +- .../include/mafianet/NatTypeDetectionClient.h | 4 +- .../include/mafianet/NatTypeDetectionCommon.h | 4 +- .../include/mafianet/NatTypeDetectionServer.h | 4 +- Source/include/mafianet/NetworkIDManager.h | 4 +- Source/include/mafianet/NetworkIDObject.h | 4 +- Source/include/mafianet/PacketLogger.h | 2 +- Source/include/mafianet/{RakPeer.h => Peer.h} | 8 +-- Source/include/mafianet/PeerHandle.h | 4 +- .../{RakPeerInterface.h => PeerInterface.h} | 8 +-- Source/include/mafianet/PluginInterface2.h | 2 +- Source/include/mafianet/PointGridSectorizer.h | 2 +- Source/include/mafianet/RPC4Plugin.h | 4 +- Source/include/mafianet/Rackspace.h | 4 +- Source/include/mafianet/RakVoice.h | 2 +- Source/include/mafianet/RefCountedObj.h | 2 +- Source/include/mafianet/RelayPlugin.h | 2 +- Source/include/mafianet/ReliabilityLayer.h | 8 +-- Source/include/mafianet/ReplicaManager3.h | 4 +- Source/include/mafianet/Router2.h | 2 +- Source/include/mafianet/SendToThread.h | 2 +- Source/include/mafianet/SimpleMutex.h | 2 +- .../include/mafianet/SingleProducerConsumer.h | 4 +- .../include/mafianet/{RakSleep.h => Sleep.h} | 0 .../mafianet/{RakNetSmartPtr.h => SmartPtr.h} | 2 +- .../mafianet/{RakNetSocket2.h => Socket2.h} | 4 +- Source/include/mafianet/SocketIncludes.h | 2 +- Source/include/mafianet/SocketLayer.h | 8 +-- .../{RakNetStatistics.h => Statistics.h} | 2 +- Source/include/mafianet/StatisticsHistory.h | 6 +-- .../mafianet/{RakString.h => String.h} | 2 +- Source/include/mafianet/StringCompressor.h | 2 +- Source/include/mafianet/StringTable.h | 2 +- Source/include/mafianet/TCPInterface.h | 8 +-- Source/include/mafianet/TableSerializer.h | 2 +- Source/include/mafianet/TeamBalancer.h | 4 +- Source/include/mafianet/TeamManager.h | 4 +- .../mafianet/{RakThread.h => Thread.h} | 0 Source/include/mafianet/ThreadPool.h | 6 +-- .../include/mafianet/{RakNetTime.h => Time.h} | 2 +- .../{RakNetTransport2.h => Transport2.h} | 0 Source/include/mafianet/TransportInterface.h | 4 +- .../include/mafianet/TwoWayAuthentication.h | 4 +- .../mafianet/{RakNetTypes.h => Types.h} | 4 +- Source/include/mafianet/UDPForwarder.h | 6 +-- Source/include/mafianet/UDPProxyClient.h | 2 +- Source/include/mafianet/UDPProxyCoordinator.h | 4 +- Source/include/mafianet/UDPProxyServer.h | 4 +- .../mafianet/VariableListDeltaTracker.h | 2 +- .../mafianet/{RakWString.h => WString.h} | 4 +- Source/include/mafianet/_FindFirst.h | 2 +- Source/include/mafianet/alloca.h | 14 ----- Source/include/mafianet/assert.h | 14 ----- Source/include/mafianet/commandparser.h | 14 ----- Source/include/mafianet/defineoverrides.h | 14 ----- Source/include/mafianet/defines.h | 14 ----- Source/include/mafianet/mafianet.h | 6 +-- Source/include/mafianet/memoryoverride.h | 14 ----- Source/include/mafianet/peer.h | 14 ----- Source/include/mafianet/peerinterface.h | 14 ----- Source/include/mafianet/sleep.h | 14 ----- Source/include/mafianet/smartptr.h | 14 ----- Source/include/mafianet/socket2.h | 14 ----- Source/include/mafianet/statistics.h | 14 ----- Source/include/mafianet/string.h | 14 ----- Source/include/mafianet/thread.h | 14 ----- Source/include/mafianet/time.h | 14 ----- Source/include/mafianet/transport2.h | 14 ----- Source/include/mafianet/types.h | 14 ----- Source/include/mafianet/wstring.h | 14 ----- Source/src/Base64Encoder.cpp | 2 +- Source/src/BitStream.cpp | 2 +- Source/src/CCRakNetSlidingWindow.cpp | 4 +- Source/src/CCRakNetUDT.cpp | 4 +- Source/src/CloudClient.cpp | 2 +- Source/src/CloudServer.cpp | 2 +- Source/src/CommandParserInterface.cpp | 2 +- Source/src/ConnectionGraph2.cpp | 2 +- Source/src/DS_BytePool.cpp | 2 +- Source/src/DS_HuffmanEncodingTree.cpp | 2 +- Source/src/DS_Table.cpp | 4 +- Source/src/DataCompressor.cpp | 2 +- Source/src/DirectoryDeltaTransfer.cpp | 2 +- Source/src/DynDNS.cpp | 2 +- Source/src/EmailSender.cpp | 2 +- Source/src/FileList.cpp | 6 +-- Source/src/FileListTransfer.cpp | 10 ++-- Source/src/FileOperations.cpp | 2 +- Source/src/FullyConnectedMesh2.cpp | 4 +- Source/src/GridSectorizer.cpp | 2 +- Source/src/HTTPConnection.cpp | 6 +-- Source/src/MessageFilter.cpp | 6 +-- Source/src/NatPunchthroughClient.cpp | 2 +- Source/src/NatPunchthroughServer.cpp | 2 +- Source/src/NatTypeDetectionClient.cpp | 6 +-- Source/src/NatTypeDetectionServer.cpp | 4 +- Source/src/NetworkIDManager.cpp | 6 +-- Source/src/NetworkIDObject.cpp | 4 +- Source/src/PacketFileLogger.cpp | 2 +- Source/src/PacketLogger.cpp | 2 +- Source/src/PacketOutputWindowLogger.cpp | 4 +- Source/src/PacketizedTCP.cpp | 2 +- Source/src/PluginInterface2.cpp | 2 +- Source/src/RPC4Plugin.cpp | 6 +-- Source/src/Rackspace.cpp | 2 +- Source/src/RakMemoryOverride.cpp | 4 +- Source/src/RakNetCommandParser.cpp | 6 +-- Source/src/RakNetSocket2.cpp | 8 +-- Source/src/RakNetStatistics.cpp | 4 +- Source/src/RakNetTransport2.cpp | 4 +- Source/src/RakNetTypes.cpp | 6 +-- Source/src/RakPeer.cpp | 14 ++--- Source/src/RakSleep.cpp | 2 +- Source/src/RakString.cpp | 8 +-- Source/src/RakThread.cpp | 10 ++-- Source/src/RakVoice.cpp | 2 +- Source/src/RakWString.cpp | 2 +- Source/src/ReadyEvent.cpp | 4 +- Source/src/RelayPlugin.cpp | 2 +- Source/src/ReliabilityLayer.cpp | 2 +- Source/src/ReplicaManager3.cpp | 2 +- Source/src/Router2.cpp | 4 +- Source/src/SendToThread.cpp | 2 +- Source/src/SignaledEvent.cpp | 4 +- Source/src/SimpleMutex.cpp | 2 +- Source/src/SocketLayer.cpp | 8 +-- Source/src/StatisticsHistory.cpp | 4 +- Source/src/StringCompressor.cpp | 4 +- Source/src/StringTable.cpp | 2 +- Source/src/TCPInterface.cpp | 6 +-- Source/src/TableSerializer.cpp | 2 +- Source/src/TeamBalancer.cpp | 2 +- Source/src/TwoWayAuthentication.cpp | 2 +- Source/src/UDPForwarder.cpp | 2 +- Source/src/UDPProxyClient.cpp | 2 +- Source/src/UDPProxyCoordinator.cpp | 2 +- Source/src/UDPProxyServer.cpp | 2 +- Source/src/WSAStartupSingleton.cpp | 2 +- Source/src/_FindFirst.cpp | 4 +- Source/src/crypto/cryptomanager.cpp | 2 +- Source/src/crypto/fileencrypter.cpp | 2 +- Source/src/crypto/securestring.cpp | 4 +- .../Integration/ComprehensiveConvertTests.cpp | 6 +-- Tests/Integration/ConnectWithSocketTests.cpp | 10 ++-- .../CrossConnectionConvertTests.cpp | 4 +- ...rectoryDeltaTransferStreamingLiveTests.cpp | 6 +-- Tests/Integration/DisconnectReasonTests.cpp | 4 +- Tests/Integration/DispatcherLiveTests.cpp | 2 +- .../DroppedConnectionConvertTests.cpp | 4 +- Tests/Integration/EightPeerTests.cpp | 8 +-- .../FileListTransferWindowLiveTests.cpp | 6 +-- Tests/Integration/LocalIsConnectedTests.cpp | 10 ++-- Tests/Integration/MTUNegotiationTests.cpp | 6 +-- .../ManyClientsOneServerBlockingTests.cpp | 8 +-- ...lientsOneServerDeallocateBlockingTests.cpp | 8 +-- .../ManyClientsOneServerNonBlockingTests.cpp | 8 +-- Tests/Integration/MaximumConnectTests.cpp | 8 +-- Tests/Integration/MmsgBatchLiveTests.cpp | 4 +- Tests/Integration/PacketAndLowLevelTests.cpp | 8 +-- Tests/Integration/PeerBuilderTests.cpp | 8 +-- .../PeerConnectDisconnectTests.cpp | 8 +-- ...onnectDisconnectWithCancelPendingTests.cpp | 8 +-- Tests/Integration/PeerHandleTests.cpp | 8 +-- Tests/Integration/RPC4ContextTests.cpp | 6 +-- .../ReliableOrderedConvertedTests.cpp | 6 +-- Tests/Integration/SecurityFunctionsTests.cpp | 10 ++-- Tests/Integration/SessionConfigLiveTests.cpp | 6 +-- Tests/Integration/TypedSendLiveTests.cpp | 2 +- Tests/Support/CommonFunctions.h | 10 ++-- Tests/Support/DebugTools.h | 2 +- Tests/Support/PacketChangerPlugin.h | 2 +- Tests/Support/PacketDropPlugin.h | 2 +- Tests/Support/RakTimer.h | 2 +- Tests/Support/TestHelpers.h | 8 +-- Tests/Unit/ArchiveTests.cpp | 2 +- Tests/Unit/BitStreamStringTests.cpp | 2 +- Tests/Unit/GuidUtilTests.cpp | 4 +- Tests/Unit/LocalAddressTests.cpp | 4 +- Tests/Unit/MmsgBatchTests.cpp | 4 +- Tests/Unit/PeerGuidTests.cpp | 2 +- Tests/Unit/RPC4GlobalRegistrationTests.cpp | 2 +- Tests/Unit/RakVoiceRelayTests.cpp | 2 +- Tests/Unit/ReliabilityLayerBlackHoleTests.cpp | 2 +- .../ReplicaManager3SendSerializeTests.cpp | 2 +- Tests/Unit/SessionAdmissionTests.cpp | 4 +- Tests/Unit/SessionConfigTests.cpp | 4 +- Tests/Unit/SocketErrorTests.cpp | 2 +- Tests/Unit/StatisticsHistorySamplingTests.cpp | 2 +- .../Unit/TwoWayAuthenticationTimeoutTests.cpp | 2 +- Tests/Unit/VirtualWorldTests.cpp | 2 +- docs/advanced/custom-memory-management.rst | 2 +- docs/basics/startup.rst | 2 +- docs/changelog.rst | 4 +- docs/getting-started/quickstart.rst | 4 +- docs/getting-started/system-overview.rst | 2 +- docs/getting-started/tutorial.rst | 8 +-- 382 files changed, 742 insertions(+), 1012 deletions(-) rename Source/include/mafianet/{RakAlloca.h => Alloca.h} (100%) rename Source/include/mafianet/{RakAssert.h => Assert.h} (93%) rename Source/include/mafianet/{RakNetCommandParser.h => CommandParser.h} (100%) rename Source/include/mafianet/{RakNetDefinesOverrides.h => DefineOverrides.h} (100%) rename Source/include/mafianet/{RakNetDefines.h => Defines.h} (97%) rename Source/include/mafianet/{RakMemoryOverride.h => MemoryOverride.h} (96%) rename Source/include/mafianet/{RakPeer.h => Peer.h} (98%) rename Source/include/mafianet/{RakPeerInterface.h => PeerInterface.h} (98%) rename Source/include/mafianet/{RakSleep.h => Sleep.h} (100%) rename Source/include/mafianet/{RakNetSmartPtr.h => SmartPtr.h} (94%) rename Source/include/mafianet/{RakNetSocket2.h => Socket2.h} (97%) rename Source/include/mafianet/{RakNetStatistics.h => Statistics.h} (96%) rename Source/include/mafianet/{RakString.h => String.h} (97%) rename Source/include/mafianet/{RakThread.h => Thread.h} (100%) rename Source/include/mafianet/{RakNetTime.h => Time.h} (94%) rename Source/include/mafianet/{RakNetTransport2.h => Transport2.h} (100%) rename Source/include/mafianet/{RakNetTypes.h => Types.h} (97%) rename Source/include/mafianet/{RakWString.h => WString.h} (95%) delete mode 100644 Source/include/mafianet/alloca.h delete mode 100644 Source/include/mafianet/assert.h delete mode 100644 Source/include/mafianet/commandparser.h delete mode 100644 Source/include/mafianet/defineoverrides.h delete mode 100644 Source/include/mafianet/defines.h delete mode 100644 Source/include/mafianet/memoryoverride.h delete mode 100644 Source/include/mafianet/peer.h delete mode 100644 Source/include/mafianet/peerinterface.h delete mode 100644 Source/include/mafianet/sleep.h delete mode 100644 Source/include/mafianet/smartptr.h delete mode 100644 Source/include/mafianet/socket2.h delete mode 100644 Source/include/mafianet/statistics.h delete mode 100644 Source/include/mafianet/string.h delete mode 100644 Source/include/mafianet/thread.h delete mode 100644 Source/include/mafianet/time.h delete mode 100644 Source/include/mafianet/transport2.h delete mode 100644 Source/include/mafianet/types.h delete mode 100644 Source/include/mafianet/wstring.h diff --git a/CLAUDE.md b/CLAUDE.md index 27b7ec1cb..feb5e504b 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -70,12 +70,12 @@ When adding or removing a plugin guarded by a `_RAKNET_SUPPORT_` flag, upd `MAFIANET_OPTIONAL_FEATURES` in `Source/CMakeLists.txt` as well, or the CMake plugin selection silently drifts from `NativeFeatureIncludes.h`. -Public headers use the PascalCase name of the class they declare, matching the -`.cpp` (`RakPeerInterface.h`, `RakString.h`, `RakNetTypes.h`). The only lowercase -header is the umbrella `mafianet/mafianet.h`. The lowercase names that remain -(`peerinterface.h`, `string.h`, ...) are deprecated forwarding shims listed in -`MAFIANET_DEPRECATED_HEADERS`; never include them from library code and do not add -new lowercase headers. +Public headers are PascalCase without the RakNet prefix (`PeerInterface.h`, +`String.h`, `Types.h`); this is MafiaNet, so never bring `Rak`/`RakNet` back into +file names. The only lowercase header is the umbrella `mafianet/mafianet.h`. The +remaining lowercase names (`guid_util.h`, `linux_adapter.h`, `osx_adapter.h`) are +deprecated forwarding shims listed in `MAFIANET_DEPRECATED_HEADERS`; never include +them from library code and do not add new lowercase headers. Dead platforms (Xbox 360, PS3, PS4, Vita, Native Client) were removed on purpose. Do not reintroduce `__native_client__`, `_PS3`, `_PS4`, `SN_TARGET_*` or Xbox @@ -167,7 +167,7 @@ For debugging, run a binary directly with a filter: `./build/Tests/IntegrationTe ### Namespaces - Primary namespace: `MafiaNet` (e.g., `MafiaNet::RakPeerInterface`, `MafiaNet::BitStream`) — used exclusively throughout the library -- Short-hand alias: the `MNet` preprocessor macro (defined in `mafianet/RakNetDefines.h`) expands to `MafiaNet` as a convenience shorthand +- Short-hand alias: the `MNet` preprocessor macro (defined in `mafianet/Defines.h`) expands to `MafiaNet` as a convenience shorthand ### Key Components @@ -211,7 +211,7 @@ Dependencies (bzip2, miniupnpc, Opus, RNNoise) are automatically fetched via CMa ### Basic Usage Pattern ```cpp -#include "mafianet/RakPeerInterface.h" +#include "mafianet/PeerInterface.h" #include "mafianet/BitStream.h" #include "mafianet/MessageIdentifiers.h" diff --git a/DependentExtensions/Autopatcher/AutopatcherClient.cpp b/DependentExtensions/Autopatcher/AutopatcherClient.cpp index c8715d8bd..a4b6273c2 100644 --- a/DependentExtensions/Autopatcher/AutopatcherClient.cpp +++ b/DependentExtensions/Autopatcher/AutopatcherClient.cpp @@ -17,7 +17,7 @@ #include "mafianet/DirectoryDeltaTransfer.h" #include "mafianet/FileList.h" #include "mafianet/StringCompressor.h" -#include "mafianet/RakPeerInterface.h" +#include "mafianet/PeerInterface.h" #include "mafianet/FileListTransfer.h" #include "mafianet/FileListTransferCBInterface.h" #include "mafianet/BitStream.h" @@ -28,7 +28,7 @@ //#include "mafianet/DR_SHA1.h" #include #include "mafianet/FileOperations.h" -#include "mafianet/RakAssert.h" +#include "mafianet/Assert.h" #include "mafianet/ThreadPool.h" #include "mafianet/LinuxAdapter.h" #include "mafianet/OsxAdapter.h" diff --git a/DependentExtensions/Autopatcher/AutopatcherClient.h b/DependentExtensions/Autopatcher/AutopatcherClient.h index cd1f058d2..1bda501af 100644 --- a/DependentExtensions/Autopatcher/AutopatcherClient.h +++ b/DependentExtensions/Autopatcher/AutopatcherClient.h @@ -20,7 +20,7 @@ #ifndef __AUTOPATCHER_CLIENT_H #define __AUTOPATCHER_CLIENT_H -#include "mafianet/RakNetTypes.h" +#include "mafianet/Types.h" #include "mafianet/Export.h" #include "mafianet/PluginInterface2.h" #include "mafianet/PacketPriority.h" diff --git a/DependentExtensions/Autopatcher/AutopatcherMySQLRepository/AutopatcherMySQLRepository.cpp b/DependentExtensions/Autopatcher/AutopatcherMySQLRepository/AutopatcherMySQLRepository.cpp index 2d0c79de8..abff0d72c 100644 --- a/DependentExtensions/Autopatcher/AutopatcherMySQLRepository/AutopatcherMySQLRepository.cpp +++ b/DependentExtensions/Autopatcher/AutopatcherMySQLRepository/AutopatcherMySQLRepository.cpp @@ -13,11 +13,11 @@ * license found in the license.txt file in the root directory of this source tree. */ -#include "mafianet/RakString.h" +#include "mafianet/String.h" #include "AutopatcherMySQLRepository.h" #include "mafianet/AutopatcherPatchContext.h" #include "mafianet/FileList.h" -#include "mafianet/RakAssert.h" +#include "mafianet/Assert.h" #include "mafianet/DS_List.h" // ntohl #ifdef _WIN32 diff --git a/DependentExtensions/Autopatcher/AutopatcherServer.cpp b/DependentExtensions/Autopatcher/AutopatcherServer.cpp index a03c9be70..9c95ad462 100644 --- a/DependentExtensions/Autopatcher/AutopatcherServer.cpp +++ b/DependentExtensions/Autopatcher/AutopatcherServer.cpp @@ -21,13 +21,13 @@ #include "mafianet/DirectoryDeltaTransfer.h" #include "mafianet/FileList.h" #include "mafianet/StringCompressor.h" -#include "mafianet/RakPeerInterface.h" +#include "mafianet/PeerInterface.h" #include "mafianet/FileListTransfer.h" #include "mafianet/FileListTransferCBInterface.h" #include "mafianet/BitStream.h" #include "mafianet/MessageIdentifiers.h" #include "mafianet/AutopatcherRepositoryInterface.h" -#include "mafianet/RakAssert.h" +#include "mafianet/Assert.h" #include "mafianet/AutopatcherPatchContext.h" #include #include diff --git a/DependentExtensions/Autopatcher/AutopatcherServer.h b/DependentExtensions/Autopatcher/AutopatcherServer.h index 9cf6d38c9..8f3bf20f6 100644 --- a/DependentExtensions/Autopatcher/AutopatcherServer.h +++ b/DependentExtensions/Autopatcher/AutopatcherServer.h @@ -30,13 +30,13 @@ #ifndef __AUTOPATCHER_SERVER_H #define __AUTOPATCHER_SERVER_H -#include "mafianet/RakNetTypes.h" +#include "mafianet/Types.h" #include "mafianet/Export.h" #include "mafianet/PluginInterface2.h" #include "mafianet/PacketPriority.h" #include "mafianet/ThreadPool.h" #include "mafianet/BitStream.h" -#include "mafianet/RakString.h" +#include "mafianet/String.h" #include "mafianet/FileList.h" #include "mafianet/IncrementalReadInterface.h" diff --git a/DependentExtensions/Lobby2/Lobby2Client.cpp b/DependentExtensions/Lobby2/Lobby2Client.cpp index 143d578ae..7f712838f 100644 --- a/DependentExtensions/Lobby2/Lobby2Client.cpp +++ b/DependentExtensions/Lobby2/Lobby2Client.cpp @@ -14,7 +14,7 @@ */ #include "Lobby2Client.h" -#include "mafianet/RakAssert.h" +#include "mafianet/Assert.h" #include "mafianet/MessageIdentifiers.h" using namespace MafiaNet; diff --git a/DependentExtensions/Lobby2/Lobby2Message.h b/DependentExtensions/Lobby2/Lobby2Message.h index 2b264e580..9f0b41351 100644 --- a/DependentExtensions/Lobby2/Lobby2Message.h +++ b/DependentExtensions/Lobby2/Lobby2Message.h @@ -18,9 +18,9 @@ #include "mafianet/BitStream.h" #include "Lobby2ResultCode.h" -#include "mafianet/RakString.h" -#include "mafianet/RakAssert.h" -#include "mafianet/RakNetSmartPtr.h" +#include "mafianet/String.h" +#include "mafianet/Assert.h" +#include "mafianet/SmartPtr.h" #include "mafianet/SimpleMutex.h" #include "Lobby2Presence.h" diff --git a/DependentExtensions/Lobby2/Lobby2Plugin.h b/DependentExtensions/Lobby2/Lobby2Plugin.h index 195dcda50..0c8d67ad6 100644 --- a/DependentExtensions/Lobby2/Lobby2Plugin.h +++ b/DependentExtensions/Lobby2/Lobby2Plugin.h @@ -19,7 +19,7 @@ #include "Lobby2Message.h" #include "mafianet/PluginInterface2.h" #include "mafianet/PacketPriority.h" -#include "mafianet/RakPeerInterface.h" +#include "mafianet/PeerInterface.h" /// \defgroup LOBBY_2_GROUP Lobby2Plugin /// \brief SQL based lobby system, with support for users, friends, clans, emails, ranking, and a message board diff --git a/DependentExtensions/Lobby2/Lobby2Presence.h b/DependentExtensions/Lobby2/Lobby2Presence.h index 4092d13ac..bcaff7fb4 100644 --- a/DependentExtensions/Lobby2/Lobby2Presence.h +++ b/DependentExtensions/Lobby2/Lobby2Presence.h @@ -16,7 +16,7 @@ #ifndef __LOBBY_2_PRESENCE_H #define __LOBBY_2_PRESENCE_H -#include "mafianet/RakString.h" +#include "mafianet/String.h" diff --git a/DependentExtensions/Lobby2/Lobby2ResultCode.cpp b/DependentExtensions/Lobby2/Lobby2ResultCode.cpp index 01b114439..70c58da6b 100644 --- a/DependentExtensions/Lobby2/Lobby2ResultCode.cpp +++ b/DependentExtensions/Lobby2/Lobby2ResultCode.cpp @@ -14,7 +14,7 @@ */ #include "Lobby2ResultCode.h" -#include "mafianet/RakAssert.h" +#include "mafianet/Assert.h" using namespace MafiaNet; diff --git a/DependentExtensions/Lobby2/Lobby2ResultCode.h b/DependentExtensions/Lobby2/Lobby2ResultCode.h index fa9d1dd96..b276f68a4 100644 --- a/DependentExtensions/Lobby2/Lobby2ResultCode.h +++ b/DependentExtensions/Lobby2/Lobby2ResultCode.h @@ -16,7 +16,7 @@ #ifndef __LOBBY_2_RESULT_CODE_H #define __LOBBY_2_RESULT_CODE_H -#include "mafianet/RakNetDefines.h" // provides the MNet short-hand alias for the MafiaNet namespace +#include "mafianet/Defines.h" // provides the MNet short-hand alias for the MafiaNet namespace namespace MafiaNet { diff --git a/DependentExtensions/Lobby2/Lobby2Server.cpp b/DependentExtensions/Lobby2/Lobby2Server.cpp index 2d50f3819..d0576a44b 100644 --- a/DependentExtensions/Lobby2/Lobby2Server.cpp +++ b/DependentExtensions/Lobby2/Lobby2Server.cpp @@ -14,7 +14,7 @@ */ #include "Lobby2Server.h" -#include "mafianet/RakAssert.h" +#include "mafianet/Assert.h" #include "mafianet/MessageIdentifiers.h" //#define __INTEGRATE_LOBBY2_WITH_ROOMS_PLUGIN diff --git a/DependentExtensions/Lobby2/Lobby2Server.h b/DependentExtensions/Lobby2/Lobby2Server.h index 4e1fb22eb..b418b5e04 100644 --- a/DependentExtensions/Lobby2/Lobby2Server.h +++ b/DependentExtensions/Lobby2/Lobby2Server.h @@ -17,7 +17,7 @@ #define __LOBBY_2_SERVER_H #include "mafianet/Export.h" -#include "mafianet/RakNetTypes.h" +#include "mafianet/Types.h" #include "Lobby2Plugin.h" #include "mafianet/DS_OrderedList.h" #include "mafianet/ThreadPool.h" diff --git a/DependentExtensions/Lobby2/Rooms/IntervalTimer.h b/DependentExtensions/Lobby2/Rooms/IntervalTimer.h index e6799091b..8f064a6d6 100644 --- a/DependentExtensions/Lobby2/Rooms/IntervalTimer.h +++ b/DependentExtensions/Lobby2/Rooms/IntervalTimer.h @@ -16,7 +16,7 @@ #ifndef __INTERVAL_TIMER_H #define __INTERVAL_TIMER_H -#include "mafianet/RakNetTypes.h" +#include "mafianet/Types.h" struct IntervalTimer { diff --git a/DependentExtensions/Lobby2/Rooms/ProfanityFilter.cpp b/DependentExtensions/Lobby2/Rooms/ProfanityFilter.cpp index b41a1aa40..d1f5d5144 100644 --- a/DependentExtensions/Lobby2/Rooms/ProfanityFilter.cpp +++ b/DependentExtensions/Lobby2/Rooms/ProfanityFilter.cpp @@ -15,7 +15,7 @@ #include "ProfanityFilter.h" #include "mafianet/Rand.h" -#include "mafianet/RakAssert.h" +#include "mafianet/Assert.h" #include "mafianet/LinuxStrings.h" #include "mafianet/LinuxAdapter.h" #include "mafianet/OsxAdapter.h" diff --git a/DependentExtensions/Lobby2/Rooms/ProfanityFilter.h b/DependentExtensions/Lobby2/Rooms/ProfanityFilter.h index 2143a570a..fa295a4d8 100644 --- a/DependentExtensions/Lobby2/Rooms/ProfanityFilter.h +++ b/DependentExtensions/Lobby2/Rooms/ProfanityFilter.h @@ -17,7 +17,7 @@ #define __PROFANITY_FILTER__H__ #include "mafianet/DS_List.h" -#include "mafianet/RakString.h" +#include "mafianet/String.h" namespace MafiaNet { diff --git a/DependentExtensions/Lobby2/Rooms/RoomsContainer.cpp b/DependentExtensions/Lobby2/Rooms/RoomsContainer.cpp index 3d513017a..60d301607 100644 --- a/DependentExtensions/Lobby2/Rooms/RoomsContainer.cpp +++ b/DependentExtensions/Lobby2/Rooms/RoomsContainer.cpp @@ -15,7 +15,7 @@ #include "RoomsContainer.h" #include "ProfanityFilter.h" -#include "mafianet/RakAssert.h" +#include "mafianet/Assert.h" #include "mafianet/GetTime.h" #include "mafianet/BitStream.h" #include "mafianet/TableSerializer.h" diff --git a/DependentExtensions/Lobby2/Rooms/RoomsContainer.h b/DependentExtensions/Lobby2/Rooms/RoomsContainer.h index 717357e57..90d7303a7 100644 --- a/DependentExtensions/Lobby2/Rooms/RoomsContainer.h +++ b/DependentExtensions/Lobby2/Rooms/RoomsContainer.h @@ -20,7 +20,7 @@ #include "mafianet/DS_Table.h" #include "RoomsErrorCodes.h" #include "mafianet/DS_List.h" -#include "mafianet/RakNetTypes.h" +#include "mafianet/Types.h" #include "IntervalTimer.h" #include "RoomTypes.h" diff --git a/DependentExtensions/Lobby2/Rooms/RoomsErrorCodes.cpp b/DependentExtensions/Lobby2/Rooms/RoomsErrorCodes.cpp index d2bca148b..98030d47b 100644 --- a/DependentExtensions/Lobby2/Rooms/RoomsErrorCodes.cpp +++ b/DependentExtensions/Lobby2/Rooms/RoomsErrorCodes.cpp @@ -14,7 +14,7 @@ */ #include "RoomsErrorCodes.h" -#include "mafianet/RakAssert.h" +#include "mafianet/Assert.h" using namespace MafiaNet; diff --git a/DependentExtensions/Lobby2/Rooms/RoomsErrorCodes.h b/DependentExtensions/Lobby2/Rooms/RoomsErrorCodes.h index b0a0ef71b..ccc92984f 100644 --- a/DependentExtensions/Lobby2/Rooms/RoomsErrorCodes.h +++ b/DependentExtensions/Lobby2/Rooms/RoomsErrorCodes.h @@ -16,7 +16,7 @@ #ifndef __ROOMS_ERROR_CODES_H #define __ROOMS_ERROR_CODES_H -#include "mafianet/RakNetDefines.h" // provides the MNet short-hand alias for the MafiaNet namespace +#include "mafianet/Defines.h" // provides the MNet short-hand alias for the MafiaNet namespace namespace MafiaNet { diff --git a/DependentExtensions/Lobby2/Rooms/RoomsPlugin.cpp b/DependentExtensions/Lobby2/Rooms/RoomsPlugin.cpp index 294ed44c2..9fa45c52a 100644 --- a/DependentExtensions/Lobby2/Rooms/RoomsPlugin.cpp +++ b/DependentExtensions/Lobby2/Rooms/RoomsPlugin.cpp @@ -17,9 +17,9 @@ #include "mafianet/BitStream.h" #include "RoomsErrorCodes.h" #include "mafianet/TableSerializer.h" -#include "mafianet/RakAssert.h" +#include "mafianet/Assert.h" #include "mafianet/MessageIdentifiers.h" -#include "mafianet/RakPeerInterface.h" +#include "mafianet/PeerInterface.h" #include "ProfanityFilter.h" #include "mafianet/GetTime.h" diff --git a/DependentExtensions/Lobby2/Rooms/RoomsPlugin.h b/DependentExtensions/Lobby2/Rooms/RoomsPlugin.h index e744d1508..7d11f8d49 100644 --- a/DependentExtensions/Lobby2/Rooms/RoomsPlugin.h +++ b/DependentExtensions/Lobby2/Rooms/RoomsPlugin.h @@ -22,7 +22,7 @@ #ifndef __ROOMS_PLUGIN_H #define __ROOMS_PLUGIN_H -#include "mafianet/RakNetTypes.h" +#include "mafianet/Types.h" #include "mafianet/PluginInterface2.h" #include "mafianet/DS_OrderedList.h" #include "mafianet/Export.h" diff --git a/DependentExtensions/Lobby2/Steam/Lobby2Client_Steam.h b/DependentExtensions/Lobby2/Steam/Lobby2Client_Steam.h index 738d5b052..69bac342d 100644 --- a/DependentExtensions/Lobby2/Steam/Lobby2Client_Steam.h +++ b/DependentExtensions/Lobby2/Steam/Lobby2Client_Steam.h @@ -18,7 +18,7 @@ #include "Lobby2Plugin.h" #include "mafianet/DS_OrderedList.h" -#include "mafianet/RakNetTypes.h" +#include "mafianet/Types.h" namespace MafiaNet { diff --git a/DependentExtensions/MySQLInterface/MySQLInterface.cpp b/DependentExtensions/MySQLInterface/MySQLInterface.cpp index 53b5deb82..2a168d793 100644 --- a/DependentExtensions/MySQLInterface/MySQLInterface.cpp +++ b/DependentExtensions/MySQLInterface/MySQLInterface.cpp @@ -14,7 +14,7 @@ */ #include "MySQLInterface.h" -#include "mafianet/RakAssert.h" +#include "mafianet/Assert.h" #include "mafianet/BitStream.h" #include "mafianet/FormatString.h" #include "mafianet/LinuxStrings.h" diff --git a/DependentExtensions/MySQLInterface/MySQLInterface.h b/DependentExtensions/MySQLInterface/MySQLInterface.h index 6e348a9ab..0f20e145a 100644 --- a/DependentExtensions/MySQLInterface/MySQLInterface.h +++ b/DependentExtensions/MySQLInterface/MySQLInterface.h @@ -16,7 +16,7 @@ #ifndef __MY_SQL_INTERFACE_H #define __MY_SQL_INTERFACE_H -#include "mafianet/RakString.h" +#include "mafianet/String.h" struct st_mysql_res; struct st_mysql; diff --git a/DependentExtensions/PostgreSQLInterface/PostgreSQLInterface.cpp b/DependentExtensions/PostgreSQLInterface/PostgreSQLInterface.cpp index b44084bee..8160ba229 100644 --- a/DependentExtensions/PostgreSQLInterface/PostgreSQLInterface.cpp +++ b/DependentExtensions/PostgreSQLInterface/PostgreSQLInterface.cpp @@ -37,8 +37,8 @@ //#include #endif -#include "mafianet/RakString.h" -#include "mafianet/RakAssert.h" +#include "mafianet/String.h" +#include "mafianet/Assert.h" #include "mafianet/BitStream.h" #include "mafianet/FormatString.h" #include "mafianet/LinuxStrings.h" diff --git a/DependentExtensions/PostgreSQLInterface/PostgreSQLInterface.h b/DependentExtensions/PostgreSQLInterface/PostgreSQLInterface.h index bf2c9c8ed..1b2ebd67e 100644 --- a/DependentExtensions/PostgreSQLInterface/PostgreSQLInterface.h +++ b/DependentExtensions/PostgreSQLInterface/PostgreSQLInterface.h @@ -22,7 +22,7 @@ typedef struct pg_conn PGconn; struct pg_result; typedef struct pg_result PGresult; -#include "mafianet/RakString.h" +#include "mafianet/String.h" #include "mafianet/DS_OrderedList.h" class PostgreSQLInterface diff --git a/DependentExtensions/RPC3/RPC3.cpp b/DependentExtensions/RPC3/RPC3.cpp index f8fe9cb33..d4de73478 100644 --- a/DependentExtensions/RPC3/RPC3.cpp +++ b/DependentExtensions/RPC3/RPC3.cpp @@ -14,11 +14,11 @@ */ #include "RPC3.h" -#include "mafianet/RakMemoryOverride.h" -#include "mafianet/RakAssert.h" +#include "mafianet/MemoryOverride.h" +#include "mafianet/Assert.h" #include "mafianet/StringCompressor.h" #include "mafianet/BitStream.h" -#include "mafianet/RakPeerInterface.h" +#include "mafianet/PeerInterface.h" #include "mafianet/MessageIdentifiers.h" #include "mafianet/NetworkIDManager.h" #include diff --git a/DependentExtensions/RPC3/RPC3.h b/DependentExtensions/RPC3/RPC3.h index 61ea93f9e..e35d43d7e 100644 --- a/DependentExtensions/RPC3/RPC3.h +++ b/DependentExtensions/RPC3/RPC3.h @@ -24,9 +24,9 @@ #include "RPC3_Boost.h" #include "mafianet/PluginInterface2.h" #include "mafianet/PacketPriority.h" -#include "mafianet/RakNetTypes.h" +#include "mafianet/Types.h" #include "mafianet/BitStream.h" -#include "mafianet/RakString.h" +#include "mafianet/String.h" #include "mafianet/NetworkIDObject.h" #include "mafianet/DS_Hash.h" #include "mafianet/DS_OrderedList.h" diff --git a/DependentExtensions/SQLite3Plugin/Logger/ClientOnly/Optional/SQLiteClientLogger_PacketLogger.cpp b/DependentExtensions/SQLite3Plugin/Logger/ClientOnly/Optional/SQLiteClientLogger_PacketLogger.cpp index 940fba5e2..906b07c56 100644 --- a/DependentExtensions/SQLite3Plugin/Logger/ClientOnly/Optional/SQLiteClientLogger_PacketLogger.cpp +++ b/DependentExtensions/SQLite3Plugin/Logger/ClientOnly/Optional/SQLiteClientLogger_PacketLogger.cpp @@ -10,7 +10,7 @@ #include "SQLiteClientLogger_PacketLogger.h" #include "SQLiteClientLoggerPlugin.h" -#include "mafianet/RakPeerInterface.h" +#include "mafianet/PeerInterface.h" #include "mafianet/InternalPacket.h" #include "mafianet/MessageIdentifiers.h" diff --git a/DependentExtensions/SQLite3Plugin/Logger/ClientOnly/Optional/SQLiteClientLogger_RNSLogger.cpp b/DependentExtensions/SQLite3Plugin/Logger/ClientOnly/Optional/SQLiteClientLogger_RNSLogger.cpp index 0800cd21a..d6ec668a7 100644 --- a/DependentExtensions/SQLite3Plugin/Logger/ClientOnly/Optional/SQLiteClientLogger_RNSLogger.cpp +++ b/DependentExtensions/SQLite3Plugin/Logger/ClientOnly/Optional/SQLiteClientLogger_RNSLogger.cpp @@ -9,10 +9,10 @@ */ #include "SQLiteClientLogger_RNSLogger.h" -#include "mafianet/RakNetTime.h" +#include "mafianet/Time.h" #include "mafianet/GetTime.h" -#include "mafianet/RakNetStatistics.h" -#include "mafianet/RakPeerInterface.h" +#include "mafianet/Statistics.h" +#include "mafianet/PeerInterface.h" #include "SQLiteClientLoggerPlugin.h" using namespace MafiaNet; diff --git a/DependentExtensions/SQLite3Plugin/Logger/ClientOnly/Samples/Ogre3D/BspCollision.cpp b/DependentExtensions/SQLite3Plugin/Logger/ClientOnly/Samples/Ogre3D/BspCollision.cpp index d0866e1b5..8e2461834 100644 --- a/DependentExtensions/SQLite3Plugin/Logger/ClientOnly/Samples/Ogre3D/BspCollision.cpp +++ b/DependentExtensions/SQLite3Plugin/Logger/ClientOnly/Samples/Ogre3D/BspCollision.cpp @@ -46,7 +46,7 @@ static const int num_rows = 3; #include "SQLiteClientLoggerPlugin.h" #include "mafianet/PacketizedTCP.h" #include "Ogre3D_DX9_BackbufferGrabber.h" -#include "mafianet/RakNetTime.h" +#include "mafianet/Time.h" #include "mafianet/GetTime.h" // Event handler to add ability to alter curvature diff --git a/DependentExtensions/SQLite3Plugin/Logger/ClientOnly/Samples/Simple/SQLiteClientLoggerSample.cpp b/DependentExtensions/SQLite3Plugin/Logger/ClientOnly/Samples/Simple/SQLiteClientLoggerSample.cpp index 27bba9e72..aff97f0bd 100644 --- a/DependentExtensions/SQLite3Plugin/Logger/ClientOnly/Samples/Simple/SQLiteClientLoggerSample.cpp +++ b/DependentExtensions/SQLite3Plugin/Logger/ClientOnly/Samples/Simple/SQLiteClientLoggerSample.cpp @@ -8,15 +8,15 @@ * license found in the license.txt file in the root directory of this source tree. */ -#include "mafianet/RakPeerInterface.h" +#include "mafianet/PeerInterface.h" #include "SQLiteClientLoggerPlugin.h" #include "mafianet/BitStream.h" -#include "mafianet/RakSleep.h" +#include "mafianet/Sleep.h" #include "mafianet/Kbhit.h" #include "mafianet/GetTime.h" #include "mafianet/PacketizedTCP.h" -#include "mafianet/RakNetTypes.h" +#include "mafianet/Types.h" #include "mafianet/rand.h" #define M_PI 3.14159265358979323846 diff --git a/DependentExtensions/SQLite3Plugin/Logger/SQLiteLoggerCommon.h b/DependentExtensions/SQLite3Plugin/Logger/SQLiteLoggerCommon.h index efd014c05..bb83c544e 100644 --- a/DependentExtensions/SQLite3Plugin/Logger/SQLiteLoggerCommon.h +++ b/DependentExtensions/SQLite3Plugin/Logger/SQLiteLoggerCommon.h @@ -12,7 +12,7 @@ #define _SQLITE_LOGGER_COMMON_H #include -#include "mafianet/RakNetDefines.h" +#include "mafianet/Defines.h" #include "mafianet/NativeTypes.h" namespace MafiaNet diff --git a/DependentExtensions/SQLite3Plugin/Logger/ServerOnly/SQLiteServerLoggerPlugin.cpp b/DependentExtensions/SQLite3Plugin/Logger/ServerOnly/SQLiteServerLoggerPlugin.cpp index a96db266e..01e9f5af9 100644 --- a/DependentExtensions/SQLite3Plugin/Logger/ServerOnly/SQLiteServerLoggerPlugin.cpp +++ b/DependentExtensions/SQLite3Plugin/Logger/ServerOnly/SQLiteServerLoggerPlugin.cpp @@ -9,7 +9,7 @@ */ #include "SQLiteServerLoggerPlugin.h" -#include "mafianet/RakPeerInterface.h" +#include "mafianet/PeerInterface.h" #include "mafianet/PacketizedTCP.h" #include "mafianet/MessageIdentifiers.h" #include "SQLiteLoggerCommon.h" diff --git a/DependentExtensions/SQLite3Plugin/Logger/ServerOnly/SQLiteServerLoggerSample.cpp b/DependentExtensions/SQLite3Plugin/Logger/ServerOnly/SQLiteServerLoggerSample.cpp index f280c6bce..9c266a340 100644 --- a/DependentExtensions/SQLite3Plugin/Logger/ServerOnly/SQLiteServerLoggerSample.cpp +++ b/DependentExtensions/SQLite3Plugin/Logger/ServerOnly/SQLiteServerLoggerSample.cpp @@ -8,10 +8,10 @@ * license found in the license.txt file in the root directory of this source tree. */ -#include "mafianet/RakPeerInterface.h" +#include "mafianet/PeerInterface.h" #include "SQLiteServerLoggerPlugin.h" #include "mafianet/BitStream.h" -#include "mafianet/RakSleep.h" +#include "mafianet/Sleep.h" #include "mafianet/Kbhit.h" #include "mafianet/GetTime.h" diff --git a/DependentExtensions/SQLite3Plugin/SQLite3ClientPlugin.h b/DependentExtensions/SQLite3Plugin/SQLite3ClientPlugin.h index 10889a09f..70709755b 100644 --- a/DependentExtensions/SQLite3Plugin/SQLite3ClientPlugin.h +++ b/DependentExtensions/SQLite3Plugin/SQLite3ClientPlugin.h @@ -22,13 +22,13 @@ #ifndef ___SQLITE_3_CLIENT_PLUGIN_H #define ___SQLITE_3_CLIENT_PLUGIN_H -#include "mafianet/RakNetTypes.h" +#include "mafianet/Types.h" #include "mafianet/Export.h" #include "mafianet/PluginInterface2.h" #include "mafianet/PacketPriority.h" #include "mafianet/SocketIncludes.h" #include "mafianet/DS_Multilist.h" -#include "mafianet/RakString.h" +#include "mafianet/String.h" #include "SQLite3PluginCommon.h" class RakPeerInterface; diff --git a/DependentExtensions/SQLite3Plugin/SQLite3PluginCommon.h b/DependentExtensions/SQLite3Plugin/SQLite3PluginCommon.h index eec2aedf5..23a16acc6 100644 --- a/DependentExtensions/SQLite3Plugin/SQLite3PluginCommon.h +++ b/DependentExtensions/SQLite3Plugin/SQLite3PluginCommon.h @@ -17,7 +17,7 @@ #define __SQL_LITE_3_PLUGIN_COMMON_H #include "mafianet/DS_Multilist.h" -#include "mafianet/RakString.h" +#include "mafianet/String.h" #include "mafianet/BitStream.h" /// \defgroup SQL_LITE_3_PLUGIN SQLite3Plugin diff --git a/DependentExtensions/SQLite3Plugin/SQLite3Sample.cpp b/DependentExtensions/SQLite3Plugin/SQLite3Sample.cpp index 3026cc96b..60b123cce 100644 --- a/DependentExtensions/SQLite3Plugin/SQLite3Sample.cpp +++ b/DependentExtensions/SQLite3Plugin/SQLite3Sample.cpp @@ -17,11 +17,11 @@ /// \brief A sample for the SQLite3Plugin, that creates a table to track connections on the server /// The SQLite3Plugin is used with SQLite version 3 to transmit over the network calls to sqlite3_exec -#include "mafianet/RakPeerInterface.h" +#include "mafianet/PeerInterface.h" #include "SQLite3ServerPlugin.h" #include "SQLite3ClientPlugin.h" #include "mafianet/BitStream.h" -#include "mafianet/RakSleep.h" +#include "mafianet/Sleep.h" #include "mafianet/Gets.h" #include "mafianet/Kbhit.h" #include "mafianet/GetTime.h" diff --git a/DependentExtensions/SQLite3Plugin/SQLite3ServerPlugin.h b/DependentExtensions/SQLite3Plugin/SQLite3ServerPlugin.h index d431dac4b..d0bdc10c8 100644 --- a/DependentExtensions/SQLite3Plugin/SQLite3ServerPlugin.h +++ b/DependentExtensions/SQLite3Plugin/SQLite3ServerPlugin.h @@ -27,13 +27,13 @@ /// \ingroup SQL_LITE_3_PLUGIN #define SQLite3_STATEMENT_EXECUTE_THREADED -#include "mafianet/RakNetTypes.h" +#include "mafianet/Types.h" #include "mafianet/Export.h" #include "mafianet/PluginInterface2.h" #include "mafianet/PacketPriority.h" #include "mafianet/SocketIncludes.h" #include "mafianet/DS_Multilist.h" -#include "mafianet/RakString.h" +#include "mafianet/String.h" #include "sqlite3.h" #include "SQLite3PluginCommon.h" diff --git a/README.md b/README.md index 996cd3bcd..2868e1357 100644 --- a/README.md +++ b/README.md @@ -116,7 +116,7 @@ Linux, flip the `#if defined(__linux__)` batching guards in `RakNetSocket2.cpp`, ### Basic Usage ```cpp -#include "mafianet/RakPeerInterface.h" +#include "mafianet/PeerInterface.h" #include "mafianet/MessageIdentifiers.h" // Create a peer diff --git a/Samples/AutoPatcherServer_MySQL/AutopatcherServerTest_MySQL.cpp b/Samples/AutoPatcherServer_MySQL/AutopatcherServerTest_MySQL.cpp index 29d0f494d..c23eb9b13 100644 --- a/Samples/AutoPatcherServer_MySQL/AutopatcherServerTest_MySQL.cpp +++ b/Samples/AutoPatcherServer_MySQL/AutopatcherServerTest_MySQL.cpp @@ -19,7 +19,7 @@ #include "mafianet/Kbhit.h" #include "mafianet/GetTime.h" -#include "mafianet/RakPeerInterface.h" +#include "mafianet/PeerInterface.h" #include "mafianet/MessageIdentifiers.h" #include "mafianet/BitStream.h" #include "mafianet/StringCompressor.h" diff --git a/Samples/AutopatcherClient/AutopatcherClientTest.cpp b/Samples/AutopatcherClient/AutopatcherClientTest.cpp index c2f9e2190..49806356a 100644 --- a/Samples/AutopatcherClient/AutopatcherClientTest.cpp +++ b/Samples/AutopatcherClient/AutopatcherClientTest.cpp @@ -38,7 +38,7 @@ #endif #include "mafianet/GetTime.h" -#include "mafianet/RakPeerInterface.h" +#include "mafianet/PeerInterface.h" #include "mafianet/MessageIdentifiers.h" #include "mafianet/BitStream.h" #include "mafianet/StringCompressor.h" @@ -50,7 +50,7 @@ #include "AutopatcherClient.h" #include "mafianet/AutopatcherPatchContext.h" #include "mafianet/Gets.h" -#include "mafianet/RakSleep.h" +#include "mafianet/Sleep.h" #include "mafianet/LinuxAdapter.h" #include "mafianet/OsxAdapter.h" diff --git a/Samples/AutopatcherClientGFx3.0/AutopatcherClientGFx3Impl.cpp b/Samples/AutopatcherClientGFx3.0/AutopatcherClientGFx3Impl.cpp index d3ded67ce..b80135441 100644 --- a/Samples/AutopatcherClientGFx3.0/AutopatcherClientGFx3Impl.cpp +++ b/Samples/AutopatcherClientGFx3.0/AutopatcherClientGFx3Impl.cpp @@ -19,7 +19,7 @@ #include "mafianet/Kbhit.h" #include "mafianet/GetTime.h" -#include "mafianet/RakPeerInterface.h" +#include "mafianet/PeerInterface.h" #include "mafianet/MessageIdentifiers.h" #include "mafianet/BitStream.h" #include "mafianet/StringCompressor.h" @@ -30,7 +30,7 @@ #include "mafianet/FileListTransfer.h" #include "AutopatcherClient.h" #include "mafianet/AutopatcherPatchContext.h" -#include "mafianet/RakSleep.h" +#include "mafianet/Sleep.h" #include "mafianet/LinuxAdapter.h" #include "mafianet/OsxAdapter.h" diff --git a/Samples/AutopatcherClientGFx3.0/AutopatcherClientGFx3Impl.h b/Samples/AutopatcherClientGFx3.0/AutopatcherClientGFx3Impl.h index cdfc1dff6..360879e3e 100644 --- a/Samples/AutopatcherClientGFx3.0/AutopatcherClientGFx3Impl.h +++ b/Samples/AutopatcherClientGFx3.0/AutopatcherClientGFx3Impl.h @@ -13,7 +13,7 @@ * license found in the license.txt file in the root directory of this source tree. */ -#include "mafianet/RakNetTypes.h" +#include "mafianet/Types.h" #include "FxGameDelegate.h" namespace MafiaNet { diff --git a/Samples/AutopatcherClient_SelfScaling/AutopatcherClientTest.cpp b/Samples/AutopatcherClient_SelfScaling/AutopatcherClientTest.cpp index 2d8c4b938..3906e439a 100644 --- a/Samples/AutopatcherClient_SelfScaling/AutopatcherClientTest.cpp +++ b/Samples/AutopatcherClient_SelfScaling/AutopatcherClientTest.cpp @@ -28,12 +28,12 @@ #include "mafianet/Kbhit.h" #include "mafianet/GetTime.h" -#include "mafianet/RakPeerInterface.h" +#include "mafianet/PeerInterface.h" #include "mafianet/MessageIdentifiers.h" #include "mafianet/BitStream.h" #include "mafianet/StringCompressor.h" #include "mafianet/PacketizedTCP.h" -#include "mafianet/RakNetSocket2.h" +#include "mafianet/Socket2.h" // Client only includes #include "mafianet/FileListTransferCBInterface.h" @@ -41,7 +41,7 @@ #include "AutopatcherClient.h" #include "mafianet/AutopatcherPatchContext.h" #include "mafianet/Gets.h" -#include "mafianet/RakSleep.h" +#include "mafianet/Sleep.h" #include "mafianet/CloudClient.h" #include "mafianet/LinuxAdapter.h" #include "mafianet/OsxAdapter.h" diff --git a/Samples/AutopatcherServer/AutopatcherServerTest.cpp b/Samples/AutopatcherServer/AutopatcherServerTest.cpp index 49f54a066..07280469a 100644 --- a/Samples/AutopatcherServer/AutopatcherServerTest.cpp +++ b/Samples/AutopatcherServer/AutopatcherServerTest.cpp @@ -35,7 +35,7 @@ #include "mafianet/Kbhit.h" #include "mafianet/GetTime.h" -#include "mafianet/RakPeerInterface.h" +#include "mafianet/PeerInterface.h" #include "mafianet/MessageIdentifiers.h" #include "mafianet/BitStream.h" #include "mafianet/StringCompressor.h" diff --git a/Samples/AutopatcherServer_SelfScaling/main.cpp b/Samples/AutopatcherServer_SelfScaling/main.cpp index c72825eb8..a004cf3c5 100644 --- a/Samples/AutopatcherServer_SelfScaling/main.cpp +++ b/Samples/AutopatcherServer_SelfScaling/main.cpp @@ -31,7 +31,7 @@ #include "mafianet/Kbhit.h" #include "mafianet/GetTime.h" -#include "mafianet/RakPeerInterface.h" +#include "mafianet/PeerInterface.h" #include "mafianet/MessageIdentifiers.h" #include "mafianet/BitStream.h" #include "mafianet/StringCompressor.h" @@ -44,8 +44,8 @@ #include "mafianet/TwoWayAuthentication.h" #include "mafianet/CloudClient.h" #include "mafianet/DynDNS.h" -#include "mafianet/RakPeerInterface.h" -#include "mafianet/RakSleep.h" +#include "mafianet/PeerInterface.h" +#include "mafianet/Sleep.h" #include "mafianet/ConnectionGraph2.h" #include "CloudServerHelper.h" #include "mafianet/HTTPConnection2.h" diff --git a/Samples/BigPacketTest/BigPacketTest.cpp b/Samples/BigPacketTest/BigPacketTest.cpp index 116c7c77f..c908c7714 100644 --- a/Samples/BigPacketTest/BigPacketTest.cpp +++ b/Samples/BigPacketTest/BigPacketTest.cpp @@ -13,17 +13,17 @@ * license found in the license.txt file in the root directory of this source tree. */ -#include "mafianet/RakPeerInterface.h" +#include "mafianet/PeerInterface.h" #include "mafianet/BitStream.h" #include // For atoi #include // For strlen -#include "mafianet/RakNetStatistics.h" +#include "mafianet/Statistics.h" #include "mafianet/GetTime.h" #include "mafianet/MessageIdentifiers.h" #include "mafianet/MTUSize.h" #include #include "mafianet/Kbhit.h" -#include "mafianet/RakSleep.h" +#include "mafianet/Sleep.h" #include "mafianet/Gets.h" #include "mafianet/LinuxAdapter.h" #include "mafianet/OsxAdapter.h" diff --git a/Samples/BurstTest/BurstTest.cpp b/Samples/BurstTest/BurstTest.cpp index 86e64e2c2..1d0ee78d2 100644 --- a/Samples/BurstTest/BurstTest.cpp +++ b/Samples/BurstTest/BurstTest.cpp @@ -13,7 +13,7 @@ * license found in the license.txt file in the root directory of this source tree. */ -#include "mafianet/RakPeerInterface.h" +#include "mafianet/PeerInterface.h" #include "mafianet/GetTime.h" #include "mafianet/MessageIdentifiers.h" #include "mafianet/BitStream.h" @@ -22,14 +22,14 @@ #include #include #include "mafianet/Rand.h" -#include "mafianet/RakNetStatistics.h" -#include "mafianet/RakSleep.h" -#include "mafianet/RakMemoryOverride.h" +#include "mafianet/Statistics.h" +#include "mafianet/Sleep.h" +#include "mafianet/MemoryOverride.h" #include #include // used for std::numeric_limits #include "mafianet/Gets.h" #include "mafianet/Kbhit.h" -#include "mafianet/RakSleep.h" +#include "mafianet/Sleep.h" #include "mafianet/LinuxAdapter.h" #include "mafianet/OsxAdapter.h" diff --git a/Samples/ChatExample/Client/Chat Example Client.cpp b/Samples/ChatExample/Client/Chat Example Client.cpp index 49110ca88..ff467a3c6 100644 --- a/Samples/ChatExample/Client/Chat Example Client.cpp +++ b/Samples/ChatExample/Client/Chat Example Client.cpp @@ -21,10 +21,10 @@ #include "mafianet/MessageIdentifiers.h" -#include "mafianet/RakPeerInterface.h" +#include "mafianet/PeerInterface.h" #include "mafianet/PeerHandle.h" -#include "mafianet/RakNetStatistics.h" -#include "mafianet/RakNetTypes.h" +#include "mafianet/Statistics.h" +#include "mafianet/Types.h" #include "mafianet/BitStream.h" #include "mafianet/PacketLogger.h" #include @@ -32,7 +32,7 @@ #include #include #include // used for std::numeric_limits -#include "mafianet/RakNetTypes.h" +#include "mafianet/Types.h" #include "mafianet/Kbhit.h" #ifdef _WIN32 #include "mafianet/WindowsIncludes.h" // Sleep diff --git a/Samples/ChatExample/Server/Chat Example Server.cpp b/Samples/ChatExample/Server/Chat Example Server.cpp index d2d6f4149..421dd9251 100644 --- a/Samples/ChatExample/Server/Chat Example Server.cpp +++ b/Samples/ChatExample/Server/Chat Example Server.cpp @@ -21,11 +21,11 @@ #include "mafianet/MessageIdentifiers.h" -#include "mafianet/RakPeerInterface.h" -#include "mafianet/RakNetStatistics.h" -#include "mafianet/RakNetTypes.h" +#include "mafianet/PeerInterface.h" +#include "mafianet/Statistics.h" +#include "mafianet/Types.h" #include "mafianet/BitStream.h" -#include "mafianet/RakSleep.h" +#include "mafianet/Sleep.h" #include "mafianet/PacketLogger.h" #include #include diff --git a/Samples/CloudClient/CloudClientSample.cpp b/Samples/CloudClient/CloudClientSample.cpp index 19ac9193e..3e70ab5f7 100644 --- a/Samples/CloudClient/CloudClientSample.cpp +++ b/Samples/CloudClient/CloudClientSample.cpp @@ -16,8 +16,8 @@ #include "mafianet/MessageIdentifiers.h" #include "mafianet/BitStream.h" #include "mafianet/CloudClient.h" -#include "mafianet/RakPeerInterface.h" -#include "mafianet/RakSleep.h" +#include "mafianet/PeerInterface.h" +#include "mafianet/Sleep.h" #include #include // used for std::numeric_limits diff --git a/Samples/CloudServer/CloudServerHelper.cpp b/Samples/CloudServer/CloudServerHelper.cpp index 90d331771..6e20b3dcc 100644 --- a/Samples/CloudServer/CloudServerHelper.cpp +++ b/Samples/CloudServer/CloudServerHelper.cpp @@ -14,7 +14,7 @@ */ #include "CloudServerHelper.h" -#include "mafianet/RakSleep.h" +#include "mafianet/Sleep.h" #include "mafianet/Gets.h" #include "mafianet/MessageIdentifiers.h" @@ -24,7 +24,7 @@ #include "mafianet/CloudClient.h" #include "mafianet/DynDNS.h" #include "mafianet/SocketLayer.h" -#include "mafianet/RakPeerInterface.h" +#include "mafianet/PeerInterface.h" #include "mafianet/ConnectionGraph2.h" #include #include // used for std::numeric_limits diff --git a/Samples/CloudServer/CloudServerSample.cpp b/Samples/CloudServer/CloudServerSample.cpp index 668d42d42..c64e8e26b 100644 --- a/Samples/CloudServer/CloudServerSample.cpp +++ b/Samples/CloudServer/CloudServerSample.cpp @@ -20,8 +20,8 @@ #include "mafianet/TwoWayAuthentication.h" #include "mafianet/CloudClient.h" #include "mafianet/DynDNS.h" -#include "mafianet/RakPeerInterface.h" -#include "mafianet/RakSleep.h" +#include "mafianet/PeerInterface.h" +#include "mafianet/Sleep.h" #include "mafianet/ConnectionGraph2.h" int main(int argc, char **argv) diff --git a/Samples/CloudTest/CloudTest.cpp b/Samples/CloudTest/CloudTest.cpp index 9f403e4a4..86b409866 100644 --- a/Samples/CloudTest/CloudTest.cpp +++ b/Samples/CloudTest/CloudTest.cpp @@ -13,10 +13,10 @@ * license found in the license.txt file in the root directory of this source tree. */ -#include "mafianet/RakPeerInterface.h" +#include "mafianet/PeerInterface.h" #include "mafianet/BitStream.h" #include "mafianet/GetTime.h" -#include "mafianet/RakSleep.h" +#include "mafianet/Sleep.h" #include "mafianet/Gets.h" #include "mafianet/MessageIdentifiers.h" #include "mafianet/CloudServer.h" diff --git a/Samples/CommandConsoleClient/main.cpp b/Samples/CommandConsoleClient/main.cpp index 1636b3563..c7baee82c 100644 --- a/Samples/CommandConsoleClient/main.cpp +++ b/Samples/CommandConsoleClient/main.cpp @@ -13,7 +13,7 @@ * license found in the license.txt file in the root directory of this source tree. */ -#include "mafianet/RakPeerInterface.h" +#include "mafianet/PeerInterface.h" #include "mafianet/MessageIdentifiers.h" #include "mafianet/BitStream.h" diff --git a/Samples/CommandConsoleServer/main.cpp b/Samples/CommandConsoleServer/main.cpp index 5a9820d50..a173bbcd9 100644 --- a/Samples/CommandConsoleServer/main.cpp +++ b/Samples/CommandConsoleServer/main.cpp @@ -19,13 +19,13 @@ #include "mafianet/TCPInterface.h" #include "mafianet/ConsoleServer.h" -#include "mafianet/RakNetCommandParser.h" +#include "mafianet/CommandParser.h" #include "mafianet/TelnetTransport.h" -#include "mafianet/RakPeerInterface.h" +#include "mafianet/PeerInterface.h" #include "mafianet/LogCommandParser.h" #include "mafianet/GetTime.h" -#include "mafianet/RakNetTransport2.h" +#include "mafianet/Transport2.h" #include "mafianet/LinuxStrings.h" #include diff --git a/Samples/ComprehensivePCGame/ComprehensivePCGame.cpp b/Samples/ComprehensivePCGame/ComprehensivePCGame.cpp index 7faf8670a..73d13aa8a 100644 --- a/Samples/ComprehensivePCGame/ComprehensivePCGame.cpp +++ b/Samples/ComprehensivePCGame/ComprehensivePCGame.cpp @@ -19,13 +19,13 @@ #include // used for std::numeric_limits #include "mafianet/GetTime.h" #include "mafianet/Rand.h" -#include "mafianet/RakPeerInterface.h" +#include "mafianet/PeerInterface.h" #include "mafianet/MessageIdentifiers.h" #include "mafianet/FullyConnectedMesh2.h" #include "mafianet/TeamManager.h" #include "mafianet/Kbhit.h" -#include "mafianet/RakSleep.h" -#include "mafianet/RakNetTypes.h" +#include "mafianet/Sleep.h" +#include "mafianet/Types.h" #include "mafianet/BitStream.h" #include "mafianet/SocketLayer.h" #include "mafianet/ReplicaManager3.h" diff --git a/Samples/ComprehensiveTest/ComprehensiveTest.cpp b/Samples/ComprehensiveTest/ComprehensiveTest.cpp index 671ee72ec..02996eb2e 100644 --- a/Samples/ComprehensiveTest/ComprehensiveTest.cpp +++ b/Samples/ComprehensiveTest/ComprehensiveTest.cpp @@ -13,13 +13,13 @@ * license found in the license.txt file in the root directory of this source tree. */ -#include "mafianet/RakPeerInterface.h" +#include "mafianet/PeerInterface.h" #include "mafianet/BitStream.h" #include // For atoi #include // For strlen #include "mafianet/Rand.h" -#include "mafianet/RakNetStatistics.h" +#include "mafianet/Statistics.h" #include "mafianet/MessageIdentifiers.h" #include #include "mafianet/GetTime.h" diff --git a/Samples/CrashReporter/CrashReporter.h b/Samples/CrashReporter/CrashReporter.h index 0af9bb9b4..bceed4254 100644 --- a/Samples/CrashReporter/CrashReporter.h +++ b/Samples/CrashReporter/CrashReporter.h @@ -65,7 +65,7 @@ // #include "DbgHelp.h" // Link with Dbghelp.lib ws2_32.lib -#include "mafianet/RakNetDefines.h" // provides the MNet short-hand alias for the MafiaNet namespace +#include "mafianet/Defines.h" // provides the MNet short-hand alias for the MafiaNet namespace namespace MafiaNet { // Possible actions to take on a crash. If you want to restart the app as well, see the CrashRelauncher sample. diff --git a/Samples/CrossConnectionTest/CrossConnectionTest.cpp b/Samples/CrossConnectionTest/CrossConnectionTest.cpp index 0377172d7..d7213f768 100644 --- a/Samples/CrossConnectionTest/CrossConnectionTest.cpp +++ b/Samples/CrossConnectionTest/CrossConnectionTest.cpp @@ -17,13 +17,13 @@ /// \brief Tests connecting two peers at the same time with the internet simulator running. -#include "mafianet/RakPeerInterface.h" +#include "mafianet/PeerInterface.h" #include "mafianet/PacketLogger.h" #include "mafianet/Rand.h" #include "mafianet/Kbhit.h" #include // Printf -#include "mafianet/RakSleep.h" +#include "mafianet/Sleep.h" #include "mafianet/MessageIdentifiers.h" #include "mafianet/BitStream.h" #include "mafianet/GetTime.h" diff --git a/Samples/DirectoryDeltaTransfer/DirectoryDeltaTransfer.cpp b/Samples/DirectoryDeltaTransfer/DirectoryDeltaTransfer.cpp index 0a0bb5bc3..bf4a992c6 100644 --- a/Samples/DirectoryDeltaTransfer/DirectoryDeltaTransfer.cpp +++ b/Samples/DirectoryDeltaTransfer/DirectoryDeltaTransfer.cpp @@ -14,9 +14,9 @@ */ #include "mafianet/GetTime.h" -#include "mafianet/RakPeerInterface.h" +#include "mafianet/PeerInterface.h" #include "mafianet/MessageIdentifiers.h" -#include "mafianet/RakNetStatistics.h" +#include "mafianet/Statistics.h" #include "mafianet/DirectoryDeltaTransfer.h" #include "mafianet/FileListTransfer.h" #include "mafianet/FileList.h" diff --git a/Samples/DirectoryDeltaTransfer/DirectoryDeltaTransferTest.cpp b/Samples/DirectoryDeltaTransfer/DirectoryDeltaTransferTest.cpp index 98a42b745..29fb30507 100644 --- a/Samples/DirectoryDeltaTransfer/DirectoryDeltaTransferTest.cpp +++ b/Samples/DirectoryDeltaTransfer/DirectoryDeltaTransferTest.cpp @@ -14,9 +14,9 @@ */ #include "mafianet/GetTime.h" -#include "mafianet/RakPeerInterface.h" +#include "mafianet/PeerInterface.h" #include "mafianet/MessageIdentifiers.h" -#include "mafianet/RakNetStatistics.h" +#include "mafianet/Statistics.h" #include "mafianet/DirectoryDeltaTransfer.h" #include "mafianet/FileListTransfer.h" #include @@ -26,7 +26,7 @@ #include "mafianet/FileList.h" #include "mafianet/DataCompressor.h" #include "mafianet/FileListTransferCBInterface.h" -#include "mafianet/RakSleep.h" +#include "mafianet/Sleep.h" #include "mafianet/IncrementalReadInterface.h" #include "mafianet/PacketizedTCP.h" #include "mafianet/Gets.h" diff --git a/Samples/DroppedConnectionTest/DroppedConnectionTest.cpp b/Samples/DroppedConnectionTest/DroppedConnectionTest.cpp index f80af05b3..77098ea43 100644 --- a/Samples/DroppedConnectionTest/DroppedConnectionTest.cpp +++ b/Samples/DroppedConnectionTest/DroppedConnectionTest.cpp @@ -13,10 +13,10 @@ * license found in the license.txt file in the root directory of this source tree. */ -#include "mafianet/RakPeerInterface.h" +#include "mafianet/PeerInterface.h" #include "mafianet/Rand.h" // randomMT #include "mafianet/MessageIdentifiers.h" // Enumerations -#include "mafianet/RakNetTypes.h" // SystemAddress +#include "mafianet/Types.h" // SystemAddress #include "mafianet/Kbhit.h" #include "mafianet/Gets.h" #include diff --git a/Samples/Encryption/Encryption.cpp b/Samples/Encryption/Encryption.cpp index 7cd36a450..e571d3cc6 100644 --- a/Samples/Encryption/Encryption.cpp +++ b/Samples/Encryption/Encryption.cpp @@ -19,13 +19,13 @@ #include "mafianet/GetTime.h" #include "mafianet/Rand.h" #include "mafianet/Rand.h" -#include "mafianet/RakPeerInterface.h" +#include "mafianet/PeerInterface.h" #include "mafianet/MessageIdentifiers.h" -#include "mafianet/RakNetTypes.h" +#include "mafianet/Types.h" #include "mafianet/NativeFeatureIncludes.h" #include -#include "mafianet/RakSleep.h" +#include "mafianet/Sleep.h" #include "mafianet/BitStream.h" #include "mafianet/SecureHandshake.h" // Include header for secure handshake #include "mafianet/Gets.h" diff --git a/Samples/FCMHost/FCM2HostTest.cpp b/Samples/FCMHost/FCM2HostTest.cpp index 4778cc303..1c9c45deb 100644 --- a/Samples/FCMHost/FCM2HostTest.cpp +++ b/Samples/FCMHost/FCM2HostTest.cpp @@ -17,10 +17,10 @@ #include #include #include "mafianet/GetTime.h" -#include "mafianet/RakPeerInterface.h" +#include "mafianet/PeerInterface.h" #include "mafianet/MessageIdentifiers.h" -#include "mafianet/RakNetTypes.h" -#include "mafianet/RakSleep.h" +#include "mafianet/Types.h" +#include "mafianet/Sleep.h" #include "mafianet/FullyConnectedMesh2.h" #include "mafianet/ConnectionGraph2.h" #include diff --git a/Samples/FCMHostSimultaneous/FCM2HostSimultaneousTest.cpp b/Samples/FCMHostSimultaneous/FCM2HostSimultaneousTest.cpp index a552542cf..1be93ccf1 100644 --- a/Samples/FCMHostSimultaneous/FCM2HostSimultaneousTest.cpp +++ b/Samples/FCMHostSimultaneous/FCM2HostSimultaneousTest.cpp @@ -17,11 +17,11 @@ #include #include #include "mafianet/GetTime.h" -#include "mafianet/RakPeerInterface.h" +#include "mafianet/PeerInterface.h" #include "mafianet/MessageIdentifiers.h" -#include "mafianet/RakNetTypes.h" -#include "mafianet/RakSleep.h" +#include "mafianet/Types.h" +#include "mafianet/Sleep.h" #include "mafianet/FullyConnectedMesh2.h" #include "mafianet/ConnectionGraph2.h" #include diff --git a/Samples/FCMVerifiedJoinSimultaneous/FCM2VerifiedJoinSimultaneousTest.cpp b/Samples/FCMVerifiedJoinSimultaneous/FCM2VerifiedJoinSimultaneousTest.cpp index 3f450055c..b269ea76c 100644 --- a/Samples/FCMVerifiedJoinSimultaneous/FCM2VerifiedJoinSimultaneousTest.cpp +++ b/Samples/FCMVerifiedJoinSimultaneous/FCM2VerifiedJoinSimultaneousTest.cpp @@ -17,10 +17,10 @@ #include #include #include "mafianet/GetTime.h" -#include "mafianet/RakPeerInterface.h" +#include "mafianet/PeerInterface.h" #include "mafianet/MessageIdentifiers.h" -#include "mafianet/RakNetTypes.h" -#include "mafianet/RakSleep.h" +#include "mafianet/Types.h" +#include "mafianet/Sleep.h" #include "mafianet/FullyConnectedMesh2.h" #include "mafianet/ConnectionGraph2.h" #include diff --git a/Samples/FileListTransfer/main.cpp b/Samples/FileListTransfer/main.cpp index 8b839df21..f31e65d73 100644 --- a/Samples/FileListTransfer/main.cpp +++ b/Samples/FileListTransfer/main.cpp @@ -13,15 +13,15 @@ * license found in the license.txt file in the root directory of this source tree. */ -#include "mafianet/RakPeerInterface.h" +#include "mafianet/PeerInterface.h" #include "mafianet/FileListTransfer.h" -#include "mafianet/RakSleep.h" +#include "mafianet/Sleep.h" #include "mafianet/MessageIdentifiers.h" #include "mafianet/FileListTransferCBInterface.h" #include "mafianet/FileOperations.h" #include "mafianet/SuperFastHash.h" -#include "mafianet/RakAssert.h" +#include "mafianet/Assert.h" #include "mafianet/BitStream.h" #include "mafianet/IncrementalReadInterface.h" #include "mafianet/PacketizedTCP.h" diff --git a/Samples/FlowControlTest/FlowControlTest.cpp b/Samples/FlowControlTest/FlowControlTest.cpp index 05078347e..be7b7b8ff 100644 --- a/Samples/FlowControlTest/FlowControlTest.cpp +++ b/Samples/FlowControlTest/FlowControlTest.cpp @@ -13,10 +13,10 @@ * license found in the license.txt file in the root directory of this source tree. */ -#include "mafianet/RakPeerInterface.h" +#include "mafianet/PeerInterface.h" #include "mafianet/GetTime.h" #include "mafianet/MessageIdentifiers.h" -#include "mafianet/RakNetStatistics.h" +#include "mafianet/Statistics.h" #include #include #include diff --git a/Samples/FullyConnectedMesh/FCMTest.cpp b/Samples/FullyConnectedMesh/FCMTest.cpp index e7990528d..668002c53 100644 --- a/Samples/FullyConnectedMesh/FCMTest.cpp +++ b/Samples/FullyConnectedMesh/FCMTest.cpp @@ -18,14 +18,14 @@ #include #include "mafianet/GetTime.h" #include "mafianet/Rand.h" -#include "mafianet/RakPeerInterface.h" +#include "mafianet/PeerInterface.h" #include "mafianet/MessageIdentifiers.h" #include "mafianet/FullyConnectedMesh2.h" #include "mafianet/ConnectionGraph2.h" #include #include "mafianet/Kbhit.h" -#include "mafianet/RakSleep.h" +#include "mafianet/Sleep.h" static const unsigned short NUM_PEERS=8; MafiaNet::RakPeerInterface *rakPeer[NUM_PEERS]; diff --git a/Samples/LANServerDiscovery/LANServerDiscovery.cpp b/Samples/LANServerDiscovery/LANServerDiscovery.cpp index 330821f2c..1eb3daee8 100644 --- a/Samples/LANServerDiscovery/LANServerDiscovery.cpp +++ b/Samples/LANServerDiscovery/LANServerDiscovery.cpp @@ -20,9 +20,9 @@ // ---------------------------------------------------------------------- #include "mafianet/MessageIdentifiers.h" -#include "mafianet/RakPeerInterface.h" -#include "mafianet/RakPeerInterface.h" -#include "mafianet/RakNetTypes.h" +#include "mafianet/PeerInterface.h" +#include "mafianet/PeerInterface.h" +#include "mafianet/Types.h" #include "mafianet/GetTime.h" #include "mafianet/BitStream.h" #include @@ -30,7 +30,7 @@ #include #include #include // used for std::numeric_limits -#include "mafianet/RakSleep.h" +#include "mafianet/Sleep.h" #include "mafianet/Gets.h" #include "mafianet/LinuxAdapter.h" #include "mafianet/OsxAdapter.h" diff --git a/Samples/Lobby2Client/Lobby2ClientSample.cpp b/Samples/Lobby2Client/Lobby2ClientSample.cpp index 44ad98dce..cad236856 100644 --- a/Samples/Lobby2Client/Lobby2ClientSample.cpp +++ b/Samples/Lobby2Client/Lobby2ClientSample.cpp @@ -14,12 +14,12 @@ */ #include "Lobby2Message.h" -#include "mafianet/RakPeerInterface.h" +#include "mafianet/PeerInterface.h" #include "mafianet/MessageIdentifiers.h" #include "Lobby2Client.h" #include "mafianet/Kbhit.h" -#include "mafianet/RakSleep.h" +#include "mafianet/Sleep.h" #include "RoomsErrorCodes.h" #include "mafianet/DS_Queue.h" #include diff --git a/Samples/Lobby2ClientGFx3.0/Lobby2ClientGFx3Impl.cpp b/Samples/Lobby2ClientGFx3.0/Lobby2ClientGFx3Impl.cpp index 6f51c0fb7..3a35ab49b 100644 --- a/Samples/Lobby2ClientGFx3.0/Lobby2ClientGFx3Impl.cpp +++ b/Samples/Lobby2ClientGFx3.0/Lobby2ClientGFx3Impl.cpp @@ -18,7 +18,7 @@ #include #include "mafianet/GetTime.h" -#include "mafianet/RakPeerInterface.h" +#include "mafianet/PeerInterface.h" #include "mafianet/MessageIdentifiers.h" #include "mafianet/BitStream.h" #include "Lobby2ClientGFx3Impl.h" diff --git a/Samples/Lobby2ClientGFx3.0/Lobby2ClientGFx3Impl.h b/Samples/Lobby2ClientGFx3.0/Lobby2ClientGFx3Impl.h index eca2b17f8..f1732a68d 100644 --- a/Samples/Lobby2ClientGFx3.0/Lobby2ClientGFx3Impl.h +++ b/Samples/Lobby2ClientGFx3.0/Lobby2ClientGFx3Impl.h @@ -17,7 +17,7 @@ #define __LOBBY_2_CLIENT_GFX3_IMPL_H #include "mafianet/WindowsIncludes.h" -#include "mafianet/RakNetTypes.h" +#include "mafianet/Types.h" #include "FxGameDelegate.h" #include "Lobby2Message.h" #include "mafianet/PluginInterface2.h" diff --git a/Samples/Lobby2Server_PGSQL/Lobby2ServerSample_PGSQL.cpp b/Samples/Lobby2Server_PGSQL/Lobby2ServerSample_PGSQL.cpp index f28309fd8..c16e656c0 100644 --- a/Samples/Lobby2Server_PGSQL/Lobby2ServerSample_PGSQL.cpp +++ b/Samples/Lobby2Server_PGSQL/Lobby2ServerSample_PGSQL.cpp @@ -14,11 +14,11 @@ */ #include "Lobby2Message.h" -#include "mafianet/RakPeerInterface.h" +#include "mafianet/PeerInterface.h" #include "mafianet/MessageIdentifiers.h" #include "mafianet/Kbhit.h" -#include "mafianet/RakSleep.h" +#include "mafianet/Sleep.h" #include "Lobby2Server_PGSQL.h" #include "Lobby2Message_PGSQL.h" #include "ProfanityFilter.h" diff --git a/Samples/Lobby3/main.cpp b/Samples/Lobby3/main.cpp index bd58c2d23..d52777679 100644 --- a/Samples/Lobby3/main.cpp +++ b/Samples/Lobby3/main.cpp @@ -20,8 +20,8 @@ #include "mafianet/Gets.h" #include "mafianet/TCPInterface.h" -#include "mafianet/RakString.h" -#include "mafianet/RakSleep.h" +#include "mafianet/String.h" +#include "mafianet/Sleep.h" #include "mafianet/DR_SHA1.h" #include "mafianet/BitStream.h" #include "mafianet/LinuxAdapter.h" diff --git a/Samples/LoopbackPerformanceTest/LoopbackPerformanceTest.cpp b/Samples/LoopbackPerformanceTest/LoopbackPerformanceTest.cpp index ef608509c..e25f0aded 100644 --- a/Samples/LoopbackPerformanceTest/LoopbackPerformanceTest.cpp +++ b/Samples/LoopbackPerformanceTest/LoopbackPerformanceTest.cpp @@ -13,10 +13,10 @@ * license found in the license.txt file in the root directory of this source tree. */ -#include "mafianet/RakPeerInterface.h" +#include "mafianet/PeerInterface.h" #include "mafianet/MessageIdentifiers.h" // Enumerations #include "mafianet/GetTime.h" -#include "mafianet/RakNetStatistics.h" +#include "mafianet/Statistics.h" #include #include #include "mafianet/Gets.h" diff --git a/Samples/MasterServer/MasterClient.cpp b/Samples/MasterServer/MasterClient.cpp index c2fcb8803..1af500877 100644 --- a/Samples/MasterServer/MasterClient.cpp +++ b/Samples/MasterServer/MasterClient.cpp @@ -15,7 +15,7 @@ #include "MasterClient.h" #include "MasterServerMessageIDs.h" -#include "mafianet/RakPeerInterface.h" +#include "mafianet/PeerInterface.h" #include "mafianet/MessageIdentifiers.h" #include "mafianet/StringCompressor.h" #include "mafianet/GetTime.h" diff --git a/Samples/MasterServer/MasterClientMain.cpp b/Samples/MasterServer/MasterClientMain.cpp index 0d086887d..78e44d851 100644 --- a/Samples/MasterServer/MasterClientMain.cpp +++ b/Samples/MasterServer/MasterClientMain.cpp @@ -20,7 +20,7 @@ #include "MasterClient.h" #include "mafianet/StringCompressor.h" #include "mafianet/BitStream.h" -#include "mafianet/RakPeerInterface.h" +#include "mafianet/PeerInterface.h" #include "mafianet/MessageIdentifiers.h" #include "mafianet/Gets.h" diff --git a/Samples/MasterServer/MasterCommon.h b/Samples/MasterServer/MasterCommon.h index f8e054b6e..9d044202c 100644 --- a/Samples/MasterServer/MasterCommon.h +++ b/Samples/MasterServer/MasterCommon.h @@ -19,7 +19,7 @@ #define __MASTER_COMMON_H #include "mafianet/DS_List.h" -#include "mafianet/RakNetTypes.h" +#include "mafianet/Types.h" #include "mafianet/BitStream.h" #include "mafianet/PluginInterface2.h" using namespace MafiaNet; diff --git a/Samples/MasterServer/MasterServer.cpp b/Samples/MasterServer/MasterServer.cpp index 01b7efd55..bd916b2bf 100644 --- a/Samples/MasterServer/MasterServer.cpp +++ b/Samples/MasterServer/MasterServer.cpp @@ -15,12 +15,12 @@ #include "MasterServer.h" #include "MasterServerMessageIDs.h" -#include "mafianet/RakPeerInterface.h" +#include "mafianet/PeerInterface.h" #include "mafianet/BitStream.h" #include "mafianet/MessageIdentifiers.h" #include "mafianet/StringCompressor.h" #include "mafianet/GetTime.h" -#include "mafianet/RakNetStatistics.h" +#include "mafianet/Statistics.h" #include "mafianet/PacketPriority.h" using namespace MafiaNet; diff --git a/Samples/MasterServer/MasterServer.h b/Samples/MasterServer/MasterServer.h index 8410da206..231634feb 100644 --- a/Samples/MasterServer/MasterServer.h +++ b/Samples/MasterServer/MasterServer.h @@ -21,7 +21,7 @@ #define __MASTER_SERVER_H #include "MasterCommon.h" -#include "mafianet/RakNetTypes.h" +#include "mafianet/Types.h" /// \ingroup MASTER_SERVER_GROUP /// \brief implements the master server diff --git a/Samples/MasterServer/MasterServerMain.cpp b/Samples/MasterServer/MasterServerMain.cpp index 078bfd9cd..66130120e 100644 --- a/Samples/MasterServer/MasterServerMain.cpp +++ b/Samples/MasterServer/MasterServerMain.cpp @@ -17,7 +17,7 @@ #include "MasterCommon.h" #include "MasterServer.h" -#include "mafianet/RakPeerInterface.h" +#include "mafianet/PeerInterface.h" #include "mafianet/Gets.h" #include #include diff --git a/Samples/MasterServer/mastercommon.cpp b/Samples/MasterServer/mastercommon.cpp index 575b33e14..c029b87b7 100644 --- a/Samples/MasterServer/mastercommon.cpp +++ b/Samples/MasterServer/mastercommon.cpp @@ -14,8 +14,8 @@ */ #include "MasterCommon.h" -#include "mafianet/RakPeerInterface.h" -#include "mafianet/RakNetDefines.h" +#include "mafianet/PeerInterface.h" +#include "mafianet/Defines.h" #include #include "mafianet/GetTime.h" #include "mafianet/StringCompressor.h" diff --git a/Samples/MasterServer2/main.cpp b/Samples/MasterServer2/main.cpp index e4d20eb65..eee7fc359 100644 --- a/Samples/MasterServer2/main.cpp +++ b/Samples/MasterServer2/main.cpp @@ -62,8 +62,8 @@ void main_sockets(void) } #include "mafianet/TCPInterface.h" -#include "mafianet/RakString.h" -#include "mafianet/RakSleep.h" +#include "mafianet/String.h" +#include "mafianet/Sleep.h" #include "jansson.h" #include "mafianet/GetTime.h" diff --git a/Samples/MessageFilter/MessageFilterTest.cpp b/Samples/MessageFilter/MessageFilterTest.cpp index 16fadcec9..d7396e138 100644 --- a/Samples/MessageFilter/MessageFilterTest.cpp +++ b/Samples/MessageFilter/MessageFilterTest.cpp @@ -13,11 +13,11 @@ * license found in the license.txt file in the root directory of this source tree. */ -#include "mafianet/RakPeerInterface.h" +#include "mafianet/PeerInterface.h" #include "mafianet/MessageFilter.h" #include "mafianet/MessageIdentifiers.h" -#include "mafianet/RakSleep.h" +#include "mafianet/Sleep.h" #include int main() diff --git a/Samples/MessageSizeTest/MessageSizeTest.cpp b/Samples/MessageSizeTest/MessageSizeTest.cpp index bf2afa841..75cd0ab39 100644 --- a/Samples/MessageSizeTest/MessageSizeTest.cpp +++ b/Samples/MessageSizeTest/MessageSizeTest.cpp @@ -13,7 +13,7 @@ * license found in the license.txt file in the root directory of this source tree. */ -#include "mafianet/RakPeerInterface.h" +#include "mafianet/PeerInterface.h" #include "mafianet/GetTime.h" #include "mafianet/MessageIdentifiers.h" #include "mafianet/BitStream.h" @@ -22,9 +22,9 @@ #include #include #include "mafianet/Rand.h" -#include "mafianet/RakNetStatistics.h" -#include "mafianet/RakSleep.h" -#include "mafianet/RakMemoryOverride.h" +#include "mafianet/Statistics.h" +#include "mafianet/Sleep.h" +#include "mafianet/MemoryOverride.h" using namespace MafiaNet; diff --git a/Samples/NATCompleteClient/main.cpp b/Samples/NATCompleteClient/main.cpp index dfa678f4e..3dda7f07b 100644 --- a/Samples/NATCompleteClient/main.cpp +++ b/Samples/NATCompleteClient/main.cpp @@ -13,8 +13,8 @@ * license found in the license.txt file in the root directory of this source tree. */ -#include "mafianet/RakPeerInterface.h" -#include "mafianet/RakSleep.h" +#include "mafianet/PeerInterface.h" +#include "mafianet/Sleep.h" #include #include #include @@ -22,7 +22,7 @@ #include "mafianet/Kbhit.h" #include "mafianet/MessageIdentifiers.h" #include "mafianet/BitStream.h" -#include "mafianet/RakSleep.h" +#include "mafianet/Sleep.h" #include "mafianet/NatPunchthroughClient.h" #include "mafianet/NatTypeDetectionClient.h" #include "mafianet/Getche.h" diff --git a/Samples/NATCompleteServer/main.cpp b/Samples/NATCompleteServer/main.cpp index 28ed36b3f..032af4700 100644 --- a/Samples/NATCompleteServer/main.cpp +++ b/Samples/NATCompleteServer/main.cpp @@ -13,8 +13,8 @@ * license found in the license.txt file in the root directory of this source tree. */ -#include "mafianet/RakPeerInterface.h" -#include "mafianet/RakSleep.h" +#include "mafianet/PeerInterface.h" +#include "mafianet/Sleep.h" #include #include #include @@ -22,7 +22,7 @@ #include "mafianet/Kbhit.h" #include "mafianet/MessageIdentifiers.h" #include "mafianet/BitStream.h" -#include "mafianet/RakSleep.h" +#include "mafianet/Sleep.h" #include "mafianet/UDPProxyServer.h" #include "mafianet/UDPProxyCoordinator.h" #include "mafianet/NatPunchthroughServer.h" @@ -32,7 +32,7 @@ #include "mafianet/Gets.h" #include "CloudServerHelper.h" #include "mafianet/CloudClient.h" -#include "mafianet/RakNetStatistics.h" +#include "mafianet/Statistics.h" #include "mafianet/RelayPlugin.h" #include "mafianet/LinuxAdapter.h" #include "mafianet/OsxAdapter.h" diff --git a/Samples/OfflineMessagesTest/OfflineMessagesTest.cpp b/Samples/OfflineMessagesTest/OfflineMessagesTest.cpp index 5ff3a7e89..8fc5df83d 100644 --- a/Samples/OfflineMessagesTest/OfflineMessagesTest.cpp +++ b/Samples/OfflineMessagesTest/OfflineMessagesTest.cpp @@ -13,7 +13,7 @@ * license found in the license.txt file in the root directory of this source tree. */ -#include "mafianet/RakPeerInterface.h" +#include "mafianet/PeerInterface.h" #include "mafianet/BitStream.h" #include // For atoi diff --git a/Samples/PHPDirectoryServer2/PHPDirectoryServer2.cpp b/Samples/PHPDirectoryServer2/PHPDirectoryServer2.cpp index 69d6d5b9b..8f45f8352 100644 --- a/Samples/PHPDirectoryServer2/PHPDirectoryServer2.cpp +++ b/Samples/PHPDirectoryServer2/PHPDirectoryServer2.cpp @@ -27,11 +27,11 @@ #include "PHPDirectoryServer2.h" #include "mafianet/HTTPConnection.h" -#include "mafianet/RakSleep.h" -#include "mafianet/RakString.h" -#include "mafianet/RakNetTypes.h" +#include "mafianet/Sleep.h" +#include "mafianet/String.h" +#include "mafianet/Types.h" #include "mafianet/GetTime.h" -#include "mafianet/RakAssert.h" +#include "mafianet/Assert.h" #include #include #include diff --git a/Samples/PHPDirectoryServer2/PHPDirectoryServer2.h b/Samples/PHPDirectoryServer2/PHPDirectoryServer2.h index 21d8726ab..1c613afd6 100644 --- a/Samples/PHPDirectoryServer2/PHPDirectoryServer2.h +++ b/Samples/PHPDirectoryServer2/PHPDirectoryServer2.h @@ -31,9 +31,9 @@ #define __PHP_DIRECTORY_SERVER_2 #include "mafianet/Export.h" -#include "mafianet/RakString.h" +#include "mafianet/String.h" #include "mafianet/HTTPConnection.h" -#include "mafianet/RakNetTypes.h" +#include "mafianet/Types.h" #include "mafianet/DS_Queue.h" #include "mafianet/DS_Table.h" #include "mafianet/DS_Map.h" diff --git a/Samples/PHPDirectoryServer2/main.cpp b/Samples/PHPDirectoryServer2/main.cpp index e31ea7da1..246028a92 100644 --- a/Samples/PHPDirectoryServer2/main.cpp +++ b/Samples/PHPDirectoryServer2/main.cpp @@ -20,8 +20,8 @@ #include "mafianet/TCPInterface.h" #include "mafianet/HTTPConnection.h" #include "PHPDirectoryServer2.h" -#include "mafianet/RakSleep.h" -#include "mafianet/RakString.h" +#include "mafianet/Sleep.h" +#include "mafianet/String.h" #include "mafianet/GetTime.h" #include "mafianet/DS_Table.h" #include diff --git a/Samples/PacketConsoleLogger/main.cpp b/Samples/PacketConsoleLogger/main.cpp index 80b65b06a..86cd3e27f 100644 --- a/Samples/PacketConsoleLogger/main.cpp +++ b/Samples/PacketConsoleLogger/main.cpp @@ -17,8 +17,8 @@ #include "mafianet/ConsoleServer.h" #include "mafianet/LogCommandParser.h" #include "mafianet/PacketConsoleLogger.h" -#include "mafianet/RakPeerInterface.h" -#include "mafianet/RakSleep.h" +#include "mafianet/PeerInterface.h" +#include "mafianet/Sleep.h" #include #include "mafianet/Getche.h" #include "mafianet/MessageIdentifiers.h" diff --git a/Samples/PacketLogger/PacketLoggerTest.cpp b/Samples/PacketLogger/PacketLoggerTest.cpp index d82a5f518..1ee6e8da7 100644 --- a/Samples/PacketLogger/PacketLoggerTest.cpp +++ b/Samples/PacketLogger/PacketLoggerTest.cpp @@ -18,7 +18,7 @@ #include #include "mafianet/GetTime.h" #include "mafianet/Rand.h" -#include "mafianet/RakPeerInterface.h" +#include "mafianet/PeerInterface.h" #include "mafianet/MessageIdentifiers.h" #include "mafianet/Gets.h" #include "mafianet/PacketLogger.h" diff --git a/Samples/Ping/Ping.cpp b/Samples/Ping/Ping.cpp index 437f914b2..e1178540e 100644 --- a/Samples/Ping/Ping.cpp +++ b/Samples/Ping/Ping.cpp @@ -20,9 +20,9 @@ // ---------------------------------------------------------------------- #include "mafianet/MessageIdentifiers.h" -#include "mafianet/RakPeerInterface.h" -#include "mafianet/RakPeerInterface.h" -#include "mafianet/RakNetTypes.h" +#include "mafianet/PeerInterface.h" +#include "mafianet/PeerInterface.h" +#include "mafianet/Types.h" #include "mafianet/GetTime.h" #include "mafianet/BitStream.h" #include diff --git a/Samples/RPC3/RPC3Sample.cpp b/Samples/RPC3/RPC3Sample.cpp index 123f89087..3de859849 100644 --- a/Samples/RPC3/RPC3Sample.cpp +++ b/Samples/RPC3/RPC3Sample.cpp @@ -14,7 +14,7 @@ */ #include "RPC3.h" -#include "mafianet/RakPeerInterface.h" +#include "mafianet/PeerInterface.h" #include #include "mafianet/Kbhit.h" @@ -23,7 +23,7 @@ #include "mafianet/BitStream.h" #include "mafianet/MessageIdentifiers.h" #include "mafianet/StringCompressor.h" -#include "mafianet/RakSleep.h" +#include "mafianet/Sleep.h" #include "mafianet/NetworkIDObject.h" #include "mafianet/NetworkIDManager.h" #include "mafianet/GetTime.h" diff --git a/Samples/RPC4/RPC4Sample.cpp b/Samples/RPC4/RPC4Sample.cpp index da462ef1c..6309d761d 100644 --- a/Samples/RPC4/RPC4Sample.cpp +++ b/Samples/RPC4/RPC4Sample.cpp @@ -14,13 +14,13 @@ */ #include "mafianet/RPC4Plugin.h" -#include "mafianet/RakPeerInterface.h" +#include "mafianet/PeerInterface.h" #include #include "mafianet/Kbhit.h" #include #include #include // used for std::numeric_limits -#include "mafianet/RakSleep.h" +#include "mafianet/Sleep.h" #include "mafianet/BitStream.h" #include "mafianet/MessageIdentifiers.h" #include "mafianet/Gets.h" diff --git a/Samples/RackspaceConsole/main.cpp b/Samples/RackspaceConsole/main.cpp index 0a6724990..41e10c18f 100644 --- a/Samples/RackspaceConsole/main.cpp +++ b/Samples/RackspaceConsole/main.cpp @@ -19,7 +19,7 @@ #include "mafianet/Rackspace.h" #include "mafianet/TCPInterface.h" #include "mafianet/Kbhit.h" -#include "mafianet/RakSleep.h" +#include "mafianet/Sleep.h" #include "mafianet/LinuxAdapter.h" #include "mafianet/OsxAdapter.h" diff --git a/Samples/RakVoice/main.cpp b/Samples/RakVoice/main.cpp index d0fd3db2e..954091ce6 100644 --- a/Samples/RakVoice/main.cpp +++ b/Samples/RakVoice/main.cpp @@ -19,11 +19,11 @@ #include // used for std::numeric_limits #include "portaudio.h" #include "mafianet/Kbhit.h" -#include "mafianet/RakPeerInterface.h" +#include "mafianet/PeerInterface.h" #include "mafianet/MessageIdentifiers.h" #include "mafianet/RakVoice.h" -#include "mafianet/RakNetStatistics.h" +#include "mafianet/Statistics.h" #include "mafianet/NatPunchthroughClient.h" #include "mafianet/BitStream.h" #include "mafianet/Getche.h" diff --git a/Samples/RakVoiceDSound/DSoundVoiceAdapter.cpp b/Samples/RakVoiceDSound/DSoundVoiceAdapter.cpp index 4b52ba386..cd1b9cc1f 100644 --- a/Samples/RakVoiceDSound/DSoundVoiceAdapter.cpp +++ b/Samples/RakVoiceDSound/DSoundVoiceAdapter.cpp @@ -14,8 +14,8 @@ */ #include "DSoundVoiceAdapter.h" -#include "mafianet/RakAssert.h" -#include "mafianet/RakPeerInterface.h" +#include "mafianet/Assert.h" +#include "mafianet/PeerInterface.h" #include /// To test sending to myself diff --git a/Samples/RakVoiceDSound/main.cpp b/Samples/RakVoiceDSound/main.cpp index dbc915f36..5e071c508 100644 --- a/Samples/RakVoiceDSound/main.cpp +++ b/Samples/RakVoiceDSound/main.cpp @@ -23,14 +23,14 @@ #include #include #include // used for std::numeric_limits -#include "mafianet/RakPeerInterface.h" +#include "mafianet/PeerInterface.h" #include "mafianet/MessageIdentifiers.h" -#include "mafianet/RakSleep.h" +#include "mafianet/Sleep.h" #include "mafianet/RakVoice.h" -#include "mafianet/RakNetStatistics.h" +#include "mafianet/Statistics.h" #include "mafianet/GetTime.h" -#include "mafianet/RakAssert.h" +#include "mafianet/Assert.h" #include "mafianet/Gets.h" #include "DSoundVoiceAdapter.h" #include "mafianet/LinuxAdapter.h" diff --git a/Samples/RakVoiceFMOD/FMODVoiceAdapter.cpp b/Samples/RakVoiceFMOD/FMODVoiceAdapter.cpp index 2610b1dbf..1812c1359 100644 --- a/Samples/RakVoiceFMOD/FMODVoiceAdapter.cpp +++ b/Samples/RakVoiceFMOD/FMODVoiceAdapter.cpp @@ -16,7 +16,7 @@ #include #include #include -#include "mafianet/RakPeerInterface.h" +#include "mafianet/PeerInterface.h" #include "mafianet/MessageIdentifiers.h" #include "FMODVoiceAdapter.h" diff --git a/Samples/RakVoiceFMOD/main.cpp b/Samples/RakVoiceFMOD/main.cpp index 8c9304931..03f5221af 100644 --- a/Samples/RakVoiceFMOD/main.cpp +++ b/Samples/RakVoiceFMOD/main.cpp @@ -22,15 +22,15 @@ #include #include #include -#include "mafianet/RakPeerInterface.h" +#include "mafianet/PeerInterface.h" #include "mafianet/MessageIdentifiers.h" #include "mafianet/Gets.h" -#include "mafianet/RakSleep.h" +#include "mafianet/Sleep.h" #include "mafianet/RakVoice.h" -#include "mafianet/RakNetStatistics.h" +#include "mafianet/Statistics.h" #include "mafianet/GetTime.h" -#include "mafianet/RakAssert.h" +#include "mafianet/Assert.h" #include "mafianet/LinuxAdapter.h" #include "mafianet/OsxAdapter.h" diff --git a/Samples/ReadyEvent/ReadyEventSample.cpp b/Samples/ReadyEvent/ReadyEventSample.cpp index 33fb6b4d3..ec264e74d 100644 --- a/Samples/ReadyEvent/ReadyEventSample.cpp +++ b/Samples/ReadyEvent/ReadyEventSample.cpp @@ -18,13 +18,13 @@ #include #include "mafianet/GetTime.h" #include "mafianet/Rand.h" -#include "mafianet/RakPeerInterface.h" +#include "mafianet/PeerInterface.h" #include "mafianet/MessageIdentifiers.h" #include "mafianet/ReadyEvent.h" #include #include // used for std::numeric_limits #include "mafianet/Kbhit.h" -#include "mafianet/RakSleep.h" +#include "mafianet/Sleep.h" #include "mafianet/SocketLayer.h" #include "mafianet/FullyConnectedMesh2.h" #include "mafianet/ConnectionGraph2.h" diff --git a/Samples/RelayPluginTest/main.cpp b/Samples/RelayPluginTest/main.cpp index 96f2d1e8f..178ce9b1d 100644 --- a/Samples/RelayPluginTest/main.cpp +++ b/Samples/RelayPluginTest/main.cpp @@ -13,8 +13,8 @@ * license found in the license.txt file in the root directory of this source tree. */ -#include "mafianet/RakPeerInterface.h" -#include "mafianet/RakSleep.h" +#include "mafianet/PeerInterface.h" +#include "mafianet/Sleep.h" #include "mafianet/RelayPlugin.h" #include "mafianet/Gets.h" #include "mafianet/Kbhit.h" diff --git a/Samples/ReliableOrderedTest/ReliableOrderedTest.cpp b/Samples/ReliableOrderedTest/ReliableOrderedTest.cpp index 2a027f49e..f32df0bfc 100644 --- a/Samples/ReliableOrderedTest/ReliableOrderedTest.cpp +++ b/Samples/ReliableOrderedTest/ReliableOrderedTest.cpp @@ -13,7 +13,7 @@ * license found in the license.txt file in the root directory of this source tree. */ -#include "mafianet/RakPeerInterface.h" +#include "mafianet/PeerInterface.h" #include "mafianet/GetTime.h" #include "mafianet/MessageIdentifiers.h" #include "mafianet/BitStream.h" @@ -22,9 +22,9 @@ #include #include #include "mafianet/Rand.h" -#include "mafianet/RakNetStatistics.h" -#include "mafianet/RakSleep.h" -#include "mafianet/RakMemoryOverride.h" +#include "mafianet/Statistics.h" +#include "mafianet/Sleep.h" +#include "mafianet/MemoryOverride.h" #include #include // used for std::numeric_limits #include "mafianet/Gets.h" diff --git a/Samples/ReplicaManager3/main.cpp b/Samples/ReplicaManager3/main.cpp index f5004ed1b..bedf7a572 100644 --- a/Samples/ReplicaManager3/main.cpp +++ b/Samples/ReplicaManager3/main.cpp @@ -16,7 +16,7 @@ // Demonstrates ReplicaManager 3: A system to automatically create, destroy, and serialize objects #include "mafianet/StringTable.h" -#include "mafianet/RakPeerInterface.h" +#include "mafianet/PeerInterface.h" #include #include "mafianet/Kbhit.h" @@ -25,9 +25,9 @@ #include "mafianet/MessageIdentifiers.h" #include "mafianet/ReplicaManager3.h" #include "mafianet/NetworkIDManager.h" -#include "mafianet/RakSleep.h" +#include "mafianet/Sleep.h" #include "mafianet/FormatString.h" -#include "mafianet/RakString.h" +#include "mafianet/String.h" #include "mafianet/GetTime.h" #include "mafianet/SocketLayer.h" #include "mafianet/Getche.h" diff --git a/Samples/ReplicatedLogin/ReplicatedLogin.cpp b/Samples/ReplicatedLogin/ReplicatedLogin.cpp index e6255750d..ef83dcbae 100644 --- a/Samples/ReplicatedLogin/ReplicatedLogin.cpp +++ b/Samples/ReplicatedLogin/ReplicatedLogin.cpp @@ -13,15 +13,15 @@ * license found in the license.txt file in the root directory of this source tree. */ -#include "mafianet/RakPeerInterface.h" +#include "mafianet/PeerInterface.h" #include "mafianet/BitStream.h" #include "mafianet/GetTime.h" -#include "mafianet/RakSleep.h" +#include "mafianet/Sleep.h" #include "mafianet/Gets.h" #include "mafianet/MessageIdentifiers.h" #include "mafianet/Kbhit.h" #include "mafianet/ReplicaManager3.h" -#include "mafianet/RakPeerInterface.h" +#include "mafianet/PeerInterface.h" #include "mafianet/NetworkIDManager.h" #include "mafianet/GuidUtil.h" diff --git a/Samples/Rooms/RoomsSample.cpp b/Samples/Rooms/RoomsSample.cpp index 70e047036..07565db48 100644 --- a/Samples/Rooms/RoomsSample.cpp +++ b/Samples/Rooms/RoomsSample.cpp @@ -14,7 +14,7 @@ */ #include "RoomsPlugin.h" -#include "mafianet/RakPeerInterface.h" +#include "mafianet/PeerInterface.h" #include "ProfanityFilter.h" #include "mafianet/MessageIdentifiers.h" diff --git a/Samples/RoomsBrowserGFx3/RakNet/RoomsBrowserGFx3_RakNet.h b/Samples/RoomsBrowserGFx3/RakNet/RoomsBrowserGFx3_RakNet.h index 0e19a9ac9..247aebfb8 100644 --- a/Samples/RoomsBrowserGFx3/RakNet/RoomsBrowserGFx3_RakNet.h +++ b/Samples/RoomsBrowserGFx3/RakNet/RoomsBrowserGFx3_RakNet.h @@ -17,7 +17,7 @@ #define __ROOMS_BROWSER_GFX3_RAKNET #include "mafianet/WindowsIncludes.h" -#include "mafianet/RakNetTypes.h" +#include "mafianet/Types.h" #include "Lobby2Message.h" #include "mafianet/PluginInterface2.h" #include "RoomsBrowserGFx3.h" diff --git a/Samples/RoomsBrowserGFx3/RoomsBrowserGFx3.h b/Samples/RoomsBrowserGFx3/RoomsBrowserGFx3.h index b4a1fbb9c..b9b31fe19 100644 --- a/Samples/RoomsBrowserGFx3/RoomsBrowserGFx3.h +++ b/Samples/RoomsBrowserGFx3/RoomsBrowserGFx3.h @@ -15,7 +15,7 @@ #include "mafianet/WindowsIncludes.h" #include "FxGameDelegate.h" -#include "mafianet/RakString.h" +#include "mafianet/String.h" #define ACTIONSCRIPT_CALLABLE_HEADER(functionName) virtual void functionName(const FxDelegateArgs& pparams); #define ACTIONSCRIPT_CALLABLE_FUNCTION(className, functionName) \ diff --git a/Samples/Router2/Router2Sample.cpp b/Samples/Router2/Router2Sample.cpp index 7cd2ff469..6f2500fc4 100644 --- a/Samples/Router2/Router2Sample.cpp +++ b/Samples/Router2/Router2Sample.cpp @@ -13,7 +13,7 @@ * license found in the license.txt file in the root directory of this source tree. */ -#include "mafianet/RakPeerInterface.h" +#include "mafianet/PeerInterface.h" #include #include "mafianet/Kbhit.h" #include @@ -22,10 +22,10 @@ #include "mafianet/BitStream.h" #include "mafianet/MessageIdentifiers.h" #include "mafianet/Router2.h" -#include "mafianet/RakSleep.h" +#include "mafianet/Sleep.h" #include "mafianet/GetTime.h" #include "mafianet/Rand.h" -#include "mafianet/RakAssert.h" +#include "mafianet/Assert.h" #include "mafianet/SocketLayer.h" #include "mafianet/Getche.h" #include "mafianet/Gets.h" diff --git a/Samples/ServerClientTest2/ServerClientTest2.cpp b/Samples/ServerClientTest2/ServerClientTest2.cpp index 98685c1c0..6e6732783 100644 --- a/Samples/ServerClientTest2/ServerClientTest2.cpp +++ b/Samples/ServerClientTest2/ServerClientTest2.cpp @@ -13,19 +13,19 @@ * license found in the license.txt file in the root directory of this source tree. */ -#include "mafianet/RakPeerInterface.h" +#include "mafianet/PeerInterface.h" #include "mafianet/BitStream.h" #include // For atoi #include // For strlen #include "mafianet/Rand.h" -#include "mafianet/RakNetStatistics.h" +#include "mafianet/Statistics.h" #include "mafianet/MessageIdentifiers.h" #include #include "mafianet/Kbhit.h" #include "mafianet/GetTime.h" -#include "mafianet/RakAssert.h" -#include "mafianet/RakSleep.h" +#include "mafianet/Assert.h" +#include "mafianet/Sleep.h" #include "mafianet/Gets.h" #include "mafianet/LinuxAdapter.h" #include "mafianet/OsxAdapter.h" diff --git a/Samples/StatisticsHistoryTest/StatisticsHistoryTest.cpp b/Samples/StatisticsHistoryTest/StatisticsHistoryTest.cpp index ba149c8ad..50545cc0b 100644 --- a/Samples/StatisticsHistoryTest/StatisticsHistoryTest.cpp +++ b/Samples/StatisticsHistoryTest/StatisticsHistoryTest.cpp @@ -20,11 +20,11 @@ #include #include #include "mafianet/GetTime.h" -#include "mafianet/RakPeerInterface.h" +#include "mafianet/PeerInterface.h" #include "mafianet/MessageIdentifiers.h" #include "mafianet/StatisticsHistory.h" #include -#include "mafianet/RakSleep.h" +#include "mafianet/Sleep.h" using namespace MafiaNet; diff --git a/Samples/SteamLobby/main.cpp b/Samples/SteamLobby/main.cpp index 3d5613d75..c7d069e59 100644 --- a/Samples/SteamLobby/main.cpp +++ b/Samples/SteamLobby/main.cpp @@ -17,10 +17,10 @@ #include #include "Lobby2Client_Steam.h" // If Lobby2Client_Steam.h is included before SocketLayer.h, then it will use the steam send functions #include "Lobby2Message_Steam.h" -#include "mafianet/RakNetTime.h" -#include "mafianet/RakSleep.h" -#include "mafianet/RakNetTypes.h" -#include "mafianet/RakPeerInterface.h" +#include "mafianet/Time.h" +#include "mafianet/Sleep.h" +#include "mafianet/Types.h" +#include "mafianet/PeerInterface.h" #include "mafianet/GetTime.h" #include "mafianet/MessageIdentifiers.h" #include diff --git a/Samples/TeamManager/TeamManagerTest.cpp b/Samples/TeamManager/TeamManagerTest.cpp index a106567aa..a87ff0fc1 100644 --- a/Samples/TeamManager/TeamManagerTest.cpp +++ b/Samples/TeamManager/TeamManagerTest.cpp @@ -18,13 +18,13 @@ #include #include "mafianet/GetTime.h" #include "mafianet/Rand.h" -#include "mafianet/RakPeerInterface.h" +#include "mafianet/PeerInterface.h" #include "mafianet/MessageIdentifiers.h" #include "mafianet/FullyConnectedMesh2.h" #include "mafianet/TeamManager.h" #include "mafianet/Kbhit.h" -#include "mafianet/RakSleep.h" -#include "mafianet/RakNetTypes.h" +#include "mafianet/Sleep.h" +#include "mafianet/Types.h" #include "mafianet/BitStream.h" #include "mafianet/SocketLayer.h" #include "mafianet/ReplicaManager3.h" diff --git a/Samples/TestDLL/main.cpp b/Samples/TestDLL/main.cpp index 3aed361bc..a31133095 100644 --- a/Samples/TestDLL/main.cpp +++ b/Samples/TestDLL/main.cpp @@ -13,16 +13,16 @@ * license found in the license.txt file in the root directory of this source tree. */ -#include "mafianet/RakPeerInterface.h" +#include "mafianet/PeerInterface.h" #include "mafianet/FileOperations.h" -#include "mafianet/RakMemoryOverride.h" +#include "mafianet/MemoryOverride.h" #include "mafianet/ConsoleServer.h" #include "mafianet/LogCommandParser.h" -#include "mafianet/RakNetCommandParser.h" +#include "mafianet/CommandParser.h" #include "mafianet/PacketLogger.h" #include "mafianet/DS_List.h" #include "mafianet/SocketLayer.h" -#include "mafianet/RakSleep.h" +#include "mafianet/Sleep.h" #include "mafianet/TCPInterface.h" using namespace MafiaNet; diff --git a/Samples/ThreadTest/ThreadTest.cpp b/Samples/ThreadTest/ThreadTest.cpp index db42a06fd..97b9836cf 100644 --- a/Samples/ThreadTest/ThreadTest.cpp +++ b/Samples/ThreadTest/ThreadTest.cpp @@ -17,17 +17,17 @@ /// \brief Tests multiple readers and writers on the same instance of RakPeer. -#include "mafianet/RakPeerInterface.h" +#include "mafianet/PeerInterface.h" #include "mafianet/GetTime.h" -#include "mafianet/RakNetStatistics.h" +#include "mafianet/Statistics.h" #include "mafianet/MessageIdentifiers.h" #include "mafianet/Kbhit.h" #include // Printf #include "mafianet/WindowsIncludes.h" // Sleep //#include -#include "mafianet/RakThread.h" -#include "mafianet/RakSleep.h" +#include "mafianet/Thread.h" +#include "mafianet/Sleep.h" using namespace MafiaNet; RakPeerInterface *peer1, *peer2; diff --git a/Samples/Timestamping/Timestamping.cpp b/Samples/Timestamping/Timestamping.cpp index a244e2483..164af32cd 100644 --- a/Samples/Timestamping/Timestamping.cpp +++ b/Samples/Timestamping/Timestamping.cpp @@ -13,12 +13,12 @@ * license found in the license.txt file in the root directory of this source tree. */ -#include "mafianet/RakPeerInterface.h" +#include "mafianet/PeerInterface.h" #include "mafianet/BitStream.h" #include "mafianet/MessageIdentifiers.h" #include "mafianet/GetTime.h" -#include "mafianet/RakSleep.h" +#include "mafianet/Sleep.h" using namespace MafiaNet; #include diff --git a/Samples/TwoWayAuthentication/TwoWayAuthenticationTest.cpp b/Samples/TwoWayAuthentication/TwoWayAuthenticationTest.cpp index a1ff12e12..8bcab783d 100644 --- a/Samples/TwoWayAuthentication/TwoWayAuthenticationTest.cpp +++ b/Samples/TwoWayAuthentication/TwoWayAuthenticationTest.cpp @@ -18,11 +18,11 @@ #include #include "mafianet/GetTime.h" #include "mafianet/Rand.h" -#include "mafianet/RakPeerInterface.h" +#include "mafianet/PeerInterface.h" #include "mafianet/MessageIdentifiers.h" #include "mafianet/BitStream.h" #include "mafianet/TwoWayAuthentication.h" -#include "mafianet/RakSleep.h" +#include "mafianet/Sleep.h" static const int NUM_PEERS=2; MafiaNet::RakPeerInterface *rakPeer[NUM_PEERS]; diff --git a/Samples/UDPForwarder/main.cpp b/Samples/UDPForwarder/main.cpp index 79dfbd9ea..cb5c8f72e 100644 --- a/Samples/UDPForwarder/main.cpp +++ b/Samples/UDPForwarder/main.cpp @@ -13,8 +13,8 @@ * license found in the license.txt file in the root directory of this source tree. */ -#include "mafianet/RakPeerInterface.h" -#include "mafianet/RakSleep.h" +#include "mafianet/PeerInterface.h" +#include "mafianet/Sleep.h" #include #include @@ -22,7 +22,7 @@ #include "mafianet/Kbhit.h" #include "mafianet/MessageIdentifiers.h" #include "mafianet/BitStream.h" -#include "mafianet/RakSleep.h" +#include "mafianet/Sleep.h" #include "mafianet/UDPForwarder.h" #include "mafianet/SocketLayer.h" diff --git a/Samples/VirtualWorld/main.cpp b/Samples/VirtualWorld/main.cpp index 174e0fa3f..d1b28f26a 100644 --- a/Samples/VirtualWorld/main.cpp +++ b/Samples/VirtualWorld/main.cpp @@ -27,14 +27,14 @@ // The sample is non-interactive: it drives the peers, prints what each client // sees at each step, and returns 0 only if visibility matched expectations. -#include "mafianet/RakPeerInterface.h" +#include "mafianet/PeerInterface.h" #include "mafianet/ReplicaManager3.h" #include "mafianet/VirtualWorld.h" #include "mafianet/VirtualWorldReplica3.h" #include "mafianet/NetworkIDManager.h" #include "mafianet/BitStream.h" #include "mafianet/MessageIdentifiers.h" -#include "mafianet/RakSleep.h" +#include "mafianet/Sleep.h" #include diff --git a/Samples/iOS/ChatClient/ChatClient/ViewController.h b/Samples/iOS/ChatClient/ChatClient/ViewController.h index 5ed1fba97..0d34efa6c 100644 --- a/Samples/iOS/ChatClient/ChatClient/ViewController.h +++ b/Samples/iOS/ChatClient/ChatClient/ViewController.h @@ -16,16 +16,16 @@ // RakNet headers #include "mafianet/MessageIdentifiers.h" -#include "mafianet/RakPeerInterface.h" -#include "mafianet/RakNetStatistics.h" -#include "mafianet/RakNetTypes.h" +#include "mafianet/PeerInterface.h" +#include "mafianet/Statistics.h" +#include "mafianet/Types.h" #include "mafianet/BitStream.h" #include "mafianet/PacketLogger.h" #include #include #include #include -#include "mafianet/RakNetTypes.h" +#include "mafianet/Types.h" // For simplicity, this sample doesn't support secure connections #if LIBCAT_SECURITY==1 diff --git a/Source/CMakeLists.txt b/Source/CMakeLists.txt index 90b89ec61..9611da9d7 100644 --- a/Source/CMakeLists.txt +++ b/Source/CMakeLists.txt @@ -134,8 +134,8 @@ set(MAFIANET_CRYPTO_SOURCES set(MAFIANET_HEADERS include/mafianet/_FindFirst.h - include/mafianet/RakAlloca.h - include/mafianet/RakAssert.h + include/mafianet/Alloca.h + include/mafianet/Assert.h include/mafianet/AutopatcherPatchContext.h include/mafianet/AutopatcherRepositoryInterface.h include/mafianet/Base64Encoder.h @@ -146,13 +146,13 @@ set(MAFIANET_HEADERS include/mafianet/CloudClient.h include/mafianet/CloudCommon.h include/mafianet/CloudServer.h - include/mafianet/RakNetCommandParser.h + include/mafianet/CommandParser.h include/mafianet/CommandParserInterface.h include/mafianet/ConnectionGraph2.h include/mafianet/ConsoleServer.h include/mafianet/DataCompressor.h - include/mafianet/RakNetDefinesOverrides.h - include/mafianet/RakNetDefines.h + include/mafianet/DefineOverrides.h + include/mafianet/Defines.h include/mafianet/DirectoryDeltaTransfer.h include/mafianet/DR_SHA1.h include/mafianet/DS_BinarySearchTree.h @@ -206,7 +206,7 @@ set(MAFIANET_HEADERS include/mafianet/LinuxStrings.h include/mafianet/LocklessTypes.h include/mafianet/LogCommandParser.h - include/mafianet/RakMemoryOverride.h + include/mafianet/MemoryOverride.h include/mafianet/MessageFilter.h include/mafianet/MessageIdentifiers.h include/mafianet/MmsgBatch.h @@ -231,8 +231,8 @@ set(MAFIANET_HEADERS include/mafianet/PacketPool.h include/mafianet/PacketPriority.h include/mafianet/PeerHandle.h - include/mafianet/RakPeer.h - include/mafianet/RakPeerInterface.h + include/mafianet/Peer.h + include/mafianet/PeerInterface.h include/mafianet/PluginInterface2.h include/mafianet/PointGridSectorizer.h include/mafianet/Rackspace.h @@ -253,16 +253,16 @@ set(MAFIANET_HEADERS include/mafianet/SimpleMutex.h include/mafianet/SimpleTCPServer.h include/mafianet/SingleProducerConsumer.h - include/mafianet/RakSleep.h + include/mafianet/Sleep.h include/mafianet/mafianet.h - include/mafianet/RakNetSmartPtr.h - include/mafianet/RakNetSocket2.h + include/mafianet/SmartPtr.h + include/mafianet/Socket2.h include/mafianet/SocketDefines.h include/mafianet/SocketIncludes.h include/mafianet/SocketLayer.h - include/mafianet/RakNetStatistics.h + include/mafianet/Statistics.h include/mafianet/StatisticsHistory.h - include/mafianet/RakString.h + include/mafianet/String.h include/mafianet/StringCompressor.h include/mafianet/StringTable.h include/mafianet/SuperFastHash.h @@ -271,14 +271,14 @@ set(MAFIANET_HEADERS include/mafianet/TeamBalancer.h include/mafianet/TeamManager.h include/mafianet/TelnetTransport.h - include/mafianet/RakThread.h + include/mafianet/Thread.h include/mafianet/ThreadPool.h include/mafianet/ThreadsafePacketLogger.h - include/mafianet/RakNetTime.h - include/mafianet/RakNetTransport2.h + include/mafianet/Time.h + include/mafianet/Transport2.h include/mafianet/TransportInterface.h include/mafianet/TwoWayAuthentication.h - include/mafianet/RakNetTypes.h + include/mafianet/Types.h include/mafianet/UDPForwarder.h include/mafianet/UDPProxyClient.h include/mafianet/UDPProxyCommon.h @@ -292,32 +292,14 @@ set(MAFIANET_HEADERS include/mafianet/VirtualWorldReplica3.h include/mafianet/WindowsIncludes.h include/mafianet/WSAStartupSingleton.h - include/mafianet/RakWString.h + include/mafianet/WString.h ) # Deprecated lowercase forwarding headers (one release cycle, see docs/changelog.rst) set(MAFIANET_DEPRECATED_HEADERS - include/mafianet/alloca.h - include/mafianet/assert.h - include/mafianet/commandparser.h - include/mafianet/defineoverrides.h - include/mafianet/defines.h include/mafianet/guid_util.h include/mafianet/linux_adapter.h - include/mafianet/memoryoverride.h include/mafianet/osx_adapter.h - include/mafianet/peer.h - include/mafianet/peerinterface.h - include/mafianet/sleep.h - include/mafianet/smartptr.h - include/mafianet/socket2.h - include/mafianet/statistics.h - include/mafianet/string.h - include/mafianet/thread.h - include/mafianet/time.h - include/mafianet/transport2.h - include/mafianet/types.h - include/mafianet/wstring.h ) set(MAFIANET_CRYPTO_HEADERS diff --git a/Source/include/mafianet/Aliases.h b/Source/include/mafianet/Aliases.h index fd0c7c965..0819068fd 100644 --- a/Source/include/mafianet/Aliases.h +++ b/Source/include/mafianet/Aliases.h @@ -23,9 +23,9 @@ #pragma once -#include "mafianet/RakPeerInterface.h" // RakPeerInterface -#include "mafianet/RakNetTypes.h" // RakNetGUID, UNASSIGNED_RAKNET_GUID -#include "mafianet/RakNetStatistics.h" // RakNetStatistics +#include "mafianet/PeerInterface.h" // RakPeerInterface +#include "mafianet/Types.h" // RakNetGUID, UNASSIGNED_RAKNET_GUID +#include "mafianet/Statistics.h" // RakNetStatistics namespace MafiaNet { diff --git a/Source/include/mafianet/RakAlloca.h b/Source/include/mafianet/Alloca.h similarity index 100% rename from Source/include/mafianet/RakAlloca.h rename to Source/include/mafianet/Alloca.h diff --git a/Source/include/mafianet/RakAssert.h b/Source/include/mafianet/Assert.h similarity index 93% rename from Source/include/mafianet/RakAssert.h rename to Source/include/mafianet/Assert.h index 61198ac92..631f9c1b7 100644 --- a/Source/include/mafianet/RakAssert.h +++ b/Source/include/mafianet/Assert.h @@ -14,4 +14,4 @@ */ #include -#include "RakNetDefines.h" +#include "Defines.h" diff --git a/Source/include/mafianet/BitStream.h b/Source/include/mafianet/BitStream.h index 5a5c2f65e..744d6ab24 100644 --- a/Source/include/mafianet/BitStream.h +++ b/Source/include/mafianet/BitStream.h @@ -21,13 +21,13 @@ #ifndef __BITSTREAM_H #define __BITSTREAM_H -#include "RakMemoryOverride.h" -#include "RakNetDefines.h" +#include "MemoryOverride.h" +#include "Defines.h" #include "Export.h" -#include "RakNetTypes.h" -#include "RakString.h" -#include "RakWString.h" -#include "RakAssert.h" +#include "Types.h" +#include "String.h" +#include "WString.h" +#include "Assert.h" #include #include #include diff --git a/Source/include/mafianet/CCRakNetSlidingWindow.h b/Source/include/mafianet/CCRakNetSlidingWindow.h index b2a8330e3..8c6741441 100644 --- a/Source/include/mafianet/CCRakNetSlidingWindow.h +++ b/Source/include/mafianet/CCRakNetSlidingWindow.h @@ -40,7 +40,7 @@ else use congestion avoidance */ -#include "RakNetDefines.h" +#include "Defines.h" #if USE_SLIDING_WINDOW_CONGESTION_CONTROL==1 @@ -48,8 +48,8 @@ else use congestion avoidance #define __CONGESTION_CONTROL_SLIDING_WINDOW_H #include "NativeTypes.h" -#include "RakNetTime.h" -#include "RakNetTypes.h" +#include "Time.h" +#include "Types.h" #include "DS_Queue.h" /// Sizeof an UDP header in byte diff --git a/Source/include/mafianet/CCRakNetUDT.h b/Source/include/mafianet/CCRakNetUDT.h index 40d4071f9..4eff8b07b 100644 --- a/Source/include/mafianet/CCRakNetUDT.h +++ b/Source/include/mafianet/CCRakNetUDT.h @@ -13,7 +13,7 @@ * license found in the license.txt file in the root directory of this source tree. */ -#include "RakNetDefines.h" +#include "Defines.h" #if USE_SLIDING_WINDOW_CONGESTION_CONTROL!=1 @@ -21,8 +21,8 @@ #define __CONGESTION_CONTROL_UDT_H #include "NativeTypes.h" -#include "RakNetTime.h" -#include "RakNetTypes.h" +#include "Time.h" +#include "Types.h" #include "DS_Queue.h" /// Set to 4 if you are using the iPod Touch TG. See http://www.jenkinssoftware.com/forum/index.php?topic=2717.0 diff --git a/Source/include/mafianet/CheckSum.h b/Source/include/mafianet/CheckSum.h index 214bf5b98..73d9c119a 100644 --- a/Source/include/mafianet/CheckSum.h +++ b/Source/include/mafianet/CheckSum.h @@ -21,7 +21,7 @@ #ifndef __CHECKSUM_H #define __CHECKSUM_H -#include "RakMemoryOverride.h" +#include "MemoryOverride.h" /// Generates and validates checksums class CheckSum diff --git a/Source/include/mafianet/CloudClient.h b/Source/include/mafianet/CloudClient.h index 95680eb53..2734232f7 100644 --- a/Source/include/mafianet/CloudClient.h +++ b/Source/include/mafianet/CloudClient.h @@ -26,7 +26,7 @@ #include "PluginInterface2.h" #include "CloudCommon.h" -#include "RakMemoryOverride.h" +#include "MemoryOverride.h" #include "DS_Hash.h" namespace MafiaNet diff --git a/Source/include/mafianet/CloudCommon.h b/Source/include/mafianet/CloudCommon.h index 0a1f7b1dd..cb746a26b 100644 --- a/Source/include/mafianet/CloudCommon.h +++ b/Source/include/mafianet/CloudCommon.h @@ -19,8 +19,8 @@ #ifndef __CLOUD_COMMON_H #define __CLOUD_COMMON_H -#include "RakNetTypes.h" -#include "RakString.h" +#include "Types.h" +#include "String.h" namespace MafiaNet { diff --git a/Source/include/mafianet/CloudServer.h b/Source/include/mafianet/CloudServer.h index 558cdb065..407ff93f9 100644 --- a/Source/include/mafianet/CloudServer.h +++ b/Source/include/mafianet/CloudServer.h @@ -26,9 +26,9 @@ #define __CLOUD_SERVER_H #include "PluginInterface2.h" -#include "RakMemoryOverride.h" +#include "MemoryOverride.h" #include "NativeTypes.h" -#include "RakString.h" +#include "String.h" #include "DS_Hash.h" #include "CloudCommon.h" #include "DS_OrderedList.h" diff --git a/Source/include/mafianet/RakNetCommandParser.h b/Source/include/mafianet/CommandParser.h similarity index 100% rename from Source/include/mafianet/RakNetCommandParser.h rename to Source/include/mafianet/CommandParser.h diff --git a/Source/include/mafianet/CommandParserInterface.h b/Source/include/mafianet/CommandParserInterface.h index 1496a3af2..630b4c357 100644 --- a/Source/include/mafianet/CommandParserInterface.h +++ b/Source/include/mafianet/CommandParserInterface.h @@ -21,8 +21,8 @@ #ifndef __COMMAND_PARSER_INTERFACE #define __COMMAND_PARSER_INTERFACE -#include "RakMemoryOverride.h" -#include "RakNetTypes.h" +#include "MemoryOverride.h" +#include "Types.h" #include "DS_OrderedList.h" #include "Export.h" diff --git a/Source/include/mafianet/ConnectionGraph2.h b/Source/include/mafianet/ConnectionGraph2.h index 0f3c6ffd0..599d06901 100644 --- a/Source/include/mafianet/ConnectionGraph2.h +++ b/Source/include/mafianet/ConnectionGraph2.h @@ -24,8 +24,8 @@ #ifndef __CONNECTION_GRAPH_2_H #define __CONNECTION_GRAPH_2_H -#include "RakMemoryOverride.h" -#include "RakNetTypes.h" +#include "MemoryOverride.h" +#include "Types.h" #include "PluginInterface2.h" #include "DS_List.h" #include "DS_WeightedGraph.h" diff --git a/Source/include/mafianet/ConsoleServer.h b/Source/include/mafianet/ConsoleServer.h index 12792c42e..a0dd9b231 100644 --- a/Source/include/mafianet/ConsoleServer.h +++ b/Source/include/mafianet/ConsoleServer.h @@ -24,9 +24,9 @@ #ifndef __CONSOLE_SERVER_H #define __CONSOLE_SERVER_H -#include "RakMemoryOverride.h" +#include "MemoryOverride.h" #include "DS_List.h" -#include "RakNetTypes.h" +#include "Types.h" #include "Export.h" namespace MafiaNet diff --git a/Source/include/mafianet/DR_SHA1.h b/Source/include/mafianet/DR_SHA1.h index 7bf5d60ab..8ed7cf684 100644 --- a/Source/include/mafianet/DR_SHA1.h +++ b/Source/include/mafianet/DR_SHA1.h @@ -116,7 +116,7 @@ #define SHA1_H_A545E61D43E9404E8D736869AB3CBFE7 // KevinJ: -#include "RakMemoryOverride.h" +#include "MemoryOverride.h" #include // Needed for file access #include // Needed for memset and memcpy diff --git a/Source/include/mafianet/DS_BPlusTree.h b/Source/include/mafianet/DS_BPlusTree.h index 92e917f38..59712eac3 100644 --- a/Source/include/mafianet/DS_BPlusTree.h +++ b/Source/include/mafianet/DS_BPlusTree.h @@ -38,7 +38,7 @@ #pragma warning( push ) #endif -#include "RakMemoryOverride.h" +#include "MemoryOverride.h" /// The namespace DataStructures was only added to avoid compiler errors for commonly named data structures /// As these data structures are stand-alone, you can use them outside of RakNet for your own projects if you wish. diff --git a/Source/include/mafianet/DS_BinarySearchTree.h b/Source/include/mafianet/DS_BinarySearchTree.h index ff40c423a..74eeca29c 100644 --- a/Source/include/mafianet/DS_BinarySearchTree.h +++ b/Source/include/mafianet/DS_BinarySearchTree.h @@ -30,7 +30,7 @@ #define __BINARY_SEARCH_TREE_H #include "DS_QueueLinkedList.h" -#include "RakMemoryOverride.h" +#include "MemoryOverride.h" #include "Export.h" diff --git a/Source/include/mafianet/DS_BytePool.h b/Source/include/mafianet/DS_BytePool.h index ca3e98081..2a81797ba 100644 --- a/Source/include/mafianet/DS_BytePool.h +++ b/Source/include/mafianet/DS_BytePool.h @@ -27,11 +27,11 @@ #ifndef __BYTE_POOL_H #define __BYTE_POOL_H -#include "RakMemoryOverride.h" +#include "MemoryOverride.h" #include "DS_MemoryPool.h" #include "Export.h" #include "SimpleMutex.h" -#include "RakAssert.h" +#include "Assert.h" // #define _DISABLE_BYTE_POOL // #define _THREADSAFE_BYTE_POOL diff --git a/Source/include/mafianet/DS_ByteQueue.h b/Source/include/mafianet/DS_ByteQueue.h index 32c1de725..7bd63d221 100644 --- a/Source/include/mafianet/DS_ByteQueue.h +++ b/Source/include/mafianet/DS_ByteQueue.h @@ -22,7 +22,7 @@ #ifndef __BYTE_QUEUE_H #define __BYTE_QUEUE_H -#include "RakMemoryOverride.h" +#include "MemoryOverride.h" #include "Export.h" /// The namespace DataStructures was only added to avoid compiler errors for commonly named data structures diff --git a/Source/include/mafianet/DS_Hash.h b/Source/include/mafianet/DS_Hash.h index 67eb58dfd..bac6ac3e1 100644 --- a/Source/include/mafianet/DS_Hash.h +++ b/Source/include/mafianet/DS_Hash.h @@ -21,11 +21,11 @@ #ifndef __HASH_H #define __HASH_H -#include "RakAssert.h" +#include "Assert.h" #include // memmove #include "Export.h" -#include "RakMemoryOverride.h" -#include "RakString.h" +#include "MemoryOverride.h" +#include "String.h" /// The namespace DataStructures was only added to avoid compiler errors for commonly named data structures /// As these data structures are stand-alone, you can use them outside of RakNet for your own projects if you wish. diff --git a/Source/include/mafianet/DS_Heap.h b/Source/include/mafianet/DS_Heap.h index bb25d1ec3..4e863f62c 100644 --- a/Source/include/mafianet/DS_Heap.h +++ b/Source/include/mafianet/DS_Heap.h @@ -23,10 +23,10 @@ #ifndef __RAKNET_HEAP_H #define __RAKNET_HEAP_H -#include "RakMemoryOverride.h" +#include "MemoryOverride.h" #include "DS_List.h" #include "Export.h" -#include "RakAssert.h" +#include "Assert.h" #ifdef _MSC_VER #pragma warning( push ) diff --git a/Source/include/mafianet/DS_HuffmanEncodingTree.h b/Source/include/mafianet/DS_HuffmanEncodingTree.h index 8e3ad6697..fa2160105 100644 --- a/Source/include/mafianet/DS_HuffmanEncodingTree.h +++ b/Source/include/mafianet/DS_HuffmanEncodingTree.h @@ -21,7 +21,7 @@ #ifndef __HUFFMAN_ENCODING_TREE #define __HUFFMAN_ENCODING_TREE -#include "RakMemoryOverride.h" +#include "MemoryOverride.h" #include "DS_HuffmanEncodingTreeNode.h" #include "BitStream.h" #include "Export.h" diff --git a/Source/include/mafianet/DS_HuffmanEncodingTreeFactory.h b/Source/include/mafianet/DS_HuffmanEncodingTreeFactory.h index 632038078..8d8872d40 100644 --- a/Source/include/mafianet/DS_HuffmanEncodingTreeFactory.h +++ b/Source/include/mafianet/DS_HuffmanEncodingTreeFactory.h @@ -29,7 +29,7 @@ #ifndef __HUFFMAN_ENCODING_TREE_FACTORY #define __HUFFMAN_ENCODING_TREE_FACTORY -#include "RakMemoryOverride.h" +#include "MemoryOverride.h" namespace MafiaNet { /// Forward declarations diff --git a/Source/include/mafianet/DS_LinkedList.h b/Source/include/mafianet/DS_LinkedList.h index e5523591a..f974128a9 100644 --- a/Source/include/mafianet/DS_LinkedList.h +++ b/Source/include/mafianet/DS_LinkedList.h @@ -23,7 +23,7 @@ #define __LINKED_LIST_H #include "Export.h" -#include "RakMemoryOverride.h" +#include "MemoryOverride.h" /// The namespace DataStructures was only added to avoid compiler errors for commonly named data structures /// As these data structures are stand-alone, you can use them outside of RakNet for your own projects if you wish. diff --git a/Source/include/mafianet/DS_List.h b/Source/include/mafianet/DS_List.h index 92e9de6c7..40ac0a07c 100644 --- a/Source/include/mafianet/DS_List.h +++ b/Source/include/mafianet/DS_List.h @@ -23,10 +23,10 @@ #ifndef __LIST_H #define __LIST_H -#include "RakAssert.h" +#include "Assert.h" #include // memmove #include "Export.h" -#include "RakMemoryOverride.h" +#include "MemoryOverride.h" /// Maximum unsigned long static const unsigned int MAX_UNSIGNED_LONG = 4294967295U; diff --git a/Source/include/mafianet/DS_Map.h b/Source/include/mafianet/DS_Map.h index c8014fe39..f58cb7ee0 100644 --- a/Source/include/mafianet/DS_Map.h +++ b/Source/include/mafianet/DS_Map.h @@ -24,8 +24,8 @@ #include "DS_OrderedList.h" #include "Export.h" -#include "RakMemoryOverride.h" -#include "RakAssert.h" +#include "MemoryOverride.h" +#include "Assert.h" // If I want to change this to a red-black tree, this is a good site: http://www.cs.auckland.ac.nz/software/AlgAnim/red_black.html // This makes insertions and deletions faster. But then traversals are slow, while they are currently fast. diff --git a/Source/include/mafianet/DS_MemoryPool.h b/Source/include/mafianet/DS_MemoryPool.h index f3775a48e..2faadf29e 100644 --- a/Source/include/mafianet/DS_MemoryPool.h +++ b/Source/include/mafianet/DS_MemoryPool.h @@ -24,10 +24,10 @@ // Use stdlib and not malloc for compatibility #include #endif -#include "RakAssert.h" +#include "Assert.h" #include "Export.h" -#include "RakMemoryOverride.h" +#include "MemoryOverride.h" // DS_MEMORY_POOL_MAX_FREE_PAGES must be > 1 #define DS_MEMORY_POOL_MAX_FREE_PAGES 4 diff --git a/Source/include/mafianet/DS_Multilist.h b/Source/include/mafianet/DS_Multilist.h index 2e48a7e2b..e6d7790ba 100644 --- a/Source/include/mafianet/DS_Multilist.h +++ b/Source/include/mafianet/DS_Multilist.h @@ -21,10 +21,10 @@ #ifndef __MULTILIST_H #define __MULTILIST_H -#include "RakAssert.h" +#include "Assert.h" #include // memmove #include "Export.h" -#include "RakMemoryOverride.h" +#include "MemoryOverride.h" #include "NativeTypes.h" diff --git a/Source/include/mafianet/DS_OrderedChannelHeap.h b/Source/include/mafianet/DS_OrderedChannelHeap.h index e4e996001..5071f0bea 100644 --- a/Source/include/mafianet/DS_OrderedChannelHeap.h +++ b/Source/include/mafianet/DS_OrderedChannelHeap.h @@ -33,7 +33,7 @@ #include "DS_Map.h" #include "DS_Queue.h" #include "Export.h" -#include "RakAssert.h" +#include "Assert.h" #include "Rand.h" /// The namespace DataStructures was only added to avoid compiler errors for commonly named data structures diff --git a/Source/include/mafianet/DS_OrderedList.h b/Source/include/mafianet/DS_OrderedList.h index 349ea980a..7a2faf7b9 100644 --- a/Source/include/mafianet/DS_OrderedList.h +++ b/Source/include/mafianet/DS_OrderedList.h @@ -19,7 +19,7 @@ /// #include "DS_List.h" -#include "RakMemoryOverride.h" +#include "MemoryOverride.h" #include "Export.h" #ifndef __ORDERED_LIST_H diff --git a/Source/include/mafianet/DS_Queue.h b/Source/include/mafianet/DS_Queue.h index 9ecc4c01a..053c78913 100644 --- a/Source/include/mafianet/DS_Queue.h +++ b/Source/include/mafianet/DS_Queue.h @@ -23,9 +23,9 @@ #define __QUEUE_H // Template classes have to have all the code in the header file -#include "RakAssert.h" +#include "Assert.h" #include "Export.h" -#include "RakMemoryOverride.h" +#include "MemoryOverride.h" /// The namespace DataStructures was only added to avoid compiler errors for commonly named data structures /// As these data structures are stand-alone, you can use them outside of RakNet for your own projects if you wish. diff --git a/Source/include/mafianet/DS_QueueLinkedList.h b/Source/include/mafianet/DS_QueueLinkedList.h index 7590c063b..a822528ea 100644 --- a/Source/include/mafianet/DS_QueueLinkedList.h +++ b/Source/include/mafianet/DS_QueueLinkedList.h @@ -31,7 +31,7 @@ #include "DS_LinkedList.h" #include "Export.h" -#include "RakMemoryOverride.h" +#include "MemoryOverride.h" /// The namespace DataStructures was only added to avoid compiler errors for commonly named data structures /// As these data structures are stand-alone, you can use them outside of RakNet for your own projects if you wish. diff --git a/Source/include/mafianet/DS_RangeList.h b/Source/include/mafianet/DS_RangeList.h index b6dfc4920..375a7b5e2 100644 --- a/Source/include/mafianet/DS_RangeList.h +++ b/Source/include/mafianet/DS_RangeList.h @@ -24,8 +24,8 @@ #include "DS_OrderedList.h" #include "BitStream.h" -#include "RakMemoryOverride.h" -#include "RakAssert.h" +#include "MemoryOverride.h" +#include "Assert.h" namespace DataStructures { diff --git a/Source/include/mafianet/DS_Table.h b/Source/include/mafianet/DS_Table.h index bf8b1bbe1..46ab78dae 100644 --- a/Source/include/mafianet/DS_Table.h +++ b/Source/include/mafianet/DS_Table.h @@ -22,9 +22,9 @@ #include "DS_List.h" #include "DS_BPlusTree.h" -#include "RakMemoryOverride.h" +#include "MemoryOverride.h" #include "Export.h" -#include "RakString.h" +#include "String.h" #define _TABLE_BPLUS_TREE_ORDER 16 #define _TABLE_MAX_COLUMN_NAME_LENGTH 64 diff --git a/Source/include/mafianet/DS_Tree.h b/Source/include/mafianet/DS_Tree.h index ec8de8b13..4a53a34e8 100644 --- a/Source/include/mafianet/DS_Tree.h +++ b/Source/include/mafianet/DS_Tree.h @@ -26,7 +26,7 @@ #include "Export.h" #include "DS_List.h" #include "DS_Queue.h" -#include "RakMemoryOverride.h" +#include "MemoryOverride.h" /// The namespace DataStructures was only added to avoid compiler errors for commonly named data structures /// As these data structures are stand-alone, you can use them outside of RakNet for your own projects if you wish. diff --git a/Source/include/mafianet/DS_WeightedGraph.h b/Source/include/mafianet/DS_WeightedGraph.h index 9edc646bd..90ee7f7ca 100644 --- a/Source/include/mafianet/DS_WeightedGraph.h +++ b/Source/include/mafianet/DS_WeightedGraph.h @@ -28,8 +28,8 @@ #include "DS_Heap.h" #include "DS_Queue.h" #include "DS_Tree.h" -#include "RakAssert.h" -#include "RakMemoryOverride.h" +#include "Assert.h" +#include "MemoryOverride.h" #ifdef _DEBUG #include #endif diff --git a/Source/include/mafianet/DataCompressor.h b/Source/include/mafianet/DataCompressor.h index 2f4274dab..0e537be67 100644 --- a/Source/include/mafianet/DataCompressor.h +++ b/Source/include/mafianet/DataCompressor.h @@ -22,7 +22,7 @@ #ifndef __DATA_COMPRESSOR_H #define __DATA_COMPRESSOR_H -#include "RakMemoryOverride.h" +#include "MemoryOverride.h" #include "DS_HuffmanEncodingTree.h" #include "Export.h" diff --git a/Source/include/mafianet/RakNetDefinesOverrides.h b/Source/include/mafianet/DefineOverrides.h similarity index 100% rename from Source/include/mafianet/RakNetDefinesOverrides.h rename to Source/include/mafianet/DefineOverrides.h diff --git a/Source/include/mafianet/RakNetDefines.h b/Source/include/mafianet/Defines.h similarity index 97% rename from Source/include/mafianet/RakNetDefines.h rename to Source/include/mafianet/Defines.h index 57a3f9d45..c276156aa 100644 --- a/Source/include/mafianet/RakNetDefines.h +++ b/Source/include/mafianet/Defines.h @@ -23,7 +23,7 @@ // If you want to change these defines, put them in RakNetDefinesOverrides so your changes are not lost when updating RakNet // The user should not edit this file -#include "RakNetDefinesOverrides.h" +#include "DefineOverrides.h" /// Define __GET_TIME_64BIT to have MafiaNet::TimeMS use a 64, rather than 32 bit value. A 32 bit value will overflow after about 5 weeks. /// However, this doubles the bandwidth use for sending times, so don't do it unless you have a reason to. diff --git a/Source/include/mafianet/DirectoryDeltaTransfer.h b/Source/include/mafianet/DirectoryDeltaTransfer.h index 41b357c08..054a58c69 100644 --- a/Source/include/mafianet/DirectoryDeltaTransfer.h +++ b/Source/include/mafianet/DirectoryDeltaTransfer.h @@ -25,8 +25,8 @@ #ifndef __DIRECTORY_DELTA_TRANSFER_H #define __DIRECTORY_DELTA_TRANSFER_H -#include "RakMemoryOverride.h" -#include "RakNetTypes.h" +#include "MemoryOverride.h" +#include "Types.h" #include "Export.h" #include "PluginInterface2.h" #include "DS_Map.h" diff --git a/Source/include/mafianet/Dispatcher.h b/Source/include/mafianet/Dispatcher.h index 90781e882..8e481d847 100644 --- a/Source/include/mafianet/Dispatcher.h +++ b/Source/include/mafianet/Dispatcher.h @@ -55,8 +55,8 @@ #include "mafianet/MessageIdentifiers.h" // ID_TIMESTAMP, ID_USER_PACKET_ENUM #include "mafianet/PeerHandle.h" // PacketPtr #include "mafianet/GuidUtil.h" // MafiaNet::to_string (owning, thread-safe) -#include "mafianet/RakNetTime.h" // MafiaNet::Time (timestamp-prefix width) -#include "mafianet/RakNetTypes.h" // Packet, MessageID, RakNetGUID, SystemAddress, PeerGuid +#include "mafianet/Time.h" // MafiaNet::Time (timestamp-prefix width) +#include "mafianet/Types.h" // Packet, MessageID, RakNetGUID, SystemAddress, PeerGuid namespace MafiaNet { diff --git a/Source/include/mafianet/DynDNS.h b/Source/include/mafianet/DynDNS.h index 48b04afd7..34a3c6619 100644 --- a/Source/include/mafianet/DynDNS.h +++ b/Source/include/mafianet/DynDNS.h @@ -25,7 +25,7 @@ #ifndef __DYN_DNS_H #define __DYN_DNS_H -#include "RakString.h" +#include "String.h" namespace MafiaNet { diff --git a/Source/include/mafianet/EmailSender.h b/Source/include/mafianet/EmailSender.h index 01901d417..1de8a44f6 100644 --- a/Source/include/mafianet/EmailSender.h +++ b/Source/include/mafianet/EmailSender.h @@ -23,8 +23,8 @@ #ifndef __EMAIL_SENDER_H #define __EMAIL_SENDER_H -#include "RakNetTypes.h" -#include "RakMemoryOverride.h" +#include "Types.h" +#include "MemoryOverride.h" #include "Export.h" #include "Rand.h" #include "TCPInterface.h" diff --git a/Source/include/mafianet/Export.h b/Source/include/mafianet/Export.h index 4ff308d0a..e94740a1c 100644 --- a/Source/include/mafianet/Export.h +++ b/Source/include/mafianet/Export.h @@ -13,7 +13,7 @@ * license found in the license.txt file in the root directory of this source tree. */ -#include "RakNetDefines.h" +#include "Defines.h" #if defined(_WIN32) && !(defined(__GNUC__) || defined(__GCCXML__)) && !defined(_MAFIANET_LIB) && defined(_MAFIANET_DLL) #define RAK_DLL_EXPORT __declspec(dllexport) diff --git a/Source/include/mafianet/FileList.h b/Source/include/mafianet/FileList.h index 058e1c8d0..750e96c35 100644 --- a/Source/include/mafianet/FileList.h +++ b/Source/include/mafianet/FileList.h @@ -25,10 +25,10 @@ #include "Export.h" #include "DS_List.h" -#include "RakMemoryOverride.h" -#include "RakNetTypes.h" +#include "MemoryOverride.h" +#include "Types.h" #include "FileListNodeContext.h" -#include "RakString.h" +#include "String.h" namespace MafiaNet { diff --git a/Source/include/mafianet/FileListTransfer.h b/Source/include/mafianet/FileListTransfer.h index 7cd73114e..d8fff840f 100644 --- a/Source/include/mafianet/FileListTransfer.h +++ b/Source/include/mafianet/FileListTransfer.h @@ -24,13 +24,13 @@ #ifndef __FILE_LIST_TRANFER_H #define __FILE_LIST_TRANFER_H -#include "RakNetTypes.h" +#include "Types.h" #include "Export.h" #include "PluginInterface2.h" #include "DS_Map.h" -#include "RakNetTypes.h" +#include "Types.h" #include "PacketPriority.h" -#include "RakMemoryOverride.h" +#include "MemoryOverride.h" #include "FileList.h" #include "DS_Queue.h" #include "SimpleMutex.h" diff --git a/Source/include/mafianet/FileListTransferCBInterface.h b/Source/include/mafianet/FileListTransferCBInterface.h index 77bf80251..d46266a74 100644 --- a/Source/include/mafianet/FileListTransferCBInterface.h +++ b/Source/include/mafianet/FileListTransferCBInterface.h @@ -20,7 +20,7 @@ #ifndef __FILE_LIST_TRANSFER_CALLBACK_INTERFACE_H #define __FILE_LIST_TRANSFER_CALLBACK_INTERFACE_H -#include "RakMemoryOverride.h" +#include "MemoryOverride.h" #include "FileListNodeContext.h" namespace MafiaNet diff --git a/Source/include/mafianet/FullyConnectedMesh2.h b/Source/include/mafianet/FullyConnectedMesh2.h index 8283abd2e..e2f676a13 100644 --- a/Source/include/mafianet/FullyConnectedMesh2.h +++ b/Source/include/mafianet/FullyConnectedMesh2.h @@ -26,10 +26,10 @@ #define __FULLY_CONNECTED_MESH_2_H #include "PluginInterface2.h" -#include "RakMemoryOverride.h" +#include "MemoryOverride.h" #include "NativeTypes.h" #include "DS_List.h" -#include "RakString.h" +#include "String.h" #include "BitStream.h" typedef int64_t FCM2Guid; diff --git a/Source/include/mafianet/GetTime.h b/Source/include/mafianet/GetTime.h index 20ea1b204..c24de474b 100644 --- a/Source/include/mafianet/GetTime.h +++ b/Source/include/mafianet/GetTime.h @@ -22,7 +22,7 @@ #define __GET_TIME_H #include "Export.h" -#include "RakNetTime.h" // For MafiaNet::TimeMS +#include "Time.h" // For MafiaNet::TimeMS namespace MafiaNet { diff --git a/Source/include/mafianet/GridSectorizer.h b/Source/include/mafianet/GridSectorizer.h index 6f4dd30eb..c01521eed 100644 --- a/Source/include/mafianet/GridSectorizer.h +++ b/Source/include/mafianet/GridSectorizer.h @@ -18,7 +18,7 @@ //#define _USE_ORDERED_LIST -#include "RakMemoryOverride.h" +#include "MemoryOverride.h" #ifdef _USE_ORDERED_LIST #include "DS_OrderedList.h" diff --git a/Source/include/mafianet/GuidUtil.h b/Source/include/mafianet/GuidUtil.h index 8048c42c5..8d2ec7355 100644 --- a/Source/include/mafianet/GuidUtil.h +++ b/Source/include/mafianet/GuidUtil.h @@ -21,8 +21,8 @@ #include #include -#include "RakNetTypes.h" -#include "RakPeerInterface.h" +#include "Types.h" +#include "PeerInterface.h" namespace MafiaNet { diff --git a/Source/include/mafianet/HTTPConnection.h b/Source/include/mafianet/HTTPConnection.h index d29c04e88..de1112435 100644 --- a/Source/include/mafianet/HTTPConnection.h +++ b/Source/include/mafianet/HTTPConnection.h @@ -25,9 +25,9 @@ #define __HTTP_CONNECTION #include "Export.h" -#include "RakString.h" -#include "RakMemoryOverride.h" -#include "RakNetTypes.h" +#include "String.h" +#include "MemoryOverride.h" +#include "Types.h" #include "DS_Queue.h" namespace MafiaNet diff --git a/Source/include/mafianet/HTTPConnection2.h b/Source/include/mafianet/HTTPConnection2.h index 031276956..acf2c09d0 100644 --- a/Source/include/mafianet/HTTPConnection2.h +++ b/Source/include/mafianet/HTTPConnection2.h @@ -26,9 +26,9 @@ #define __HTTP_CONNECTION_2 #include "Export.h" -#include "RakString.h" -#include "RakMemoryOverride.h" -#include "RakNetTypes.h" +#include "String.h" +#include "MemoryOverride.h" +#include "Types.h" #include "DS_List.h" #include "DS_Queue.h" #include "PluginInterface2.h" diff --git a/Source/include/mafianet/InternalPacket.h b/Source/include/mafianet/InternalPacket.h index e9fbe99f7..55f5217cb 100644 --- a/Source/include/mafianet/InternalPacket.h +++ b/Source/include/mafianet/InternalPacket.h @@ -21,11 +21,11 @@ #define __INTERNAL_PACKET_H #include "PacketPriority.h" -#include "RakNetTypes.h" -#include "RakMemoryOverride.h" -#include "RakNetDefines.h" +#include "Types.h" +#include "MemoryOverride.h" +#include "Defines.h" #include "NativeTypes.h" -#include "RakNetDefines.h" +#include "Defines.h" #if USE_SLIDING_WINDOW_CONGESTION_CONTROL!=1 #include "CCRakNetUDT.h" #else diff --git a/Source/include/mafianet/RakMemoryOverride.h b/Source/include/mafianet/MemoryOverride.h similarity index 96% rename from Source/include/mafianet/RakMemoryOverride.h rename to Source/include/mafianet/MemoryOverride.h index e769998b7..bf1aa2ab6 100644 --- a/Source/include/mafianet/RakMemoryOverride.h +++ b/Source/include/mafianet/MemoryOverride.h @@ -23,7 +23,7 @@ #define __RAK_MEMORY_H #include "Export.h" -#include "RakNetDefines.h" +#include "Defines.h" #include @@ -32,7 +32,7 @@ -#include "RakAlloca.h" +#include "Alloca.h" // #if _USE_RAK_MEMORY_OVERRIDE==1 // #if defined(new) diff --git a/Source/include/mafianet/MessageFilter.h b/Source/include/mafianet/MessageFilter.h index 8c1f30285..d9ec075db 100644 --- a/Source/include/mafianet/MessageFilter.h +++ b/Source/include/mafianet/MessageFilter.h @@ -23,7 +23,7 @@ #ifndef __MESSAGE_FILTER_PLUGIN_H #define __MESSAGE_FILTER_PLUGIN_H -#include "RakNetTypes.h" +#include "Types.h" #include "PluginInterface2.h" #include "DS_OrderedList.h" #include "DS_Hash.h" diff --git a/Source/include/mafianet/MmsgBatch.h b/Source/include/mafianet/MmsgBatch.h index cfc2033a2..f93e9a79f 100644 --- a/Source/include/mafianet/MmsgBatch.h +++ b/Source/include/mafianet/MmsgBatch.h @@ -22,9 +22,9 @@ #ifndef __MAFIANET_MMSG_BATCH_H #define __MAFIANET_MMSG_BATCH_H -#include "mafianet/RakNetSocket2.h" -#include "mafianet/RakAssert.h" -#include "mafianet/RakMemoryOverride.h" +#include "mafianet/Socket2.h" +#include "mafianet/Assert.h" +#include "mafianet/MemoryOverride.h" #include // memcpy #include // RAKNET_DEBUG_PRINTF defaults to printf diff --git a/Source/include/mafianet/NatPunchthroughClient.h b/Source/include/mafianet/NatPunchthroughClient.h index 94e8e8901..2004b8279 100644 --- a/Source/include/mafianet/NatPunchthroughClient.h +++ b/Source/include/mafianet/NatPunchthroughClient.h @@ -23,13 +23,13 @@ #ifndef __NAT_PUNCHTHROUGH_CLIENT_H #define __NAT_PUNCHTHROUGH_CLIENT_H -#include "RakNetTypes.h" +#include "Types.h" #include "Export.h" #include "PluginInterface2.h" #include "PacketPriority.h" #include "SocketIncludes.h" #include "DS_List.h" -#include "RakString.h" +#include "String.h" #include "DS_Queue.h" // Trendnet TEW-632BRP sometimes starts at port 1024 and increments sequentially. diff --git a/Source/include/mafianet/NatPunchthroughServer.h b/Source/include/mafianet/NatPunchthroughServer.h index eb69cd78f..1ae72f8f7 100644 --- a/Source/include/mafianet/NatPunchthroughServer.h +++ b/Source/include/mafianet/NatPunchthroughServer.h @@ -24,13 +24,13 @@ #ifndef __NAT_PUNCHTHROUGH_SERVER_H #define __NAT_PUNCHTHROUGH_SERVER_H -#include "RakNetTypes.h" +#include "Types.h" #include "Export.h" #include "PluginInterface2.h" #include "PacketPriority.h" #include "SocketIncludes.h" #include "DS_OrderedList.h" -#include "RakString.h" +#include "String.h" namespace MafiaNet { diff --git a/Source/include/mafianet/NatTypeDetectionClient.h b/Source/include/mafianet/NatTypeDetectionClient.h index e8de1ecaf..a71a5c39f 100644 --- a/Source/include/mafianet/NatTypeDetectionClient.h +++ b/Source/include/mafianet/NatTypeDetectionClient.h @@ -24,13 +24,13 @@ #ifndef __NAT_TYPE_DETECTION_CLIENT_H #define __NAT_TYPE_DETECTION_CLIENT_H -#include "RakNetTypes.h" +#include "Types.h" #include "Export.h" #include "PluginInterface2.h" #include "PacketPriority.h" #include "SocketIncludes.h" #include "DS_OrderedList.h" -#include "RakString.h" +#include "String.h" #include "NatTypeDetectionCommon.h" namespace MafiaNet diff --git a/Source/include/mafianet/NatTypeDetectionCommon.h b/Source/include/mafianet/NatTypeDetectionCommon.h index 41b15dd46..44626b9e5 100644 --- a/Source/include/mafianet/NatTypeDetectionCommon.h +++ b/Source/include/mafianet/NatTypeDetectionCommon.h @@ -26,8 +26,8 @@ #if _RAKNET_SUPPORT_NatTypeDetectionServer==1 || _RAKNET_SUPPORT_NatTypeDetectionClient==1 #include "SocketIncludes.h" -#include "RakNetTypes.h" -#include "RakNetSocket2.h" +#include "Types.h" +#include "Socket2.h" namespace MafiaNet { diff --git a/Source/include/mafianet/NatTypeDetectionServer.h b/Source/include/mafianet/NatTypeDetectionServer.h index d9d72cb6c..ebfa5dee8 100644 --- a/Source/include/mafianet/NatTypeDetectionServer.h +++ b/Source/include/mafianet/NatTypeDetectionServer.h @@ -23,13 +23,13 @@ #ifndef __NAT_TYPE_DETECTION_SERVER_H #define __NAT_TYPE_DETECTION_SERVER_H -#include "RakNetTypes.h" +#include "Types.h" #include "Export.h" #include "PluginInterface2.h" #include "PacketPriority.h" #include "SocketIncludes.h" #include "DS_OrderedList.h" -#include "RakString.h" +#include "String.h" #include "NatTypeDetectionCommon.h" diff --git a/Source/include/mafianet/NetworkIDManager.h b/Source/include/mafianet/NetworkIDManager.h index 1de68cd7f..5c593d20f 100644 --- a/Source/include/mafianet/NetworkIDManager.h +++ b/Source/include/mafianet/NetworkIDManager.h @@ -20,9 +20,9 @@ #ifndef __NETWORK_ID_MANAGER_H #define __NETWORK_ID_MANAGER_H -#include "RakNetTypes.h" +#include "Types.h" #include "Export.h" -#include "RakMemoryOverride.h" +#include "MemoryOverride.h" #include "NetworkIDObject.h" #include "Rand.h" diff --git a/Source/include/mafianet/NetworkIDObject.h b/Source/include/mafianet/NetworkIDObject.h index 7bf338253..5edba1679 100644 --- a/Source/include/mafianet/NetworkIDObject.h +++ b/Source/include/mafianet/NetworkIDObject.h @@ -21,8 +21,8 @@ #if !defined(__NETWORK_ID_GENERATOR) #define __NETWORK_ID_GENERATOR -#include "RakNetTypes.h" -#include "RakMemoryOverride.h" +#include "Types.h" +#include "MemoryOverride.h" #include "Export.h" namespace MafiaNet diff --git a/Source/include/mafianet/PacketLogger.h b/Source/include/mafianet/PacketLogger.h index caa7325f1..6948f5fef 100644 --- a/Source/include/mafianet/PacketLogger.h +++ b/Source/include/mafianet/PacketLogger.h @@ -24,7 +24,7 @@ #ifndef __PACKET_LOGGER_H #define __PACKET_LOGGER_H -#include "RakNetTypes.h" +#include "Types.h" #include "PluginInterface2.h" #include "Export.h" diff --git a/Source/include/mafianet/RakPeer.h b/Source/include/mafianet/Peer.h similarity index 98% rename from Source/include/mafianet/RakPeer.h rename to Source/include/mafianet/Peer.h index fa21bf3cd..185276425 100644 --- a/Source/include/mafianet/RakPeer.h +++ b/Source/include/mafianet/Peer.h @@ -25,16 +25,16 @@ #define __RAK_PEER_H #include "ReliabilityLayer.h" -#include "RakPeerInterface.h" +#include "PeerInterface.h" #include "BitStream.h" #include "SingleProducerConsumer.h" #include "SimpleMutex.h" #include "DS_OrderedList.h" #include "Export.h" -#include "RakString.h" -#include "RakThread.h" +#include "String.h" +#include "Thread.h" //#include "socket.h" -#include "RakNetSmartPtr.h" +#include "SmartPtr.h" #include "DS_ThreadsafeAllocatingQueue.h" #include "SignaledEvent.h" #include "NativeFeatureIncludes.h" diff --git a/Source/include/mafianet/PeerHandle.h b/Source/include/mafianet/PeerHandle.h index b1824e069..4357e3043 100644 --- a/Source/include/mafianet/PeerHandle.h +++ b/Source/include/mafianet/PeerHandle.h @@ -19,8 +19,8 @@ #include // std::string (owned password / bind-address in the builders) #include // std::move -#include "mafianet/RakPeerInterface.h" // RakPeerInterface, Send, Receive, DeallocatePacket, GetInstance, DestroyInstance -#include "mafianet/RakNetTypes.h" // Packet, StartupResult, ConnectionAttemptResult, SocketDescriptor, PublicKey, AddressOrGUID +#include "mafianet/PeerInterface.h" // RakPeerInterface, Send, Receive, DeallocatePacket, GetInstance, DestroyInstance +#include "mafianet/Types.h" // Packet, StartupResult, ConnectionAttemptResult, SocketDescriptor, PublicKey, AddressOrGUID #include "mafianet/PacketPriority.h"// Priority, Reliability (scoped enums with the send defaults) #include "mafianet/BitStream.h" // BitStream (the encode() scratch buffer for send/broadcast) #include "mafianet/Export.h" // RAK_DLL_EXPORT diff --git a/Source/include/mafianet/RakPeerInterface.h b/Source/include/mafianet/PeerInterface.h similarity index 98% rename from Source/include/mafianet/RakPeerInterface.h rename to Source/include/mafianet/PeerInterface.h index 25e6ccbba..0e24850b1 100644 --- a/Source/include/mafianet/RakPeerInterface.h +++ b/Source/include/mafianet/PeerInterface.h @@ -23,12 +23,12 @@ #define __RAK_PEER_INTERFACE_H #include "PacketPriority.h" -#include "RakNetTypes.h" -#include "RakMemoryOverride.h" +#include "Types.h" +#include "MemoryOverride.h" #include "Export.h" #include "DS_List.h" -#include "RakNetSmartPtr.h" -#include "RakNetSocket2.h" +#include "SmartPtr.h" +#include "Socket2.h" namespace MafiaNet { diff --git a/Source/include/mafianet/PluginInterface2.h b/Source/include/mafianet/PluginInterface2.h index f392d9894..a7e59b458 100644 --- a/Source/include/mafianet/PluginInterface2.h +++ b/Source/include/mafianet/PluginInterface2.h @@ -22,7 +22,7 @@ #define __PLUGIN_INTERFACE_2_H #include "NativeFeatureIncludes.h" -#include "RakNetTypes.h" +#include "Types.h" #include "Export.h" #include "PacketPriority.h" diff --git a/Source/include/mafianet/PointGridSectorizer.h b/Source/include/mafianet/PointGridSectorizer.h index 76f7d1c5d..66829138d 100644 --- a/Source/include/mafianet/PointGridSectorizer.h +++ b/Source/include/mafianet/PointGridSectorizer.h @@ -22,7 +22,7 @@ #define MAFIANET_POINT_GRID_SECTORIZER_H #include "Export.h" -#include "RakMemoryOverride.h" +#include "MemoryOverride.h" #include "DS_List.h" namespace MafiaNet diff --git a/Source/include/mafianet/RPC4Plugin.h b/Source/include/mafianet/RPC4Plugin.h index 50592840b..681ee076d 100644 --- a/Source/include/mafianet/RPC4Plugin.h +++ b/Source/include/mafianet/RPC4Plugin.h @@ -26,9 +26,9 @@ #include "PluginInterface2.h" #include "PacketPriority.h" -#include "RakNetTypes.h" +#include "Types.h" #include "BitStream.h" -#include "RakString.h" +#include "String.h" #include "NetworkIDObject.h" #include "DS_Hash.h" #include "DS_OrderedList.h" diff --git a/Source/include/mafianet/Rackspace.h b/Source/include/mafianet/Rackspace.h index 4a6002bdf..f52d9d1f2 100644 --- a/Source/include/mafianet/Rackspace.h +++ b/Source/include/mafianet/Rackspace.h @@ -24,9 +24,9 @@ #include "Export.h" #include "DS_List.h" -#include "RakNetTypes.h" +#include "Types.h" #include "DS_Queue.h" -#include "RakString.h" +#include "String.h" #ifndef __RACKSPACE_H #define __RACKSPACE_H diff --git a/Source/include/mafianet/RakVoice.h b/Source/include/mafianet/RakVoice.h index 03464c95e..d1c498774 100644 --- a/Source/include/mafianet/RakVoice.h +++ b/Source/include/mafianet/RakVoice.h @@ -20,7 +20,7 @@ #ifndef __RAK_VOICE_H #define __RAK_VOICE_H -#include "mafianet/RakNetTypes.h" +#include "mafianet/Types.h" #include "mafianet/PluginInterface2.h" #include "mafianet/DS_OrderedList.h" #include "mafianet/NativeTypes.h" diff --git a/Source/include/mafianet/RefCountedObj.h b/Source/include/mafianet/RefCountedObj.h index 36dfed9a2..70d1b7acf 100644 --- a/Source/include/mafianet/RefCountedObj.h +++ b/Source/include/mafianet/RefCountedObj.h @@ -22,7 +22,7 @@ #ifndef __REF_COUNTED_OBJ_H #define __REF_COUNTED_OBJ_H -#include "RakMemoryOverride.h" +#include "MemoryOverride.h" /// World's simplest class :) class RefCountedObj diff --git a/Source/include/mafianet/RelayPlugin.h b/Source/include/mafianet/RelayPlugin.h index 0504dbfa4..251cfe22d 100644 --- a/Source/include/mafianet/RelayPlugin.h +++ b/Source/include/mafianet/RelayPlugin.h @@ -25,7 +25,7 @@ #define __RELAY_PLUGIN_H #include "PluginInterface2.h" -#include "RakString.h" +#include "String.h" #include "DS_Hash.h" /// \defgroup RELAY_PLUGIN_GROUP RelayPlugin diff --git a/Source/include/mafianet/ReliabilityLayer.h b/Source/include/mafianet/ReliabilityLayer.h index 1bdd23fda..da79d71c9 100644 --- a/Source/include/mafianet/ReliabilityLayer.h +++ b/Source/include/mafianet/ReliabilityLayer.h @@ -21,7 +21,7 @@ #ifndef __RELIABILITY_LAYER_H #define __RELIABILITY_LAYER_H -#include "RakMemoryOverride.h" +#include "MemoryOverride.h" #include "MTUSize.h" #include "DS_LinkedList.h" #include "DS_List.h" @@ -30,20 +30,20 @@ #include "DS_Queue.h" #include "BitStream.h" #include "InternalPacket.h" -#include "RakNetStatistics.h" +#include "Statistics.h" #include "DR_SHA1.h" #include "DS_OrderedList.h" #include "DS_RangeList.h" #include "DS_BPlusTree.h" #include "DS_MemoryPool.h" -#include "RakNetDefines.h" +#include "Defines.h" #include "DS_Heap.h" #include "BitStream.h" #include "NativeFeatureIncludes.h" #include "SecureHandshake.h" #include "PluginInterface2.h" #include "Rand.h" -#include "RakNetSocket2.h" +#include "Socket2.h" #if USE_SLIDING_WINDOW_CONGESTION_CONTROL!=1 #include "CCRakNetUDT.h" diff --git a/Source/include/mafianet/ReplicaManager3.h b/Source/include/mafianet/ReplicaManager3.h index 1f6a78383..7387ea6ca 100644 --- a/Source/include/mafianet/ReplicaManager3.h +++ b/Source/include/mafianet/ReplicaManager3.h @@ -24,8 +24,8 @@ #ifndef __REPLICA_MANAGER_3 #define __REPLICA_MANAGER_3 -#include "RakNetTypes.h" -#include "RakNetTime.h" +#include "Types.h" +#include "Time.h" #include "BitStream.h" #include "PacketPriority.h" #include "PluginInterface2.h" diff --git a/Source/include/mafianet/Router2.h b/Source/include/mafianet/Router2.h index 8c522de87..5a1623308 100644 --- a/Source/include/mafianet/Router2.h +++ b/Source/include/mafianet/Router2.h @@ -24,7 +24,7 @@ #ifndef __ROUTER_2_PLUGIN_H #define __ROUTER_2_PLUGIN_H -#include "RakNetTypes.h" +#include "Types.h" #include "PluginInterface2.h" #include "PacketPriority.h" #include "Export.h" diff --git a/Source/include/mafianet/SendToThread.h b/Source/include/mafianet/SendToThread.h index 77c234657..e0d474ee8 100644 --- a/Source/include/mafianet/SendToThread.h +++ b/Source/include/mafianet/SendToThread.h @@ -16,7 +16,7 @@ #ifndef __SENDTO_THREAD #define __SENDTO_THREAD -#include "RakNetDefines.h" +#include "Defines.h" #ifdef USE_THREADED_SEND diff --git a/Source/include/mafianet/SimpleMutex.h b/Source/include/mafianet/SimpleMutex.h index 20a4c7e7f..904ff2a8d 100644 --- a/Source/include/mafianet/SimpleMutex.h +++ b/Source/include/mafianet/SimpleMutex.h @@ -22,7 +22,7 @@ #ifndef __SIMPLE_MUTEX_H #define __SIMPLE_MUTEX_H -#include "RakMemoryOverride.h" +#include "MemoryOverride.h" #if defined(_WIN32) diff --git a/Source/include/mafianet/SingleProducerConsumer.h b/Source/include/mafianet/SingleProducerConsumer.h index f7cccaa1b..bb58e9582 100644 --- a/Source/include/mafianet/SingleProducerConsumer.h +++ b/Source/include/mafianet/SingleProducerConsumer.h @@ -22,11 +22,11 @@ #ifndef __SINGLE_PRODUCER_CONSUMER_H #define __SINGLE_PRODUCER_CONSUMER_H -#include "RakAssert.h" +#include "Assert.h" static const int MINIMUM_LIST_SIZE=8; -#include "RakMemoryOverride.h" +#include "MemoryOverride.h" #include "Export.h" /// The namespace DataStructures was only added to avoid compiler errors for commonly named data structures diff --git a/Source/include/mafianet/RakSleep.h b/Source/include/mafianet/Sleep.h similarity index 100% rename from Source/include/mafianet/RakSleep.h rename to Source/include/mafianet/Sleep.h diff --git a/Source/include/mafianet/RakNetSmartPtr.h b/Source/include/mafianet/SmartPtr.h similarity index 94% rename from Source/include/mafianet/RakNetSmartPtr.h rename to Source/include/mafianet/SmartPtr.h index 25a9d6e48..091448ee4 100644 --- a/Source/include/mafianet/RakNetSmartPtr.h +++ b/Source/include/mafianet/SmartPtr.h @@ -19,7 +19,7 @@ // From http://www.codeproject.com/KB/cpp/SmartPointers.aspx // with bugs fixed -#include "RakMemoryOverride.h" +#include "MemoryOverride.h" #include "Export.h" //static int allocCount=0; diff --git a/Source/include/mafianet/RakNetSocket2.h b/Source/include/mafianet/Socket2.h similarity index 97% rename from Source/include/mafianet/RakNetSocket2.h rename to Source/include/mafianet/Socket2.h index 1b603e8f6..3cfbf9815 100644 --- a/Source/include/mafianet/RakNetSocket2.h +++ b/Source/include/mafianet/Socket2.h @@ -16,10 +16,10 @@ #ifndef __RAKNET_SOCKET_2_H #define __RAKNET_SOCKET_2_H -#include "RakNetTypes.h" +#include "Types.h" #include "MTUSize.h" #include "LocklessTypes.h" -#include "RakThread.h" +#include "Thread.h" #include "DS_ThreadsafeAllocatingQueue.h" #include "Export.h" diff --git a/Source/include/mafianet/SocketIncludes.h b/Source/include/mafianet/SocketIncludes.h index fa0b17aa9..6a03b6065 100644 --- a/Source/include/mafianet/SocketIncludes.h +++ b/Source/include/mafianet/SocketIncludes.h @@ -32,7 +32,7 @@ #include #include - //#include "RakMemoryOverride.h" + //#include "MemoryOverride.h" /// Unix/Linux uses ints for sockets typedef int __UDPSOCKET__; typedef int __TCPSOCKET__; diff --git a/Source/include/mafianet/SocketLayer.h b/Source/include/mafianet/SocketLayer.h index b62330f6c..935ffc50e 100644 --- a/Source/include/mafianet/SocketLayer.h +++ b/Source/include/mafianet/SocketLayer.h @@ -23,13 +23,13 @@ #ifndef __SOCKET_LAYER_H #define __SOCKET_LAYER_H -#include "RakMemoryOverride.h" -#include "RakNetTypes.h" -#include "RakNetSmartPtr.h" +#include "MemoryOverride.h" +#include "Types.h" +#include "SmartPtr.h" //#include "socket.h" #include "Export.h" #include "MTUSize.h" -#include "RakString.h" +#include "String.h" //#include "ClientContextStruct.h" diff --git a/Source/include/mafianet/RakNetStatistics.h b/Source/include/mafianet/Statistics.h similarity index 96% rename from Source/include/mafianet/RakNetStatistics.h rename to Source/include/mafianet/Statistics.h index 99c15ddd0..3b5ba666e 100644 --- a/Source/include/mafianet/RakNetStatistics.h +++ b/Source/include/mafianet/Statistics.h @@ -24,7 +24,7 @@ #include "PacketPriority.h" #include "Export.h" -#include "RakNetTypes.h" +#include "Types.h" namespace MafiaNet { diff --git a/Source/include/mafianet/StatisticsHistory.h b/Source/include/mafianet/StatisticsHistory.h index f8f0f87c3..500a13c41 100644 --- a/Source/include/mafianet/StatisticsHistory.h +++ b/Source/include/mafianet/StatisticsHistory.h @@ -24,12 +24,12 @@ #define __STATISTICS_HISTORY_H #include "PluginInterface2.h" -#include "RakMemoryOverride.h" +#include "MemoryOverride.h" #include "NativeTypes.h" #include "DS_List.h" -#include "RakNetTypes.h" +#include "Types.h" #include "DS_OrderedList.h" -#include "RakString.h" +#include "String.h" #include "DS_Queue.h" #include "DS_Hash.h" #include diff --git a/Source/include/mafianet/RakString.h b/Source/include/mafianet/String.h similarity index 97% rename from Source/include/mafianet/RakString.h rename to Source/include/mafianet/String.h index ed6af7866..3bebae0d6 100644 --- a/Source/include/mafianet/RakString.h +++ b/Source/include/mafianet/String.h @@ -18,7 +18,7 @@ #include "Export.h" #include "DS_List.h" -#include "RakNetTypes.h" // int64_t +#include "Types.h" // int64_t #include #include "stdarg.h" diff --git a/Source/include/mafianet/StringCompressor.h b/Source/include/mafianet/StringCompressor.h index edfdae558..71b580ae7 100644 --- a/Source/include/mafianet/StringCompressor.h +++ b/Source/include/mafianet/StringCompressor.h @@ -24,7 +24,7 @@ #include "Export.h" #include "DS_Map.h" -#include "RakMemoryOverride.h" +#include "MemoryOverride.h" #include "NativeTypes.h" #ifdef _STD_STRING_COMPRESSOR diff --git a/Source/include/mafianet/StringTable.h b/Source/include/mafianet/StringTable.h index 91bc4167d..915fd4a56 100644 --- a/Source/include/mafianet/StringTable.h +++ b/Source/include/mafianet/StringTable.h @@ -24,7 +24,7 @@ #include "DS_OrderedList.h" #include "Export.h" -#include "RakMemoryOverride.h" +#include "MemoryOverride.h" /// Forward declaration namespace MafiaNet diff --git a/Source/include/mafianet/TCPInterface.h b/Source/include/mafianet/TCPInterface.h index eefcf3195..d8ee8eae4 100644 --- a/Source/include/mafianet/TCPInterface.h +++ b/Source/include/mafianet/TCPInterface.h @@ -24,14 +24,14 @@ #ifndef __SIMPLE_TCP_SERVER #define __SIMPLE_TCP_SERVER -#include "RakMemoryOverride.h" +#include "MemoryOverride.h" #include "DS_List.h" -#include "RakNetTypes.h" +#include "Types.h" #include "Export.h" -#include "RakThread.h" +#include "Thread.h" #include "DS_Queue.h" #include "SimpleMutex.h" -#include "RakNetDefines.h" +#include "Defines.h" #include "SocketIncludes.h" #include "DS_ByteQueue.h" #include "DS_ThreadsafeAllocatingQueue.h" diff --git a/Source/include/mafianet/TableSerializer.h b/Source/include/mafianet/TableSerializer.h index 2e9203d8f..2c3932985 100644 --- a/Source/include/mafianet/TableSerializer.h +++ b/Source/include/mafianet/TableSerializer.h @@ -16,7 +16,7 @@ #ifndef __TABLE_SERIALIZER_H #define __TABLE_SERIALIZER_H -#include "RakMemoryOverride.h" +#include "MemoryOverride.h" #include "DS_Table.h" #include "Export.h" diff --git a/Source/include/mafianet/TeamBalancer.h b/Source/include/mafianet/TeamBalancer.h index 915aa599f..d34786279 100644 --- a/Source/include/mafianet/TeamBalancer.h +++ b/Source/include/mafianet/TeamBalancer.h @@ -27,10 +27,10 @@ #define __TEAM_BALANCER_H #include "PluginInterface2.h" -#include "RakMemoryOverride.h" +#include "MemoryOverride.h" #include "NativeTypes.h" #include "DS_List.h" -#include "RakString.h" +#include "String.h" namespace MafiaNet { diff --git a/Source/include/mafianet/TeamManager.h b/Source/include/mafianet/TeamManager.h index e6749f215..8ef36d971 100644 --- a/Source/include/mafianet/TeamManager.h +++ b/Source/include/mafianet/TeamManager.h @@ -31,10 +31,10 @@ #define __TEAM_MANAGER_H #include "PluginInterface2.h" -#include "RakMemoryOverride.h" +#include "MemoryOverride.h" #include "NativeTypes.h" #include "DS_List.h" -#include "RakNetTypes.h" +#include "Types.h" #include "DS_Hash.h" #include "DS_OrderedList.h" diff --git a/Source/include/mafianet/RakThread.h b/Source/include/mafianet/Thread.h similarity index 100% rename from Source/include/mafianet/RakThread.h rename to Source/include/mafianet/Thread.h diff --git a/Source/include/mafianet/ThreadPool.h b/Source/include/mafianet/ThreadPool.h index 69a88268a..cc18e9a22 100644 --- a/Source/include/mafianet/ThreadPool.h +++ b/Source/include/mafianet/ThreadPool.h @@ -16,11 +16,11 @@ #ifndef __THREAD_POOL_H #define __THREAD_POOL_H -#include "RakMemoryOverride.h" +#include "MemoryOverride.h" #include "DS_Queue.h" #include "SimpleMutex.h" #include "Export.h" -#include "RakThread.h" +#include "Thread.h" #include "SignaledEvent.h" class ThreadDataInterface @@ -191,7 +191,7 @@ struct RAK_DLL_EXPORT ThreadPool }; #include "ThreadPool.h" -#include "RakSleep.h" +#include "Sleep.h" #ifdef _WIN32 #else diff --git a/Source/include/mafianet/RakNetTime.h b/Source/include/mafianet/Time.h similarity index 94% rename from Source/include/mafianet/RakNetTime.h rename to Source/include/mafianet/Time.h index b22b47ebc..0dee57214 100644 --- a/Source/include/mafianet/RakNetTime.h +++ b/Source/include/mafianet/Time.h @@ -17,7 +17,7 @@ #define __RAKNET_TIME_H #include "NativeTypes.h" -#include "RakNetDefines.h" +#include "Defines.h" namespace MafiaNet { diff --git a/Source/include/mafianet/RakNetTransport2.h b/Source/include/mafianet/Transport2.h similarity index 100% rename from Source/include/mafianet/RakNetTransport2.h rename to Source/include/mafianet/Transport2.h diff --git a/Source/include/mafianet/TransportInterface.h b/Source/include/mafianet/TransportInterface.h index 5a04dd133..bb4538c53 100644 --- a/Source/include/mafianet/TransportInterface.h +++ b/Source/include/mafianet/TransportInterface.h @@ -22,9 +22,9 @@ #ifndef __TRANSPORT_INTERFACE_H #define __TRANSPORT_INTERFACE_H -#include "RakNetTypes.h" +#include "Types.h" #include "Export.h" -#include "RakMemoryOverride.h" +#include "MemoryOverride.h" #define REMOTE_MAX_TEXT_INPUT 2048 diff --git a/Source/include/mafianet/TwoWayAuthentication.h b/Source/include/mafianet/TwoWayAuthentication.h index 5b148b506..138bb7353 100644 --- a/Source/include/mafianet/TwoWayAuthentication.h +++ b/Source/include/mafianet/TwoWayAuthentication.h @@ -47,9 +47,9 @@ #endif #include "PluginInterface2.h" -#include "RakMemoryOverride.h" +#include "MemoryOverride.h" #include "NativeTypes.h" -#include "RakString.h" +#include "String.h" #include "DS_Hash.h" #include "DS_Queue.h" diff --git a/Source/include/mafianet/RakNetTypes.h b/Source/include/mafianet/Types.h similarity index 97% rename from Source/include/mafianet/RakNetTypes.h rename to Source/include/mafianet/Types.h index 8fb863160..77faf29ca 100644 --- a/Source/include/mafianet/RakNetTypes.h +++ b/Source/include/mafianet/Types.h @@ -19,9 +19,9 @@ #ifndef __NETWORK_TYPES_H #define __NETWORK_TYPES_H -#include "RakNetDefines.h" +#include "Defines.h" #include "NativeTypes.h" -#include "RakNetTime.h" +#include "Time.h" #include "Export.h" #include "WindowsIncludes.h" #include "SocketIncludes.h" diff --git a/Source/include/mafianet/UDPForwarder.h b/Source/include/mafianet/UDPForwarder.h index bf0b2bea3..23b0c50b5 100644 --- a/Source/include/mafianet/UDPForwarder.h +++ b/Source/include/mafianet/UDPForwarder.h @@ -26,12 +26,12 @@ #define __UDP_FORWARDER_H #include "Export.h" -#include "RakNetTypes.h" +#include "Types.h" #include "SocketIncludes.h" #include "UDPProxyCommon.h" #include "SimpleMutex.h" -#include "RakString.h" -#include "RakThread.h" +#include "String.h" +#include "Thread.h" #include "DS_Queue.h" #include "DS_OrderedList.h" #include "LocklessTypes.h" diff --git a/Source/include/mafianet/UDPProxyClient.h b/Source/include/mafianet/UDPProxyClient.h index fbf4d77cc..cdd203bdf 100644 --- a/Source/include/mafianet/UDPProxyClient.h +++ b/Source/include/mafianet/UDPProxyClient.h @@ -24,7 +24,7 @@ #define __UDP_PROXY_CLIENT_H #include "Export.h" -#include "RakNetTypes.h" +#include "Types.h" #include "PluginInterface2.h" #include "DS_List.h" diff --git a/Source/include/mafianet/UDPProxyCoordinator.h b/Source/include/mafianet/UDPProxyCoordinator.h index 6da970173..323171064 100644 --- a/Source/include/mafianet/UDPProxyCoordinator.h +++ b/Source/include/mafianet/UDPProxyCoordinator.h @@ -25,9 +25,9 @@ #define __UDP_PROXY_COORDINATOR_H #include "Export.h" -#include "RakNetTypes.h" +#include "Types.h" #include "PluginInterface2.h" -#include "RakString.h" +#include "String.h" #include "BitStream.h" #include "DS_Queue.h" #include "DS_OrderedList.h" diff --git a/Source/include/mafianet/UDPProxyServer.h b/Source/include/mafianet/UDPProxyServer.h index 1d9c83634..b8dec6f91 100644 --- a/Source/include/mafianet/UDPProxyServer.h +++ b/Source/include/mafianet/UDPProxyServer.h @@ -25,10 +25,10 @@ #define __UDP_PROXY_SERVER_H #include "Export.h" -#include "RakNetTypes.h" +#include "Types.h" #include "PluginInterface2.h" #include "UDPForwarder.h" -#include "RakString.h" +#include "String.h" namespace MafiaNet { diff --git a/Source/include/mafianet/VariableListDeltaTracker.h b/Source/include/mafianet/VariableListDeltaTracker.h index 18f1d0254..a60cefaf1 100644 --- a/Source/include/mafianet/VariableListDeltaTracker.h +++ b/Source/include/mafianet/VariableListDeltaTracker.h @@ -15,7 +15,7 @@ #include "NativeTypes.h" #include "DS_List.h" -#include "RakMemoryOverride.h" +#include "MemoryOverride.h" #include "BitStream.h" #ifndef __VARIABLE_LIST_DELTA_TRACKER diff --git a/Source/include/mafianet/RakWString.h b/Source/include/mafianet/WString.h similarity index 95% rename from Source/include/mafianet/RakWString.h rename to Source/include/mafianet/WString.h index 8e4e57136..2baad8015 100644 --- a/Source/include/mafianet/RakWString.h +++ b/Source/include/mafianet/WString.h @@ -17,8 +17,8 @@ #define __RAK_W_STRING_H #include "Export.h" -#include "RakNetTypes.h" // int64_t -#include "RakString.h" +#include "Types.h" // int64_t +#include "String.h" #ifdef _WIN32 #include "WindowsIncludes.h" diff --git a/Source/include/mafianet/_FindFirst.h b/Source/include/mafianet/_FindFirst.h index f66b78610..663807473 100644 --- a/Source/include/mafianet/_FindFirst.h +++ b/Source/include/mafianet/_FindFirst.h @@ -20,7 +20,7 @@ #include -#include "RakString.h" +#include "String.h" #define _A_NORMAL 0x00 // Normal file #define _A_RDONLY 0x01 // Read-only file diff --git a/Source/include/mafianet/alloca.h b/Source/include/mafianet/alloca.h deleted file mode 100644 index 5939d987e..000000000 --- a/Source/include/mafianet/alloca.h +++ /dev/null @@ -1,14 +0,0 @@ -/* - * Copyright (c) 2026, MafiaHub - * Licensed under MIT-style license - * - * Deprecated include path. "mafianet/alloca.h" was renamed to "mafianet/RakAlloca.h" so - * every header follows the PascalCase name of the class it declares. This - * forwarding header is kept for one release cycle and will then be removed. - * Define MAFIANET_SILENCE_DEPRECATED_INCLUDES to suppress the message. - */ -#pragma once -#ifndef MAFIANET_SILENCE_DEPRECATED_INCLUDES -#pragma message("mafianet/alloca.h is deprecated; include mafianet/RakAlloca.h instead") -#endif -#include "RakAlloca.h" diff --git a/Source/include/mafianet/assert.h b/Source/include/mafianet/assert.h deleted file mode 100644 index 767fc28bd..000000000 --- a/Source/include/mafianet/assert.h +++ /dev/null @@ -1,14 +0,0 @@ -/* - * Copyright (c) 2026, MafiaHub - * Licensed under MIT-style license - * - * Deprecated include path. "mafianet/assert.h" was renamed to "mafianet/RakAssert.h" so - * every header follows the PascalCase name of the class it declares. This - * forwarding header is kept for one release cycle and will then be removed. - * Define MAFIANET_SILENCE_DEPRECATED_INCLUDES to suppress the message. - */ -#pragma once -#ifndef MAFIANET_SILENCE_DEPRECATED_INCLUDES -#pragma message("mafianet/assert.h is deprecated; include mafianet/RakAssert.h instead") -#endif -#include "RakAssert.h" diff --git a/Source/include/mafianet/commandparser.h b/Source/include/mafianet/commandparser.h deleted file mode 100644 index 0bc2dc50a..000000000 --- a/Source/include/mafianet/commandparser.h +++ /dev/null @@ -1,14 +0,0 @@ -/* - * Copyright (c) 2026, MafiaHub - * Licensed under MIT-style license - * - * Deprecated include path. "mafianet/commandparser.h" was renamed to "mafianet/RakNetCommandParser.h" so - * every header follows the PascalCase name of the class it declares. This - * forwarding header is kept for one release cycle and will then be removed. - * Define MAFIANET_SILENCE_DEPRECATED_INCLUDES to suppress the message. - */ -#pragma once -#ifndef MAFIANET_SILENCE_DEPRECATED_INCLUDES -#pragma message("mafianet/commandparser.h is deprecated; include mafianet/RakNetCommandParser.h instead") -#endif -#include "RakNetCommandParser.h" diff --git a/Source/include/mafianet/defineoverrides.h b/Source/include/mafianet/defineoverrides.h deleted file mode 100644 index 48637a293..000000000 --- a/Source/include/mafianet/defineoverrides.h +++ /dev/null @@ -1,14 +0,0 @@ -/* - * Copyright (c) 2026, MafiaHub - * Licensed under MIT-style license - * - * Deprecated include path. "mafianet/defineoverrides.h" was renamed to "mafianet/RakNetDefinesOverrides.h" so - * every header follows the PascalCase name of the class it declares. This - * forwarding header is kept for one release cycle and will then be removed. - * Define MAFIANET_SILENCE_DEPRECATED_INCLUDES to suppress the message. - */ -#pragma once -#ifndef MAFIANET_SILENCE_DEPRECATED_INCLUDES -#pragma message("mafianet/defineoverrides.h is deprecated; include mafianet/RakNetDefinesOverrides.h instead") -#endif -#include "RakNetDefinesOverrides.h" diff --git a/Source/include/mafianet/defines.h b/Source/include/mafianet/defines.h deleted file mode 100644 index 4aaf257c6..000000000 --- a/Source/include/mafianet/defines.h +++ /dev/null @@ -1,14 +0,0 @@ -/* - * Copyright (c) 2026, MafiaHub - * Licensed under MIT-style license - * - * Deprecated include path. "mafianet/defines.h" was renamed to "mafianet/RakNetDefines.h" so - * every header follows the PascalCase name of the class it declares. This - * forwarding header is kept for one release cycle and will then be removed. - * Define MAFIANET_SILENCE_DEPRECATED_INCLUDES to suppress the message. - */ -#pragma once -#ifndef MAFIANET_SILENCE_DEPRECATED_INCLUDES -#pragma message("mafianet/defines.h is deprecated; include mafianet/RakNetDefines.h instead") -#endif -#include "RakNetDefines.h" diff --git a/Source/include/mafianet/mafianet.h b/Source/include/mafianet/mafianet.h index 82f8d0ccb..853df874f 100644 --- a/Source/include/mafianet/mafianet.h +++ b/Source/include/mafianet/mafianet.h @@ -22,11 +22,11 @@ #pragma once -#include "mafianet/RakPeerInterface.h" // RakPeerInterface — main entry point -#include "mafianet/RakNetTypes.h" // Packet, SystemAddress, RakNetGUID, enums +#include "mafianet/PeerInterface.h" // RakPeerInterface — main entry point +#include "mafianet/Types.h" // Packet, SystemAddress, RakNetGUID, enums #include "mafianet/MessageIdentifiers.h" // ID_* message IDs + ID_USER_PACKET_ENUM #include "mafianet/PacketPriority.h" // MafiaNet::Priority / MafiaNet::Reliability -#include "mafianet/RakNetStatistics.h" // RakNetStatistics — return type of GetStatistics() +#include "mafianet/Statistics.h" // RakNetStatistics — return type of GetStatistics() #include "mafianet/BitStream.h" // binary serialization #include "mafianet/Archive.h" // serialize() convention over BitStream #include "mafianet/GetTime.h" // MafiaNet::GetTime / TimeMS diff --git a/Source/include/mafianet/memoryoverride.h b/Source/include/mafianet/memoryoverride.h deleted file mode 100644 index 00e0d0a9b..000000000 --- a/Source/include/mafianet/memoryoverride.h +++ /dev/null @@ -1,14 +0,0 @@ -/* - * Copyright (c) 2026, MafiaHub - * Licensed under MIT-style license - * - * Deprecated include path. "mafianet/memoryoverride.h" was renamed to "mafianet/RakMemoryOverride.h" so - * every header follows the PascalCase name of the class it declares. This - * forwarding header is kept for one release cycle and will then be removed. - * Define MAFIANET_SILENCE_DEPRECATED_INCLUDES to suppress the message. - */ -#pragma once -#ifndef MAFIANET_SILENCE_DEPRECATED_INCLUDES -#pragma message("mafianet/memoryoverride.h is deprecated; include mafianet/RakMemoryOverride.h instead") -#endif -#include "RakMemoryOverride.h" diff --git a/Source/include/mafianet/peer.h b/Source/include/mafianet/peer.h deleted file mode 100644 index 593ed8c87..000000000 --- a/Source/include/mafianet/peer.h +++ /dev/null @@ -1,14 +0,0 @@ -/* - * Copyright (c) 2026, MafiaHub - * Licensed under MIT-style license - * - * Deprecated include path. "mafianet/peer.h" was renamed to "mafianet/RakPeer.h" so - * every header follows the PascalCase name of the class it declares. This - * forwarding header is kept for one release cycle and will then be removed. - * Define MAFIANET_SILENCE_DEPRECATED_INCLUDES to suppress the message. - */ -#pragma once -#ifndef MAFIANET_SILENCE_DEPRECATED_INCLUDES -#pragma message("mafianet/peer.h is deprecated; include mafianet/RakPeer.h instead") -#endif -#include "RakPeer.h" diff --git a/Source/include/mafianet/peerinterface.h b/Source/include/mafianet/peerinterface.h deleted file mode 100644 index 378076bad..000000000 --- a/Source/include/mafianet/peerinterface.h +++ /dev/null @@ -1,14 +0,0 @@ -/* - * Copyright (c) 2026, MafiaHub - * Licensed under MIT-style license - * - * Deprecated include path. "mafianet/peerinterface.h" was renamed to "mafianet/RakPeerInterface.h" so - * every header follows the PascalCase name of the class it declares. This - * forwarding header is kept for one release cycle and will then be removed. - * Define MAFIANET_SILENCE_DEPRECATED_INCLUDES to suppress the message. - */ -#pragma once -#ifndef MAFIANET_SILENCE_DEPRECATED_INCLUDES -#pragma message("mafianet/peerinterface.h is deprecated; include mafianet/RakPeerInterface.h instead") -#endif -#include "RakPeerInterface.h" diff --git a/Source/include/mafianet/sleep.h b/Source/include/mafianet/sleep.h deleted file mode 100644 index ad4a744d3..000000000 --- a/Source/include/mafianet/sleep.h +++ /dev/null @@ -1,14 +0,0 @@ -/* - * Copyright (c) 2026, MafiaHub - * Licensed under MIT-style license - * - * Deprecated include path. "mafianet/sleep.h" was renamed to "mafianet/RakSleep.h" so - * every header follows the PascalCase name of the class it declares. This - * forwarding header is kept for one release cycle and will then be removed. - * Define MAFIANET_SILENCE_DEPRECATED_INCLUDES to suppress the message. - */ -#pragma once -#ifndef MAFIANET_SILENCE_DEPRECATED_INCLUDES -#pragma message("mafianet/sleep.h is deprecated; include mafianet/RakSleep.h instead") -#endif -#include "RakSleep.h" diff --git a/Source/include/mafianet/smartptr.h b/Source/include/mafianet/smartptr.h deleted file mode 100644 index dabda0d25..000000000 --- a/Source/include/mafianet/smartptr.h +++ /dev/null @@ -1,14 +0,0 @@ -/* - * Copyright (c) 2026, MafiaHub - * Licensed under MIT-style license - * - * Deprecated include path. "mafianet/smartptr.h" was renamed to "mafianet/RakNetSmartPtr.h" so - * every header follows the PascalCase name of the class it declares. This - * forwarding header is kept for one release cycle and will then be removed. - * Define MAFIANET_SILENCE_DEPRECATED_INCLUDES to suppress the message. - */ -#pragma once -#ifndef MAFIANET_SILENCE_DEPRECATED_INCLUDES -#pragma message("mafianet/smartptr.h is deprecated; include mafianet/RakNetSmartPtr.h instead") -#endif -#include "RakNetSmartPtr.h" diff --git a/Source/include/mafianet/socket2.h b/Source/include/mafianet/socket2.h deleted file mode 100644 index e8acf72ab..000000000 --- a/Source/include/mafianet/socket2.h +++ /dev/null @@ -1,14 +0,0 @@ -/* - * Copyright (c) 2026, MafiaHub - * Licensed under MIT-style license - * - * Deprecated include path. "mafianet/socket2.h" was renamed to "mafianet/RakNetSocket2.h" so - * every header follows the PascalCase name of the class it declares. This - * forwarding header is kept for one release cycle and will then be removed. - * Define MAFIANET_SILENCE_DEPRECATED_INCLUDES to suppress the message. - */ -#pragma once -#ifndef MAFIANET_SILENCE_DEPRECATED_INCLUDES -#pragma message("mafianet/socket2.h is deprecated; include mafianet/RakNetSocket2.h instead") -#endif -#include "RakNetSocket2.h" diff --git a/Source/include/mafianet/statistics.h b/Source/include/mafianet/statistics.h deleted file mode 100644 index c24b3f5e8..000000000 --- a/Source/include/mafianet/statistics.h +++ /dev/null @@ -1,14 +0,0 @@ -/* - * Copyright (c) 2026, MafiaHub - * Licensed under MIT-style license - * - * Deprecated include path. "mafianet/statistics.h" was renamed to "mafianet/RakNetStatistics.h" so - * every header follows the PascalCase name of the class it declares. This - * forwarding header is kept for one release cycle and will then be removed. - * Define MAFIANET_SILENCE_DEPRECATED_INCLUDES to suppress the message. - */ -#pragma once -#ifndef MAFIANET_SILENCE_DEPRECATED_INCLUDES -#pragma message("mafianet/statistics.h is deprecated; include mafianet/RakNetStatistics.h instead") -#endif -#include "RakNetStatistics.h" diff --git a/Source/include/mafianet/string.h b/Source/include/mafianet/string.h deleted file mode 100644 index 4974b4f38..000000000 --- a/Source/include/mafianet/string.h +++ /dev/null @@ -1,14 +0,0 @@ -/* - * Copyright (c) 2026, MafiaHub - * Licensed under MIT-style license - * - * Deprecated include path. "mafianet/string.h" was renamed to "mafianet/RakString.h" so - * every header follows the PascalCase name of the class it declares. This - * forwarding header is kept for one release cycle and will then be removed. - * Define MAFIANET_SILENCE_DEPRECATED_INCLUDES to suppress the message. - */ -#pragma once -#ifndef MAFIANET_SILENCE_DEPRECATED_INCLUDES -#pragma message("mafianet/string.h is deprecated; include mafianet/RakString.h instead") -#endif -#include "RakString.h" diff --git a/Source/include/mafianet/thread.h b/Source/include/mafianet/thread.h deleted file mode 100644 index 2050ea8b5..000000000 --- a/Source/include/mafianet/thread.h +++ /dev/null @@ -1,14 +0,0 @@ -/* - * Copyright (c) 2026, MafiaHub - * Licensed under MIT-style license - * - * Deprecated include path. "mafianet/thread.h" was renamed to "mafianet/RakThread.h" so - * every header follows the PascalCase name of the class it declares. This - * forwarding header is kept for one release cycle and will then be removed. - * Define MAFIANET_SILENCE_DEPRECATED_INCLUDES to suppress the message. - */ -#pragma once -#ifndef MAFIANET_SILENCE_DEPRECATED_INCLUDES -#pragma message("mafianet/thread.h is deprecated; include mafianet/RakThread.h instead") -#endif -#include "RakThread.h" diff --git a/Source/include/mafianet/time.h b/Source/include/mafianet/time.h deleted file mode 100644 index d289f2bca..000000000 --- a/Source/include/mafianet/time.h +++ /dev/null @@ -1,14 +0,0 @@ -/* - * Copyright (c) 2026, MafiaHub - * Licensed under MIT-style license - * - * Deprecated include path. "mafianet/time.h" was renamed to "mafianet/RakNetTime.h" so - * every header follows the PascalCase name of the class it declares. This - * forwarding header is kept for one release cycle and will then be removed. - * Define MAFIANET_SILENCE_DEPRECATED_INCLUDES to suppress the message. - */ -#pragma once -#ifndef MAFIANET_SILENCE_DEPRECATED_INCLUDES -#pragma message("mafianet/time.h is deprecated; include mafianet/RakNetTime.h instead") -#endif -#include "RakNetTime.h" diff --git a/Source/include/mafianet/transport2.h b/Source/include/mafianet/transport2.h deleted file mode 100644 index b449c80fd..000000000 --- a/Source/include/mafianet/transport2.h +++ /dev/null @@ -1,14 +0,0 @@ -/* - * Copyright (c) 2026, MafiaHub - * Licensed under MIT-style license - * - * Deprecated include path. "mafianet/transport2.h" was renamed to "mafianet/RakNetTransport2.h" so - * every header follows the PascalCase name of the class it declares. This - * forwarding header is kept for one release cycle and will then be removed. - * Define MAFIANET_SILENCE_DEPRECATED_INCLUDES to suppress the message. - */ -#pragma once -#ifndef MAFIANET_SILENCE_DEPRECATED_INCLUDES -#pragma message("mafianet/transport2.h is deprecated; include mafianet/RakNetTransport2.h instead") -#endif -#include "RakNetTransport2.h" diff --git a/Source/include/mafianet/types.h b/Source/include/mafianet/types.h deleted file mode 100644 index 13c53d395..000000000 --- a/Source/include/mafianet/types.h +++ /dev/null @@ -1,14 +0,0 @@ -/* - * Copyright (c) 2026, MafiaHub - * Licensed under MIT-style license - * - * Deprecated include path. "mafianet/types.h" was renamed to "mafianet/RakNetTypes.h" so - * every header follows the PascalCase name of the class it declares. This - * forwarding header is kept for one release cycle and will then be removed. - * Define MAFIANET_SILENCE_DEPRECATED_INCLUDES to suppress the message. - */ -#pragma once -#ifndef MAFIANET_SILENCE_DEPRECATED_INCLUDES -#pragma message("mafianet/types.h is deprecated; include mafianet/RakNetTypes.h instead") -#endif -#include "RakNetTypes.h" diff --git a/Source/include/mafianet/wstring.h b/Source/include/mafianet/wstring.h deleted file mode 100644 index bad3e4240..000000000 --- a/Source/include/mafianet/wstring.h +++ /dev/null @@ -1,14 +0,0 @@ -/* - * Copyright (c) 2026, MafiaHub - * Licensed under MIT-style license - * - * Deprecated include path. "mafianet/wstring.h" was renamed to "mafianet/RakWString.h" so - * every header follows the PascalCase name of the class it declares. This - * forwarding header is kept for one release cycle and will then be removed. - * Define MAFIANET_SILENCE_DEPRECATED_INCLUDES to suppress the message. - */ -#pragma once -#ifndef MAFIANET_SILENCE_DEPRECATED_INCLUDES -#pragma message("mafianet/wstring.h is deprecated; include mafianet/RakWString.h instead") -#endif -#include "RakWString.h" diff --git a/Source/src/Base64Encoder.cpp b/Source/src/Base64Encoder.cpp index d0ac34cf5..ec4085321 100644 --- a/Source/src/Base64Encoder.cpp +++ b/Source/src/Base64Encoder.cpp @@ -14,7 +14,7 @@ */ #include "mafianet/Base64Encoder.h" -#include "mafianet/RakMemoryOverride.h" +#include "mafianet/MemoryOverride.h" const char *Base64Map(void) {return "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";} const char *base64Map = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; diff --git a/Source/src/BitStream.cpp b/Source/src/BitStream.cpp index e7242a7cc..8fd6a477b 100644 --- a/Source/src/BitStream.cpp +++ b/Source/src/BitStream.cpp @@ -24,7 +24,7 @@ #include #include "mafianet/SocketIncludes.h" -#include "mafianet/RakNetDefines.h" +#include "mafianet/Defines.h" #if defined(_WIN32) #include "mafianet/WindowsIncludes.h" diff --git a/Source/src/CCRakNetSlidingWindow.cpp b/Source/src/CCRakNetSlidingWindow.cpp index 2c2dcec9e..a92445afc 100644 --- a/Source/src/CCRakNetSlidingWindow.cpp +++ b/Source/src/CCRakNetSlidingWindow.cpp @@ -29,8 +29,8 @@ static const CCTimeType SYN=10000; #include #include #include -#include "mafianet/RakAssert.h" -#include "mafianet/RakAlloca.h" +#include "mafianet/Assert.h" +#include "mafianet/Alloca.h" using namespace MafiaNet; diff --git a/Source/src/CCRakNetUDT.cpp b/Source/src/CCRakNetUDT.cpp index 336fd49d5..3931e534c 100644 --- a/Source/src/CCRakNetUDT.cpp +++ b/Source/src/CCRakNetUDT.cpp @@ -23,8 +23,8 @@ #include #include //#include -#include "mafianet/RakAssert.h" -#include "mafianet/RakAlloca.h" +#include "mafianet/Assert.h" +#include "mafianet/Alloca.h" using namespace MafiaNet; diff --git a/Source/src/CloudClient.cpp b/Source/src/CloudClient.cpp index a84f22cb5..b0f57aa07 100644 --- a/Source/src/CloudClient.cpp +++ b/Source/src/CloudClient.cpp @@ -20,7 +20,7 @@ #include "mafianet/GetTime.h" #include "mafianet/MessageIdentifiers.h" #include "mafianet/BitStream.h" -#include "mafianet/RakPeerInterface.h" +#include "mafianet/PeerInterface.h" using namespace MafiaNet; diff --git a/Source/src/CloudServer.cpp b/Source/src/CloudServer.cpp index ead4a4f9c..0f5724c7b 100644 --- a/Source/src/CloudServer.cpp +++ b/Source/src/CloudServer.cpp @@ -20,7 +20,7 @@ #include "mafianet/GetTime.h" #include "mafianet/MessageIdentifiers.h" #include "mafianet/BitStream.h" -#include "mafianet/RakPeerInterface.h" +#include "mafianet/PeerInterface.h" enum ServerToServerCommands { diff --git a/Source/src/CommandParserInterface.cpp b/Source/src/CommandParserInterface.cpp index 2a7df0d26..bc443e177 100644 --- a/Source/src/CommandParserInterface.cpp +++ b/Source/src/CommandParserInterface.cpp @@ -16,7 +16,7 @@ #include "mafianet/CommandParserInterface.h" #include "mafianet/TransportInterface.h" #include -#include "mafianet/RakAssert.h" +#include "mafianet/Assert.h" #include diff --git a/Source/src/ConnectionGraph2.cpp b/Source/src/ConnectionGraph2.cpp index bf52b5cb0..24d908655 100644 --- a/Source/src/ConnectionGraph2.cpp +++ b/Source/src/ConnectionGraph2.cpp @@ -17,7 +17,7 @@ #if _RAKNET_SUPPORT_ConnectionGraph2==1 #include "mafianet/ConnectionGraph2.h" -#include "mafianet/RakPeerInterface.h" +#include "mafianet/PeerInterface.h" #include "mafianet/MessageIdentifiers.h" #include "mafianet/BitStream.h" diff --git a/Source/src/DS_BytePool.cpp b/Source/src/DS_BytePool.cpp index cbd2a978b..5cfe5903b 100644 --- a/Source/src/DS_BytePool.cpp +++ b/Source/src/DS_BytePool.cpp @@ -16,7 +16,7 @@ // The header is deprecated; this is its own implementation file. #define MAFIANET_SILENCE_DEPRECATED_INCLUDES #include "mafianet/DS_BytePool.h" -#include "mafianet/RakAssert.h" +#include "mafianet/Assert.h" #ifndef __APPLE__ // Use stdlib and not malloc for compatibility #include diff --git a/Source/src/DS_HuffmanEncodingTree.cpp b/Source/src/DS_HuffmanEncodingTree.cpp index ca9dfc0b9..6243e17c1 100644 --- a/Source/src/DS_HuffmanEncodingTree.cpp +++ b/Source/src/DS_HuffmanEncodingTree.cpp @@ -16,7 +16,7 @@ #include "mafianet/DS_HuffmanEncodingTree.h" #include "mafianet/DS_Queue.h" #include "mafianet/BitStream.h" -#include "mafianet/RakAssert.h" +#include "mafianet/Assert.h" using namespace MafiaNet; diff --git a/Source/src/DS_Table.cpp b/Source/src/DS_Table.cpp index ae4bb5dc1..164df4f59 100644 --- a/Source/src/DS_Table.cpp +++ b/Source/src/DS_Table.cpp @@ -16,8 +16,8 @@ #include "mafianet/DS_Table.h" #include "mafianet/DS_OrderedList.h" #include -#include "mafianet/RakAssert.h" -#include "mafianet/RakAssert.h" +#include "mafianet/Assert.h" +#include "mafianet/Assert.h" #include "mafianet/Itoa.h" #include "mafianet/LinuxAdapter.h" #include "mafianet/OsxAdapter.h" diff --git a/Source/src/DataCompressor.cpp b/Source/src/DataCompressor.cpp index 6e7e4b1ee..b4c4f5929 100644 --- a/Source/src/DataCompressor.cpp +++ b/Source/src/DataCompressor.cpp @@ -15,7 +15,7 @@ #include "mafianet/DataCompressor.h" #include "mafianet/DS_HuffmanEncodingTree.h" -#include "mafianet/RakAssert.h" +#include "mafianet/Assert.h" #include // Use string.h rather than memory.h for a console using namespace MafiaNet; diff --git a/Source/src/DirectoryDeltaTransfer.cpp b/Source/src/DirectoryDeltaTransfer.cpp index 805551730..75f9aacb3 100644 --- a/Source/src/DirectoryDeltaTransfer.cpp +++ b/Source/src/DirectoryDeltaTransfer.cpp @@ -19,7 +19,7 @@ #include "mafianet/DirectoryDeltaTransfer.h" #include "mafianet/FileList.h" #include "mafianet/StringCompressor.h" -#include "mafianet/RakPeerInterface.h" +#include "mafianet/PeerInterface.h" #include "mafianet/FileListTransfer.h" #include "mafianet/FileListTransferCBInterface.h" #include "mafianet/BitStream.h" diff --git a/Source/src/DynDNS.cpp b/Source/src/DynDNS.cpp index 2233c3fc8..a8c68220b 100644 --- a/Source/src/DynDNS.cpp +++ b/Source/src/DynDNS.cpp @@ -17,7 +17,7 @@ #if _RAKNET_SUPPORT_DynDNS==1 && _RAKNET_SUPPORT_TCPInterface==1 #include "mafianet/TCPInterface.h" -#include "mafianet/RakNetSocket2.h" +#include "mafianet/Socket2.h" #include "mafianet/DynDNS.h" #include "mafianet/GetTime.h" #include "mafianet/Base64Encoder.h" diff --git a/Source/src/EmailSender.cpp b/Source/src/EmailSender.cpp index b8f7ddb89..6abf7c1a0 100644 --- a/Source/src/EmailSender.cpp +++ b/Source/src/EmailSender.cpp @@ -35,7 +35,7 @@ -#include "mafianet/RakSleep.h" +#include "mafianet/Sleep.h" using namespace MafiaNet; diff --git a/Source/src/FileList.cpp b/Source/src/FileList.cpp index e21a095ce..06f2c0c84 100644 --- a/Source/src/FileList.cpp +++ b/Source/src/FileList.cpp @@ -18,7 +18,7 @@ #if _RAKNET_SUPPORT_FileOperations==1 #include // RAKNET_DEBUG_PRINTF -#include "mafianet/RakAssert.h" +#include "mafianet/Assert.h" #if defined(ANDROID) #include #elif defined(_WIN32) || defined(__CYGWIN__) @@ -47,7 +47,7 @@ #include "mafianet/BitStream.h" #include "mafianet/FileOperations.h" #include "mafianet/SuperFastHash.h" -#include "mafianet/RakAssert.h" +#include "mafianet/Assert.h" #include "mafianet/LinuxStrings.h" #include "mafianet/LinuxAdapter.h" #include "mafianet/OsxAdapter.h" @@ -74,7 +74,7 @@ using namespace MafiaNet; #include //defines intptr_t #endif -#include "mafianet/RakAlloca.h" +#include "mafianet/Alloca.h" //int RAK_DLL_EXPORT FileListNodeComp( char * const &key, const FileListNode &data ) //{ diff --git a/Source/src/FileListTransfer.cpp b/Source/src/FileListTransfer.cpp index d656e1992..dae7130d4 100644 --- a/Source/src/FileListTransfer.cpp +++ b/Source/src/FileListTransfer.cpp @@ -23,12 +23,12 @@ #include "mafianet/FileList.h" #include "mafianet/DS_Queue.h" #include "mafianet/MessageIdentifiers.h" -#include "mafianet/RakNetTypes.h" -#include "mafianet/RakPeerInterface.h" -#include "mafianet/RakNetStatistics.h" +#include "mafianet/Types.h" +#include "mafianet/PeerInterface.h" +#include "mafianet/Statistics.h" #include "mafianet/IncrementalReadInterface.h" -#include "mafianet/RakAssert.h" -#include "mafianet/RakAlloca.h" +#include "mafianet/Assert.h" +#include "mafianet/Alloca.h" namespace MafiaNet { diff --git a/Source/src/FileOperations.cpp b/Source/src/FileOperations.cpp index 66f3465ce..ad6848f08 100644 --- a/Source/src/FileOperations.cpp +++ b/Source/src/FileOperations.cpp @@ -15,7 +15,7 @@ #include "mafianet/FileOperations.h" #if _RAKNET_SUPPORT_FileOperations==1 -#include "mafianet/RakMemoryOverride.h" +#include "mafianet/MemoryOverride.h" #include "mafianet/_FindFirst.h" // For linux #include #include diff --git a/Source/src/FullyConnectedMesh2.cpp b/Source/src/FullyConnectedMesh2.cpp index 2bed19a88..05b92fc5c 100644 --- a/Source/src/FullyConnectedMesh2.cpp +++ b/Source/src/FullyConnectedMesh2.cpp @@ -21,10 +21,10 @@ #if _RAKNET_SUPPORT_FullyConnectedMesh2==1 #include "mafianet/FullyConnectedMesh2.h" -#include "mafianet/RakPeerInterface.h" +#include "mafianet/PeerInterface.h" #include "mafianet/GuidUtil.h" #include "mafianet/MessageIdentifiers.h" -#include "mafianet/RakAssert.h" +#include "mafianet/Assert.h" #include "mafianet/GetTime.h" #include "mafianet/Rand.h" #include "mafianet/DS_OrderedList.h" diff --git a/Source/src/GridSectorizer.cpp b/Source/src/GridSectorizer.cpp index 7580eec70..747c1b95d 100644 --- a/Source/src/GridSectorizer.cpp +++ b/Source/src/GridSectorizer.cpp @@ -13,7 +13,7 @@ * license found in the license.txt file in the root directory of this source tree. */ -#include "mafianet/RakAssert.h" +#include "mafianet/Assert.h" #include "mafianet/GridSectorizer.h" //#include #include diff --git a/Source/src/HTTPConnection.cpp b/Source/src/HTTPConnection.cpp index f6602b453..df3652180 100644 --- a/Source/src/HTTPConnection.cpp +++ b/Source/src/HTTPConnection.cpp @@ -22,9 +22,9 @@ #include "mafianet/TCPInterface.h" #include "mafianet/HTTPConnection.h" -#include "mafianet/RakSleep.h" -#include "mafianet/RakString.h" -#include "mafianet/RakAssert.h" +#include "mafianet/Sleep.h" +#include "mafianet/String.h" +#include "mafianet/Assert.h" #include #include #include diff --git a/Source/src/MessageFilter.cpp b/Source/src/MessageFilter.cpp index b927a51fa..eba9a7708 100644 --- a/Source/src/MessageFilter.cpp +++ b/Source/src/MessageFilter.cpp @@ -17,11 +17,11 @@ #if _RAKNET_SUPPORT_MessageFilter==1 #include "mafianet/MessageFilter.h" -#include "mafianet/RakAssert.h" +#include "mafianet/Assert.h" #include "mafianet/GetTime.h" #include "mafianet/MessageIdentifiers.h" -#include "mafianet/RakAssert.h" -#include "mafianet/RakPeerInterface.h" +#include "mafianet/Assert.h" +#include "mafianet/PeerInterface.h" #include "mafianet/PacketizedTCP.h" #include "mafianet/BitStream.h" diff --git a/Source/src/NatPunchthroughClient.cpp b/Source/src/NatPunchthroughClient.cpp index 0f03527d9..79bf3e597 100644 --- a/Source/src/NatPunchthroughClient.cpp +++ b/Source/src/NatPunchthroughClient.cpp @@ -19,7 +19,7 @@ #include "mafianet/NatPunchthroughClient.h" #include "mafianet/BitStream.h" #include "mafianet/MessageIdentifiers.h" -#include "mafianet/RakPeerInterface.h" +#include "mafianet/PeerInterface.h" #include "mafianet/GetTime.h" #include "mafianet/PacketLogger.h" #include "mafianet/Itoa.h" diff --git a/Source/src/NatPunchthroughServer.cpp b/Source/src/NatPunchthroughServer.cpp index 49f49f9ae..1cec6964c 100644 --- a/Source/src/NatPunchthroughServer.cpp +++ b/Source/src/NatPunchthroughServer.cpp @@ -20,7 +20,7 @@ #include "mafianet/SocketLayer.h" #include "mafianet/BitStream.h" #include "mafianet/MessageIdentifiers.h" -#include "mafianet/RakPeerInterface.h" +#include "mafianet/PeerInterface.h" #include "mafianet/MTUSize.h" #include "mafianet/GetTime.h" #include "mafianet/PacketLogger.h" diff --git a/Source/src/NatTypeDetectionClient.cpp b/Source/src/NatTypeDetectionClient.cpp index c852305a8..6967612c6 100644 --- a/Source/src/NatTypeDetectionClient.cpp +++ b/Source/src/NatTypeDetectionClient.cpp @@ -17,11 +17,11 @@ #if _RAKNET_SUPPORT_NatTypeDetectionClient==1 #include "mafianet/NatTypeDetectionClient.h" -#include "mafianet/RakNetSmartPtr.h" +#include "mafianet/SmartPtr.h" #include "mafianet/BitStream.h" #include "mafianet/SocketIncludes.h" -#include "mafianet/RakString.h" -#include "mafianet/RakPeerInterface.h" +#include "mafianet/String.h" +#include "mafianet/PeerInterface.h" #include "mafianet/MessageIdentifiers.h" #include "mafianet/SocketLayer.h" #include "mafianet/SocketDefines.h" diff --git a/Source/src/NatTypeDetectionServer.cpp b/Source/src/NatTypeDetectionServer.cpp index 6c4c0f7e2..6638b4d53 100644 --- a/Source/src/NatTypeDetectionServer.cpp +++ b/Source/src/NatTypeDetectionServer.cpp @@ -18,9 +18,9 @@ #include "mafianet/NatTypeDetectionServer.h" #include "mafianet/SocketLayer.h" -#include "mafianet/RakNetSmartPtr.h" +#include "mafianet/SmartPtr.h" #include "mafianet/SocketIncludes.h" -#include "mafianet/RakPeerInterface.h" +#include "mafianet/PeerInterface.h" #include "mafianet/MessageIdentifiers.h" #include "mafianet/GetTime.h" #include "mafianet/BitStream.h" diff --git a/Source/src/NetworkIDManager.cpp b/Source/src/NetworkIDManager.cpp index 55732a72c..645535d7a 100644 --- a/Source/src/NetworkIDManager.cpp +++ b/Source/src/NetworkIDManager.cpp @@ -19,11 +19,11 @@ #include "mafianet/NetworkIDManager.h" #include "mafianet/NetworkIDObject.h" -#include "mafianet/RakAssert.h" +#include "mafianet/Assert.h" #include "mafianet/GetTime.h" -#include "mafianet/RakSleep.h" +#include "mafianet/Sleep.h" #include "mafianet/SuperFastHash.h" -#include "mafianet/RakPeerInterface.h" +#include "mafianet/PeerInterface.h" using namespace MafiaNet; diff --git a/Source/src/NetworkIDObject.cpp b/Source/src/NetworkIDObject.cpp index d54964dc2..cd97d7a31 100644 --- a/Source/src/NetworkIDObject.cpp +++ b/Source/src/NetworkIDObject.cpp @@ -19,8 +19,8 @@ #include "mafianet/NetworkIDObject.h" #include "mafianet/NetworkIDManager.h" -#include "mafianet/RakAssert.h" -#include "mafianet/RakAlloca.h" +#include "mafianet/Assert.h" +#include "mafianet/Alloca.h" using namespace MafiaNet; diff --git a/Source/src/PacketFileLogger.cpp b/Source/src/PacketFileLogger.cpp index 32996cbdf..e5545be58 100644 --- a/Source/src/PacketFileLogger.cpp +++ b/Source/src/PacketFileLogger.cpp @@ -20,7 +20,7 @@ #include "mafianet/GetTime.h" #include "mafianet/LinuxAdapter.h" #include "mafianet/OsxAdapter.h" -#include "mafianet/RakMemoryOverride.h" +#include "mafianet/MemoryOverride.h" using namespace MafiaNet; diff --git a/Source/src/PacketLogger.cpp b/Source/src/PacketLogger.cpp index 92b56485b..bbf0145d9 100644 --- a/Source/src/PacketLogger.cpp +++ b/Source/src/PacketLogger.cpp @@ -20,7 +20,7 @@ #include "mafianet/BitStream.h" #include "mafianet/DS_List.h" #include "mafianet/InternalPacket.h" -#include "mafianet/RakPeerInterface.h" +#include "mafianet/PeerInterface.h" #include "mafianet/MessageIdentifiers.h" #include "mafianet/StringCompressor.h" #include "mafianet/GetTime.h" diff --git a/Source/src/PacketOutputWindowLogger.cpp b/Source/src/PacketOutputWindowLogger.cpp index 6a2e80561..2025dad13 100644 --- a/Source/src/PacketOutputWindowLogger.cpp +++ b/Source/src/PacketOutputWindowLogger.cpp @@ -17,11 +17,11 @@ #if _RAKNET_SUPPORT_PacketLogger==1 #if defined(UNICODE) -#include "mafianet/RakWString.h" +#include "mafianet/WString.h" #endif #include "mafianet/PacketOutputWindowLogger.h" -#include "mafianet/RakString.h" +#include "mafianet/String.h" #if defined(_WIN32) #include "mafianet/WindowsIncludes.h" #endif diff --git a/Source/src/PacketizedTCP.cpp b/Source/src/PacketizedTCP.cpp index 3e0531410..474c88766 100644 --- a/Source/src/PacketizedTCP.cpp +++ b/Source/src/PacketizedTCP.cpp @@ -21,7 +21,7 @@ #include "mafianet/NativeTypes.h" #include "mafianet/BitStream.h" #include "mafianet/MessageIdentifiers.h" -#include "mafianet/RakAlloca.h" +#include "mafianet/Alloca.h" using namespace MafiaNet; diff --git a/Source/src/PluginInterface2.cpp b/Source/src/PluginInterface2.cpp index b680ee162..70a990596 100644 --- a/Source/src/PluginInterface2.cpp +++ b/Source/src/PluginInterface2.cpp @@ -16,7 +16,7 @@ #include "mafianet/PluginInterface2.h" #include "mafianet/PacketizedTCP.h" -#include "mafianet/RakPeerInterface.h" +#include "mafianet/PeerInterface.h" #include "mafianet/BitStream.h" using namespace MafiaNet; diff --git a/Source/src/RPC4Plugin.cpp b/Source/src/RPC4Plugin.cpp index f1dd13199..221174499 100644 --- a/Source/src/RPC4Plugin.cpp +++ b/Source/src/RPC4Plugin.cpp @@ -18,10 +18,10 @@ #include "mafianet/RPC4Plugin.h" #include "mafianet/MessageIdentifiers.h" -#include "mafianet/RakPeerInterface.h" +#include "mafianet/PeerInterface.h" #include "mafianet/PacketizedTCP.h" -#include "mafianet/RakSleep.h" -#include "mafianet/RakNetDefines.h" +#include "mafianet/Sleep.h" +#include "mafianet/Defines.h" #include "mafianet/DS_Queue.h" //#include "mafianet/GetTime.h" #include "mafianet/LinuxAdapter.h" diff --git a/Source/src/Rackspace.cpp b/Source/src/Rackspace.cpp index d4049905d..208589ac0 100644 --- a/Source/src/Rackspace.cpp +++ b/Source/src/Rackspace.cpp @@ -17,7 +17,7 @@ #if _RAKNET_SUPPORT_Rackspace==1 && _RAKNET_SUPPORT_TCPInterface==1 #include "mafianet/Rackspace.h" -#include "mafianet/RakString.h" +#include "mafianet/String.h" #include "mafianet/TCPInterface.h" using namespace MafiaNet; diff --git a/Source/src/RakMemoryOverride.cpp b/Source/src/RakMemoryOverride.cpp index 3039323b0..2c199dcfe 100644 --- a/Source/src/RakMemoryOverride.cpp +++ b/Source/src/RakMemoryOverride.cpp @@ -13,8 +13,8 @@ * license found in the license.txt file in the root directory of this source tree. */ -#include "mafianet/RakMemoryOverride.h" -#include "mafianet/RakAssert.h" +#include "mafianet/MemoryOverride.h" +#include "mafianet/Assert.h" #include #ifdef _RAKNET_SUPPORT_DL_MALLOC diff --git a/Source/src/RakNetCommandParser.cpp b/Source/src/RakNetCommandParser.cpp index aaf144bca..154d27122 100644 --- a/Source/src/RakNetCommandParser.cpp +++ b/Source/src/RakNetCommandParser.cpp @@ -16,11 +16,11 @@ #include "mafianet/NativeFeatureIncludes.h" #if _RAKNET_SUPPORT_RakNetCommandParser==1 -#include "mafianet/RakNetCommandParser.h" +#include "mafianet/CommandParser.h" #include "mafianet/TransportInterface.h" -#include "mafianet/RakPeerInterface.h" +#include "mafianet/PeerInterface.h" #include "mafianet/BitStream.h" -#include "mafianet/RakAssert.h" +#include "mafianet/Assert.h" #include #include #include diff --git a/Source/src/RakNetSocket2.cpp b/Source/src/RakNetSocket2.cpp index 7b41935ff..294a2eb7c 100644 --- a/Source/src/RakNetSocket2.cpp +++ b/Source/src/RakNetSocket2.cpp @@ -13,11 +13,11 @@ * license found in the license.txt file in the root directory of this source tree. */ -#include "mafianet/RakNetSocket2.h" +#include "mafianet/Socket2.h" #include "mafianet/MmsgBatch.h" -#include "mafianet/RakMemoryOverride.h" -#include "mafianet/RakAssert.h" -#include "mafianet/RakSleep.h" +#include "mafianet/MemoryOverride.h" +#include "mafianet/Assert.h" +#include "mafianet/Sleep.h" #include "mafianet/SocketDefines.h" #include "mafianet/GetTime.h" #include diff --git a/Source/src/RakNetStatistics.cpp b/Source/src/RakNetStatistics.cpp index e6337eeec..11420a37d 100644 --- a/Source/src/RakNetStatistics.cpp +++ b/Source/src/RakNetStatistics.cpp @@ -18,10 +18,10 @@ -#include "mafianet/RakNetStatistics.h" +#include "mafianet/Statistics.h" #include // sprintf #include "mafianet/GetTime.h" -#include "mafianet/RakString.h" +#include "mafianet/String.h" #include "mafianet/LinuxAdapter.h" #include "mafianet/OsxAdapter.h" diff --git a/Source/src/RakNetTransport2.cpp b/Source/src/RakNetTransport2.cpp index 89e9c155d..054bec010 100644 --- a/Source/src/RakNetTransport2.cpp +++ b/Source/src/RakNetTransport2.cpp @@ -16,9 +16,9 @@ #include "mafianet/NativeFeatureIncludes.h" #if _RAKNET_SUPPORT_TelnetTransport==1 -#include "mafianet/RakNetTransport2.h" +#include "mafianet/Transport2.h" -#include "mafianet/RakPeerInterface.h" +#include "mafianet/PeerInterface.h" #include "mafianet/BitStream.h" #include "mafianet/MessageIdentifiers.h" #include diff --git a/Source/src/RakNetTypes.cpp b/Source/src/RakNetTypes.cpp index b39c57425..3377932f2 100644 --- a/Source/src/RakNetTypes.cpp +++ b/Source/src/RakNetTypes.cpp @@ -16,14 +16,14 @@ /// \file /// -#include "mafianet/RakNetTypes.h" -#include "mafianet/RakAssert.h" +#include "mafianet/Types.h" +#include "mafianet/Assert.h" #include #include #include "mafianet/WindowsIncludes.h" #include "mafianet/WSAStartupSingleton.h" #include "mafianet/SocketDefines.h" -#include "mafianet/RakNetSocket2.h" +#include "mafianet/Socket2.h" #if defined(_WIN32) // extern __int64 _strtoui64(const char*, char**, int); // needed for Code::Blocks. Does not compile on Visual Studio 2010 diff --git a/Source/src/RakPeer.cpp b/Source/src/RakPeer.cpp index 8f4035a26..6ca5a8ee0 100644 --- a/Source/src/RakPeer.cpp +++ b/Source/src/RakPeer.cpp @@ -20,10 +20,10 @@ #define CAT_NEUTER_EXPORT /* Neuter dllimport for libcat */ -#include "mafianet/RakNetDefines.h" -#include "mafianet/RakPeer.h" +#include "mafianet/Defines.h" +#include "mafianet/Peer.h" #include "mafianet/SessionAdmission.h" -#include "mafianet/RakNetTypes.h" +#include "mafianet/Types.h" #ifdef _WIN32 @@ -51,16 +51,16 @@ #include "mafianet/StringCompressor.h" #include "mafianet/StringTable.h" #include "mafianet/NetworkIDObject.h" -#include "mafianet/RakNetTypes.h" +#include "mafianet/Types.h" #include "mafianet/DR_SHA1.h" -#include "mafianet/RakSleep.h" -#include "mafianet/RakAssert.h" +#include "mafianet/Sleep.h" +#include "mafianet/Assert.h" #include "mafianet/Version.h" #include "mafianet/NetworkIDManager.h" #include "mafianet/GetTimeOfDay.h" #include "mafianet/SignaledEvent.h" #include "mafianet/SuperFastHash.h" -#include "mafianet/RakAlloca.h" +#include "mafianet/Alloca.h" #include "mafianet/WSAStartupSingleton.h" #include "mafianet/LinuxAdapter.h" #include "mafianet/OsxAdapter.h" diff --git a/Source/src/RakSleep.cpp b/Source/src/RakSleep.cpp index a2d821800..4f8f99cf8 100644 --- a/Source/src/RakSleep.cpp +++ b/Source/src/RakSleep.cpp @@ -30,7 +30,7 @@ pthread_mutex_t fakeMutex = PTHREAD_MUTEX_INITIALIZER; pthread_cond_t fakeCond = PTHREAD_COND_INITIALIZER; #endif -#include "mafianet/RakSleep.h" +#include "mafianet/Sleep.h" void RakSleep(unsigned int ms) { diff --git a/Source/src/RakString.cpp b/Source/src/RakString.cpp index 77e6a2400..25fc89536 100644 --- a/Source/src/RakString.cpp +++ b/Source/src/RakString.cpp @@ -13,9 +13,9 @@ * license found in the license.txt file in the root directory of this source tree. */ -#include "mafianet/RakString.h" -#include "mafianet/RakAssert.h" -#include "mafianet/RakMemoryOverride.h" +#include "mafianet/String.h" +#include "mafianet/Assert.h" +#include "mafianet/MemoryOverride.h" #include "mafianet/BitStream.h" #include #include @@ -1573,7 +1573,7 @@ void RakString::UnlockMutex(void) } /* -#include "mafianet/RakString.h" +#include "mafianet/String.h" #include #include "mafianet/GetTime.h" diff --git a/Source/src/RakThread.cpp b/Source/src/RakThread.cpp index ff9b8920c..6523643a7 100644 --- a/Source/src/RakThread.cpp +++ b/Source/src/RakThread.cpp @@ -13,11 +13,11 @@ * license found in the license.txt file in the root directory of this source tree. */ -#include "mafianet/RakThread.h" -#include "mafianet/RakAssert.h" -#include "mafianet/RakNetDefines.h" -#include "mafianet/RakSleep.h" -#include "mafianet/RakMemoryOverride.h" +#include "mafianet/Thread.h" +#include "mafianet/Assert.h" +#include "mafianet/Defines.h" +#include "mafianet/Sleep.h" +#include "mafianet/MemoryOverride.h" using namespace MafiaNet; diff --git a/Source/src/RakVoice.cpp b/Source/src/RakVoice.cpp index 062c6b470..d2cb56a9c 100644 --- a/Source/src/RakVoice.cpp +++ b/Source/src/RakVoice.cpp @@ -20,7 +20,7 @@ #include "mafianet/BitStream.h" #include "mafianet/PacketPriority.h" #include "mafianet/MessageIdentifiers.h" -#include "mafianet/RakPeerInterface.h" +#include "mafianet/PeerInterface.h" #include "mafianet/ReliabilityLayer.h" #include #include diff --git a/Source/src/RakWString.cpp b/Source/src/RakWString.cpp index ccaab61fb..7ee1ca4f5 100644 --- a/Source/src/RakWString.cpp +++ b/Source/src/RakWString.cpp @@ -13,7 +13,7 @@ * license found in the license.txt file in the root directory of this source tree. */ -#include "mafianet/RakWString.h" +#include "mafianet/WString.h" #include "mafianet/BitStream.h" #include #include diff --git a/Source/src/ReadyEvent.cpp b/Source/src/ReadyEvent.cpp index 0cfbebbbd..f900852a9 100644 --- a/Source/src/ReadyEvent.cpp +++ b/Source/src/ReadyEvent.cpp @@ -17,10 +17,10 @@ #if _RAKNET_SUPPORT_ReadyEvent==1 #include "mafianet/ReadyEvent.h" -#include "mafianet/RakPeerInterface.h" +#include "mafianet/PeerInterface.h" #include "mafianet/BitStream.h" #include "mafianet/MessageIdentifiers.h" -#include "mafianet/RakAssert.h" +#include "mafianet/Assert.h" using namespace MafiaNet; diff --git a/Source/src/RelayPlugin.cpp b/Source/src/RelayPlugin.cpp index f0219294c..db1edd61f 100644 --- a/Source/src/RelayPlugin.cpp +++ b/Source/src/RelayPlugin.cpp @@ -18,7 +18,7 @@ #include "mafianet/RelayPlugin.h" #include "mafianet/MessageIdentifiers.h" -#include "mafianet/RakPeerInterface.h" +#include "mafianet/PeerInterface.h" #include "mafianet/BitStream.h" using namespace MafiaNet; diff --git a/Source/src/ReliabilityLayer.cpp b/Source/src/ReliabilityLayer.cpp index 6350e0e61..8fa2e50b3 100644 --- a/Source/src/ReliabilityLayer.cpp +++ b/Source/src/ReliabilityLayer.cpp @@ -24,7 +24,7 @@ #include "mafianet/GetTime.h" #include "mafianet/SocketLayer.h" #include "mafianet/PluginInterface2.h" -#include "mafianet/RakAssert.h" +#include "mafianet/Assert.h" #include "mafianet/Rand.h" #include "mafianet/MessageIdentifiers.h" #ifdef USE_THREADED_SEND diff --git a/Source/src/ReplicaManager3.cpp b/Source/src/ReplicaManager3.cpp index c60be1e1a..9c472c4ce 100644 --- a/Source/src/ReplicaManager3.cpp +++ b/Source/src/ReplicaManager3.cpp @@ -20,7 +20,7 @@ #include "mafianet/VirtualWorldReplica3.h" #include "mafianet/GetTime.h" #include "mafianet/MessageIdentifiers.h" -#include "mafianet/RakPeerInterface.h" +#include "mafianet/PeerInterface.h" #include "mafianet/NetworkIDManager.h" using namespace MafiaNet; diff --git a/Source/src/Router2.cpp b/Source/src/Router2.cpp index 6d4449d76..877d452a7 100644 --- a/Source/src/Router2.cpp +++ b/Source/src/Router2.cpp @@ -17,9 +17,9 @@ #if _RAKNET_SUPPORT_Router2==1 && _RAKNET_SUPPORT_UDPForwarder==1 #include "mafianet/Router2.h" -#include "mafianet/RakPeerInterface.h" +#include "mafianet/PeerInterface.h" #include "mafianet/BitStream.h" -#include "mafianet/RakNetTime.h" +#include "mafianet/Time.h" #include "mafianet/GetTime.h" #include "mafianet/DS_OrderedList.h" #include "mafianet/SocketLayer.h" diff --git a/Source/src/SendToThread.cpp b/Source/src/SendToThread.cpp index 59ffc7bd8..37033cf08 100644 --- a/Source/src/SendToThread.cpp +++ b/Source/src/SendToThread.cpp @@ -15,7 +15,7 @@ #include "mafianet/SendToThread.h" #ifdef USE_THREADED_SEND -#include "mafianet/RakThread.h" +#include "mafianet/Thread.h" #include "mafianet/InternalPacket.h" #include "mafianet/GetTime.h" diff --git a/Source/src/SignaledEvent.cpp b/Source/src/SignaledEvent.cpp index 3f409b3bc..e94f0cc3a 100644 --- a/Source/src/SignaledEvent.cpp +++ b/Source/src/SignaledEvent.cpp @@ -14,8 +14,8 @@ */ #include "mafianet/SignaledEvent.h" -#include "mafianet/RakAssert.h" -#include "mafianet/RakSleep.h" +#include "mafianet/Assert.h" +#include "mafianet/Sleep.h" #if defined(__GNUC__) #include diff --git a/Source/src/SimpleMutex.cpp b/Source/src/SimpleMutex.cpp index de6b96fe8..046fade0b 100644 --- a/Source/src/SimpleMutex.cpp +++ b/Source/src/SimpleMutex.cpp @@ -19,7 +19,7 @@ #include "mafianet/SimpleMutex.h" -#include "mafianet/RakAssert.h" +#include "mafianet/Assert.h" using namespace MafiaNet; diff --git a/Source/src/SocketLayer.cpp b/Source/src/SocketLayer.cpp index 429154f61..793c170a8 100644 --- a/Source/src/SocketLayer.cpp +++ b/Source/src/SocketLayer.cpp @@ -18,9 +18,9 @@ /// #include "mafianet/SocketLayer.h" -#include "mafianet/RakAssert.h" -#include "mafianet/RakNetTypes.h" -#include "mafianet/RakPeer.h" +#include "mafianet/Assert.h" +#include "mafianet/Types.h" +#include "mafianet/Peer.h" #include "mafianet/GetTime.h" #include "mafianet/LinuxStrings.h" #include "mafianet/SocketDefines.h" @@ -72,7 +72,7 @@ using namespace MafiaNet; #endif -#include "mafianet/RakSleep.h" +#include "mafianet/Sleep.h" #include #include "mafianet/Itoa.h" diff --git a/Source/src/StatisticsHistory.cpp b/Source/src/StatisticsHistory.cpp index b63d7b271..eaa1beb0b 100644 --- a/Source/src/StatisticsHistory.cpp +++ b/Source/src/StatisticsHistory.cpp @@ -18,8 +18,8 @@ #include "mafianet/StatisticsHistory.h" #include "mafianet/GetTime.h" -#include "mafianet/RakNetStatistics.h" -#include "mafianet/RakPeerInterface.h" +#include "mafianet/Statistics.h" +#include "mafianet/PeerInterface.h" using namespace MafiaNet; diff --git a/Source/src/StringCompressor.cpp b/Source/src/StringCompressor.cpp index 7a7debd97..9643c42f1 100644 --- a/Source/src/StringCompressor.cpp +++ b/Source/src/StringCompressor.cpp @@ -21,8 +21,8 @@ #include "mafianet/StringCompressor.h" #include "mafianet/DS_HuffmanEncodingTree.h" #include "mafianet/BitStream.h" -#include "mafianet/RakString.h" -#include "mafianet/RakAssert.h" +#include "mafianet/String.h" +#include "mafianet/Assert.h" #include #include diff --git a/Source/src/StringTable.cpp b/Source/src/StringTable.cpp index bc0285623..3ac5f94ef 100644 --- a/Source/src/StringTable.cpp +++ b/Source/src/StringTable.cpp @@ -15,7 +15,7 @@ #include "mafianet/StringTable.h" #include -#include "mafianet/RakAssert.h" +#include "mafianet/Assert.h" #include #include "mafianet/BitStream.h" #include "mafianet/StringCompressor.h" diff --git a/Source/src/TCPInterface.cpp b/Source/src/TCPInterface.cpp index 8c7d4767a..d2edee8f1 100644 --- a/Source/src/TCPInterface.cpp +++ b/Source/src/TCPInterface.cpp @@ -31,10 +31,10 @@ #include #endif #include -#include "mafianet/RakAssert.h" +#include "mafianet/Assert.h" #include -#include "mafianet/RakAssert.h" -#include "mafianet/RakSleep.h" +#include "mafianet/Assert.h" +#include "mafianet/Sleep.h" #include "mafianet/StringCompressor.h" #include "mafianet/StringTable.h" #include "mafianet/Itoa.h" diff --git a/Source/src/TableSerializer.cpp b/Source/src/TableSerializer.cpp index 1a8a2f062..4f18681df 100644 --- a/Source/src/TableSerializer.cpp +++ b/Source/src/TableSerializer.cpp @@ -17,7 +17,7 @@ #include "mafianet/DS_Table.h" #include "mafianet/BitStream.h" #include "mafianet/StringCompressor.h" -#include "mafianet/RakAssert.h" +#include "mafianet/Assert.h" using namespace MafiaNet; diff --git a/Source/src/TeamBalancer.cpp b/Source/src/TeamBalancer.cpp index 069aef5b6..69f7d7302 100644 --- a/Source/src/TeamBalancer.cpp +++ b/Source/src/TeamBalancer.cpp @@ -19,7 +19,7 @@ #include "mafianet/TeamBalancer.h" #include "mafianet/BitStream.h" #include "mafianet/MessageIdentifiers.h" -#include "mafianet/RakPeerInterface.h" +#include "mafianet/PeerInterface.h" #include "mafianet/Rand.h" using namespace MafiaNet; diff --git a/Source/src/TwoWayAuthentication.cpp b/Source/src/TwoWayAuthentication.cpp index 2823c4d97..fff18e3a6 100644 --- a/Source/src/TwoWayAuthentication.cpp +++ b/Source/src/TwoWayAuthentication.cpp @@ -21,7 +21,7 @@ #include "mafianet/GetTime.h" #include "mafianet/MessageIdentifiers.h" #include "mafianet/BitStream.h" -#include "mafianet/RakPeerInterface.h" +#include "mafianet/PeerInterface.h" #if LIBCAT_SECURITY==1 static const int HASH_BITS = 256; diff --git a/Source/src/UDPForwarder.cpp b/Source/src/UDPForwarder.cpp index faa872a33..864f53b56 100644 --- a/Source/src/UDPForwarder.cpp +++ b/Source/src/UDPForwarder.cpp @@ -21,7 +21,7 @@ #include "mafianet/MTUSize.h" #include "mafianet/SocketLayer.h" #include "mafianet/WSAStartupSingleton.h" -#include "mafianet/RakSleep.h" +#include "mafianet/Sleep.h" #include "mafianet/DS_OrderedList.h" #include "mafianet/LinuxStrings.h" #include "mafianet/SocketDefines.h" diff --git a/Source/src/UDPProxyClient.cpp b/Source/src/UDPProxyClient.cpp index d9fefc0d1..1511f4671 100644 --- a/Source/src/UDPProxyClient.cpp +++ b/Source/src/UDPProxyClient.cpp @@ -19,7 +19,7 @@ #include "mafianet/UDPProxyClient.h" #include "mafianet/BitStream.h" #include "mafianet/UDPProxyCommon.h" -#include "mafianet/RakPeerInterface.h" +#include "mafianet/PeerInterface.h" #include "mafianet/MessageIdentifiers.h" #include "mafianet/GetTime.h" diff --git a/Source/src/UDPProxyCoordinator.cpp b/Source/src/UDPProxyCoordinator.cpp index 6b23ea250..4dce76480 100644 --- a/Source/src/UDPProxyCoordinator.cpp +++ b/Source/src/UDPProxyCoordinator.cpp @@ -19,7 +19,7 @@ #include "mafianet/UDPProxyCoordinator.h" #include "mafianet/BitStream.h" #include "mafianet/UDPProxyCommon.h" -#include "mafianet/RakPeerInterface.h" +#include "mafianet/PeerInterface.h" #include "mafianet/MessageIdentifiers.h" #include "mafianet/Rand.h" #include "mafianet/GetTime.h" diff --git a/Source/src/UDPProxyServer.cpp b/Source/src/UDPProxyServer.cpp index 77fdde9ac..178f0fb07 100644 --- a/Source/src/UDPProxyServer.cpp +++ b/Source/src/UDPProxyServer.cpp @@ -19,7 +19,7 @@ #include "mafianet/UDPProxyServer.h" #include "mafianet/BitStream.h" #include "mafianet/UDPProxyCommon.h" -#include "mafianet/RakPeerInterface.h" +#include "mafianet/PeerInterface.h" #include "mafianet/MessageIdentifiers.h" using namespace MafiaNet; diff --git a/Source/src/WSAStartupSingleton.cpp b/Source/src/WSAStartupSingleton.cpp index cea7dba79..5b7b3a3f8 100644 --- a/Source/src/WSAStartupSingleton.cpp +++ b/Source/src/WSAStartupSingleton.cpp @@ -28,7 +28,7 @@ #endif -#include "mafianet/RakNetDefines.h" +#include "mafianet/Defines.h" #include #ifdef _WIN32 diff --git a/Source/src/_FindFirst.cpp b/Source/src/_FindFirst.cpp index a796ce871..068988926 100644 --- a/Source/src/_FindFirst.cpp +++ b/Source/src/_FindFirst.cpp @@ -25,8 +25,8 @@ static DataStructures::List< _findinfo_t* > fileInfo; -#include "mafianet/RakMemoryOverride.h" -#include "mafianet/RakAssert.h" +#include "mafianet/MemoryOverride.h" +#include "mafianet/Assert.h" /** * _findfirst - equivalent diff --git a/Source/src/crypto/cryptomanager.cpp b/Source/src/crypto/cryptomanager.cpp index 1bfd33bb3..3c17fb7fb 100644 --- a/Source/src/crypto/cryptomanager.cpp +++ b/Source/src/crypto/cryptomanager.cpp @@ -6,7 +6,7 @@ */ #include "mafianet/crypto/cryptomanager.h" -#include "mafianet/RakAssert.h" // used for RakAssert +#include "mafianet/Assert.h" // used for RakAssert #include // used for std::numeric_limits<> // prevent max/min macros getting defined (breaking numeric_limits<>::max() / ::min() usage) through the indirect windows.h include in the OpenSSL includes diff --git a/Source/src/crypto/fileencrypter.cpp b/Source/src/crypto/fileencrypter.cpp index 1e7ddf92e..50f4384c3 100644 --- a/Source/src/crypto/fileencrypter.cpp +++ b/Source/src/crypto/fileencrypter.cpp @@ -14,7 +14,7 @@ #include // used for RSA_xxxx #include "mafianet/crypto/cryptomanager.h" // used for MafiaNet::Experimental::Crypto::CCryptoManager -#include "mafianet/RakAssert.h" // used for RakAssert +#include "mafianet/Assert.h" // used for RakAssert #include "mafianet/LinuxAdapter.h" // used for strcpy_s #include "mafianet/OsxAdapter.h" // used for strcpy_s diff --git a/Source/src/crypto/securestring.cpp b/Source/src/crypto/securestring.cpp index 50c7c490a..4fb02faf6 100644 --- a/Source/src/crypto/securestring.cpp +++ b/Source/src/crypto/securestring.cpp @@ -8,8 +8,8 @@ // #med - review the include order - defines.h defines SLNET_VERIFY but doesn't enforce including assert.h which it honestly should #include "mafianet/crypto/cryptomanager.h" // used for CCryptoManager -#include "mafianet/RakAssert.h" // used for assert() (via SLNET_VERIFY) -#include "mafianet/RakMemoryOverride.h" // used for OP_NEW_ARRAY +#include "mafianet/Assert.h" // used for assert() (via SLNET_VERIFY) +#include "mafianet/MemoryOverride.h" // used for OP_NEW_ARRAY #include // used for std::memcpy #include // used for std::numeric_limits diff --git a/Tests/Integration/ComprehensiveConvertTests.cpp b/Tests/Integration/ComprehensiveConvertTests.cpp index 248b5668d..9d37280ef 100644 --- a/Tests/Integration/ComprehensiveConvertTests.cpp +++ b/Tests/Integration/ComprehensiveConvertTests.cpp @@ -7,12 +7,12 @@ #include -#include "mafianet/RakPeerInterface.h" +#include "mafianet/PeerInterface.h" #include "mafianet/MessageIdentifiers.h" -#include "mafianet/RakSleep.h" +#include "mafianet/Sleep.h" #include "mafianet/GetTime.h" #include "mafianet/Rand.h" -#include "mafianet/RakNetStatistics.h" +#include "mafianet/Statistics.h" #include "CommonFunctions.h" diff --git a/Tests/Integration/ConnectWithSocketTests.cpp b/Tests/Integration/ConnectWithSocketTests.cpp index 7c8fd30b5..46c40b793 100644 --- a/Tests/Integration/ConnectWithSocketTests.cpp +++ b/Tests/Integration/ConnectWithSocketTests.cpp @@ -7,13 +7,13 @@ #include -#include "mafianet/RakString.h" -#include "mafianet/RakPeerInterface.h" +#include "mafianet/String.h" +#include "mafianet/PeerInterface.h" #include "mafianet/MessageIdentifiers.h" #include "mafianet/BitStream.h" -#include "mafianet/RakPeer.h" -#include "mafianet/RakSleep.h" -#include "mafianet/RakNetTime.h" +#include "mafianet/Peer.h" +#include "mafianet/Sleep.h" +#include "mafianet/Time.h" #include "mafianet/GetTime.h" #include "TestHelpers.h" #include "CommonFunctions.h" diff --git a/Tests/Integration/CrossConnectionConvertTests.cpp b/Tests/Integration/CrossConnectionConvertTests.cpp index 44b48574d..418b209d2 100644 --- a/Tests/Integration/CrossConnectionConvertTests.cpp +++ b/Tests/Integration/CrossConnectionConvertTests.cpp @@ -7,10 +7,10 @@ #include -#include "mafianet/RakPeerInterface.h" +#include "mafianet/PeerInterface.h" #include "mafianet/MessageIdentifiers.h" #include "mafianet/BitStream.h" -#include "mafianet/RakSleep.h" +#include "mafianet/Sleep.h" #include "mafianet/GetTime.h" #include // For getenv diff --git a/Tests/Integration/DirectoryDeltaTransferStreamingLiveTests.cpp b/Tests/Integration/DirectoryDeltaTransferStreamingLiveTests.cpp index bddf18de8..c21255b5f 100644 --- a/Tests/Integration/DirectoryDeltaTransferStreamingLiveTests.cpp +++ b/Tests/Integration/DirectoryDeltaTransferStreamingLiveTests.cpp @@ -14,14 +14,14 @@ #include #include -#include "mafianet/RakPeer.h" -#include "mafianet/RakPeerInterface.h" +#include "mafianet/Peer.h" +#include "mafianet/PeerInterface.h" #include "mafianet/MessageIdentifiers.h" #include "mafianet/FileListTransfer.h" #include "mafianet/FileListTransferCBInterface.h" #include "mafianet/DirectoryDeltaTransfer.h" #include "mafianet/IncrementalReadInterface.h" -#include "mafianet/RakSleep.h" +#include "mafianet/Sleep.h" #include "mafianet/GetTime.h" using namespace MafiaNet; diff --git a/Tests/Integration/DisconnectReasonTests.cpp b/Tests/Integration/DisconnectReasonTests.cpp index a0504fb6c..f40048a76 100644 --- a/Tests/Integration/DisconnectReasonTests.cpp +++ b/Tests/Integration/DisconnectReasonTests.cpp @@ -7,10 +7,10 @@ #include -#include "mafianet/RakPeerInterface.h" +#include "mafianet/PeerInterface.h" #include "mafianet/MessageIdentifiers.h" #include "mafianet/BitStream.h" -#include "mafianet/RakSleep.h" +#include "mafianet/Sleep.h" #include "CommonFunctions.h" using namespace MafiaNet; diff --git a/Tests/Integration/DispatcherLiveTests.cpp b/Tests/Integration/DispatcherLiveTests.cpp index 9fe0989e8..56ff76f3f 100644 --- a/Tests/Integration/DispatcherLiveTests.cpp +++ b/Tests/Integration/DispatcherLiveTests.cpp @@ -10,7 +10,7 @@ #include "mafianet/Dispatcher.h" #include "mafianet/PeerHandle.h" // Peer, PacketPtr (live round-trip) #include "mafianet/GetTime.h" // GetTime, GetTimeMS -#include "mafianet/RakSleep.h" // RakSleep +#include "mafianet/Sleep.h" // RakSleep #include diff --git a/Tests/Integration/DroppedConnectionConvertTests.cpp b/Tests/Integration/DroppedConnectionConvertTests.cpp index 472fbd536..be7817a25 100644 --- a/Tests/Integration/DroppedConnectionConvertTests.cpp +++ b/Tests/Integration/DroppedConnectionConvertTests.cpp @@ -7,9 +7,9 @@ #include -#include "mafianet/RakPeerInterface.h" +#include "mafianet/PeerInterface.h" #include "mafianet/MessageIdentifiers.h" -#include "mafianet/RakSleep.h" +#include "mafianet/Sleep.h" #include "mafianet/GetTime.h" #include "mafianet/Rand.h" // randomMT diff --git a/Tests/Integration/EightPeerTests.cpp b/Tests/Integration/EightPeerTests.cpp index f8294a360..c3c593436 100644 --- a/Tests/Integration/EightPeerTests.cpp +++ b/Tests/Integration/EightPeerTests.cpp @@ -7,12 +7,12 @@ #include -#include "mafianet/RakPeerInterface.h" +#include "mafianet/PeerInterface.h" #include "mafianet/MessageIdentifiers.h" #include "mafianet/BitStream.h" -#include "mafianet/RakPeer.h" -#include "mafianet/RakSleep.h" -#include "mafianet/RakNetTime.h" +#include "mafianet/Peer.h" +#include "mafianet/Sleep.h" +#include "mafianet/Time.h" #include "mafianet/GetTime.h" #include diff --git a/Tests/Integration/FileListTransferWindowLiveTests.cpp b/Tests/Integration/FileListTransferWindowLiveTests.cpp index 0d7fedfca..fb2488bdb 100644 --- a/Tests/Integration/FileListTransferWindowLiveTests.cpp +++ b/Tests/Integration/FileListTransferWindowLiveTests.cpp @@ -14,14 +14,14 @@ #include #include -#include "mafianet/RakPeer.h" -#include "mafianet/RakPeerInterface.h" +#include "mafianet/Peer.h" +#include "mafianet/PeerInterface.h" #include "mafianet/MessageIdentifiers.h" #include "mafianet/FileList.h" #include "mafianet/FileListTransfer.h" #include "mafianet/FileListTransferCBInterface.h" #include "mafianet/IncrementalReadInterface.h" -#include "mafianet/RakSleep.h" +#include "mafianet/Sleep.h" #include "mafianet/GetTime.h" using namespace MafiaNet; diff --git a/Tests/Integration/LocalIsConnectedTests.cpp b/Tests/Integration/LocalIsConnectedTests.cpp index 3657685a4..e6d1deaad 100644 --- a/Tests/Integration/LocalIsConnectedTests.cpp +++ b/Tests/Integration/LocalIsConnectedTests.cpp @@ -7,13 +7,13 @@ #include -#include "mafianet/RakString.h" -#include "mafianet/RakPeerInterface.h" +#include "mafianet/String.h" +#include "mafianet/PeerInterface.h" #include "mafianet/MessageIdentifiers.h" #include "mafianet/BitStream.h" -#include "mafianet/RakPeer.h" -#include "mafianet/RakSleep.h" -#include "mafianet/RakNetTime.h" +#include "mafianet/Peer.h" +#include "mafianet/Sleep.h" +#include "mafianet/Time.h" #include "mafianet/GetTime.h" #include "CommonFunctions.h" diff --git a/Tests/Integration/MTUNegotiationTests.cpp b/Tests/Integration/MTUNegotiationTests.cpp index f78926b7d..1a4f88b3b 100644 --- a/Tests/Integration/MTUNegotiationTests.cpp +++ b/Tests/Integration/MTUNegotiationTests.cpp @@ -10,12 +10,12 @@ #include #include -#include "mafianet/RakPeer.h" -#include "mafianet/RakPeerInterface.h" +#include "mafianet/Peer.h" +#include "mafianet/PeerInterface.h" #include "mafianet/MessageIdentifiers.h" #include "mafianet/MTUSize.h" #include "mafianet/BitStream.h" -#include "mafianet/RakSleep.h" +#include "mafianet/Sleep.h" #include "mafianet/GetTime.h" #ifdef _WIN32 diff --git a/Tests/Integration/ManyClientsOneServerBlockingTests.cpp b/Tests/Integration/ManyClientsOneServerBlockingTests.cpp index 75dc9e5ab..6c50feb8a 100644 --- a/Tests/Integration/ManyClientsOneServerBlockingTests.cpp +++ b/Tests/Integration/ManyClientsOneServerBlockingTests.cpp @@ -7,12 +7,12 @@ #include -#include "mafianet/RakPeerInterface.h" +#include "mafianet/PeerInterface.h" #include "mafianet/MessageIdentifiers.h" #include "mafianet/BitStream.h" -#include "mafianet/RakPeer.h" -#include "mafianet/RakSleep.h" -#include "mafianet/RakNetTime.h" +#include "mafianet/Peer.h" +#include "mafianet/Sleep.h" +#include "mafianet/Time.h" #include "mafianet/GetTime.h" #include "CommonFunctions.h" diff --git a/Tests/Integration/ManyClientsOneServerDeallocateBlockingTests.cpp b/Tests/Integration/ManyClientsOneServerDeallocateBlockingTests.cpp index f4d24f871..7fef8d487 100644 --- a/Tests/Integration/ManyClientsOneServerDeallocateBlockingTests.cpp +++ b/Tests/Integration/ManyClientsOneServerDeallocateBlockingTests.cpp @@ -7,12 +7,12 @@ #include -#include "mafianet/RakPeerInterface.h" +#include "mafianet/PeerInterface.h" #include "mafianet/MessageIdentifiers.h" #include "mafianet/BitStream.h" -#include "mafianet/RakPeer.h" -#include "mafianet/RakSleep.h" -#include "mafianet/RakNetTime.h" +#include "mafianet/Peer.h" +#include "mafianet/Sleep.h" +#include "mafianet/Time.h" #include "mafianet/GetTime.h" #include "CommonFunctions.h" diff --git a/Tests/Integration/ManyClientsOneServerNonBlockingTests.cpp b/Tests/Integration/ManyClientsOneServerNonBlockingTests.cpp index 97ddc4eca..195930f27 100644 --- a/Tests/Integration/ManyClientsOneServerNonBlockingTests.cpp +++ b/Tests/Integration/ManyClientsOneServerNonBlockingTests.cpp @@ -7,12 +7,12 @@ #include -#include "mafianet/RakPeerInterface.h" +#include "mafianet/PeerInterface.h" #include "mafianet/MessageIdentifiers.h" #include "mafianet/BitStream.h" -#include "mafianet/RakPeer.h" -#include "mafianet/RakSleep.h" -#include "mafianet/RakNetTime.h" +#include "mafianet/Peer.h" +#include "mafianet/Sleep.h" +#include "mafianet/Time.h" #include "mafianet/GetTime.h" #include "CommonFunctions.h" diff --git a/Tests/Integration/MaximumConnectTests.cpp b/Tests/Integration/MaximumConnectTests.cpp index 7d32599a6..099974ec3 100644 --- a/Tests/Integration/MaximumConnectTests.cpp +++ b/Tests/Integration/MaximumConnectTests.cpp @@ -7,12 +7,12 @@ #include -#include "mafianet/RakPeerInterface.h" +#include "mafianet/PeerInterface.h" #include "mafianet/MessageIdentifiers.h" #include "mafianet/BitStream.h" -#include "mafianet/RakPeer.h" -#include "mafianet/RakSleep.h" -#include "mafianet/RakNetTime.h" +#include "mafianet/Peer.h" +#include "mafianet/Sleep.h" +#include "mafianet/Time.h" #include "mafianet/GetTime.h" #include diff --git a/Tests/Integration/MmsgBatchLiveTests.cpp b/Tests/Integration/MmsgBatchLiveTests.cpp index 237e1bd6f..7f8ed8507 100644 --- a/Tests/Integration/MmsgBatchLiveTests.cpp +++ b/Tests/Integration/MmsgBatchLiveTests.cpp @@ -22,12 +22,12 @@ #include -#include "mafianet/RakPeerInterface.h" +#include "mafianet/PeerInterface.h" #include "mafianet/MessageIdentifiers.h" #include "mafianet/BitStream.h" #include "mafianet/PeerHandle.h" // Peer, PacketPtr (RAII: survives a failed ASSERT) #include "mafianet/GetTime.h" -#include "mafianet/RakSleep.h" +#include "mafianet/Sleep.h" #include "mafianet/MmsgBatch.h" // MMSG_BATCH_MAX #include diff --git a/Tests/Integration/PacketAndLowLevelTests.cpp b/Tests/Integration/PacketAndLowLevelTests.cpp index 92646e4b0..9c8a91d8a 100644 --- a/Tests/Integration/PacketAndLowLevelTests.cpp +++ b/Tests/Integration/PacketAndLowLevelTests.cpp @@ -7,12 +7,12 @@ #include -#include "mafianet/RakString.h" -#include "mafianet/RakPeerInterface.h" +#include "mafianet/String.h" +#include "mafianet/PeerInterface.h" #include "mafianet/MessageIdentifiers.h" #include "mafianet/BitStream.h" -#include "mafianet/RakSleep.h" -#include "mafianet/RakNetTime.h" +#include "mafianet/Sleep.h" +#include "mafianet/Time.h" #include "mafianet/GetTime.h" #include "DebugTools.h" #include "CommonFunctions.h" diff --git a/Tests/Integration/PeerBuilderTests.cpp b/Tests/Integration/PeerBuilderTests.cpp index a5d9326a6..e1c8a106a 100644 --- a/Tests/Integration/PeerBuilderTests.cpp +++ b/Tests/Integration/PeerBuilderTests.cpp @@ -7,14 +7,14 @@ #include -#include "mafianet/RakString.h" +#include "mafianet/String.h" #include "mafianet/DS_List.h" -#include "mafianet/RakPeerInterface.h" +#include "mafianet/PeerInterface.h" #include "mafianet/PeerHandle.h" #include "mafianet/MessageIdentifiers.h" #include "mafianet/BitStream.h" -#include "mafianet/RakSleep.h" -#include "mafianet/RakNetTime.h" +#include "mafianet/Sleep.h" +#include "mafianet/Time.h" #include "mafianet/GetTime.h" #include // std::move diff --git a/Tests/Integration/PeerConnectDisconnectTests.cpp b/Tests/Integration/PeerConnectDisconnectTests.cpp index 1f0797773..77e4e2546 100644 --- a/Tests/Integration/PeerConnectDisconnectTests.cpp +++ b/Tests/Integration/PeerConnectDisconnectTests.cpp @@ -7,12 +7,12 @@ #include -#include "mafianet/RakPeerInterface.h" +#include "mafianet/PeerInterface.h" #include "mafianet/MessageIdentifiers.h" #include "mafianet/BitStream.h" -#include "mafianet/RakPeer.h" -#include "mafianet/RakSleep.h" -#include "mafianet/RakNetTime.h" +#include "mafianet/Peer.h" +#include "mafianet/Sleep.h" +#include "mafianet/Time.h" #include "mafianet/GetTime.h" #include "CommonFunctions.h" diff --git a/Tests/Integration/PeerConnectDisconnectWithCancelPendingTests.cpp b/Tests/Integration/PeerConnectDisconnectWithCancelPendingTests.cpp index 1a44fc2ab..c1616ee7e 100644 --- a/Tests/Integration/PeerConnectDisconnectWithCancelPendingTests.cpp +++ b/Tests/Integration/PeerConnectDisconnectWithCancelPendingTests.cpp @@ -7,12 +7,12 @@ #include -#include "mafianet/RakPeerInterface.h" +#include "mafianet/PeerInterface.h" #include "mafianet/MessageIdentifiers.h" #include "mafianet/BitStream.h" -#include "mafianet/RakPeer.h" -#include "mafianet/RakSleep.h" -#include "mafianet/RakNetTime.h" +#include "mafianet/Peer.h" +#include "mafianet/Sleep.h" +#include "mafianet/Time.h" #include "mafianet/GetTime.h" #include "CommonFunctions.h" diff --git a/Tests/Integration/PeerHandleTests.cpp b/Tests/Integration/PeerHandleTests.cpp index a7925ec1b..a4257c4ce 100644 --- a/Tests/Integration/PeerHandleTests.cpp +++ b/Tests/Integration/PeerHandleTests.cpp @@ -7,14 +7,14 @@ #include -#include "mafianet/RakString.h" +#include "mafianet/String.h" #include "mafianet/DS_List.h" -#include "mafianet/RakPeerInterface.h" +#include "mafianet/PeerInterface.h" #include "mafianet/PeerHandle.h" #include "mafianet/MessageIdentifiers.h" #include "mafianet/BitStream.h" -#include "mafianet/RakSleep.h" -#include "mafianet/RakNetTime.h" +#include "mafianet/Sleep.h" +#include "mafianet/Time.h" #include "mafianet/GetTime.h" #include // std::move diff --git a/Tests/Integration/RPC4ContextTests.cpp b/Tests/Integration/RPC4ContextTests.cpp index 68db537cc..e9466f9c0 100644 --- a/Tests/Integration/RPC4ContextTests.cpp +++ b/Tests/Integration/RPC4ContextTests.cpp @@ -7,13 +7,13 @@ #include -#include "mafianet/RakString.h" +#include "mafianet/String.h" #include "mafianet/DS_List.h" -#include "mafianet/RakPeerInterface.h" +#include "mafianet/PeerInterface.h" #include "mafianet/RPC4Plugin.h" #include "mafianet/MessageIdentifiers.h" #include "mafianet/BitStream.h" -#include "mafianet/RakSleep.h" +#include "mafianet/Sleep.h" #include #include diff --git a/Tests/Integration/ReliableOrderedConvertedTests.cpp b/Tests/Integration/ReliableOrderedConvertedTests.cpp index 39580236c..da2d07e5a 100644 --- a/Tests/Integration/ReliableOrderedConvertedTests.cpp +++ b/Tests/Integration/ReliableOrderedConvertedTests.cpp @@ -7,13 +7,13 @@ #include -#include "mafianet/RakPeerInterface.h" +#include "mafianet/PeerInterface.h" #include "mafianet/GetTime.h" #include "mafianet/MessageIdentifiers.h" #include "mafianet/BitStream.h" #include "mafianet/Rand.h" -#include "mafianet/RakNetStatistics.h" -#include "mafianet/RakSleep.h" +#include "mafianet/Statistics.h" +#include "mafianet/Sleep.h" #include // For atoi #include diff --git a/Tests/Integration/SecurityFunctionsTests.cpp b/Tests/Integration/SecurityFunctionsTests.cpp index 4ba116f5c..6df3864ac 100644 --- a/Tests/Integration/SecurityFunctionsTests.cpp +++ b/Tests/Integration/SecurityFunctionsTests.cpp @@ -7,13 +7,13 @@ #include -#include "mafianet/RakString.h" -#include "mafianet/RakPeerInterface.h" +#include "mafianet/String.h" +#include "mafianet/PeerInterface.h" #include "mafianet/MessageIdentifiers.h" #include "mafianet/BitStream.h" -#include "mafianet/RakPeer.h" -#include "mafianet/RakSleep.h" -#include "mafianet/RakNetTime.h" +#include "mafianet/Peer.h" +#include "mafianet/Sleep.h" +#include "mafianet/Time.h" #include "mafianet/GetTime.h" #include "CommonFunctions.h" diff --git a/Tests/Integration/SessionConfigLiveTests.cpp b/Tests/Integration/SessionConfigLiveTests.cpp index 54f81f5f6..223cb6336 100644 --- a/Tests/Integration/SessionConfigLiveTests.cpp +++ b/Tests/Integration/SessionConfigLiveTests.cpp @@ -11,11 +11,11 @@ #include #include -#include "mafianet/RakPeer.h" -#include "mafianet/RakPeerInterface.h" +#include "mafianet/Peer.h" +#include "mafianet/PeerInterface.h" #include "mafianet/MessageIdentifiers.h" #include "mafianet/BitStream.h" -#include "mafianet/RakSleep.h" +#include "mafianet/Sleep.h" #include "mafianet/GetTime.h" using namespace MafiaNet; diff --git a/Tests/Integration/TypedSendLiveTests.cpp b/Tests/Integration/TypedSendLiveTests.cpp index 5e876624f..4778272fb 100644 --- a/Tests/Integration/TypedSendLiveTests.cpp +++ b/Tests/Integration/TypedSendLiveTests.cpp @@ -10,7 +10,7 @@ #include "mafianet/Dispatcher.h" #include "mafianet/PeerHandle.h" // Peer, PacketPtr, send()/broadcast() #include "mafianet/GetTime.h" // GetTimeMS -#include "mafianet/RakSleep.h" // RakSleep +#include "mafianet/Sleep.h" // RakSleep #include diff --git a/Tests/Support/CommonFunctions.h b/Tests/Support/CommonFunctions.h index 4d89a3d3d..43dcd405d 100644 --- a/Tests/Support/CommonFunctions.h +++ b/Tests/Support/CommonFunctions.h @@ -11,14 +11,14 @@ #pragma once -#include "mafianet/RakString.h" +#include "mafianet/String.h" -#include "mafianet/RakPeerInterface.h" +#include "mafianet/PeerInterface.h" #include "mafianet/MessageIdentifiers.h" #include "mafianet/BitStream.h" -#include "mafianet/RakPeer.h" -#include "mafianet/RakSleep.h" -#include "mafianet/RakNetTime.h" +#include "mafianet/Peer.h" +#include "mafianet/Sleep.h" +#include "mafianet/Time.h" #include "mafianet/GetTime.h" #include "DebugTools.h" #include "RakTimer.h" diff --git a/Tests/Support/DebugTools.h b/Tests/Support/DebugTools.h index 846e55bde..c1459ed63 100644 --- a/Tests/Support/DebugTools.h +++ b/Tests/Support/DebugTools.h @@ -11,7 +11,7 @@ #pragma once -#include "mafianet/RakString.h" +#include "mafianet/String.h" using namespace MafiaNet; class DebugTools diff --git a/Tests/Support/PacketChangerPlugin.h b/Tests/Support/PacketChangerPlugin.h index 758ef0e1c..842a25e48 100644 --- a/Tests/Support/PacketChangerPlugin.h +++ b/Tests/Support/PacketChangerPlugin.h @@ -10,7 +10,7 @@ #pragma once -#include "mafianet/RakNetTypes.h" +#include "mafianet/Types.h" #include "mafianet/PluginInterface2.h" #include "mafianet/PacketPriority.h" #include "mafianet/MessageIdentifiers.h" diff --git a/Tests/Support/PacketDropPlugin.h b/Tests/Support/PacketDropPlugin.h index b55198b55..8df845f04 100644 --- a/Tests/Support/PacketDropPlugin.h +++ b/Tests/Support/PacketDropPlugin.h @@ -11,7 +11,7 @@ #pragma once -#include "mafianet/RakNetTypes.h" +#include "mafianet/Types.h" #include "mafianet/PluginInterface2.h" #include "mafianet/PacketPriority.h" #include "mafianet/MessageIdentifiers.h" diff --git a/Tests/Support/RakTimer.h b/Tests/Support/RakTimer.h index 4a77b1607..794f3defd 100644 --- a/Tests/Support/RakTimer.h +++ b/Tests/Support/RakTimer.h @@ -11,7 +11,7 @@ #pragma once -#include "mafianet/RakNetTime.h" +#include "mafianet/Time.h" #include "mafianet/GetTime.h" using namespace MafiaNet; diff --git a/Tests/Support/TestHelpers.h b/Tests/Support/TestHelpers.h index 7fd59c3bb..77caa073c 100644 --- a/Tests/Support/TestHelpers.h +++ b/Tests/Support/TestHelpers.h @@ -11,13 +11,13 @@ #pragma once -#include "mafianet/RakString.h" +#include "mafianet/String.h" -#include "mafianet/RakPeerInterface.h" +#include "mafianet/PeerInterface.h" #include "mafianet/MessageIdentifiers.h" #include "mafianet/BitStream.h" -#include "mafianet/RakPeer.h" -#include "mafianet/RakSleep.h" +#include "mafianet/Peer.h" +#include "mafianet/Sleep.h" #include "DebugTools.h" #include "CommonFunctions.h" #include "RakTimer.h" diff --git a/Tests/Unit/ArchiveTests.cpp b/Tests/Unit/ArchiveTests.cpp index 43eb248a6..036db9834 100644 --- a/Tests/Unit/ArchiveTests.cpp +++ b/Tests/Unit/ArchiveTests.cpp @@ -7,7 +7,7 @@ #include -#include "mafianet/RakString.h" +#include "mafianet/String.h" #include "mafianet/BitStream.h" #include "mafianet/Archive.h" diff --git a/Tests/Unit/BitStreamStringTests.cpp b/Tests/Unit/BitStreamStringTests.cpp index 5957414cc..38cbf53a7 100644 --- a/Tests/Unit/BitStreamStringTests.cpp +++ b/Tests/Unit/BitStreamStringTests.cpp @@ -7,7 +7,7 @@ #include -#include "mafianet/RakString.h" +#include "mafianet/String.h" #include "mafianet/BitStream.h" #include diff --git a/Tests/Unit/GuidUtilTests.cpp b/Tests/Unit/GuidUtilTests.cpp index 485452b73..d8d52b48c 100644 --- a/Tests/Unit/GuidUtilTests.cpp +++ b/Tests/Unit/GuidUtilTests.cpp @@ -8,8 +8,8 @@ #include #include "mafianet/GuidUtil.h" -#include "mafianet/RakNetTypes.h" -#include "mafianet/RakPeerInterface.h" +#include "mafianet/Types.h" +#include "mafianet/PeerInterface.h" #include #include diff --git a/Tests/Unit/LocalAddressTests.cpp b/Tests/Unit/LocalAddressTests.cpp index de27e234e..6cd806514 100644 --- a/Tests/Unit/LocalAddressTests.cpp +++ b/Tests/Unit/LocalAddressTests.cpp @@ -7,8 +7,8 @@ #include -#include "mafianet/RakPeerInterface.h" -#include "mafianet/RakNetTypes.h" +#include "mafianet/PeerInterface.h" +#include "mafianet/Types.h" #include diff --git a/Tests/Unit/MmsgBatchTests.cpp b/Tests/Unit/MmsgBatchTests.cpp index 4841336a4..e561d073e 100644 --- a/Tests/Unit/MmsgBatchTests.cpp +++ b/Tests/Unit/MmsgBatchTests.cpp @@ -15,8 +15,8 @@ #include #include "mafianet/MmsgBatch.h" -#include "mafianet/RakNetSocket2.h" -#include "mafianet/RakNetTypes.h" +#include "mafianet/Socket2.h" +#include "mafianet/Types.h" #ifdef _WIN32 #include // inet_pton, htons (winsock2 pulled in via socket2.h) diff --git a/Tests/Unit/PeerGuidTests.cpp b/Tests/Unit/PeerGuidTests.cpp index f6ef9b99c..52b405a4e 100644 --- a/Tests/Unit/PeerGuidTests.cpp +++ b/Tests/Unit/PeerGuidTests.cpp @@ -7,7 +7,7 @@ #include -#include "mafianet/RakNetTypes.h" +#include "mafianet/Types.h" #include "mafianet/BitStream.h" #include diff --git a/Tests/Unit/RPC4GlobalRegistrationTests.cpp b/Tests/Unit/RPC4GlobalRegistrationTests.cpp index 85e6db3cf..39bac1a54 100644 --- a/Tests/Unit/RPC4GlobalRegistrationTests.cpp +++ b/Tests/Unit/RPC4GlobalRegistrationTests.cpp @@ -8,7 +8,7 @@ #include #include "mafianet/RPC4Plugin.h" -#include "mafianet/RakPeerInterface.h" +#include "mafianet/PeerInterface.h" #include diff --git a/Tests/Unit/RakVoiceRelayTests.cpp b/Tests/Unit/RakVoiceRelayTests.cpp index 86b357a9e..f31c40759 100644 --- a/Tests/Unit/RakVoiceRelayTests.cpp +++ b/Tests/Unit/RakVoiceRelayTests.cpp @@ -17,7 +17,7 @@ #include "mafianet/MessageIdentifiers.h" #include "mafianet/RakVoice.h" -#include "mafianet/RakNetTypes.h" +#include "mafianet/Types.h" #include #include diff --git a/Tests/Unit/ReliabilityLayerBlackHoleTests.cpp b/Tests/Unit/ReliabilityLayerBlackHoleTests.cpp index cad447be1..93ce5d350 100644 --- a/Tests/Unit/ReliabilityLayerBlackHoleTests.cpp +++ b/Tests/Unit/ReliabilityLayerBlackHoleTests.cpp @@ -32,7 +32,7 @@ #include "mafianet/PluginInterface2.h" #include "mafianet/Rand.h" #include "mafianet/ReliabilityLayer.h" -#include "mafianet/RakNetSocket2.h" +#include "mafianet/Socket2.h" using namespace MafiaNet; diff --git a/Tests/Unit/ReplicaManager3SendSerializeTests.cpp b/Tests/Unit/ReplicaManager3SendSerializeTests.cpp index d67c3a79b..44404eeae 100644 --- a/Tests/Unit/ReplicaManager3SendSerializeTests.cpp +++ b/Tests/Unit/ReplicaManager3SendSerializeTests.cpp @@ -11,7 +11,7 @@ #include "mafianet/BitStream.h" #include "mafianet/MessageIdentifiers.h" #include "mafianet/NetworkIDManager.h" -#include "mafianet/RakPeerInterface.h" +#include "mafianet/PeerInterface.h" #include diff --git a/Tests/Unit/SessionAdmissionTests.cpp b/Tests/Unit/SessionAdmissionTests.cpp index 0837d87d6..b68ffc1b2 100644 --- a/Tests/Unit/SessionAdmissionTests.cpp +++ b/Tests/Unit/SessionAdmissionTests.cpp @@ -10,9 +10,9 @@ #include #include "mafianet/SessionAdmission.h" -#include "mafianet/RakPeerInterface.h" +#include "mafianet/PeerInterface.h" #include "mafianet/MessageIdentifiers.h" -#include "mafianet/RakNetDefines.h" +#include "mafianet/Defines.h" using namespace MafiaNet; diff --git a/Tests/Unit/SessionConfigTests.cpp b/Tests/Unit/SessionConfigTests.cpp index 27a1c025b..1b84c44c2 100644 --- a/Tests/Unit/SessionConfigTests.cpp +++ b/Tests/Unit/SessionConfigTests.cpp @@ -9,9 +9,9 @@ #include -#include "mafianet/RakPeerInterface.h" +#include "mafianet/PeerInterface.h" #include "mafianet/MessageIdentifiers.h" -#include "mafianet/RakNetDefines.h" +#include "mafianet/Defines.h" using namespace MafiaNet; diff --git a/Tests/Unit/SocketErrorTests.cpp b/Tests/Unit/SocketErrorTests.cpp index 336048155..f509d3b66 100644 --- a/Tests/Unit/SocketErrorTests.cpp +++ b/Tests/Unit/SocketErrorTests.cpp @@ -17,7 +17,7 @@ #include -#include "mafianet/RakNetSocket2.h" +#include "mafianet/Socket2.h" #include "mafianet/MTUSize.h" #include diff --git a/Tests/Unit/StatisticsHistorySamplingTests.cpp b/Tests/Unit/StatisticsHistorySamplingTests.cpp index 948ed4511..bc58968a0 100644 --- a/Tests/Unit/StatisticsHistorySamplingTests.cpp +++ b/Tests/Unit/StatisticsHistorySamplingTests.cpp @@ -8,7 +8,7 @@ #include #include "mafianet/StatisticsHistory.h" -#include "mafianet/RakPeerInterface.h" +#include "mafianet/PeerInterface.h" using namespace MafiaNet; diff --git a/Tests/Unit/TwoWayAuthenticationTimeoutTests.cpp b/Tests/Unit/TwoWayAuthenticationTimeoutTests.cpp index 5df33b151..321843d4e 100644 --- a/Tests/Unit/TwoWayAuthenticationTimeoutTests.cpp +++ b/Tests/Unit/TwoWayAuthenticationTimeoutTests.cpp @@ -9,7 +9,7 @@ #include "mafianet/TwoWayAuthentication.h" #include "mafianet/MessageIdentifiers.h" -#include "mafianet/RakPeerInterface.h" +#include "mafianet/PeerInterface.h" using namespace MafiaNet; diff --git a/Tests/Unit/VirtualWorldTests.cpp b/Tests/Unit/VirtualWorldTests.cpp index 71de11606..ba4c33bad 100644 --- a/Tests/Unit/VirtualWorldTests.cpp +++ b/Tests/Unit/VirtualWorldTests.cpp @@ -11,7 +11,7 @@ #include "mafianet/VirtualWorld.h" #include "mafianet/VirtualWorldReplica3.h" #include "mafianet/BitStream.h" -#include "mafianet/RakPeerInterface.h" +#include "mafianet/PeerInterface.h" using namespace MafiaNet; diff --git a/docs/advanced/custom-memory-management.rst b/docs/advanced/custom-memory-management.rst index c8004aca0..32359ed2d 100644 --- a/docs/advanced/custom-memory-management.rst +++ b/docs/advanced/custom-memory-management.rst @@ -21,7 +21,7 @@ Basic Usage .. code-block:: cpp - #include "mafianet/RakMemoryOverride.h" + #include "mafianet/MemoryOverride.h" // Define custom allocation functions void* MyMalloc(size_t size) { diff --git a/docs/basics/startup.rst b/docs/basics/startup.rst index c4e0838df..7267a1ccf 100644 --- a/docs/basics/startup.rst +++ b/docs/basics/startup.rst @@ -130,7 +130,7 @@ Example: Basic Server Startup .. code-block:: cpp - #include "mafianet/RakPeerInterface.h" + #include "mafianet/PeerInterface.h" MafiaNet::RakPeerInterface* server = MafiaNet::RakPeerInterface::GetInstance(); diff --git a/docs/changelog.rst b/docs/changelog.rst index 01e90876e..0492e890b 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -10,7 +10,7 @@ Unreleased * **New CMake options: ``MAFIANET_DISABLED_FEATURES`` and ``MAFIANET_MINIMAL``.** The ``_RAKNET_SUPPORT_`` plugin flags from ``NativeFeatureIncludes.h`` can now be set from CMake (``-DMAFIANET_DISABLED_FEATURES="ReplicaManager3;RPC4Plugin"`` or ``-DMAFIANET_MINIMAL=ON`` for the core transport alone). The definitions are ``PUBLIC`` on the library targets so consumers see the same configuration. Unknown names are a configure error. A ``linux-minimal`` CI job builds the ``MAFIANET_MINIMAL`` configuration. See :doc:`/getting-started/building`. -**Header names.** Every public header now carries the PascalCase name of the class or facility it declares, matching its ``.cpp``. The lowercase names inherited from SLikeNet were renamed (``peerinterface.h`` → ``RakPeerInterface.h``, ``peer.h`` → ``RakPeer.h``, ``types.h`` → ``RakNetTypes.h``, ``string.h`` → ``RakString.h``, ``wstring.h`` → ``RakWString.h``, ``time.h`` → ``RakNetTime.h``, ``sleep.h`` → ``RakSleep.h``, ``thread.h`` → ``RakThread.h``, ``assert.h`` → ``RakAssert.h``, ``alloca.h`` → ``RakAlloca.h``, ``defines.h`` → ``RakNetDefines.h``, ``defineoverrides.h`` → ``RakNetDefinesOverrides.h``, ``memoryoverride.h`` → ``RakMemoryOverride.h``, ``smartptr.h`` → ``RakNetSmartPtr.h``, ``socket2.h`` → ``RakNetSocket2.h``, ``statistics.h`` → ``RakNetStatistics.h``, ``transport2.h`` → ``RakNetTransport2.h``, ``commandparser.h`` → ``RakNetCommandParser.h``, ``guid_util.h`` → ``GuidUtil.h``, ``linux_adapter.h`` → ``LinuxAdapter.h``, ``osx_adapter.h`` → ``OsxAdapter.h``, ``gettimeofday.h`` → ``GetTimeOfDay.h``, ``aliases.h`` → ``Aliases.h``, ``version.h`` → ``Version.h``). The umbrella header stays ``mafianet/mafianet.h``. Every old name except ``aliases.h``, ``version.h`` and ``gettimeofday.h`` (which differ from the new name only by case and so cannot coexist on Windows or macOS) remains as a forwarding header that emits a ``#pragma message`` and will be removed in the next minor release; define ``MAFIANET_SILENCE_DEPRECATED_INCLUDES`` to quiet it. The matching sources were renamed too (``GuidUtil.cpp``, ``LinuxAdapter.cpp``, ``OsxAdapter.cpp``, ``GetTimeOfDay.cpp``). +**Header names.** Every public header is now PascalCase, without the RakNet prefix the project dropped (``peerinterface.h`` → ``PeerInterface.h``, ``peer.h`` → ``Peer.h``, ``types.h`` → ``Types.h``, ``string.h`` → ``String.h``, ``wstring.h`` → ``WString.h``, ``time.h`` → ``Time.h``, ``sleep.h`` → ``Sleep.h``, ``thread.h`` → ``Thread.h``, ``assert.h`` → ``Assert.h``, ``alloca.h`` → ``Alloca.h``, ``defines.h`` → ``Defines.h``, ``defineoverrides.h`` → ``DefineOverrides.h``, ``memoryoverride.h`` → ``MemoryOverride.h``, ``smartptr.h`` → ``SmartPtr.h``, ``socket2.h`` → ``Socket2.h``, ``statistics.h`` → ``Statistics.h``, ``transport2.h`` → ``Transport2.h``, ``commandparser.h`` → ``CommandParser.h``, ``guid_util.h`` → ``GuidUtil.h``, ``linux_adapter.h`` → ``LinuxAdapter.h``, ``osx_adapter.h`` → ``OsxAdapter.h``, ``gettimeofday.h`` → ``GetTimeOfDay.h``, ``aliases.h`` → ``Aliases.h``, ``version.h`` → ``Version.h``). The umbrella header stays ``mafianet/mafianet.h``. On Windows and macOS the old lowercase spellings still resolve, since those file systems ignore case; on Linux includes must be updated. ``guid_util.h``, ``linux_adapter.h`` and ``osx_adapter.h`` remain as forwarding headers that emit a ``#pragma message`` and will be removed in the next minor release (define ``MAFIANET_SILENCE_DEPRECATED_INCLUDES`` to quiet it). The matching sources were renamed too (``GuidUtil.cpp``, ``LinuxAdapter.cpp``, ``OsxAdapter.cpp``, ``GetTimeOfDay.cpp``). **Extras library.** ``EmailSender``, ``HTTPConnection``, ``HTTPConnection2``, ``TelnetTransport``, ``RakNetTransport2``, ``ConsoleServer``, ``CommandParserInterface``, ``RakNetCommandParser``, ``LogCommandParser`` and ``PacketConsoleLogger`` moved out of the core library into ``MafiaNetExtras`` (``MafiaNet::MafiaNetExtras``), built with ``MAFIANET_BUILD_EXTRAS=ON`` (forced on by ``MAFIANET_BUILD_SAMPLES``). Headers and include paths are unchanged; code using these classes must link the extras target. See :doc:`/getting-started/building`. @@ -617,7 +617,7 @@ Version 0.5.0 **Breaking Changes** -* Legacy include spellings are gone — include public headers via the ``mafianet/...`` path (e.g. ``mafianet/RakString.h`` instead of ``RakString.h``) +* Legacy include spellings are gone — include public headers via the ``mafianet/...`` path (e.g. ``mafianet/string.h`` instead of ``RakString.h``) * The ``SLNet`` namespace macro has been removed — use ``MafiaNet`` (or the new ``MNet`` shorthand) * Serializing a non-trivially-copyable type through the generic ``BitStream::Write``/``Read`` now fails to compile by design; provide an explicit ``Serialize()`` or a type specialization diff --git a/docs/getting-started/quickstart.rst b/docs/getting-started/quickstart.rst index 87bcbd6c4..78b3576b8 100644 --- a/docs/getting-started/quickstart.rst +++ b/docs/getting-started/quickstart.rst @@ -65,7 +65,7 @@ Basic Server .. code-block:: cpp - #include "mafianet/RakPeerInterface.h" + #include "mafianet/PeerInterface.h" #include "mafianet/MessageIdentifiers.h" int main() { @@ -108,7 +108,7 @@ Basic Client .. code-block:: cpp - #include "mafianet/RakPeerInterface.h" + #include "mafianet/PeerInterface.h" #include "mafianet/MessageIdentifiers.h" int main() { diff --git a/docs/getting-started/system-overview.rst b/docs/getting-started/system-overview.rst index e61543223..4665527b9 100644 --- a/docs/getting-started/system-overview.rst +++ b/docs/getting-started/system-overview.rst @@ -123,7 +123,7 @@ Namespaces ---------- - ``MafiaNet::`` - Primary namespace for all classes -- ``MNet`` - Preprocessor macro shorthand that expands to ``MafiaNet`` (defined in ``mafianet/RakNetDefines.h``) +- ``MNet`` - Preprocessor macro shorthand that expands to ``MafiaNet`` (defined in ``mafianet/Defines.h``) - ``DataStructures::`` - Container classes (DS_List, DS_Queue, etc.) Common Patterns diff --git a/docs/getting-started/tutorial.rst b/docs/getting-started/tutorial.rst index c363f8395..d6f318a15 100644 --- a/docs/getting-started/tutorial.rst +++ b/docs/getting-started/tutorial.rst @@ -38,9 +38,9 @@ Create ``ChatServer.cpp``: .. code-block:: cpp - #include "mafianet/RakPeerInterface.h" + #include "mafianet/PeerInterface.h" #include "mafianet/BitStream.h" - #include "mafianet/RakString.h" + #include "mafianet/String.h" #include "ChatCommon.h" #include @@ -112,9 +112,9 @@ Create ``ChatClient.cpp``: .. code-block:: cpp - #include "mafianet/RakPeerInterface.h" + #include "mafianet/PeerInterface.h" #include "mafianet/BitStream.h" - #include "mafianet/RakString.h" + #include "mafianet/String.h" #include "mafianet/Gets.h" #include "ChatCommon.h" #include From 378eebf5101dbb95b6b1903068a68111c1877448 Mon Sep 17 00:00:00 2001 From: Segfault <5221072+Segfaultd@users.noreply.github.com> Date: Thu, 8 Oct 2026 11:08:52 +0200 Subject: [PATCH 4/7] refactor(files): snake_case file names under Source/ Every header and source is now lowercase snake_case with no RakNet prefix (bit_stream.h, peer_interface.h, voice.h, cc_udt.h), and each .cpp matches its header. Class names are unchanged. Library headers include siblings only as "mafianet/.h" so string.h, time.h and assert.h cannot shadow the C headers; a CI step enforces both rules. The remaining lowercase forwarding shims are removed since the real files now carry those names. --- .github/workflows/build.yml | 13 + CLAUDE.md | 34 +- CMakeLists.txt | 2 +- .../Autopatcher/ApplyPatch.cpp | 10 +- .../Autopatcher/AutopatcherClient.cpp | 34 +- .../Autopatcher/AutopatcherClient.h | 16 +- .../AutopatcherMySQLRepository.cpp | 20 +- .../AutopatcherMySQLRepository.h | 4 +- .../AutopatcherPostgreRepository.cpp | 14 +- .../AutopatcherPostgreRepository.h | 4 +- .../Autopatcher/AutopatcherServer.cpp | 22 +- .../Autopatcher/AutopatcherServer.h | 18 +- .../Autopatcher/CreatePatch.cpp | 6 +- .../Lobby2/LibVoice/LibVoice.h | 2 +- DependentExtensions/Lobby2/Lobby2Client.cpp | 4 +- DependentExtensions/Lobby2/Lobby2Client.h | 2 +- DependentExtensions/Lobby2/Lobby2Message.h | 10 +- DependentExtensions/Lobby2/Lobby2Plugin.h | 6 +- DependentExtensions/Lobby2/Lobby2Presence.cpp | 2 +- DependentExtensions/Lobby2/Lobby2Presence.h | 2 +- .../Lobby2/Lobby2ResultCode.cpp | 2 +- DependentExtensions/Lobby2/Lobby2ResultCode.h | 2 +- DependentExtensions/Lobby2/Lobby2Server.cpp | 4 +- DependentExtensions/Lobby2/Lobby2Server.h | 8 +- .../Lobby2/PGSQL/Lobby2Message_PGSQL.cpp | 4 +- .../Lobby2/PGSQL/Lobby2Message_PGSQL.h | 2 +- .../Lobby2/Rooms/IntervalTimer.h | 2 +- .../Lobby2/Rooms/ProfanityFilter.cpp | 10 +- .../Lobby2/Rooms/ProfanityFilter.h | 4 +- DependentExtensions/Lobby2/Rooms/RoomTypes.h | 2 +- .../Lobby2/Rooms/RoomsContainer.cpp | 12 +- .../Lobby2/Rooms/RoomsContainer.h | 8 +- .../Lobby2/Rooms/RoomsErrorCodes.cpp | 2 +- .../Lobby2/Rooms/RoomsErrorCodes.h | 2 +- .../Lobby2/Rooms/RoomsPlugin.cpp | 12 +- .../Lobby2/Rooms/RoomsPlugin.h | 12 +- .../Lobby2/Steam/Lobby2Client_Steam.h | 4 +- .../Lobby2/Steam/Lobby2Client_Steam_Impl.cpp | 4 +- .../Lobby2/Steam/Lobby2Client_Steam_Impl.h | 6 +- .../Lobby2/Steam/Lobby2Message_Steam.h | 2 +- .../MySQLInterface/MySQLInterface.cpp | 12 +- .../MySQLInterface/MySQLInterface.h | 2 +- .../PostgreSQLInterface.cpp | 16 +- .../PostgreSQLInterface/PostgreSQLInterface.h | 4 +- DependentExtensions/RPC3/RPC3.cpp | 14 +- DependentExtensions/RPC3/RPC3.h | 16 +- DependentExtensions/RPC3/RPC3_Boost.h | 6 +- .../SQLiteClientLogger_PacketLogger.cpp | 6 +- .../SQLiteClientLogger_PacketLogger.h | 2 +- .../Optional/SQLiteClientLogger_RNSLogger.cpp | 8 +- .../Optional/SQLiteClientLogger_RNSLogger.h | 2 +- .../ClientOnly/SQLiteClientLoggerPlugin.cpp | 10 +- .../ClientOnly/Samples/D3D9/Matrices.cpp | 2 +- .../Samples/Ogre3D/BspCollision.cpp | 6 +- .../Simple/SQLiteClientLoggerSample.cpp | 14 +- .../Logger/SQLiteLoggerCommon.cpp | 6 +- .../SQLite3Plugin/Logger/SQLiteLoggerCommon.h | 4 +- .../ServerOnly/SQLiteServerLoggerPlugin.cpp | 12 +- .../ServerOnly/SQLiteServerLoggerSample.cpp | 12 +- .../SQLite3Plugin/SQLite3ClientPlugin.cpp | 4 +- .../SQLite3Plugin/SQLite3ClientPlugin.h | 14 +- .../SQLite3Plugin/SQLite3PluginCommon.h | 6 +- .../SQLite3Plugin/SQLite3Sample.cpp | 12 +- .../SQLite3Plugin/SQLite3ServerPlugin.cpp | 6 +- .../SQLite3Plugin/SQLite3ServerPlugin.h | 16 +- README.md | 22 +- .../AutopatcherServerTest_MySQL.cpp | 28 +- .../AutopatcherClientTest.cpp | 28 +- .../AutopatcherClientGFx3Impl.cpp | 26 +- .../AutopatcherClientGFx3Impl.h | 2 +- Samples/AutopatcherClientRestarter/main.cpp | 8 +- .../AutopatcherClientTest.cpp | 32 +- .../AutopatcherServerTest.cpp | 30 +- .../AutopatcherServer_SelfScaling/main.cpp | 46 +- Samples/BigPacketTest/BigPacketTest.cpp | 24 +- Samples/BurstTest/BurstTest.cpp | 26 +- Samples/CMakeLists.txt | 2 +- .../Client/Chat Example Client.cpp | 32 +- .../Server/Chat Example Server.cpp | 28 +- Samples/CloudClient/CloudClientSample.cpp | 10 +- Samples/CloudServer/CloudServerHelper.cpp | 28 +- Samples/CloudServer/CloudServerHelper.h | 2 +- Samples/CloudServer/CloudServerSample.cpp | 18 +- Samples/CloudTest/CloudTest.cpp | 18 +- Samples/CommandConsoleClient/main.cpp | 18 +- Samples/CommandConsoleServer/main.cpp | 18 +- .../ComprehensivePCGame.cpp | 52 +- .../ComprehensiveTest/ComprehensiveTest.cpp | 18 +- Samples/CrashReporter/CrashReporter.cpp | 14 +- Samples/CrashReporter/CrashReporter.h | 2 +- Samples/CrashReporter/SendFileTo.cpp | 6 +- Samples/CrashReporter/SendFileTo.h | 2 +- Samples/CrashReporter/main.cpp | 8 +- .../CrossConnectionTest.cpp | 16 +- Samples/DirectoryDeltaTransfer/CMakeLists.txt | 4 +- .../DirectoryDeltaTransfer.cpp | 22 +- .../DirectoryDeltaTransferTest.cpp | 34 +- .../DroppedConnectionTest.cpp | 14 +- Samples/Encryption/Encryption.cpp | 30 +- Samples/FCMHost/FCM2HostTest.cpp | 24 +- .../FCM2HostSimultaneousTest.cpp | 26 +- .../FCM2VerifiedJoinSimultaneousTest.cpp | 26 +- Samples/FileListTransfer/main.cpp | 30 +- Samples/FlowControlTest/FlowControlTest.cpp | 16 +- Samples/FullyConnectedMesh/FCMTest.cpp | 16 +- .../LANServerDiscovery/LANServerDiscovery.cpp | 22 +- Samples/Lobby2Client/Lobby2ClientSample.cpp | 18 +- .../Lobby2ClientGFx3Impl.cpp | 8 +- .../Lobby2ClientGFx3.0/Lobby2ClientGFx3Impl.h | 6 +- .../Lobby2ServerSample_PGSQL.cpp | 24 +- Samples/Lobby3/main.cpp | 18 +- .../LobbyDB_PostgreSQLTest.cpp | 6 +- .../LoopbackPerformanceTest.cpp | 12 +- Samples/MasterServer/MasterClient.cpp | 10 +- Samples/MasterServer/MasterClient.h | 2 +- Samples/MasterServer/MasterClientMain.cpp | 10 +- Samples/MasterServer/MasterCommon.h | 8 +- Samples/MasterServer/MasterServer.cpp | 14 +- Samples/MasterServer/MasterServer.h | 2 +- Samples/MasterServer/MasterServerMain.cpp | 4 +- Samples/MasterServer/MasterServerMessageIDs.h | 2 +- Samples/MasterServer/mastercommon.cpp | 10 +- Samples/MasterServer2/main.cpp | 10 +- Samples/MessageFilter/MessageFilterTest.cpp | 8 +- Samples/MessageSizeTest/MessageSizeTest.cpp | 16 +- Samples/NATCompleteClient/main.cpp | 34 +- Samples/NATCompleteServer/main.cpp | 36 +- .../OfflineMessagesTest.cpp | 14 +- .../PHPDirectoryServer2.cpp | 14 +- .../PHPDirectoryServer2/PHPDirectoryServer2.h | 14 +- Samples/PHPDirectoryServer2/main.cpp | 20 +- Samples/PacketConsoleLogger/main.cpp | 18 +- Samples/PacketLogger/PacketLoggerTest.cpp | 16 +- Samples/Ping/Ping.cpp | 20 +- Samples/RPC3/RPC3Sample.cpp | 22 +- Samples/RPC4/RPC4Sample.cpp | 18 +- Samples/RackspaceConsole/main.cpp | 16 +- Samples/RakVoice/main.cpp | 30 +- Samples/RakVoiceDSound/DSoundVoiceAdapter.cpp | 4 +- Samples/RakVoiceDSound/DSoundVoiceAdapter.h | 2 +- Samples/RakVoiceDSound/main.cpp | 24 +- Samples/RakVoiceFMOD/FMODVoiceAdapter.cpp | 4 +- Samples/RakVoiceFMOD/FMODVoiceAdapter.h | 2 +- Samples/RakVoiceFMOD/main.cpp | 24 +- .../RankingServerDB/RankingServerDBTest.cpp | 2 +- .../RankingServerDBTest.cpp | 4 +- Samples/ReadyEvent/ReadyEventSample.cpp | 28 +- Samples/RelayPluginTest/main.cpp | 18 +- .../ReliableOrderedTest.cpp | 26 +- Samples/ReplicaManager3/main.cpp | 38 +- Samples/ReplicatedLogin/ReplicatedLogin.cpp | 22 +- Samples/Rooms/RoomsSample.cpp | 8 +- .../RakNet/RoomsBrowserGFx3_RakNet.cpp | 4 +- .../RakNet/RoomsBrowserGFx3_RakNet.h | 6 +- Samples/RoomsBrowserGFx3/RoomsBrowserGFx3.h | 4 +- Samples/Router2/Router2Sample.cpp | 30 +- Samples/SendEmail/main.cpp | 10 +- .../ServerClientTest2/ServerClientTest2.cpp | 28 +- .../StatisticsHistoryTest.cpp | 10 +- Samples/SteamLobby/main.cpp | 22 +- Samples/TeamManager/TeamManagerTest.cpp | 32 +- Samples/TestDLL/main.cpp | 22 +- Samples/ThreadTest/ThreadTest.cpp | 16 +- Samples/Timestamping/Timestamping.cpp | 18 +- .../TitleValidationDB_PostgreSQLTest.cpp | 6 +- .../TwoWayAuthenticationTest.cpp | 14 +- Samples/UDPForwarder/main.cpp | 16 +- Samples/VirtualWorld/main.cpp | 20 +- .../ChatClient.xcodeproj/project.pbxproj | 1196 ++++++++--------- .../ChatClient/ChatClient/ViewController.h | 14 +- Source/CMakeLists.txt | 540 ++++---- Source/include/mafianet/GuidUtil.h | 48 - Source/include/mafianet/LinuxAdapter.h | 88 -- Source/include/mafianet/OsxAdapter.h | 91 -- .../include/mafianet/{Aliases.h => aliases.h} | 6 +- .../include/mafianet/{Alloca.h => alloca.h} | 0 .../include/mafianet/{Archive.h => archive.h} | 4 +- .../include/mafianet/{Assert.h => assert.h} | 2 +- ...hContext.h => autopatcher_patch_context.h} | 0 ...e.h => autopatcher_repository_interface.h} | 6 +- .../{Base64Encoder.h => base64_encoder.h} | 2 +- .../mafianet/{BitStream.h => bit_stream.h} | 16 +- ...NetSlidingWindow.h => cc_sliding_window.h} | 10 +- .../mafianet/{CCRakNetUDT.h => cc_udt.h} | 10 +- .../mafianet/{CheckSum.h => check_sum.h} | 4 +- .../{CloudClient.h => cloud_client.h} | 12 +- .../{CloudCommon.h => cloud_common.h} | 6 +- .../{CloudServer.h => cloud_server.h} | 18 +- .../{CommandParser.h => command_parser.h} | 6 +- ...Interface.h => command_parser_interface.h} | 10 +- ...ConnectionGraph2.h => connection_graph2.h} | 18 +- .../{ConsoleServer.h => console_server.h} | 12 +- Source/include/mafianet/crypto/factory.h | 4 +- .../include/mafianet/crypto/fileencrypter.h | 4 +- .../{DataCompressor.h => data_compressor.h} | 8 +- .../{DefineOverrides.h => define_overrides.h} | 0 .../include/mafianet/{Defines.h => defines.h} | 2 +- ...aTransfer.h => directory_delta_transfer.h} | 16 +- .../mafianet/{Dispatcher.h => dispatcher.h} | 16 +- .../include/mafianet/{DR_SHA1.h => dr_sha1.h} | 6 +- ...rySearchTree.h => ds_binary_search_tree.h} | 12 +- .../{DS_BPlusTree.h => ds_bplus_tree.h} | 14 +- .../{DS_BytePool.h => ds_byte_pool.h} | 16 +- .../{DS_ByteQueue.h => ds_byte_queue.h} | 6 +- .../include/mafianet/{DS_Hash.h => ds_hash.h} | 8 +- .../include/mafianet/{DS_Heap.h => ds_heap.h} | 10 +- ...odingTree.h => ds_huffman_encoding_tree.h} | 12 +- ...y.h => ds_huffman_encoding_tree_factory.h} | 8 +- ...Node.h => ds_huffman_encoding_tree_node.h} | 0 .../{DS_LinkedList.h => ds_linked_list.h} | 6 +- .../include/mafianet/{DS_List.h => ds_list.h} | 8 +- .../include/mafianet/{DS_Map.h => ds_map.h} | 10 +- .../{DS_MemoryPool.h => ds_memory_pool.h} | 12 +- .../{DS_Multilist.h => ds_multilist.h} | 10 +- ...hannelHeap.h => ds_ordered_channel_heap.h} | 18 +- .../{DS_OrderedList.h => ds_ordered_list.h} | 8 +- .../mafianet/{DS_Queue.h => ds_queue.h} | 8 +- ...eueLinkedList.h => ds_queue_linked_list.h} | 12 +- .../{DS_RangeList.h => ds_range_list.h} | 10 +- .../mafianet/{DS_Table.h => ds_table.h} | 12 +- ...eue.h => ds_threadsafe_allocating_queue.h} | 8 +- .../include/mafianet/{DS_Tree.h => ds_tree.h} | 10 +- ...DS_WeightedGraph.h => ds_weighted_graph.h} | 16 +- .../include/mafianet/{DynDNS.h => dyn_dns.h} | 6 +- .../{EmailSender.h => email_sender.h} | 14 +- .../{EmptyHeader.h => empty_header.h} | 0 ...hTimeToString.h => epoch_time_to_string.h} | 4 +- .../include/mafianet/{Export.h => export.h} | 2 +- .../mafianet/{FileList.h => file_list.h} | 16 +- ...NodeContext.h => file_list_node_context.h} | 4 +- ...ileListTransfer.h => file_list_transfer.h} | 26 +- ...ce.h => file_list_transfer_cb_interface.h} | 6 +- .../{FileOperations.h => file_operations.h} | 6 +- .../mafianet/{_FindFirst.h => find_first.h} | 2 +- .../{FormatString.h => format_string.h} | 4 +- ...nnectedMesh2.h => fully_connected_mesh2.h} | 16 +- .../mafianet/{GetTime.h => get_time.h} | 6 +- .../{GetTimeOfDay.h => get_time_of_day.h} | 0 .../include/mafianet/{Getche.h => getche.h} | 0 Source/include/mafianet/{Gets.h => gets.h} | 0 .../{GridSectorizer.h => grid_sectorizer.h} | 6 +- Source/include/mafianet/guid_util.h | 56 +- .../{HTTPConnection.h => http_connection.h} | 14 +- .../{HTTPConnection2.h => http_connection2.h} | 20 +- ...terface.h => incremental_read_interface.h} | 4 +- .../{InternalPacket.h => internal_packet.h} | 16 +- Source/include/mafianet/{Itoa.h => itoa.h} | 0 Source/include/mafianet/{Kbhit.h => kbhit.h} | 0 Source/include/mafianet/linux_adapter.h | 92 +- .../{LinuxStrings.h => linux_strings.h} | 0 .../{LocklessTypes.h => lockless_types.h} | 8 +- ...ogCommandParser.h => log_command_parser.h} | 6 +- Source/include/mafianet/mafianet.h | 24 +- .../{MemoryOverride.h => memory_override.h} | 8 +- .../{MessageFilter.h => message_filter.h} | 12 +- ...ageIdentifiers.h => message_identifiers.h} | 4 +- .../mafianet/{MmsgBatch.h => mmsg_batch.h} | 12 +- .../{MtuBlackHole.h => mtu_black_hole.h} | 6 +- .../mafianet/{MTUSize.h => mtu_size.h} | 4 +- ...oughClient.h => nat_punchthrough_client.h} | 18 +- ...oughServer.h => nat_punchthrough_server.h} | 16 +- ...onClient.h => nat_type_detection_client.h} | 20 +- ...onCommon.h => nat_type_detection_common.h} | 8 +- ...onServer.h => nat_type_detection_server.h} | 18 +- ...reIncludes.h => native_feature_includes.h} | 4 +- ....h => native_feature_includes_overrides.h} | 2 +- .../{NativeTypes.h => native_types.h} | 0 ...etworkIDManager.h => network_id_manager.h} | 10 +- ...{NetworkIDObject.h => network_id_object.h} | 6 +- Source/include/mafianet/osx_adapter.h | 95 +- ...onsoleLogger.h => packet_console_logger.h} | 6 +- ...acketFileLogger.h => packet_file_logger.h} | 4 +- .../{PacketLogger.h => packet_logger.h} | 8 +- ...Logger.h => packet_output_window_logger.h} | 4 +- .../mafianet/{PacketPool.h => packet_pool.h} | 0 .../{PacketPriority.h => packet_priority.h} | 0 .../{PacketizedTCP.h => packetized_tcp.h} | 8 +- Source/include/mafianet/{Peer.h => peer.h} | 46 +- .../mafianet/{PeerHandle.h => peer_handle.h} | 20 +- .../{PeerInterface.h => peer_interface.h} | 28 +- ...PluginInterface2.h => plugin_interface2.h} | 8 +- ...idSectorizer.h => point_grid_sectorizer.h} | 6 +- .../mafianet/{Rackspace.h => rackspace.h} | 16 +- Source/include/mafianet/{Rand.h => rand.h} | 2 +- .../mafianet/{RandSync.h => rand_sync.h} | 8 +- .../mafianet/{ReadyEvent.h => ready_event.h} | 6 +- .../{RefCountedObj.h => ref_counted_obj.h} | 2 +- .../{RelayPlugin.h => relay_plugin.h} | 8 +- ...ReliabilityLayer.h => reliability_layer.h} | 56 +- .../{ReplicaEnums.h => replica_enums.h} | 0 .../{ReplicaManager3.h => replica_manager3.h} | 30 +- .../include/mafianet/{Router2.h => router2.h} | 18 +- .../mafianet/{RPC4Plugin.h => rpc4_plugin.h} | 18 +- .../{SecureHandshake.h => secure_handshake.h} | 2 +- .../{SendToThread.h => send_to_thread.h} | 10 +- ...SessionAdmission.h => session_admission.h} | 2 +- .../{SignaledEvent.h => signaled_event.h} | 6 +- .../{SimpleMutex.h => simple_mutex.h} | 6 +- ...{SimpleTCPServer.h => simple_tcp_server.h} | 0 ...rConsumer.h => single_producer_consumer.h} | 6 +- Source/include/mafianet/{Sleep.h => sleep.h} | 2 +- .../mafianet/{SmartPtr.h => smart_ptr.h} | 4 +- .../include/mafianet/{Socket2.h => socket2.h} | 12 +- .../{SocketDefines.h => socket_defines.h} | 0 .../{SocketIncludes.h => socket_includes.h} | 2 +- .../{SocketLayer.h => socket_layer.h} | 12 +- .../mafianet/{Statistics.h => statistics.h} | 6 +- ...atisticsHistory.h => statistics_history.h} | 22 +- .../include/mafianet/{String.h => string.h} | 10 +- ...StringCompressor.h => string_compressor.h} | 8 +- .../{StringTable.h => string_table.h} | 6 +- .../{SuperFastHash.h => super_fast_hash.h} | 2 +- .../{TableSerializer.h => table_serializer.h} | 14 +- .../{TCPInterface.h => tcp_interface.h} | 28 +- .../{TeamBalancer.h => team_balancer.h} | 14 +- .../{TeamManager.h => team_manager.h} | 18 +- .../{TelnetTransport.h => telnet_transport.h} | 8 +- .../include/mafianet/{Thread.h => thread.h} | 2 +- .../mafianet/{ThreadPool.h => thread_pool.h} | 16 +- ...ketLogger.h => threadsafe_packet_logger.h} | 6 +- Source/include/mafianet/{Time.h => time.h} | 4 +- .../mafianet/{Transport2.h => transport2.h} | 12 +- ...sportInterface.h => transport_interface.h} | 6 +- ...hentication.h => two_way_authentication.h} | 18 +- Source/include/mafianet/{Types.h => types.h} | 16 +- .../{UDPForwarder.h => udp_forwarder.h} | 24 +- .../{UDPProxyClient.h => udp_proxy_client.h} | 10 +- .../{UDPProxyCommon.h => udp_proxy_common.h} | 2 +- ...yCoordinator.h => udp_proxy_coordinator.h} | 16 +- .../{UDPProxyServer.h => udp_proxy_server.h} | 12 +- ...rializer.h => variable_delta_serializer.h} | 12 +- ...racker.h => variable_list_delta_tracker.h} | 8 +- ...iadicSQLParser.h => variadic_sql_parser.h} | 2 +- .../include/mafianet/{Version.h => version.h} | 0 .../{VirtualWorld.h => virtual_world.h} | 0 ...rldReplica3.h => virtual_world_replica3.h} | 6 +- .../include/mafianet/{RakVoice.h => voice.h} | 10 +- .../{WindowsIncludes.h => windows_includes.h} | 0 ...tupSingleton.h => wsa_startup_singleton.h} | 0 .../include/mafianet/{WString.h => wstring.h} | 8 +- .../{Base64Encoder.cpp => base64_encoder.cpp} | 4 +- Source/src/{BitStream.cpp => bit_stream.cpp} | 12 +- ...lidingWindow.cpp => cc_sliding_window.cpp} | 8 +- Source/src/{CCRakNetUDT.cpp => cc_udt.cpp} | 10 +- Source/src/{CheckSum.cpp => check_sum.cpp} | 2 +- .../src/{CloudClient.cpp => cloud_client.cpp} | 12 +- .../src/{CloudCommon.cpp => cloud_common.cpp} | 6 +- .../src/{CloudServer.cpp => cloud_server.cpp} | 12 +- ...etCommandParser.cpp => command_parser.cpp} | 12 +- ...rface.cpp => command_parser_interface.cpp} | 8 +- ...ectionGraph2.cpp => connection_graph2.cpp} | 10 +- .../{ConsoleServer.cpp => console_server.cpp} | 14 +- Source/src/crypto/cryptomanager.cpp | 2 +- Source/src/crypto/fileencrypter.cpp | 6 +- Source/src/crypto/securestring.cpp | 4 +- ...DataCompressor.cpp => data_compressor.cpp} | 6 +- ...nsfer.cpp => directory_delta_transfer.cpp} | 30 +- Source/src/{DR_SHA1.cpp => dr_sha1.cpp} | 2 +- .../src/{DS_BytePool.cpp => ds_byte_pool.cpp} | 4 +- .../{DS_ByteQueue.cpp => ds_byte_queue.cpp} | 2 +- ...gTree.cpp => ds_huffman_encoding_tree.cpp} | 8 +- Source/src/{DS_Table.cpp => ds_table.cpp} | 14 +- Source/src/{DynDNS.cpp => dyn_dns.cpp} | 12 +- .../src/{EmailSender.cpp => email_sender.cpp} | 22 +- ...eToString.cpp => epoch_time_to_string.cpp} | 10 +- Source/src/{FileList.cpp => file_list.cpp} | 28 +- ...istTransfer.cpp => file_list_transfer.cpp} | 32 +- ...FileOperations.cpp => file_operations.cpp} | 12 +- Source/src/{_FindFirst.cpp => find_first.cpp} | 12 +- .../{FormatString.cpp => format_string.cpp} | 8 +- ...tedMesh2.cpp => fully_connected_mesh2.cpp} | 18 +- Source/src/{GetTime.cpp => get_time.cpp} | 6 +- .../{GetTimeOfDay.cpp => get_time_of_day.cpp} | 4 +- Source/src/{Getche.cpp => getche.cpp} | 2 +- Source/src/{Gets.cpp => gets.cpp} | 0 ...GridSectorizer.cpp => grid_sectorizer.cpp} | 4 +- Source/src/{GuidUtil.cpp => guid_util.cpp} | 2 +- ...HTTPConnection.cpp => http_connection.cpp} | 12 +- ...TPConnection2.cpp => http_connection2.cpp} | 6 +- ...ace.cpp => incremental_read_interface.cpp} | 6 +- Source/src/{Itoa.cpp => itoa.cpp} | 2 +- .../{LinuxAdapter.cpp => linux_adapter.cpp} | 2 +- .../{LinuxStrings.cpp => linux_strings.cpp} | 0 .../{LocklessTypes.cpp => lockless_types.cpp} | 2 +- ...mmandParser.cpp => log_command_parser.cpp} | 12 +- ...MemoryOverride.cpp => memory_override.cpp} | 4 +- .../{MessageFilter.cpp => message_filter.cpp} | 18 +- Source/src/{MmsgBatch.cpp => mmsg_batch.cpp} | 4 +- .../{MtuBlackHole.cpp => mtu_black_hole.cpp} | 4 +- ...Client.cpp => nat_punchthrough_client.cpp} | 16 +- ...Server.cpp => nat_punchthrough_server.cpp} | 22 +- ...ient.cpp => nat_type_detection_client.cpp} | 20 +- ...mmon.cpp => nat_type_detection_common.cpp} | 8 +- ...rver.cpp => nat_type_detection_server.cpp} | 32 +- ...rkIDManager.cpp => network_id_manager.cpp} | 14 +- ...workIDObject.cpp => network_id_object.cpp} | 8 +- .../src/{OsxAdapter.cpp => osx_adapter.cpp} | 2 +- ...leLogger.cpp => packet_console_logger.cpp} | 6 +- ...tFileLogger.cpp => packet_file_logger.cpp} | 12 +- .../{PacketLogger.cpp => packet_logger.cpp} | 28 +- ...er.cpp => packet_output_window_logger.cpp} | 10 +- .../{PacketizedTCP.cpp => packetized_tcp.cpp} | 12 +- Source/src/{RakPeer.cpp => peer.cpp} | 60 +- .../src/{PeerHandle.cpp => peer_handle.cpp} | 4 +- ...inInterface2.cpp => plugin_interface2.cpp} | 8 +- ...ctorizer.cpp => point_grid_sectorizer.cpp} | 2 +- Source/src/{Rackspace.cpp => rackspace.cpp} | 8 +- Source/src/{Rand.cpp => rand.cpp} | 2 +- Source/src/{RandSync.cpp => rand_sync.cpp} | 4 +- .../src/{ReadyEvent.cpp => ready_event.cpp} | 12 +- .../src/{RelayPlugin.cpp => relay_plugin.cpp} | 10 +- ...abilityLayer.cpp => reliability_layer.cpp} | 32 +- ...plicaManager3.cpp => replica_manager3.cpp} | 16 +- Source/src/{Router2.cpp => router2.cpp} | 20 +- .../src/{RPC4Plugin.cpp => rpc4_plugin.cpp} | 22 +- ...cureHandshake.cpp => secure_handshake.cpp} | 2 +- .../{SendToThread.cpp => send_to_thread.cpp} | 12 +- .../{SignaledEvent.cpp => signaled_event.cpp} | 6 +- .../src/{SimpleMutex.cpp => simple_mutex.cpp} | 4 +- Source/src/{RakSleep.cpp => sleep.cpp} | 4 +- Source/src/{RakNetSocket2.cpp => socket2.cpp} | 20 +- ...ocket2_Berkley.cpp => socket2_berkley.cpp} | 8 +- ...ws_Linux.cpp => socket2_windows_linux.cpp} | 2 +- .../src/{SocketLayer.cpp => socket_layer.cpp} | 30 +- .../{RakNetStatistics.cpp => statistics.cpp} | 10 +- ...ticsHistory.cpp => statistics_history.cpp} | 10 +- Source/src/{RakString.cpp => string.cpp} | 24 +- ...ngCompressor.cpp => string_compressor.cpp} | 10 +- .../src/{StringTable.cpp => string_table.cpp} | 12 +- ...{SuperFastHash.cpp => super_fast_hash.cpp} | 8 +- ...bleSerializer.cpp => table_serializer.cpp} | 10 +- .../{TCPInterface.cpp => tcp_interface.cpp} | 26 +- .../{TeamBalancer.cpp => team_balancer.cpp} | 12 +- .../src/{TeamManager.cpp => team_manager.cpp} | 10 +- ...lnetTransport.cpp => telnet_transport.cpp} | 12 +- Source/src/{RakThread.cpp => thread.cpp} | 14 +- ...ogger.cpp => threadsafe_packet_logger.cpp} | 8 +- .../{RakNetTransport2.cpp => transport2.cpp} | 16 +- ...ication.cpp => two_way_authentication.cpp} | 14 +- Source/src/{RakNetTypes.cpp => types.cpp} | 26 +- .../{UDPForwarder.cpp => udp_forwarder.cpp} | 18 +- ...DPProxyClient.cpp => udp_proxy_client.cpp} | 14 +- ...rdinator.cpp => udp_proxy_coordinator.cpp} | 18 +- ...DPProxyServer.cpp => udp_proxy_server.cpp} | 12 +- ...izer.cpp => variable_delta_serializer.cpp} | 2 +- ...er.cpp => variable_list_delta_tracker.cpp} | 2 +- ...cSQLParser.cpp => variadic_sql_parser.cpp} | 4 +- Source/src/{RakVoice.cpp => voice.cpp} | 18 +- ...ingleton.cpp => wsa_startup_singleton.cpp} | 4 +- Source/src/{RakWString.cpp => wstring.cpp} | 8 +- .../Integration/ComprehensiveConvertTests.cpp | 12 +- Tests/Integration/ConnectWithSocketTests.cpp | 16 +- .../CrossConnectionConvertTests.cpp | 10 +- ...rectoryDeltaTransferStreamingLiveTests.cpp | 18 +- Tests/Integration/DisconnectReasonTests.cpp | 8 +- Tests/Integration/DispatcherLiveTests.cpp | 8 +- .../DroppedConnectionConvertTests.cpp | 10 +- Tests/Integration/EightPeerTests.cpp | 14 +- .../FileListTransferWindowLiveTests.cpp | 18 +- Tests/Integration/LocalIsConnectedTests.cpp | 16 +- Tests/Integration/MTUNegotiationTests.cpp | 16 +- .../ManyClientsOneServerBlockingTests.cpp | 14 +- ...lientsOneServerDeallocateBlockingTests.cpp | 14 +- .../ManyClientsOneServerNonBlockingTests.cpp | 14 +- Tests/Integration/MaximumConnectTests.cpp | 14 +- Tests/Integration/MmsgBatchLiveTests.cpp | 14 +- Tests/Integration/PacketAndLowLevelTests.cpp | 14 +- Tests/Integration/PeerBuilderTests.cpp | 18 +- .../PeerConnectDisconnectTests.cpp | 14 +- ...onnectDisconnectWithCancelPendingTests.cpp | 14 +- Tests/Integration/PeerHandleTests.cpp | 18 +- Tests/Integration/RPC4ContextTests.cpp | 14 +- .../ReliableOrderedConvertedTests.cpp | 14 +- Tests/Integration/SecurityFunctionsTests.cpp | 16 +- Tests/Integration/SessionConfigLiveTests.cpp | 12 +- Tests/Integration/TypedSendLiveTests.cpp | 8 +- Tests/Support/CommonFunctions.h | 16 +- Tests/Support/DebugTools.h | 2 +- Tests/Support/PacketChangerPlugin.h | 10 +- Tests/Support/PacketDropPlugin.h | 10 +- Tests/Support/RakTimer.h | 4 +- Tests/Support/TestHelpers.h | 12 +- Tests/Unit/ArchiveTests.cpp | 6 +- Tests/Unit/BitStreamStringTests.cpp | 4 +- Tests/Unit/DispatcherTests.cpp | 8 +- Tests/Unit/GuidUtilTests.cpp | 6 +- Tests/Unit/LocalAddressTests.cpp | 4 +- Tests/Unit/MmsgBatchTests.cpp | 8 +- Tests/Unit/MtuBlackHoleTests.cpp | 4 +- Tests/Unit/PeerGuidTests.cpp | 4 +- Tests/Unit/PointGridSectorizerTests.cpp | 2 +- Tests/Unit/RPC4GlobalRegistrationTests.cpp | 4 +- Tests/Unit/RakVoiceRelayTests.cpp | 6 +- Tests/Unit/ReliabilityLayerBlackHoleTests.cpp | 22 +- .../ReplicaManager3SendSerializeTests.cpp | 10 +- Tests/Unit/ReplicaManager3WorldTests.cpp | 2 +- Tests/Unit/SessionAdmissionTests.cpp | 8 +- Tests/Unit/SessionConfigTests.cpp | 6 +- Tests/Unit/SocketErrorTests.cpp | 4 +- Tests/Unit/StatisticsHistorySamplingTests.cpp | 4 +- .../Unit/TwoWayAuthenticationTimeoutTests.cpp | 6 +- Tests/Unit/VirtualWorldTests.cpp | 10 +- cmake/FetchVoiceDependencies.cmake | 2 +- docs/advanced/congestion-control.rst | 2 +- docs/advanced/custom-memory-management.rst | 4 +- docs/advanced/debugging-disconnects.rst | 2 +- docs/advanced/nat-traversal-architecture.rst | 8 +- docs/api/core.rst | 14 +- docs/basics/bitstreams.rst | 4 +- docs/basics/data-compression.rst | 4 +- docs/basics/network-id-object.rst | 2 +- docs/basics/network-messages.rst | 2 +- docs/basics/secure-connections.rst | 2 +- docs/basics/startup.rst | 2 +- docs/basics/statistics.rst | 2 +- docs/changelog.rst | 26 +- docs/getting-started/building.rst | 6 +- docs/getting-started/quickstart.rst | 10 +- docs/getting-started/system-overview.rst | 2 +- docs/getting-started/tutorial.rst | 16 +- docs/guide/peer-to-peer.rst | 6 +- docs/guide/plugins.rst | 4 +- docs/plugins/autopatcher.rst | 2 +- docs/plugins/cloud-computing.rst | 4 +- docs/plugins/directory-delta-transfer.rst | 2 +- docs/plugins/file-list-transfer.rst | 4 +- docs/plugins/fully-connected-mesh-2.rst | 2 +- docs/plugins/message-filter.rst | 2 +- docs/plugins/nat-punchthrough.rst | 4 +- docs/plugins/nat-type-detection.rst | 4 +- docs/plugins/overview.rst | 2 +- docs/plugins/packet-logger.rst | 2 +- docs/plugins/rakvoice.rst | 2 +- docs/plugins/ready-event.rst | 2 +- docs/plugins/replica-manager-3.rst | 2 +- docs/plugins/router2.rst | 2 +- docs/plugins/rpc4.rst | 2 +- docs/plugins/team-balancer.rst | 2 +- docs/plugins/team-manager.rst | 2 +- docs/plugins/two-way-authentication.rst | 2 +- docs/plugins/virtual-worlds.rst | 4 +- docs/utilities/console-server.rst | 4 +- docs/utilities/crash-reporter.rst | 2 +- docs/utilities/email-sender.rst | 4 +- docs/utilities/string-compressor.rst | 4 +- docs/utilities/tcp-interface.rst | 2 +- 546 files changed, 3957 insertions(+), 3994 deletions(-) delete mode 100644 Source/include/mafianet/GuidUtil.h delete mode 100644 Source/include/mafianet/LinuxAdapter.h delete mode 100644 Source/include/mafianet/OsxAdapter.h rename Source/include/mafianet/{Aliases.h => aliases.h} (89%) rename Source/include/mafianet/{Alloca.h => alloca.h} (100%) rename Source/include/mafianet/{Archive.h => archive.h} (98%) rename Source/include/mafianet/{Assert.h => assert.h} (92%) rename Source/include/mafianet/{AutopatcherPatchContext.h => autopatcher_patch_context.h} (100%) rename Source/include/mafianet/{AutopatcherRepositoryInterface.h => autopatcher_repository_interface.h} (95%) rename Source/include/mafianet/{Base64Encoder.h => base64_encoder.h} (92%) rename Source/include/mafianet/{BitStream.h => bit_stream.h} (97%) rename Source/include/mafianet/{CCRakNetSlidingWindow.h => cc_sliding_window.h} (95%) rename Source/include/mafianet/{CCRakNetUDT.h => cc_udt.h} (97%) rename Source/include/mafianet/{CheckSum.h => check_sum.h} (90%) rename Source/include/mafianet/{CloudClient.h => cloud_client.h} (96%) rename Source/include/mafianet/{CloudCommon.h => cloud_common.h} (95%) rename Source/include/mafianet/{CloudServer.h => cloud_server.h} (96%) rename Source/include/mafianet/{CommandParser.h => command_parser.h} (93%) rename Source/include/mafianet/{CommandParserInterface.h => command_parser_interface.h} (96%) rename Source/include/mafianet/{ConnectionGraph2.h => connection_graph2.h} (92%) rename Source/include/mafianet/{ConsoleServer.h => console_server.h} (91%) rename Source/include/mafianet/{DataCompressor.h => data_compressor.h} (88%) rename Source/include/mafianet/{DefineOverrides.h => define_overrides.h} (100%) rename Source/include/mafianet/{Defines.h => defines.h} (97%) rename Source/include/mafianet/{DirectoryDeltaTransfer.h => directory_delta_transfer.h} (95%) rename Source/include/mafianet/{Dispatcher.h => dispatcher.h} (94%) rename Source/include/mafianet/{DR_SHA1.h => dr_sha1.h} (95%) rename Source/include/mafianet/{DS_BinarySearchTree.h => ds_binary_search_tree.h} (95%) rename Source/include/mafianet/{DS_BPlusTree.h => ds_bplus_tree.h} (96%) rename Source/include/mafianet/{DS_BytePool.h => ds_byte_pool.h} (77%) rename Source/include/mafianet/{DS_ByteQueue.h => ds_byte_queue.h} (91%) rename Source/include/mafianet/{DS_Hash.h => ds_hash.h} (95%) rename Source/include/mafianet/{DS_Heap.h => ds_heap.h} (95%) rename Source/include/mafianet/{DS_HuffmanEncodingTree.h => ds_huffman_encoding_tree.h} (88%) rename Source/include/mafianet/{DS_HuffmanEncodingTreeFactory.h => ds_huffman_encoding_tree_factory.h} (85%) rename Source/include/mafianet/{DS_HuffmanEncodingTreeNode.h => ds_huffman_encoding_tree_node.h} (100%) rename Source/include/mafianet/{DS_LinkedList.h => ds_linked_list.h} (96%) rename Source/include/mafianet/{DS_List.h => ds_list.h} (95%) rename Source/include/mafianet/{DS_Map.h => ds_map.h} (95%) rename Source/include/mafianet/{DS_MemoryPool.h => ds_memory_pool.h} (94%) rename Source/include/mafianet/{DS_Multilist.h => ds_multilist.h} (96%) rename Source/include/mafianet/{DS_OrderedChannelHeap.h => ds_ordered_channel_heap.h} (93%) rename Source/include/mafianet/{DS_OrderedList.h => ds_ordered_list.h} (96%) rename Source/include/mafianet/{DS_Queue.h => ds_queue.h} (95%) rename Source/include/mafianet/{DS_QueueLinkedList.h => ds_queue_linked_list.h} (85%) rename Source/include/mafianet/{DS_RangeList.h => ds_range_list.h} (94%) rename Source/include/mafianet/{DS_Table.h => ds_table.h} (96%) rename Source/include/mafianet/{DS_ThreadsafeAllocatingQueue.h => ds_threadsafe_allocating_queue.h} (93%) rename Source/include/mafianet/{DS_Tree.h => ds_tree.h} (90%) rename Source/include/mafianet/{DS_WeightedGraph.h => ds_weighted_graph.h} (95%) rename Source/include/mafianet/{DynDNS.h => dyn_dns.h} (94%) rename Source/include/mafianet/{EmailSender.h => email_sender.h} (89%) rename Source/include/mafianet/{EmptyHeader.h => empty_header.h} (100%) rename Source/include/mafianet/{EpochTimeToString.h => epoch_time_to_string.h} (84%) rename Source/include/mafianet/{Export.h => export.h} (95%) rename Source/include/mafianet/{FileList.h => file_list.h} (95%) rename Source/include/mafianet/{FileListNodeContext.h => file_list_node_context.h} (92%) rename Source/include/mafianet/{FileListTransfer.h => file_list_transfer.h} (93%) rename Source/include/mafianet/{FileListTransferCBInterface.h => file_list_transfer_cb_interface.h} (96%) rename Source/include/mafianet/{FileOperations.h => file_operations.h} (86%) rename Source/include/mafianet/{_FindFirst.h => find_first.h} (95%) rename Source/include/mafianet/{FormatString.h => format_string.h} (86%) rename Source/include/mafianet/{FullyConnectedMesh2.h => fully_connected_mesh2.h} (96%) rename Source/include/mafianet/{GetTime.h => get_time.h} (92%) rename Source/include/mafianet/{GetTimeOfDay.h => get_time_of_day.h} (100%) rename Source/include/mafianet/{Getche.h => getche.h} (100%) rename Source/include/mafianet/{Gets.h => gets.h} (100%) rename Source/include/mafianet/{GridSectorizer.h => grid_sectorizer.h} (93%) rename Source/include/mafianet/{HTTPConnection.h => http_connection.h} (92%) rename Source/include/mafianet/{HTTPConnection2.h => http_connection2.h} (91%) rename Source/include/mafianet/{IncrementalReadInterface.h => incremental_read_interface.h} (92%) rename Source/include/mafianet/{InternalPacket.h => internal_packet.h} (93%) rename Source/include/mafianet/{Itoa.h => itoa.h} (100%) rename Source/include/mafianet/{Kbhit.h => kbhit.h} (100%) rename Source/include/mafianet/{LinuxStrings.h => linux_strings.h} (100%) rename Source/include/mafianet/{LocklessTypes.h => lockless_types.h} (87%) rename Source/include/mafianet/{LogCommandParser.h => log_command_parser.h} (95%) rename Source/include/mafianet/{MemoryOverride.h => memory_override.h} (95%) rename Source/include/mafianet/{MessageFilter.h => message_filter.h} (96%) rename Source/include/mafianet/{MessageIdentifiers.h => message_identifiers.h} (97%) rename Source/include/mafianet/{MmsgBatch.h => mmsg_batch.h} (98%) rename Source/include/mafianet/{MtuBlackHole.h => mtu_black_hole.h} (95%) rename Source/include/mafianet/{MTUSize.h => mtu_size.h} (94%) rename Source/include/mafianet/{NatPunchthroughClient.h => nat_punchthrough_client.h} (95%) rename Source/include/mafianet/{NatPunchthroughServer.h => nat_punchthrough_server.h} (91%) rename Source/include/mafianet/{NatTypeDetectionClient.h => nat_type_detection_client.h} (85%) rename Source/include/mafianet/{NatTypeDetectionCommon.h => nat_type_detection_common.h} (94%) rename Source/include/mafianet/{NatTypeDetectionServer.h => nat_type_detection_server.h} (90%) rename Source/include/mafianet/{NativeFeatureIncludes.h => native_feature_includes.h} (93%) rename Source/include/mafianet/{NativeFeatureIncludesOverrides.h => native_feature_includes_overrides.h} (90%) rename Source/include/mafianet/{NativeTypes.h => native_types.h} (100%) rename Source/include/mafianet/{NetworkIDManager.h => network_id_manager.h} (90%) rename Source/include/mafianet/{NetworkIDObject.h => network_id_object.h} (95%) rename Source/include/mafianet/{PacketConsoleLogger.h => packet_console_logger.h} (90%) rename Source/include/mafianet/{PacketFileLogger.h => packet_file_logger.h} (90%) rename Source/include/mafianet/{PacketLogger.h => packet_logger.h} (95%) rename Source/include/mafianet/{PacketOutputWindowLogger.h => packet_output_window_logger.h} (90%) rename Source/include/mafianet/{PacketPool.h => packet_pool.h} (100%) rename Source/include/mafianet/{PacketPriority.h => packet_priority.h} (100%) rename Source/include/mafianet/{PacketizedTCP.h => packetized_tcp.h} (92%) rename Source/include/mafianet/{Peer.h => peer.h} (97%) rename Source/include/mafianet/{PeerHandle.h => peer_handle.h} (96%) rename Source/include/mafianet/{PeerInterface.h => peer_interface.h} (97%) rename Source/include/mafianet/{PluginInterface2.h => plugin_interface2.h} (96%) rename Source/include/mafianet/{PointGridSectorizer.h => point_grid_sectorizer.h} (98%) rename Source/include/mafianet/{Rackspace.h => rackspace.h} (97%) rename Source/include/mafianet/{Rand.h => rand.h} (95%) rename Source/include/mafianet/{RandSync.h => rand_sync.h} (89%) rename Source/include/mafianet/{ReadyEvent.h => ready_event.h} (97%) rename Source/include/mafianet/{RefCountedObj.h => ref_counted_obj.h} (93%) rename Source/include/mafianet/{RelayPlugin.h => relay_plugin.h} (95%) rename Source/include/mafianet/{ReliabilityLayer.h => reliability_layer.h} (94%) rename Source/include/mafianet/{ReplicaEnums.h => replica_enums.h} (100%) rename Source/include/mafianet/{ReplicaManager3.h => replica_manager3.h} (97%) rename Source/include/mafianet/{Router2.h => router2.h} (93%) rename Source/include/mafianet/{RPC4Plugin.h => rpc4_plugin.h} (96%) rename Source/include/mafianet/{SecureHandshake.h => secure_handshake.h} (91%) rename Source/include/mafianet/{SendToThread.h => send_to_thread.h} (84%) rename Source/include/mafianet/{SessionAdmission.h => session_admission.h} (98%) rename Source/include/mafianet/{SignaledEvent.h => signaled_event.h} (87%) rename Source/include/mafianet/{SimpleMutex.h => simple_mutex.h} (90%) rename Source/include/mafianet/{SimpleTCPServer.h => simple_tcp_server.h} (100%) rename Source/include/mafianet/{SingleProducerConsumer.h => single_producer_consumer.h} (96%) rename Source/include/mafianet/{Sleep.h => sleep.h} (90%) rename Source/include/mafianet/{SmartPtr.h => smart_ptr.h} (94%) rename Source/include/mafianet/{Socket2.h => socket2.h} (95%) rename Source/include/mafianet/{SocketDefines.h => socket_defines.h} (100%) rename Source/include/mafianet/{SocketIncludes.h => socket_includes.h} (94%) rename Source/include/mafianet/{SocketLayer.h => socket_layer.h} (94%) rename Source/include/mafianet/{Statistics.h => statistics.h} (95%) rename Source/include/mafianet/{StatisticsHistory.h => statistics_history.h} (93%) rename Source/include/mafianet/{String.h => string.h} (96%) rename Source/include/mafianet/{StringCompressor.h => string_compressor.h} (94%) rename Source/include/mafianet/{StringTable.h => string_table.h} (95%) rename Source/include/mafianet/{SuperFastHash.h => super_fast_hash.h} (93%) rename Source/include/mafianet/{TableSerializer.h => table_serializer.h} (94%) rename Source/include/mafianet/{TCPInterface.h => tcp_interface.h} (91%) rename Source/include/mafianet/{TeamBalancer.h => team_balancer.h} (96%) rename Source/include/mafianet/{TeamManager.h => team_manager.h} (97%) rename Source/include/mafianet/{TelnetTransport.h => telnet_transport.h} (91%) rename Source/include/mafianet/{Thread.h => thread.h} (95%) rename Source/include/mafianet/{ThreadPool.h => thread_pool.h} (95%) rename Source/include/mafianet/{ThreadsafePacketLogger.h => threadsafe_packet_logger.h} (87%) rename Source/include/mafianet/{Time.h => time.h} (92%) rename Source/include/mafianet/{Transport2.h => transport2.h} (92%) rename Source/include/mafianet/{TransportInterface.h => transport_interface.h} (95%) rename Source/include/mafianet/{TwoWayAuthentication.h => two_way_authentication.h} (93%) rename Source/include/mafianet/{Types.h => types.h} (96%) rename Source/include/mafianet/{UDPForwarder.h => udp_forwarder.h} (89%) rename Source/include/mafianet/{UDPProxyClient.h => udp_proxy_client.h} (97%) rename Source/include/mafianet/{UDPProxyCommon.h => udp_proxy_common.h} (93%) rename Source/include/mafianet/{UDPProxyCoordinator.h => udp_proxy_coordinator.h} (92%) rename Source/include/mafianet/{UDPProxyServer.h => udp_proxy_server.h} (94%) rename Source/include/mafianet/{VariableDeltaSerializer.h => variable_delta_serializer.h} (96%) rename Source/include/mafianet/{VariableListDeltaTracker.h => variable_list_delta_tracker.h} (94%) rename Source/include/mafianet/{VariadicSQLParser.h => variadic_sql_parser.h} (94%) rename Source/include/mafianet/{Version.h => version.h} (100%) rename Source/include/mafianet/{VirtualWorld.h => virtual_world.h} (100%) rename Source/include/mafianet/{VirtualWorldReplica3.h => virtual_world_replica3.h} (98%) rename Source/include/mafianet/{RakVoice.h => voice.h} (96%) rename Source/include/mafianet/{WindowsIncludes.h => windows_includes.h} (100%) rename Source/include/mafianet/{WSAStartupSingleton.h => wsa_startup_singleton.h} (100%) rename Source/include/mafianet/{WString.h => wstring.h} (93%) rename Source/src/{Base64Encoder.cpp => base64_encoder.cpp} (96%) rename Source/src/{BitStream.cpp => bit_stream.cpp} (95%) rename Source/src/{CCRakNetSlidingWindow.cpp => cc_sliding_window.cpp} (96%) rename Source/src/{CCRakNetUDT.cpp => cc_udt.cpp} (96%) rename Source/src/{CheckSum.cpp => check_sum.cpp} (95%) rename Source/src/{CloudClient.cpp => cloud_client.cpp} (94%) rename Source/src/{CloudCommon.cpp => cloud_common.cpp} (94%) rename Source/src/{CloudServer.cpp => cloud_server.cpp} (96%) rename Source/src/{RakNetCommandParser.cpp => command_parser.cpp} (95%) rename Source/src/{CommandParserInterface.cpp => command_parser_interface.cpp} (94%) rename Source/src/{ConnectionGraph2.cpp => connection_graph2.cpp} (94%) rename Source/src/{ConsoleServer.cpp => console_server.cpp} (94%) rename Source/src/{DataCompressor.cpp => data_compressor.cpp} (93%) rename Source/src/{DirectoryDeltaTransfer.cpp => directory_delta_transfer.cpp} (92%) rename Source/src/{DR_SHA1.cpp => dr_sha1.cpp} (96%) rename Source/src/{DS_BytePool.cpp => ds_byte_pool.cpp} (94%) rename Source/src/{DS_ByteQueue.cpp => ds_byte_queue.cpp} (95%) rename Source/src/{DS_HuffmanEncodingTree.cpp => ds_huffman_encoding_tree.cpp} (95%) rename Source/src/{DS_Table.cpp => ds_table.cpp} (95%) rename Source/src/{DynDNS.cpp => dyn_dns.cpp} (93%) rename Source/src/{EmailSender.cpp => email_sender.cpp} (93%) rename Source/src/{EpochTimeToString.cpp => epoch_time_to_string.cpp} (84%) rename Source/src/{FileList.cpp => file_list.cpp} (94%) rename Source/src/{FileListTransfer.cpp => file_list_transfer.cpp} (95%) rename Source/src/{FileOperations.cpp => file_operations.cpp} (88%) rename Source/src/{_FindFirst.cpp => find_first.cpp} (91%) rename Source/src/{FormatString.cpp => format_string.cpp} (85%) rename Source/src/{FullyConnectedMesh2.cpp => fully_connected_mesh2.cpp} (96%) rename Source/src/{GetTime.cpp => get_time.cpp} (93%) rename Source/src/{GetTimeOfDay.cpp => get_time_of_day.cpp} (92%) rename Source/src/{Getche.cpp => getche.cpp} (93%) rename Source/src/{Gets.cpp => gets.cpp} (100%) rename Source/src/{GridSectorizer.cpp => grid_sectorizer.cpp} (96%) rename Source/src/{GuidUtil.cpp => guid_util.cpp} (96%) rename Source/src/{HTTPConnection.cpp => http_connection.cpp} (93%) rename Source/src/{HTTPConnection2.cpp => http_connection2.cpp} (95%) rename Source/src/{IncrementalReadInterface.cpp => incremental_read_interface.cpp} (87%) rename Source/src/{Itoa.cpp => itoa.cpp} (94%) rename Source/src/{LinuxAdapter.cpp => linux_adapter.cpp} (99%) rename Source/src/{LinuxStrings.cpp => linux_strings.cpp} (100%) rename Source/src/{LocklessTypes.cpp => lockless_types.cpp} (93%) rename Source/src/{LogCommandParser.cpp => log_command_parser.cpp} (93%) rename Source/src/{RakMemoryOverride.cpp => memory_override.cpp} (95%) rename Source/src/{MessageFilter.cpp => message_filter.cpp} (94%) rename Source/src/{MmsgBatch.cpp => mmsg_batch.cpp} (97%) rename Source/src/{MtuBlackHole.cpp => mtu_black_hole.cpp} (93%) rename Source/src/{NatPunchthroughClient.cpp => nat_punchthrough_client.cpp} (96%) rename Source/src/{NatPunchthroughServer.cpp => nat_punchthrough_server.cpp} (95%) rename Source/src/{NatTypeDetectionClient.cpp => nat_type_detection_client.cpp} (92%) rename Source/src/{NatTypeDetectionCommon.cpp => nat_type_detection_common.cpp} (93%) rename Source/src/{NatTypeDetectionServer.cpp => nat_type_detection_server.cpp} (90%) rename Source/src/{NetworkIDManager.cpp => network_id_manager.cpp} (90%) rename Source/src/{NetworkIDObject.cpp => network_id_object.cpp} (89%) rename Source/src/{OsxAdapter.cpp => osx_adapter.cpp} (99%) rename Source/src/{PacketConsoleLogger.cpp => packet_console_logger.cpp} (86%) rename Source/src/{PacketFileLogger.cpp => packet_file_logger.cpp} (83%) rename Source/src/{PacketLogger.cpp => packet_logger.cpp} (94%) rename Source/src/{PacketOutputWindowLogger.cpp => packet_output_window_logger.cpp} (82%) rename Source/src/{PacketizedTCP.cpp => packetized_tcp.cpp} (94%) rename Source/src/{RakPeer.cpp => peer.cpp} (97%) rename Source/src/{PeerHandle.cpp => peer_handle.cpp} (96%) rename Source/src/{PluginInterface2.cpp => plugin_interface2.cpp} (94%) rename Source/src/{PointGridSectorizer.cpp => point_grid_sectorizer.cpp} (99%) rename Source/src/{Rackspace.cpp => rackspace.cpp} (96%) rename Source/src/{Rand.cpp => rand.cpp} (96%) rename Source/src/{RandSync.cpp => rand_sync.cpp} (95%) rename Source/src/{ReadyEvent.cpp => ready_event.cpp} (95%) rename Source/src/{RelayPlugin.cpp => relay_plugin.cpp} (95%) rename Source/src/{ReliabilityLayer.cpp => reliability_layer.cpp} (97%) rename Source/src/{ReplicaManager3.cpp => replica_manager3.cpp} (97%) rename Source/src/{Router2.cpp => router2.cpp} (96%) rename Source/src/{RPC4Plugin.cpp => rpc4_plugin.cpp} (95%) rename Source/src/{SecureHandshake.cpp => secure_handshake.cpp} (95%) rename Source/src/{SendToThread.cpp => send_to_thread.cpp} (88%) rename Source/src/{SignaledEvent.cpp => signaled_event.cpp} (92%) rename Source/src/{SimpleMutex.cpp => simple_mutex.cpp} (91%) rename Source/src/{RakSleep.cpp => sleep.cpp} (91%) rename Source/src/{RakNetSocket2.cpp => socket2.cpp} (94%) rename Source/src/{RakNetSocket2_Berkley.cpp => socket2_berkley.cpp} (96%) rename Source/src/{RakNetSocket2_Windows_Linux.cpp => socket2_windows_linux.cpp} (96%) rename Source/src/{SocketLayer.cpp => socket_layer.cpp} (93%) rename Source/src/{RakNetStatistics.cpp => statistics.cpp} (96%) rename Source/src/{StatisticsHistory.cpp => statistics_history.cpp} (96%) rename Source/src/{RakString.cpp => string.cpp} (94%) rename Source/src/{StringCompressor.cpp => string_compressor.cpp} (92%) rename Source/src/{StringTable.cpp => string_table.cpp} (90%) rename Source/src/{SuperFastHash.cpp => super_fast_hash.cpp} (92%) rename Source/src/{TableSerializer.cpp => table_serializer.cpp} (95%) rename Source/src/{TCPInterface.cpp => tcp_interface.cpp} (95%) rename Source/src/{TeamBalancer.cpp => team_balancer.cpp} (95%) rename Source/src/{TeamManager.cpp => team_manager.cpp} (97%) rename Source/src/{TelnetTransport.cpp => telnet_transport.cpp} (94%) rename Source/src/{RakThread.cpp => thread.cpp} (81%) rename Source/src/{ThreadsafePacketLogger.cpp => threadsafe_packet_logger.cpp} (85%) rename Source/src/{RakNetTransport2.cpp => transport2.cpp} (89%) rename Source/src/{TwoWayAuthentication.cpp => two_way_authentication.cpp} (95%) rename Source/src/{RakNetTypes.cpp => types.cpp} (94%) rename Source/src/{UDPForwarder.cpp => udp_forwarder.cpp} (94%) rename Source/src/{UDPProxyClient.cpp => udp_proxy_client.cpp} (95%) rename Source/src/{UDPProxyCoordinator.cpp => udp_proxy_coordinator.cpp} (95%) rename Source/src/{UDPProxyServer.cpp => udp_proxy_server.cpp} (93%) rename Source/src/{VariableDeltaSerializer.cpp => variable_delta_serializer.cpp} (96%) rename Source/src/{VariableListDeltaTracker.cpp => variable_list_delta_tracker.cpp} (94%) rename Source/src/{VariadicSQLParser.cpp => variadic_sql_parser.cpp} (95%) rename Source/src/{RakVoice.cpp => voice.cpp} (96%) rename Source/src/{WSAStartupSingleton.cpp => wsa_startup_singleton.cpp} (91%) rename Source/src/{RakWString.cpp => wstring.cpp} (95%) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 9e1106f29..2ec9063bc 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -63,6 +63,19 @@ jobs: - name: Install OpenSSL run: sudo apt-get update && sudo apt-get install -y libssl-dev + # File names under Source/ are snake_case, and library headers include each + # other only as "mafianet/.h". A bare #include "string.h" inside + # include/mafianet/ would resolve to the library's own string.h instead of + # the C header, so both rules are enforced here. + - name: Check file naming and include style + run: | + bad=$(find Source/include Source/src -type f \( -name '*.h' -o -name '*.cpp' \) | grep -E '/[^/]*[A-Z][^/]*$' || true) + if [ -n "$bad" ]; then echo "Non-snake_case file names:"; echo "$bad"; exit 1; fi + bad=$(grep -rnE '^\s*#include "[a-z0-9_]+\.h"' Source/include/mafianet | while IFS=: read -r f l rest; do + n=$(echo "$rest" | sed -E 's/.*"([^"]+)".*/\1/') + [ -e "Source/include/mafianet/$n" ] && echo "$f:$l: $rest"; done || true) + if [ -n "$bad" ]; then echo "Bare includes of library headers (use \"mafianet/.h\"):"; echo "$bad"; exit 1; fi + - name: Configure CMake run: | cmake -B build \ diff --git a/CLAUDE.md b/CLAUDE.md index feb5e504b..b72aa8abf 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -68,14 +68,14 @@ Available generators (run `cmake --help` for full list): When adding or removing a plugin guarded by a `_RAKNET_SUPPORT_` flag, update `MAFIANET_OPTIONAL_FEATURES` in `Source/CMakeLists.txt` as well, or the CMake -plugin selection silently drifts from `NativeFeatureIncludes.h`. +plugin selection silently drifts from `native_feature_includes.h`. -Public headers are PascalCase without the RakNet prefix (`PeerInterface.h`, -`String.h`, `Types.h`); this is MafiaNet, so never bring `Rak`/`RakNet` back into -file names. The only lowercase header is the umbrella `mafianet/mafianet.h`. The -remaining lowercase names (`guid_util.h`, `linux_adapter.h`, `osx_adapter.h`) are -deprecated forwarding shims listed in `MAFIANET_DEPRECATED_HEADERS`; never include -them from library code and do not add new lowercase headers. +File names under `Source/` are lowercase `snake_case` (`bit_stream.h`, `peer_interface.h`, +`reliability_layer.cpp`) with no `Rak`/`RakNet` prefix; this is MafiaNet. Class names keep +their historical spelling. Inside `Source/include/mafianet/`, include sibling headers only +as `"mafianet/.h"`, never as a bare `".h"`: several library headers share a name +with a C header (`string.h`, `time.h`, `assert.h`) and a bare quoted include would shadow +it. CI greps for this. Do not add PascalCase or shim headers. Dead platforms (Xbox 360, PS3, PS4, Vita, Native Client) were removed on purpose. Do not reintroduce `__native_client__`, `_PS3`, `_PS4`, `SN_TARGET_*` or Xbox @@ -88,13 +88,13 @@ paths are guarded by a plain `#if defined(__linux__)`. Do not reintroduce a flag capability macro for this; a CMake option here was removed deliberately because it left the shipping path uncompiled on most machines. -The portable helpers in `MmsgBatch.h` (`DriveBatchedSend`, `ClassifySendmmsgErrno`, +The portable helpers in `mmsg_batch.h` (`DriveBatchedSend`, `ClassifySendmmsgErrno`, `SockaddrToSystemAddress`, `CompactRecvSlots`, `RNS2SendBatch`) compile and are unit tested on **every** platform; only the syscall glue is gated. Keep it that way — new logic belongs in a portable helper with a unit test, not inside the `#if`. -When changing `Source/src/MmsgBatch.cpp`, `RakNetSocket2*.cpp`, or the send path in -`ReliabilityLayer.cpp`, a macOS/Windows build proves nothing about the batched paths. +When changing `Source/src/mmsg_batch.cpp`, `RakNetSocket2*.cpp`, or the send path in +`reliability_layer.cpp`, a macOS/Windows build proves nothing about the batched paths. Verify on Linux, in **both** `Debug` and `Release` (`RakAssert` only fires in Debug; Release is what ships and exercises the backstops the asserts hide): @@ -157,7 +157,7 @@ For debugging, run a binary directly with a filter: `./build/Tests/IntegrationTe - Ports: use OS-assigned ephemeral ports (`SocketDescriptor(0, "127.0.0.1")`, then `peer->GetInternalID().GetPort()`), never a new fixed port. (Some ported legacy tests still bind fixed ports; that is why the suite is `RUN_SERIAL` — do not add to the problem.) - Waiting: always poll for a condition with a deadline (`while (GetTimeMS() - start < N && !condition) { pump; RakSleep(30); }`), never assert immediately after a state change — packets surface asynchronously from each peer's network thread, and both sides of a handshake must be pumped until *each* has observed the event. - Never use a bare `RakSleep(N)` as a synchronization primitive; sleep only as the polling interval inside a deadline loop. -- Cleanup must survive a failed `ASSERT_`: destroy peers in fixture `TearDown()` (`Shutdown(100)` then `DestroyInstance` for every peer created) or use RAII `Peer`/`PacketPtr` handles from `mafianet/PeerHandle.h`. Never rely on code after the assertions to clean up. +- Cleanup must survive a failed `ASSERT_`: destroy peers in fixture `TearDown()` (`Shutdown(100)` then `DestroyInstance` for every peer created) or use RAII `Peer`/`PacketPtr` handles from `mafianet/peer_handle.h`. Never rely on code after the assertions to clean up. - Write correctness assertions so a real regression fails on every attempt: CI retries transient integration failures (`ctest --repeat until-pass:3`), which must only absorb timing misses, never actual bugs. Do not add retry loops inside tests. - Reusable connect/wait helpers live in `Tests/Support/` (`CommonFunctions.h`, `TestHelpers.h`); extend those rather than duplicating polling loops. @@ -167,7 +167,7 @@ For debugging, run a binary directly with a filter: `./build/Tests/IntegrationTe ### Namespaces - Primary namespace: `MafiaNet` (e.g., `MafiaNet::RakPeerInterface`, `MafiaNet::BitStream`) — used exclusively throughout the library -- Short-hand alias: the `MNet` preprocessor macro (defined in `mafianet/Defines.h`) expands to `MafiaNet` as a convenience shorthand +- Short-hand alias: the `MNet` preprocessor macro (defined in `mafianet/defines.h`) expands to `MafiaNet` as a convenience shorthand ### Key Components @@ -176,7 +176,7 @@ For debugging, run a binary directly with a filter: `./build/Tests/IntegrationTe - `BitStream` - Binary serialization for packets - `Packet` - Received network data container - `SystemAddress` - Network endpoint identifier -- `MessageIdentifiers.h` - Packet type IDs (extend with `ID_USER_PACKET_ENUM`) +- `message_identifiers.h` - Packet type IDs (extend with `ID_USER_PACKET_ENUM`) **Plugin System** (`PluginInterface2`): - Extend functionality by attaching plugins to RakPeerInterface @@ -211,9 +211,9 @@ Dependencies (bzip2, miniupnpc, Opus, RNNoise) are automatically fetched via CMa ### Basic Usage Pattern ```cpp -#include "mafianet/PeerInterface.h" -#include "mafianet/BitStream.h" -#include "mafianet/MessageIdentifiers.h" +#include "mafianet/peer_interface.h" +#include "mafianet/bit_stream.h" +#include "mafianet/message_identifiers.h" // Create peer MafiaNet::RakPeerInterface* peer = MafiaNet::RakPeerInterface::GetInstance(); @@ -259,7 +259,7 @@ cutting a release, bump **every** location below to the new version: | File | What to change | |------|----------------| | `CMakeLists.txt` | `project(MafiaNet VERSION X.Y.Z ...)` — the canonical source of truth | -| `Source/include/mafianet/Version.h` | `MAFIANET_VERSION`, `MAFIANET_VERSION_NUMBER_INT`, and the `MAJOR`/`MINOR`/`PATCH` defines (leave the deprecated `RAKNET_*` / `SLIKENET_*` defines untouched) | +| `Source/include/mafianet/version.h` | `MAFIANET_VERSION`, `MAFIANET_VERSION_NUMBER_INT`, and the `MAJOR`/`MINOR`/`PATCH` defines (leave the deprecated `RAKNET_*` / `SLIKENET_*` defines untouched) | | `docs/conf.py` | `version` and `release` | | `docs/Doxyfile` | `PROJECT_NUMBER` | | `docs/changelog.rst` | Add a new `Version X.Y.Z` section at the top | diff --git a/CMakeLists.txt b/CMakeLists.txt index 1dbae55df..b249e263e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -43,7 +43,7 @@ if(MAFIANET_BUILD_SAMPLES AND NOT MAFIANET_BUILD_EXTRAS) endif() # Plugin selection. Every optional plugin in the core library is guarded by a -# _RAKNET_SUPPORT_ flag from NativeFeatureIncludes.h. These two settings +# _RAKNET_SUPPORT_ flag from native_feature_includes.h. These two settings # are the supported way to compile plugins out without editing that header: # -DMAFIANET_DISABLED_FEATURES="ReplicaManager3;RPC4Plugin" drop specific plugins # -DMAFIANET_MINIMAL=ON drop every optional plugin diff --git a/DependentExtensions/Autopatcher/ApplyPatch.cpp b/DependentExtensions/Autopatcher/ApplyPatch.cpp index 4ddbbf121..860cf14fc 100644 --- a/DependentExtensions/Autopatcher/ApplyPatch.cpp +++ b/DependentExtensions/Autopatcher/ApplyPatch.cpp @@ -50,8 +50,8 @@ __FBSDID("$FreeBSD: src/usr.bin/bsdiff/bspatch/bspatch.c,v 1.1 2005/08/06 01:59: typedef int ssize_t; #include #include -#include "mafianet/LinuxAdapter.h" -#include "mafianet/OsxAdapter.h" +#include "mafianet/linux_adapter.h" +#include "mafianet/osx_adapter.h" #define fseeko fseek static void err(int i, ...) { @@ -65,15 +65,15 @@ static void errx(int i, ...) // Unix/POSIX includes and Windows API compatibility #include #include -#include "mafianet/LinuxAdapter.h" -#include "mafianet/OsxAdapter.h" +#include "mafianet/linux_adapter.h" +#include "mafianet/osx_adapter.h" // Map Windows API names to POSIX equivalents #define _open open #define _lseek lseek #define _read read #define _write write #define _close close -// fopen_s is provided by OsxAdapter.h +// fopen_s is provided by osx_adapter.h #endif #include diff --git a/DependentExtensions/Autopatcher/AutopatcherClient.cpp b/DependentExtensions/Autopatcher/AutopatcherClient.cpp index a4b6273c2..7a8cf06c8 100644 --- a/DependentExtensions/Autopatcher/AutopatcherClient.cpp +++ b/DependentExtensions/Autopatcher/AutopatcherClient.cpp @@ -14,28 +14,28 @@ */ #include "AutopatcherClient.h" -#include "mafianet/DirectoryDeltaTransfer.h" -#include "mafianet/FileList.h" -#include "mafianet/StringCompressor.h" -#include "mafianet/PeerInterface.h" -#include "mafianet/FileListTransfer.h" -#include "mafianet/FileListTransferCBInterface.h" -#include "mafianet/BitStream.h" -#include "mafianet/MessageIdentifiers.h" -#include "mafianet/AutopatcherPatchContext.h" +#include "mafianet/directory_delta_transfer.h" +#include "mafianet/file_list.h" +#include "mafianet/string_compressor.h" +#include "mafianet/peer_interface.h" +#include "mafianet/file_list_transfer.h" +#include "mafianet/file_list_transfer_cb_interface.h" +#include "mafianet/bit_stream.h" +#include "mafianet/message_identifiers.h" +#include "mafianet/autopatcher_patch_context.h" #include "ApplyPatch.h" -#include "mafianet/FileOperations.h" -//#include "mafianet/DR_SHA1.h" +#include "mafianet/file_operations.h" +//#include "mafianet/dr_sha1.h" #include -#include "mafianet/FileOperations.h" -#include "mafianet/Assert.h" -#include "mafianet/ThreadPool.h" -#include "mafianet/LinuxAdapter.h" -#include "mafianet/OsxAdapter.h" +#include "mafianet/file_operations.h" +#include "mafianet/assert.h" +#include "mafianet/thread_pool.h" +#include "mafianet/linux_adapter.h" +#include "mafianet/osx_adapter.h" using namespace MafiaNet; -#include "mafianet/SuperFastHash.h" +#include "mafianet/super_fast_hash.h" static const unsigned HASH_LENGTH=4; #define COPY_ON_RESTART_EXTENSION ".patched.tmp" diff --git a/DependentExtensions/Autopatcher/AutopatcherClient.h b/DependentExtensions/Autopatcher/AutopatcherClient.h index 1bda501af..e8d9a63c1 100644 --- a/DependentExtensions/Autopatcher/AutopatcherClient.h +++ b/DependentExtensions/Autopatcher/AutopatcherClient.h @@ -20,14 +20,14 @@ #ifndef __AUTOPATCHER_CLIENT_H #define __AUTOPATCHER_CLIENT_H -#include "mafianet/Types.h" -#include "mafianet/Export.h" -#include "mafianet/PluginInterface2.h" -#include "mafianet/PacketPriority.h" -#include "mafianet/FileList.h" -#include "mafianet/SimpleMutex.h" -#include "mafianet/FileListTransferCBInterface.h" -#include "mafianet/AutopatcherPatchContext.h" +#include "mafianet/types.h" +#include "mafianet/export.h" +#include "mafianet/plugin_interface2.h" +#include "mafianet/packet_priority.h" +#include "mafianet/file_list.h" +#include "mafianet/simple_mutex.h" +#include "mafianet/file_list_transfer_cb_interface.h" +#include "mafianet/autopatcher_patch_context.h" namespace MafiaNet { diff --git a/DependentExtensions/Autopatcher/AutopatcherMySQLRepository/AutopatcherMySQLRepository.cpp b/DependentExtensions/Autopatcher/AutopatcherMySQLRepository/AutopatcherMySQLRepository.cpp index abff0d72c..3b1d337a8 100644 --- a/DependentExtensions/Autopatcher/AutopatcherMySQLRepository/AutopatcherMySQLRepository.cpp +++ b/DependentExtensions/Autopatcher/AutopatcherMySQLRepository/AutopatcherMySQLRepository.cpp @@ -13,12 +13,12 @@ * license found in the license.txt file in the root directory of this source tree. */ -#include "mafianet/String.h" +#include "mafianet/string.h" #include "AutopatcherMySQLRepository.h" -#include "mafianet/AutopatcherPatchContext.h" -#include "mafianet/FileList.h" -#include "mafianet/Assert.h" -#include "mafianet/DS_List.h" +#include "mafianet/autopatcher_patch_context.h" +#include "mafianet/file_list.h" +#include "mafianet/assert.h" +#include "mafianet/ds_list.h" // ntohl #ifdef _WIN32 #include @@ -29,12 +29,12 @@ // If you get fatal error C1083: Cannot open include file: 'mysql.h' then you need to install MySQL. See readme.txt in this sample directory. #include "mysql.h" #include "CreatePatch.h" -#include "mafianet/AutopatcherPatchContext.h" -// #include "mafianet/DR_SHA1.h" +#include "mafianet/autopatcher_patch_context.h" +// #include "mafianet/dr_sha1.h" #include -#include "mafianet/LinuxStrings.h" -#include "mafianet/LinuxAdapter.h" -#include "mafianet/OsxAdapter.h" +#include "mafianet/linux_strings.h" +#include "mafianet/linux_adapter.h" +#include "mafianet/osx_adapter.h" using namespace MafiaNet; diff --git a/DependentExtensions/Autopatcher/AutopatcherMySQLRepository/AutopatcherMySQLRepository.h b/DependentExtensions/Autopatcher/AutopatcherMySQLRepository/AutopatcherMySQLRepository.h index b3d149cd1..540f06647 100644 --- a/DependentExtensions/Autopatcher/AutopatcherMySQLRepository/AutopatcherMySQLRepository.h +++ b/DependentExtensions/Autopatcher/AutopatcherMySQLRepository/AutopatcherMySQLRepository.h @@ -22,9 +22,9 @@ #ifndef __MYSQL_REPOSITORY_H #define __MYSQL_REPOSITORY_H -#include "mafianet/AutopatcherRepositoryInterface.h" +#include "mafianet/autopatcher_repository_interface.h" #include "MySQLInterface.h" -#include "mafianet/Export.h" +#include "mafianet/export.h" namespace MafiaNet { diff --git a/DependentExtensions/Autopatcher/AutopatcherPostgreRepository/AutopatcherPostgreRepository.cpp b/DependentExtensions/Autopatcher/AutopatcherPostgreRepository/AutopatcherPostgreRepository.cpp index 55f65cd1e..1e6a51b00 100644 --- a/DependentExtensions/Autopatcher/AutopatcherPostgreRepository/AutopatcherPostgreRepository.cpp +++ b/DependentExtensions/Autopatcher/AutopatcherPostgreRepository/AutopatcherPostgreRepository.cpp @@ -18,17 +18,17 @@ #include "AutopatcherPostgreRepository.h" -#include "mafianet/AutopatcherPatchContext.h" -#include "mafianet/FileList.h" +#include "mafianet/autopatcher_patch_context.h" +#include "mafianet/file_list.h" // libpq-fe.h is part of PostgreSQL which must be installed on this computer to use the PostgreRepository #include "libpq-fe.h" #include "CreatePatch.h" -#include "mafianet/AutopatcherPatchContext.h" -// #include "mafianet/DR_SHA1.h" +#include "mafianet/autopatcher_patch_context.h" +// #include "mafianet/dr_sha1.h" #include -#include "mafianet/LinuxStrings.h" -#include "mafianet/LinuxAdapter.h" -#include "mafianet/OsxAdapter.h" +#include "mafianet/linux_strings.h" +#include "mafianet/linux_adapter.h" +#include "mafianet/osx_adapter.h" // localtime #include diff --git a/DependentExtensions/Autopatcher/AutopatcherPostgreRepository/AutopatcherPostgreRepository.h b/DependentExtensions/Autopatcher/AutopatcherPostgreRepository/AutopatcherPostgreRepository.h index eb706b9f6..acc9e3728 100644 --- a/DependentExtensions/Autopatcher/AutopatcherPostgreRepository/AutopatcherPostgreRepository.h +++ b/DependentExtensions/Autopatcher/AutopatcherPostgreRepository/AutopatcherPostgreRepository.h @@ -20,9 +20,9 @@ #define _USE_POSTGRE_REPOSITORY #ifdef _USE_POSTGRE_REPOSITORY -#include "mafianet/AutopatcherRepositoryInterface.h" +#include "mafianet/autopatcher_repository_interface.h" #include "PostgreSQLInterface.h" -#include "mafianet/Export.h" +#include "mafianet/export.h" struct pg_conn; typedef struct pg_conn PGconn; diff --git a/DependentExtensions/Autopatcher/AutopatcherServer.cpp b/DependentExtensions/Autopatcher/AutopatcherServer.cpp index 9c95ad462..e28467855 100644 --- a/DependentExtensions/Autopatcher/AutopatcherServer.cpp +++ b/DependentExtensions/Autopatcher/AutopatcherServer.cpp @@ -18,17 +18,17 @@ #include "AutopatcherServer.h" -#include "mafianet/DirectoryDeltaTransfer.h" -#include "mafianet/FileList.h" -#include "mafianet/StringCompressor.h" -#include "mafianet/PeerInterface.h" -#include "mafianet/FileListTransfer.h" -#include "mafianet/FileListTransferCBInterface.h" -#include "mafianet/BitStream.h" -#include "mafianet/MessageIdentifiers.h" -#include "mafianet/AutopatcherRepositoryInterface.h" -#include "mafianet/Assert.h" -#include "mafianet/AutopatcherPatchContext.h" +#include "mafianet/directory_delta_transfer.h" +#include "mafianet/file_list.h" +#include "mafianet/string_compressor.h" +#include "mafianet/peer_interface.h" +#include "mafianet/file_list_transfer.h" +#include "mafianet/file_list_transfer_cb_interface.h" +#include "mafianet/bit_stream.h" +#include "mafianet/message_identifiers.h" +#include "mafianet/autopatcher_repository_interface.h" +#include "mafianet/assert.h" +#include "mafianet/autopatcher_patch_context.h" #include #include diff --git a/DependentExtensions/Autopatcher/AutopatcherServer.h b/DependentExtensions/Autopatcher/AutopatcherServer.h index 8f3bf20f6..233b21676 100644 --- a/DependentExtensions/Autopatcher/AutopatcherServer.h +++ b/DependentExtensions/Autopatcher/AutopatcherServer.h @@ -30,15 +30,15 @@ #ifndef __AUTOPATCHER_SERVER_H #define __AUTOPATCHER_SERVER_H -#include "mafianet/Types.h" -#include "mafianet/Export.h" -#include "mafianet/PluginInterface2.h" -#include "mafianet/PacketPriority.h" -#include "mafianet/ThreadPool.h" -#include "mafianet/BitStream.h" -#include "mafianet/String.h" -#include "mafianet/FileList.h" -#include "mafianet/IncrementalReadInterface.h" +#include "mafianet/types.h" +#include "mafianet/export.h" +#include "mafianet/plugin_interface2.h" +#include "mafianet/packet_priority.h" +#include "mafianet/thread_pool.h" +#include "mafianet/bit_stream.h" +#include "mafianet/string.h" +#include "mafianet/file_list.h" +#include "mafianet/incremental_read_interface.h" namespace MafiaNet { diff --git a/DependentExtensions/Autopatcher/CreatePatch.cpp b/DependentExtensions/Autopatcher/CreatePatch.cpp index 0378f4ca9..1d7b154fe 100644 --- a/DependentExtensions/Autopatcher/CreatePatch.cpp +++ b/DependentExtensions/Autopatcher/CreatePatch.cpp @@ -66,15 +66,15 @@ static void errx(int i, ...) // Unix/POSIX includes and Windows API compatibility #include #include -#include "mafianet/LinuxAdapter.h" -#include "mafianet/OsxAdapter.h" +#include "mafianet/linux_adapter.h" +#include "mafianet/osx_adapter.h" // Map Windows API names to POSIX equivalents #define _open open #define _lseek lseek #define _read read #define _write write #define _close close -// fopen_s is provided by OsxAdapter.h +// fopen_s is provided by osx_adapter.h #endif #include #include diff --git a/DependentExtensions/Lobby2/LibVoice/LibVoice.h b/DependentExtensions/Lobby2/LibVoice/LibVoice.h index 4fad14ac9..8e889fea6 100644 --- a/DependentExtensions/Lobby2/LibVoice/LibVoice.h +++ b/DependentExtensions/Lobby2/LibVoice/LibVoice.h @@ -13,7 +13,7 @@ /// -#include "mafianet/NativeFeatureIncludes.h" +#include "mafianet/native_feature_includes.h" diff --git a/DependentExtensions/Lobby2/Lobby2Client.cpp b/DependentExtensions/Lobby2/Lobby2Client.cpp index 7f712838f..dda646670 100644 --- a/DependentExtensions/Lobby2/Lobby2Client.cpp +++ b/DependentExtensions/Lobby2/Lobby2Client.cpp @@ -14,8 +14,8 @@ */ #include "Lobby2Client.h" -#include "mafianet/Assert.h" -#include "mafianet/MessageIdentifiers.h" +#include "mafianet/assert.h" +#include "mafianet/message_identifiers.h" using namespace MafiaNet; diff --git a/DependentExtensions/Lobby2/Lobby2Client.h b/DependentExtensions/Lobby2/Lobby2Client.h index 580c612bc..ce4c86c16 100644 --- a/DependentExtensions/Lobby2/Lobby2Client.h +++ b/DependentExtensions/Lobby2/Lobby2Client.h @@ -17,7 +17,7 @@ #define __LOBBY_2_CLIENT_H #include "Lobby2Plugin.h" -#include "mafianet/DS_OrderedList.h" +#include "mafianet/ds_ordered_list.h" namespace MafiaNet { diff --git a/DependentExtensions/Lobby2/Lobby2Message.h b/DependentExtensions/Lobby2/Lobby2Message.h index 9f0b41351..e0c46863c 100644 --- a/DependentExtensions/Lobby2/Lobby2Message.h +++ b/DependentExtensions/Lobby2/Lobby2Message.h @@ -16,12 +16,12 @@ #ifndef __LOBBY_2_MESSAGE_H #define __LOBBY_2_MESSAGE_H -#include "mafianet/BitStream.h" +#include "mafianet/bit_stream.h" #include "Lobby2ResultCode.h" -#include "mafianet/String.h" -#include "mafianet/Assert.h" -#include "mafianet/SmartPtr.h" -#include "mafianet/SimpleMutex.h" +#include "mafianet/string.h" +#include "mafianet/assert.h" +#include "mafianet/smart_ptr.h" +#include "mafianet/simple_mutex.h" #include "Lobby2Presence.h" diff --git a/DependentExtensions/Lobby2/Lobby2Plugin.h b/DependentExtensions/Lobby2/Lobby2Plugin.h index 0c8d67ad6..5a41f0224 100644 --- a/DependentExtensions/Lobby2/Lobby2Plugin.h +++ b/DependentExtensions/Lobby2/Lobby2Plugin.h @@ -17,9 +17,9 @@ #define __LOBBY_2_PLUGIN_H #include "Lobby2Message.h" -#include "mafianet/PluginInterface2.h" -#include "mafianet/PacketPriority.h" -#include "mafianet/PeerInterface.h" +#include "mafianet/plugin_interface2.h" +#include "mafianet/packet_priority.h" +#include "mafianet/peer_interface.h" /// \defgroup LOBBY_2_GROUP Lobby2Plugin /// \brief SQL based lobby system, with support for users, friends, clans, emails, ranking, and a message board diff --git a/DependentExtensions/Lobby2/Lobby2Presence.cpp b/DependentExtensions/Lobby2/Lobby2Presence.cpp index 6173bb536..f7949c451 100644 --- a/DependentExtensions/Lobby2/Lobby2Presence.cpp +++ b/DependentExtensions/Lobby2/Lobby2Presence.cpp @@ -14,7 +14,7 @@ */ #include "Lobby2Presence.h" -#include "mafianet/BitStream.h" +#include "mafianet/bit_stream.h" using namespace MafiaNet; diff --git a/DependentExtensions/Lobby2/Lobby2Presence.h b/DependentExtensions/Lobby2/Lobby2Presence.h index bcaff7fb4..2edccfd25 100644 --- a/DependentExtensions/Lobby2/Lobby2Presence.h +++ b/DependentExtensions/Lobby2/Lobby2Presence.h @@ -16,7 +16,7 @@ #ifndef __LOBBY_2_PRESENCE_H #define __LOBBY_2_PRESENCE_H -#include "mafianet/String.h" +#include "mafianet/string.h" diff --git a/DependentExtensions/Lobby2/Lobby2ResultCode.cpp b/DependentExtensions/Lobby2/Lobby2ResultCode.cpp index 70c58da6b..fbf946900 100644 --- a/DependentExtensions/Lobby2/Lobby2ResultCode.cpp +++ b/DependentExtensions/Lobby2/Lobby2ResultCode.cpp @@ -14,7 +14,7 @@ */ #include "Lobby2ResultCode.h" -#include "mafianet/Assert.h" +#include "mafianet/assert.h" using namespace MafiaNet; diff --git a/DependentExtensions/Lobby2/Lobby2ResultCode.h b/DependentExtensions/Lobby2/Lobby2ResultCode.h index b276f68a4..fcc66bb69 100644 --- a/DependentExtensions/Lobby2/Lobby2ResultCode.h +++ b/DependentExtensions/Lobby2/Lobby2ResultCode.h @@ -16,7 +16,7 @@ #ifndef __LOBBY_2_RESULT_CODE_H #define __LOBBY_2_RESULT_CODE_H -#include "mafianet/Defines.h" // provides the MNet short-hand alias for the MafiaNet namespace +#include "mafianet/defines.h" // provides the MNet short-hand alias for the MafiaNet namespace namespace MafiaNet { diff --git a/DependentExtensions/Lobby2/Lobby2Server.cpp b/DependentExtensions/Lobby2/Lobby2Server.cpp index d0576a44b..448ca5f75 100644 --- a/DependentExtensions/Lobby2/Lobby2Server.cpp +++ b/DependentExtensions/Lobby2/Lobby2Server.cpp @@ -14,8 +14,8 @@ */ #include "Lobby2Server.h" -#include "mafianet/Assert.h" -#include "mafianet/MessageIdentifiers.h" +#include "mafianet/assert.h" +#include "mafianet/message_identifiers.h" //#define __INTEGRATE_LOBBY2_WITH_ROOMS_PLUGIN diff --git a/DependentExtensions/Lobby2/Lobby2Server.h b/DependentExtensions/Lobby2/Lobby2Server.h index b418b5e04..cf2ec63aa 100644 --- a/DependentExtensions/Lobby2/Lobby2Server.h +++ b/DependentExtensions/Lobby2/Lobby2Server.h @@ -16,11 +16,11 @@ #ifndef __LOBBY_2_SERVER_H #define __LOBBY_2_SERVER_H -#include "mafianet/Export.h" -#include "mafianet/Types.h" +#include "mafianet/export.h" +#include "mafianet/types.h" #include "Lobby2Plugin.h" -#include "mafianet/DS_OrderedList.h" -#include "mafianet/ThreadPool.h" +#include "mafianet/ds_ordered_list.h" +#include "mafianet/thread_pool.h" #include "Lobby2Presence.h" //class PostgreSQLInterface; diff --git a/DependentExtensions/Lobby2/PGSQL/Lobby2Message_PGSQL.cpp b/DependentExtensions/Lobby2/PGSQL/Lobby2Message_PGSQL.cpp index a31f89c17..70d05d798 100644 --- a/DependentExtensions/Lobby2/PGSQL/Lobby2Message_PGSQL.cpp +++ b/DependentExtensions/Lobby2/PGSQL/Lobby2Message_PGSQL.cpp @@ -14,8 +14,8 @@ */ #include "Lobby2Message_PGSQL.h" -#include "mafianet/LinuxAdapter.h" -#include "mafianet/OsxAdapter.h" +#include "mafianet/linux_adapter.h" +#include "mafianet/osx_adapter.h" using namespace MafiaNet; diff --git a/DependentExtensions/Lobby2/PGSQL/Lobby2Message_PGSQL.h b/DependentExtensions/Lobby2/PGSQL/Lobby2Message_PGSQL.h index 24844b076..bbc4fe2aa 100644 --- a/DependentExtensions/Lobby2/PGSQL/Lobby2Message_PGSQL.h +++ b/DependentExtensions/Lobby2/PGSQL/Lobby2Message_PGSQL.h @@ -18,7 +18,7 @@ // libpq-fe.h is part of PostgreSQL which must be installed on this computer to use the PostgreRepository #include "libpq-fe.h" #include "PostgreSQLInterface.h" -#include "mafianet/EpochTimeToString.h" +#include "mafianet/epoch_time_to_string.h" #ifndef __LOBBY_2_MESSAGE_PGSQL_H #define __LOBBY_2_MESSAGE_PGSQL_H diff --git a/DependentExtensions/Lobby2/Rooms/IntervalTimer.h b/DependentExtensions/Lobby2/Rooms/IntervalTimer.h index 8f064a6d6..ea4ca3bca 100644 --- a/DependentExtensions/Lobby2/Rooms/IntervalTimer.h +++ b/DependentExtensions/Lobby2/Rooms/IntervalTimer.h @@ -16,7 +16,7 @@ #ifndef __INTERVAL_TIMER_H #define __INTERVAL_TIMER_H -#include "mafianet/Types.h" +#include "mafianet/types.h" struct IntervalTimer { diff --git a/DependentExtensions/Lobby2/Rooms/ProfanityFilter.cpp b/DependentExtensions/Lobby2/Rooms/ProfanityFilter.cpp index d1f5d5144..7691b02c6 100644 --- a/DependentExtensions/Lobby2/Rooms/ProfanityFilter.cpp +++ b/DependentExtensions/Lobby2/Rooms/ProfanityFilter.cpp @@ -14,11 +14,11 @@ */ #include "ProfanityFilter.h" -#include "mafianet/Rand.h" -#include "mafianet/Assert.h" -#include "mafianet/LinuxStrings.h" -#include "mafianet/LinuxAdapter.h" -#include "mafianet/OsxAdapter.h" +#include "mafianet/rand.h" +#include "mafianet/assert.h" +#include "mafianet/linux_strings.h" +#include "mafianet/linux_adapter.h" +#include "mafianet/osx_adapter.h" #if defined(_WIN32) #include // alloca diff --git a/DependentExtensions/Lobby2/Rooms/ProfanityFilter.h b/DependentExtensions/Lobby2/Rooms/ProfanityFilter.h index fa295a4d8..01d6fdeba 100644 --- a/DependentExtensions/Lobby2/Rooms/ProfanityFilter.h +++ b/DependentExtensions/Lobby2/Rooms/ProfanityFilter.h @@ -16,8 +16,8 @@ #ifndef __PROFANITY_FILTER__H__ #define __PROFANITY_FILTER__H__ -#include "mafianet/DS_List.h" -#include "mafianet/String.h" +#include "mafianet/ds_list.h" +#include "mafianet/string.h" namespace MafiaNet { diff --git a/DependentExtensions/Lobby2/Rooms/RoomTypes.h b/DependentExtensions/Lobby2/Rooms/RoomTypes.h index 1583afca4..12e367dd2 100644 --- a/DependentExtensions/Lobby2/Rooms/RoomTypes.h +++ b/DependentExtensions/Lobby2/Rooms/RoomTypes.h @@ -12,7 +12,7 @@ * license found in the license.txt file in the root directory of this source tree. */ -#include "mafianet/DS_Table.h" +#include "mafianet/ds_table.h" #ifndef __ROOM_TYPES_H #define __ROOM_TYPES_H diff --git a/DependentExtensions/Lobby2/Rooms/RoomsContainer.cpp b/DependentExtensions/Lobby2/Rooms/RoomsContainer.cpp index 60d301607..0865d3168 100644 --- a/DependentExtensions/Lobby2/Rooms/RoomsContainer.cpp +++ b/DependentExtensions/Lobby2/Rooms/RoomsContainer.cpp @@ -15,12 +15,12 @@ #include "RoomsContainer.h" #include "ProfanityFilter.h" -#include "mafianet/Assert.h" -#include "mafianet/GetTime.h" -#include "mafianet/BitStream.h" -#include "mafianet/TableSerializer.h" -#include "mafianet/LinuxAdapter.h" -#include "mafianet/OsxAdapter.h" +#include "mafianet/assert.h" +#include "mafianet/get_time.h" +#include "mafianet/bit_stream.h" +#include "mafianet/table_serializer.h" +#include "mafianet/linux_adapter.h" +#include "mafianet/osx_adapter.h" static const MafiaNet::TimeMS MINIMUM_QUICK_JOIN_TIMEOUT=5000; static const MafiaNet::TimeMS MAXIMUM_QUICK_JOIN_TIMEOUT=60000 * 5; diff --git a/DependentExtensions/Lobby2/Rooms/RoomsContainer.h b/DependentExtensions/Lobby2/Rooms/RoomsContainer.h index 90d7303a7..c7fef6e63 100644 --- a/DependentExtensions/Lobby2/Rooms/RoomsContainer.h +++ b/DependentExtensions/Lobby2/Rooms/RoomsContainer.h @@ -16,11 +16,11 @@ #ifndef __LOBBY_ROOM_H #define __LOBBY_ROOM_H -#include "mafianet/DS_Map.h" -#include "mafianet/DS_Table.h" +#include "mafianet/ds_map.h" +#include "mafianet/ds_table.h" #include "RoomsErrorCodes.h" -#include "mafianet/DS_List.h" -#include "mafianet/Types.h" +#include "mafianet/ds_list.h" +#include "mafianet/types.h" #include "IntervalTimer.h" #include "RoomTypes.h" diff --git a/DependentExtensions/Lobby2/Rooms/RoomsErrorCodes.cpp b/DependentExtensions/Lobby2/Rooms/RoomsErrorCodes.cpp index 98030d47b..43f92c933 100644 --- a/DependentExtensions/Lobby2/Rooms/RoomsErrorCodes.cpp +++ b/DependentExtensions/Lobby2/Rooms/RoomsErrorCodes.cpp @@ -14,7 +14,7 @@ */ #include "RoomsErrorCodes.h" -#include "mafianet/Assert.h" +#include "mafianet/assert.h" using namespace MafiaNet; diff --git a/DependentExtensions/Lobby2/Rooms/RoomsErrorCodes.h b/DependentExtensions/Lobby2/Rooms/RoomsErrorCodes.h index ccc92984f..3533c251c 100644 --- a/DependentExtensions/Lobby2/Rooms/RoomsErrorCodes.h +++ b/DependentExtensions/Lobby2/Rooms/RoomsErrorCodes.h @@ -16,7 +16,7 @@ #ifndef __ROOMS_ERROR_CODES_H #define __ROOMS_ERROR_CODES_H -#include "mafianet/Defines.h" // provides the MNet short-hand alias for the MafiaNet namespace +#include "mafianet/defines.h" // provides the MNet short-hand alias for the MafiaNet namespace namespace MafiaNet { diff --git a/DependentExtensions/Lobby2/Rooms/RoomsPlugin.cpp b/DependentExtensions/Lobby2/Rooms/RoomsPlugin.cpp index 9fa45c52a..0ecac29df 100644 --- a/DependentExtensions/Lobby2/Rooms/RoomsPlugin.cpp +++ b/DependentExtensions/Lobby2/Rooms/RoomsPlugin.cpp @@ -14,14 +14,14 @@ */ #include "RoomsPlugin.h" -#include "mafianet/BitStream.h" +#include "mafianet/bit_stream.h" #include "RoomsErrorCodes.h" -#include "mafianet/TableSerializer.h" -#include "mafianet/Assert.h" -#include "mafianet/MessageIdentifiers.h" -#include "mafianet/PeerInterface.h" +#include "mafianet/table_serializer.h" +#include "mafianet/assert.h" +#include "mafianet/message_identifiers.h" +#include "mafianet/peer_interface.h" #include "ProfanityFilter.h" -#include "mafianet/GetTime.h" +#include "mafianet/get_time.h" using namespace MafiaNet; diff --git a/DependentExtensions/Lobby2/Rooms/RoomsPlugin.h b/DependentExtensions/Lobby2/Rooms/RoomsPlugin.h index 7d11f8d49..fce79f4a8 100644 --- a/DependentExtensions/Lobby2/Rooms/RoomsPlugin.h +++ b/DependentExtensions/Lobby2/Rooms/RoomsPlugin.h @@ -22,13 +22,13 @@ #ifndef __ROOMS_PLUGIN_H #define __ROOMS_PLUGIN_H -#include "mafianet/Types.h" -#include "mafianet/PluginInterface2.h" -#include "mafianet/DS_OrderedList.h" -#include "mafianet/Export.h" +#include "mafianet/types.h" +#include "mafianet/plugin_interface2.h" +#include "mafianet/ds_ordered_list.h" +#include "mafianet/export.h" #include "RoomsContainer.h" -#include "mafianet/PacketPriority.h" -#include "mafianet/BitStream.h" +#include "mafianet/packet_priority.h" +#include "mafianet/bit_stream.h" /// \defgroup ROOMS_GROUP RoomsPlugin /// \brief Networked implementation of a rooms system, where members join and leave rooms. diff --git a/DependentExtensions/Lobby2/Steam/Lobby2Client_Steam.h b/DependentExtensions/Lobby2/Steam/Lobby2Client_Steam.h index 69bac342d..87053ba02 100644 --- a/DependentExtensions/Lobby2/Steam/Lobby2Client_Steam.h +++ b/DependentExtensions/Lobby2/Steam/Lobby2Client_Steam.h @@ -17,8 +17,8 @@ #define __LOBBY_2_CLIENT_STEAM_H #include "Lobby2Plugin.h" -#include "mafianet/DS_OrderedList.h" -#include "mafianet/Types.h" +#include "mafianet/ds_ordered_list.h" +#include "mafianet/types.h" namespace MafiaNet { diff --git a/DependentExtensions/Lobby2/Steam/Lobby2Client_Steam_Impl.cpp b/DependentExtensions/Lobby2/Steam/Lobby2Client_Steam_Impl.cpp index 962fb9143..06d6daa8e 100644 --- a/DependentExtensions/Lobby2/Steam/Lobby2Client_Steam_Impl.cpp +++ b/DependentExtensions/Lobby2/Steam/Lobby2Client_Steam_Impl.cpp @@ -16,8 +16,8 @@ #include "Lobby2Client_Steam_Impl.h" #include "Lobby2Message_Steam.h" #include -#include "mafianet/NativeTypes.h" -#include "mafianet/MTUSize.h" +#include "mafianet/native_types.h" +#include "mafianet/mtu_size.h" #include using namespace MafiaNet; diff --git a/DependentExtensions/Lobby2/Steam/Lobby2Client_Steam_Impl.h b/DependentExtensions/Lobby2/Steam/Lobby2Client_Steam_Impl.h index fe9d1b8ea..205a1b610 100644 --- a/DependentExtensions/Lobby2/Steam/Lobby2Client_Steam_Impl.h +++ b/DependentExtensions/Lobby2/Steam/Lobby2Client_Steam_Impl.h @@ -21,9 +21,9 @@ #include "steam_api.h" #pragma warning( pop ) #include "Lobby2Client_Steam.h" -#include "mafianet/DS_Multilist.h" -#include "mafianet/SocketLayer.h" -#include "mafianet/DS_OrderedList.h" +#include "mafianet/ds_multilist.h" +#include "mafianet/socket_layer.h" +#include "mafianet/ds_ordered_list.h" namespace MafiaNet { diff --git a/DependentExtensions/Lobby2/Steam/Lobby2Message_Steam.h b/DependentExtensions/Lobby2/Steam/Lobby2Message_Steam.h index c07f9dd70..607cb5169 100644 --- a/DependentExtensions/Lobby2/Steam/Lobby2Message_Steam.h +++ b/DependentExtensions/Lobby2/Steam/Lobby2Message_Steam.h @@ -17,7 +17,7 @@ #define __LOBBY_2_MESSAGE_STEAM_H #include "Lobby2Message.h" -#include "mafianet/DS_Multilist.h" +#include "mafianet/ds_multilist.h" #include "Lobby2Client_Steam.h" namespace MafiaNet diff --git a/DependentExtensions/MySQLInterface/MySQLInterface.cpp b/DependentExtensions/MySQLInterface/MySQLInterface.cpp index 2a168d793..380c42fe1 100644 --- a/DependentExtensions/MySQLInterface/MySQLInterface.cpp +++ b/DependentExtensions/MySQLInterface/MySQLInterface.cpp @@ -14,12 +14,12 @@ */ #include "MySQLInterface.h" -#include "mafianet/Assert.h" -#include "mafianet/BitStream.h" -#include "mafianet/FormatString.h" -#include "mafianet/LinuxStrings.h" -#include "mafianet/LinuxAdapter.h" -#include "mafianet/OsxAdapter.h" +#include "mafianet/assert.h" +#include "mafianet/bit_stream.h" +#include "mafianet/format_string.h" +#include "mafianet/linux_strings.h" +#include "mafianet/linux_adapter.h" +#include "mafianet/osx_adapter.h" #include diff --git a/DependentExtensions/MySQLInterface/MySQLInterface.h b/DependentExtensions/MySQLInterface/MySQLInterface.h index 0f20e145a..369df37dd 100644 --- a/DependentExtensions/MySQLInterface/MySQLInterface.h +++ b/DependentExtensions/MySQLInterface/MySQLInterface.h @@ -16,7 +16,7 @@ #ifndef __MY_SQL_INTERFACE_H #define __MY_SQL_INTERFACE_H -#include "mafianet/String.h" +#include "mafianet/string.h" struct st_mysql_res; struct st_mysql; diff --git a/DependentExtensions/PostgreSQLInterface/PostgreSQLInterface.cpp b/DependentExtensions/PostgreSQLInterface/PostgreSQLInterface.cpp index 8160ba229..feed5b623 100644 --- a/DependentExtensions/PostgreSQLInterface/PostgreSQLInterface.cpp +++ b/DependentExtensions/PostgreSQLInterface/PostgreSQLInterface.cpp @@ -14,7 +14,7 @@ */ #include "PostgreSQLInterface.h" -#include "mafianet/VariadicSQLParser.h" +#include "mafianet/variadic_sql_parser.h" // libpq-fe.h is part of PostgreSQL which must be installed on this computer to use the PostgreRepository #include "libpq-fe.h" @@ -37,13 +37,13 @@ //#include #endif -#include "mafianet/String.h" -#include "mafianet/Assert.h" -#include "mafianet/BitStream.h" -#include "mafianet/FormatString.h" -#include "mafianet/LinuxStrings.h" -#include "mafianet/LinuxAdapter.h" -#include "mafianet/OsxAdapter.h" +#include "mafianet/string.h" +#include "mafianet/assert.h" +#include "mafianet/bit_stream.h" +#include "mafianet/format_string.h" +#include "mafianet/linux_strings.h" +#include "mafianet/linux_adapter.h" +#include "mafianet/osx_adapter.h" #define PQEXECPARAM_FORMAT_TEXT 0 #define PQEXECPARAM_FORMAT_BINARY 1 diff --git a/DependentExtensions/PostgreSQLInterface/PostgreSQLInterface.h b/DependentExtensions/PostgreSQLInterface/PostgreSQLInterface.h index 1b2ebd67e..687b6a8e5 100644 --- a/DependentExtensions/PostgreSQLInterface/PostgreSQLInterface.h +++ b/DependentExtensions/PostgreSQLInterface/PostgreSQLInterface.h @@ -22,8 +22,8 @@ typedef struct pg_conn PGconn; struct pg_result; typedef struct pg_result PGresult; -#include "mafianet/String.h" -#include "mafianet/DS_OrderedList.h" +#include "mafianet/string.h" +#include "mafianet/ds_ordered_list.h" class PostgreSQLInterface { diff --git a/DependentExtensions/RPC3/RPC3.cpp b/DependentExtensions/RPC3/RPC3.cpp index d4de73478..a518e2a5a 100644 --- a/DependentExtensions/RPC3/RPC3.cpp +++ b/DependentExtensions/RPC3/RPC3.cpp @@ -14,13 +14,13 @@ */ #include "RPC3.h" -#include "mafianet/MemoryOverride.h" -#include "mafianet/Assert.h" -#include "mafianet/StringCompressor.h" -#include "mafianet/BitStream.h" -#include "mafianet/PeerInterface.h" -#include "mafianet/MessageIdentifiers.h" -#include "mafianet/NetworkIDManager.h" +#include "mafianet/memory_override.h" +#include "mafianet/assert.h" +#include "mafianet/string_compressor.h" +#include "mafianet/bit_stream.h" +#include "mafianet/peer_interface.h" +#include "mafianet/message_identifiers.h" +#include "mafianet/network_id_manager.h" #include using namespace MafiaNet; diff --git a/DependentExtensions/RPC3/RPC3.h b/DependentExtensions/RPC3/RPC3.h index e35d43d7e..bdf003923 100644 --- a/DependentExtensions/RPC3/RPC3.h +++ b/DependentExtensions/RPC3/RPC3.h @@ -22,14 +22,14 @@ // Most of the internals of the boost code to make this work #include "RPC3_Boost.h" -#include "mafianet/PluginInterface2.h" -#include "mafianet/PacketPriority.h" -#include "mafianet/Types.h" -#include "mafianet/BitStream.h" -#include "mafianet/String.h" -#include "mafianet/NetworkIDObject.h" -#include "mafianet/DS_Hash.h" -#include "mafianet/DS_OrderedList.h" +#include "mafianet/plugin_interface2.h" +#include "mafianet/packet_priority.h" +#include "mafianet/types.h" +#include "mafianet/bit_stream.h" +#include "mafianet/string.h" +#include "mafianet/network_id_object.h" +#include "mafianet/ds_hash.h" +#include "mafianet/ds_ordered_list.h" /// \defgroup RPC_3_GROUP RPC3 /// \brief Remote procedure calls, powered by the 3rd party library Boost diff --git a/DependentExtensions/RPC3/RPC3_Boost.h b/DependentExtensions/RPC3/RPC3_Boost.h index 73a9f094e..eb40fec89 100644 --- a/DependentExtensions/RPC3/RPC3_Boost.h +++ b/DependentExtensions/RPC3/RPC3_Boost.h @@ -45,9 +45,9 @@ // Not needed? //#include -#include "mafianet/NetworkIDManager.h" -#include "mafianet/NetworkIDObject.h" -#include "mafianet/BitStream.h" +#include "mafianet/network_id_manager.h" +#include "mafianet/network_id_object.h" +#include "mafianet/bit_stream.h" namespace MafiaNet { diff --git a/DependentExtensions/SQLite3Plugin/Logger/ClientOnly/Optional/SQLiteClientLogger_PacketLogger.cpp b/DependentExtensions/SQLite3Plugin/Logger/ClientOnly/Optional/SQLiteClientLogger_PacketLogger.cpp index 906b07c56..1e8822548 100644 --- a/DependentExtensions/SQLite3Plugin/Logger/ClientOnly/Optional/SQLiteClientLogger_PacketLogger.cpp +++ b/DependentExtensions/SQLite3Plugin/Logger/ClientOnly/Optional/SQLiteClientLogger_PacketLogger.cpp @@ -10,9 +10,9 @@ #include "SQLiteClientLogger_PacketLogger.h" #include "SQLiteClientLoggerPlugin.h" -#include "mafianet/PeerInterface.h" -#include "mafianet/InternalPacket.h" -#include "mafianet/MessageIdentifiers.h" +#include "mafianet/peer_interface.h" +#include "mafianet/internal_packet.h" +#include "mafianet/message_identifiers.h" using namespace MafiaNet; diff --git a/DependentExtensions/SQLite3Plugin/Logger/ClientOnly/Optional/SQLiteClientLogger_PacketLogger.h b/DependentExtensions/SQLite3Plugin/Logger/ClientOnly/Optional/SQLiteClientLogger_PacketLogger.h index 0d5a0c1c2..c166b22f6 100644 --- a/DependentExtensions/SQLite3Plugin/Logger/ClientOnly/Optional/SQLiteClientLogger_PacketLogger.h +++ b/DependentExtensions/SQLite3Plugin/Logger/ClientOnly/Optional/SQLiteClientLogger_PacketLogger.h @@ -22,7 +22,7 @@ #ifndef __SQL_LITE_CLIENT_LOGGER_PACKET_LOGGER_H_ #define __SQL_LITE_CLIENT_LOGGER_PACKET_LOGGER_H_ -#include "mafianet/PacketLogger.h" +#include "mafianet/packet_logger.h" namespace MafiaNet { diff --git a/DependentExtensions/SQLite3Plugin/Logger/ClientOnly/Optional/SQLiteClientLogger_RNSLogger.cpp b/DependentExtensions/SQLite3Plugin/Logger/ClientOnly/Optional/SQLiteClientLogger_RNSLogger.cpp index d6ec668a7..556f861c0 100644 --- a/DependentExtensions/SQLite3Plugin/Logger/ClientOnly/Optional/SQLiteClientLogger_RNSLogger.cpp +++ b/DependentExtensions/SQLite3Plugin/Logger/ClientOnly/Optional/SQLiteClientLogger_RNSLogger.cpp @@ -9,10 +9,10 @@ */ #include "SQLiteClientLogger_RNSLogger.h" -#include "mafianet/Time.h" -#include "mafianet/GetTime.h" -#include "mafianet/Statistics.h" -#include "mafianet/PeerInterface.h" +#include "mafianet/time.h" +#include "mafianet/get_time.h" +#include "mafianet/statistics.h" +#include "mafianet/peer_interface.h" #include "SQLiteClientLoggerPlugin.h" using namespace MafiaNet; diff --git a/DependentExtensions/SQLite3Plugin/Logger/ClientOnly/Optional/SQLiteClientLogger_RNSLogger.h b/DependentExtensions/SQLite3Plugin/Logger/ClientOnly/Optional/SQLiteClientLogger_RNSLogger.h index 9e69b30f4..65d506890 100644 --- a/DependentExtensions/SQLite3Plugin/Logger/ClientOnly/Optional/SQLiteClientLogger_RNSLogger.h +++ b/DependentExtensions/SQLite3Plugin/Logger/ClientOnly/Optional/SQLiteClientLogger_RNSLogger.h @@ -22,7 +22,7 @@ #ifndef __SQL_LITE_CLIENT_LOGGER_RAKNET_STATISTICS_H_ #define __SQL_LITE_CLIENT_LOGGER_RAKNET_STATISTICS_H_ -#include "mafianet/PluginInterface2.h" +#include "mafianet/plugin_interface2.h" namespace MafiaNet { diff --git a/DependentExtensions/SQLite3Plugin/Logger/ClientOnly/SQLiteClientLoggerPlugin.cpp b/DependentExtensions/SQLite3Plugin/Logger/ClientOnly/SQLiteClientLoggerPlugin.cpp index 7df2e1a73..b2706d16d 100644 --- a/DependentExtensions/SQLite3Plugin/Logger/ClientOnly/SQLiteClientLoggerPlugin.cpp +++ b/DependentExtensions/SQLite3Plugin/Logger/ClientOnly/SQLiteClientLoggerPlugin.cpp @@ -9,11 +9,11 @@ */ #include "SQLiteClientLoggerPlugin.h" -#include "mafianet/MessageIdentifiers.h" -#include "mafianet/PacketizedTCP.h" -#include "mafianet/GetTime.h" -#include "mafianet/LinuxAdapter.h" -#include "mafianet/OsxAdapter.h" +#include "mafianet/message_identifiers.h" +#include "mafianet/packetized_tcp.h" +#include "mafianet/get_time.h" +#include "mafianet/linux_adapter.h" +#include "mafianet/osx_adapter.h" static const char COLUMN_NAMES_DELIMITER=','; static const int MAX_COLUMN_NAMES_LENGTH=512; diff --git a/DependentExtensions/SQLite3Plugin/Logger/ClientOnly/Samples/D3D9/Matrices.cpp b/DependentExtensions/SQLite3Plugin/Logger/ClientOnly/Samples/D3D9/Matrices.cpp index 903f5d2fb..070d5e900 100644 --- a/DependentExtensions/SQLite3Plugin/Logger/ClientOnly/Samples/D3D9/Matrices.cpp +++ b/DependentExtensions/SQLite3Plugin/Logger/ClientOnly/Samples/D3D9/Matrices.cpp @@ -36,7 +36,7 @@ // RakNet: Logger includes. Include before Windows.h #include "SQLiteClientLoggerPlugin.h" -#include "mafianet/PacketizedTCP.h" +#include "mafianet/packetized_tcp.h" #include "DX9_BackbufferGrabber.h" #include diff --git a/DependentExtensions/SQLite3Plugin/Logger/ClientOnly/Samples/Ogre3D/BspCollision.cpp b/DependentExtensions/SQLite3Plugin/Logger/ClientOnly/Samples/Ogre3D/BspCollision.cpp index 8e2461834..db31916c5 100644 --- a/DependentExtensions/SQLite3Plugin/Logger/ClientOnly/Samples/Ogre3D/BspCollision.cpp +++ b/DependentExtensions/SQLite3Plugin/Logger/ClientOnly/Samples/Ogre3D/BspCollision.cpp @@ -44,10 +44,10 @@ static const int num_rows = 3; // RakNet: Logger includes. #include "SQLiteClientLoggerPlugin.h" -#include "mafianet/PacketizedTCP.h" +#include "mafianet/packetized_tcp.h" #include "Ogre3D_DX9_BackbufferGrabber.h" -#include "mafianet/Time.h" -#include "mafianet/GetTime.h" +#include "mafianet/time.h" +#include "mafianet/get_time.h" // Event handler to add ability to alter curvature class BspCollisionListener : public ExampleRefAppFrameListener diff --git a/DependentExtensions/SQLite3Plugin/Logger/ClientOnly/Samples/Simple/SQLiteClientLoggerSample.cpp b/DependentExtensions/SQLite3Plugin/Logger/ClientOnly/Samples/Simple/SQLiteClientLoggerSample.cpp index aff97f0bd..2ebcdf95d 100644 --- a/DependentExtensions/SQLite3Plugin/Logger/ClientOnly/Samples/Simple/SQLiteClientLoggerSample.cpp +++ b/DependentExtensions/SQLite3Plugin/Logger/ClientOnly/Samples/Simple/SQLiteClientLoggerSample.cpp @@ -8,15 +8,15 @@ * license found in the license.txt file in the root directory of this source tree. */ -#include "mafianet/PeerInterface.h" +#include "mafianet/peer_interface.h" #include "SQLiteClientLoggerPlugin.h" -#include "mafianet/BitStream.h" -#include "mafianet/Sleep.h" +#include "mafianet/bit_stream.h" +#include "mafianet/sleep.h" -#include "mafianet/Kbhit.h" -#include "mafianet/GetTime.h" -#include "mafianet/PacketizedTCP.h" -#include "mafianet/Types.h" +#include "mafianet/kbhit.h" +#include "mafianet/get_time.h" +#include "mafianet/packetized_tcp.h" +#include "mafianet/types.h" #include "mafianet/rand.h" #define M_PI 3.14159265358979323846 diff --git a/DependentExtensions/SQLite3Plugin/Logger/SQLiteLoggerCommon.cpp b/DependentExtensions/SQLite3Plugin/Logger/SQLiteLoggerCommon.cpp index c3bef540c..498812c6c 100644 --- a/DependentExtensions/SQLite3Plugin/Logger/SQLiteLoggerCommon.cpp +++ b/DependentExtensions/SQLite3Plugin/Logger/SQLiteLoggerCommon.cpp @@ -9,9 +9,9 @@ */ #include "SQLiteLoggerCommon.h" -#include "mafianet/BitStream.h" -#include "mafianet/LinuxAdapter.h" -#include "mafianet/OsxAdapter.h" +#include "mafianet/bit_stream.h" +#include "mafianet/linux_adapter.h" +#include "mafianet/osx_adapter.h" using namespace MafiaNet; diff --git a/DependentExtensions/SQLite3Plugin/Logger/SQLiteLoggerCommon.h b/DependentExtensions/SQLite3Plugin/Logger/SQLiteLoggerCommon.h index bb83c544e..d4ec312fa 100644 --- a/DependentExtensions/SQLite3Plugin/Logger/SQLiteLoggerCommon.h +++ b/DependentExtensions/SQLite3Plugin/Logger/SQLiteLoggerCommon.h @@ -12,8 +12,8 @@ #define _SQLITE_LOGGER_COMMON_H #include -#include "mafianet/Defines.h" -#include "mafianet/NativeTypes.h" +#include "mafianet/defines.h" +#include "mafianet/native_types.h" namespace MafiaNet { diff --git a/DependentExtensions/SQLite3Plugin/Logger/ServerOnly/SQLiteServerLoggerPlugin.cpp b/DependentExtensions/SQLite3Plugin/Logger/ServerOnly/SQLiteServerLoggerPlugin.cpp index 01e9f5af9..2c55669d1 100644 --- a/DependentExtensions/SQLite3Plugin/Logger/ServerOnly/SQLiteServerLoggerPlugin.cpp +++ b/DependentExtensions/SQLite3Plugin/Logger/ServerOnly/SQLiteServerLoggerPlugin.cpp @@ -9,14 +9,14 @@ */ #include "SQLiteServerLoggerPlugin.h" -#include "mafianet/PeerInterface.h" -#include "mafianet/PacketizedTCP.h" -#include "mafianet/MessageIdentifiers.h" +#include "mafianet/peer_interface.h" +#include "mafianet/packetized_tcp.h" +#include "mafianet/message_identifiers.h" #include "SQLiteLoggerCommon.h" #include "jpeglib.h" #include "jpeg_memory_dest.h" -#include "mafianet/FileOperations.h" -#include "mafianet/GetTime.h" +#include "mafianet/file_operations.h" +#include "mafianet/get_time.h" #include #include #include @@ -29,7 +29,7 @@ #ifdef _MSC_VER #pragma warning(pop) #endif -#include "mafianet/LinuxAdapter.h" +#include "mafianet/linux_adapter.h" // http://web.utk.edu/~jplyon/sqlite/SQLite_optimization_FAQ.html diff --git a/DependentExtensions/SQLite3Plugin/Logger/ServerOnly/SQLiteServerLoggerSample.cpp b/DependentExtensions/SQLite3Plugin/Logger/ServerOnly/SQLiteServerLoggerSample.cpp index 9c266a340..21f3514d4 100644 --- a/DependentExtensions/SQLite3Plugin/Logger/ServerOnly/SQLiteServerLoggerSample.cpp +++ b/DependentExtensions/SQLite3Plugin/Logger/ServerOnly/SQLiteServerLoggerSample.cpp @@ -8,14 +8,14 @@ * license found in the license.txt file in the root directory of this source tree. */ -#include "mafianet/PeerInterface.h" +#include "mafianet/peer_interface.h" #include "SQLiteServerLoggerPlugin.h" -#include "mafianet/BitStream.h" -#include "mafianet/Sleep.h" +#include "mafianet/bit_stream.h" +#include "mafianet/sleep.h" -#include "mafianet/Kbhit.h" -#include "mafianet/GetTime.h" -#include "mafianet/PacketizedTCP.h" +#include "mafianet/kbhit.h" +#include "mafianet/get_time.h" +#include "mafianet/packetized_tcp.h" int main(void) diff --git a/DependentExtensions/SQLite3Plugin/SQLite3ClientPlugin.cpp b/DependentExtensions/SQLite3Plugin/SQLite3ClientPlugin.cpp index 031abae21..8e7c2af2c 100644 --- a/DependentExtensions/SQLite3Plugin/SQLite3ClientPlugin.cpp +++ b/DependentExtensions/SQLite3Plugin/SQLite3ClientPlugin.cpp @@ -9,8 +9,8 @@ */ #include "SQLite3ClientPlugin.h" -#include "mafianet/MessageIdentifiers.h" -#include "mafianet/BitStream.h" +#include "mafianet/message_identifiers.h" +#include "mafianet/bit_stream.h" using namespace MafiaNet; diff --git a/DependentExtensions/SQLite3Plugin/SQLite3ClientPlugin.h b/DependentExtensions/SQLite3Plugin/SQLite3ClientPlugin.h index 70709755b..e1b6ef7cb 100644 --- a/DependentExtensions/SQLite3Plugin/SQLite3ClientPlugin.h +++ b/DependentExtensions/SQLite3Plugin/SQLite3ClientPlugin.h @@ -22,13 +22,13 @@ #ifndef ___SQLITE_3_CLIENT_PLUGIN_H #define ___SQLITE_3_CLIENT_PLUGIN_H -#include "mafianet/Types.h" -#include "mafianet/Export.h" -#include "mafianet/PluginInterface2.h" -#include "mafianet/PacketPriority.h" -#include "mafianet/SocketIncludes.h" -#include "mafianet/DS_Multilist.h" -#include "mafianet/String.h" +#include "mafianet/types.h" +#include "mafianet/export.h" +#include "mafianet/plugin_interface2.h" +#include "mafianet/packet_priority.h" +#include "mafianet/socket_includes.h" +#include "mafianet/ds_multilist.h" +#include "mafianet/string.h" #include "SQLite3PluginCommon.h" class RakPeerInterface; diff --git a/DependentExtensions/SQLite3Plugin/SQLite3PluginCommon.h b/DependentExtensions/SQLite3Plugin/SQLite3PluginCommon.h index 23a16acc6..9423936ee 100644 --- a/DependentExtensions/SQLite3Plugin/SQLite3PluginCommon.h +++ b/DependentExtensions/SQLite3Plugin/SQLite3PluginCommon.h @@ -16,9 +16,9 @@ #ifndef __SQL_LITE_3_PLUGIN_COMMON_H #define __SQL_LITE_3_PLUGIN_COMMON_H -#include "mafianet/DS_Multilist.h" -#include "mafianet/String.h" -#include "mafianet/BitStream.h" +#include "mafianet/ds_multilist.h" +#include "mafianet/string.h" +#include "mafianet/bit_stream.h" /// \defgroup SQL_LITE_3_PLUGIN SQLite3Plugin /// \brief Code to transmit SQLite3 commands across the network diff --git a/DependentExtensions/SQLite3Plugin/SQLite3Sample.cpp b/DependentExtensions/SQLite3Plugin/SQLite3Sample.cpp index 60b123cce..8068088d0 100644 --- a/DependentExtensions/SQLite3Plugin/SQLite3Sample.cpp +++ b/DependentExtensions/SQLite3Plugin/SQLite3Sample.cpp @@ -17,14 +17,14 @@ /// \brief A sample for the SQLite3Plugin, that creates a table to track connections on the server /// The SQLite3Plugin is used with SQLite version 3 to transmit over the network calls to sqlite3_exec -#include "mafianet/PeerInterface.h" +#include "mafianet/peer_interface.h" #include "SQLite3ServerPlugin.h" #include "SQLite3ClientPlugin.h" -#include "mafianet/BitStream.h" -#include "mafianet/Sleep.h" -#include "mafianet/Gets.h" -#include "mafianet/Kbhit.h" -#include "mafianet/GetTime.h" +#include "mafianet/bit_stream.h" +#include "mafianet/sleep.h" +#include "mafianet/gets.h" +#include "mafianet/kbhit.h" +#include "mafianet/get_time.h" using namespace MafiaNet; diff --git a/DependentExtensions/SQLite3Plugin/SQLite3ServerPlugin.cpp b/DependentExtensions/SQLite3Plugin/SQLite3ServerPlugin.cpp index 23f08257d..fca6ea6af 100644 --- a/DependentExtensions/SQLite3Plugin/SQLite3ServerPlugin.cpp +++ b/DependentExtensions/SQLite3Plugin/SQLite3ServerPlugin.cpp @@ -14,9 +14,9 @@ */ #include "SQLite3ServerPlugin.h" -#include "mafianet/MessageIdentifiers.h" -#include "mafianet/BitStream.h" -#include "mafianet/GetTime.h" +#include "mafianet/message_identifiers.h" +#include "mafianet/bit_stream.h" +#include "mafianet/get_time.h" using namespace MafiaNet; diff --git a/DependentExtensions/SQLite3Plugin/SQLite3ServerPlugin.h b/DependentExtensions/SQLite3Plugin/SQLite3ServerPlugin.h index d0bdc10c8..06869e63b 100644 --- a/DependentExtensions/SQLite3Plugin/SQLite3ServerPlugin.h +++ b/DependentExtensions/SQLite3Plugin/SQLite3ServerPlugin.h @@ -27,18 +27,18 @@ /// \ingroup SQL_LITE_3_PLUGIN #define SQLite3_STATEMENT_EXECUTE_THREADED -#include "mafianet/Types.h" -#include "mafianet/Export.h" -#include "mafianet/PluginInterface2.h" -#include "mafianet/PacketPriority.h" -#include "mafianet/SocketIncludes.h" -#include "mafianet/DS_Multilist.h" -#include "mafianet/String.h" +#include "mafianet/types.h" +#include "mafianet/export.h" +#include "mafianet/plugin_interface2.h" +#include "mafianet/packet_priority.h" +#include "mafianet/socket_includes.h" +#include "mafianet/ds_multilist.h" +#include "mafianet/string.h" #include "sqlite3.h" #include "SQLite3PluginCommon.h" #ifdef SQLite3_STATEMENT_EXECUTE_THREADED -#include "mafianet/ThreadPool.h" +#include "mafianet/thread_pool.h" #endif class RakPeerInterface; diff --git a/README.md b/README.md index 2868e1357..af47682a7 100644 --- a/README.md +++ b/README.md @@ -110,14 +110,14 @@ strace -f -c -e trace=sendmmsg,sendto,recvmmsg,recvfrom \ ``` The per-datagram column is what every non-Linux platform runs; to reproduce it on -Linux, flip the `#if defined(__linux__)` batching guards in `RakNetSocket2.cpp`, -`RakNetSocket2_Berkley.cpp`, `ReliabilityLayer.cpp` and `socket2.h` to `#if 0`. +Linux, flip the `#if defined(__linux__)` batching guards in `socket2.cpp`, +`socket2_berkley.cpp`, `reliability_layer.cpp` and `socket2.h` to `#if 0`. ### Basic Usage ```cpp -#include "mafianet/PeerInterface.h" -#include "mafianet/MessageIdentifiers.h" +#include "mafianet/peer_interface.h" +#include "mafianet/message_identifiers.h" // Create a peer MafiaNet::RakPeerInterface* peer = MafiaNet::RakPeerInterface::GetInstance(); @@ -268,7 +268,7 @@ MafiaNet/ ├── DependentExtensions/ # Optional integrations │ ├── Autopatcher/ # Delta patching system │ ├── Lobby2/ # Matchmaking and lobbies -│ ├── RakVoice.cpp/h # Voice communication +│ ├── voice.cpp/h # Voice communication │ ├── MySQLInterface/ # MySQL connectivity │ ├── PostgreSQLInterface/# PostgreSQL connectivity │ ├── SQLite3Plugin/ # SQLite integration @@ -400,17 +400,17 @@ To debug a single test, run the binary directly with a filter: ### Version 0.11.0 - **Range-based receive `Peer::incoming()`**: drains the receive queue with a range-`for`; each iteration yields a fresh `PacketPtr` freed at end of scope, and `pkt.id()` returns the `ID_TIMESTAMP`-aware identifier - **Startup builders `Peer::server()` / `Peer::client()`**: fluent chain folding `SocketDescriptor` + `Startup` + result check + `SetMaximumIncomingConnections` / `Connect` into one call; `start()` returns a move-only `Result` whose error preserves the underlying `StartupResult` / `ConnectionAttemptResult` (tagged by `PeerStage`) instead of collapsing to a bool. Security stays opt-in (`secure()` / `public_key()`) -- **Serialization archives** (`mafianet/Archive.h`): one `serialize(Ar&)` member template describes a type's wire format for both directions; `WriteArchive` / `ReadArchive` adapt a `BitStream`, recursing into nested `serialize()` types and falling through to `operator<<`/`operator>>` (incl. per-type specializations) for everything else -- **Typed message dispatcher** (`mafianet/Dispatcher.h`): `on(handler)` auto-assigns ids from `ID_USER_PACKET_ENUM` in registration order (documented wire contract; `on(id, handler)` pins explicit ids), `on(id, handler)` covers system messages, `dispatch()` skips `ID_TIMESTAMP` prefixes and hands handlers a deserialized `T` plus a `Sender` (`guid()`/`peer_guid()`/`address()`/`guid_string()`); `encode()` is the symmetric write path. Opt-in — the raw `switch` stays fully usable +- **Serialization archives** (`mafianet/archive.h`): one `serialize(Ar&)` member template describes a type's wire format for both directions; `WriteArchive` / `ReadArchive` adapt a `BitStream`, recursing into nested `serialize()` types and falling through to `operator<<`/`operator>>` (incl. per-type specializations) for everything else +- **Typed message dispatcher** (`mafianet/dispatcher.h`): `on(handler)` auto-assigns ids from `ID_USER_PACKET_ENUM` in registration order (documented wire contract; `on(id, handler)` pins explicit ids), `on(id, handler)` covers system messages, `dispatch()` skips `ID_TIMESTAMP` prefixes and hands handlers a deserialized `T` plus a `Sender` (`guid()`/`peer_guid()`/`address()`/`guid_string()`); `encode()` is the symmetric write path. Opt-in — the raw `switch` stays fully usable - **Typed `Peer::send` / `Peer::broadcast`**: serialize-and-send a registered message in one call via the dispatcher registry, with overridable defaults (`Priority::High`, `Reliability::ReliableOrdered`, channel 0); destination accepts `SystemAddress` or `RakNetGUID`; raw `Send()` untouched -- **RakVoice built into the core library**: header now `mafianet/RakVoice.h`; Opus and RNNoise are fetched and linked into the core automatically — no separate extension build +- **RakVoice built into the core library**: header now `mafianet/voice.h`; Opus and RNNoise are fetched and linked into the core automatically — no separate extension build - **Full GoogleTest migration**: all 29 legacy tests ported, the `Samples/Tests` `TestInterface` harness deleted; hermetic `UnitTests` + loopback `IntegrationTests` under `Tests/`, one process per test via CTest, `MAFIANET_BUILD_TESTS` builds everything test-related (requires `MAFIANET_BUILD_STATIC`); CI runs ctest with JUnit artifacts on all platforms ### Version 0.10.0 - **Umbrella header `mafianet/mafianet.h`**: aggregates the core public headers (`RakPeerInterface`, types, message IDs, `PacketPriority`, `BitStream`, `GetTime`, `Statistics`) so the common path only needs `#include "mafianet/mafianet.h"`. Additive — granular headers remain; encryption headers are intentionally omitted (security stays opt-in via `InitializeSecurity()`) -- **Canonical type aliases** (`mafianet/Aliases.h`): `PeerInterface` (`RakPeerInterface`), `Guid` (`RakNetGUID`), `Statistics` (`RakNetStatistics`), `UnassignedGuid`. `using` aliases denoting the same types, so old and new names interoperate; legacy names left untouched -- **RAII handles `Peer` & `PacketPtr`** (`mafianet/PeerHandle.h`): own a `RakPeerInterface` / received `Packet` and clean up on scope exit, removing manual `DestroyInstance` / `DeallocatePacket` bookkeeping. ChatExample client rewritten to use them -- **Thread-safe GUID value accessors** (`mafianet/GuidUtil.h`): `MafiaNet::to_string(const RakNetGUID&)` owns its buffer; `connected_address(...)` returns `std::optional` (sentinel → `nullopt`) +- **Canonical type aliases** (`mafianet/aliases.h`): `PeerInterface` (`RakPeerInterface`), `Guid` (`RakNetGUID`), `Statistics` (`RakNetStatistics`), `UnassignedGuid`. `using` aliases denoting the same types, so old and new names interoperate; legacy names left untouched +- **RAII handles `Peer` & `PacketPtr`** (`mafianet/peer_handle.h`): own a `RakPeerInterface` / received `Packet` and clean up on scope exit, removing manual `DestroyInstance` / `DeallocatePacket` bookkeeping. ChatExample client rewritten to use them +- **Thread-safe GUID value accessors** (`mafianet/guid_util.h`): `MafiaNet::to_string(const RakNetGUID&)` owns its buffer; `connected_address(...)` returns `std::optional` (sentinel → `nullopt`) - **`PointGridSectorizer`**: uniform point grid with O(1) `RemoveEntry`/`MoveEntry` via per-entry hash + swap-remove (early-out on same-cell moves), upsert add/move semantics, duplicate-free `GetEntries`, and edge-cell clamping. `GridSectorizer` left untouched - **Breaking — scoped enum classes**: the global `PacketPriority` / `PacketReliability` C enums are removed in favour of scoped `MafiaNet::Priority` / `MafiaNet::Reliability`. Enumerator order (and the wire field) is preserved, but call sites must update (`HIGH_PRIORITY` → `MafiaNet::Priority::High`, `RELIABLE_ORDERED` → `MafiaNet::Reliability::ReliableOrdered`); `NUMBER_OF_*` sentinels are now `constexpr` counts in `MafiaNet` - **Breaking — removed non-thread-safe `RakNetGUID::ToString(void)`** (shared static buffer); use `MafiaNet::to_string(g).c_str()` diff --git a/Samples/AutoPatcherServer_MySQL/AutopatcherServerTest_MySQL.cpp b/Samples/AutoPatcherServer_MySQL/AutopatcherServerTest_MySQL.cpp index c23eb9b13..2fe3bdca0 100644 --- a/Samples/AutoPatcherServer_MySQL/AutopatcherServerTest_MySQL.cpp +++ b/Samples/AutoPatcherServer_MySQL/AutopatcherServerTest_MySQL.cpp @@ -16,24 +16,24 @@ // Common includes #include #include -#include "mafianet/Kbhit.h" - -#include "mafianet/GetTime.h" -#include "mafianet/PeerInterface.h" -#include "mafianet/MessageIdentifiers.h" -#include "mafianet/BitStream.h" -#include "mafianet/StringCompressor.h" -#include "mafianet/FileListTransfer.h" -#include "mafianet/FileList.h" // FLP_Printf +#include "mafianet/kbhit.h" + +#include "mafianet/get_time.h" +#include "mafianet/peer_interface.h" +#include "mafianet/message_identifiers.h" +#include "mafianet/bit_stream.h" +#include "mafianet/string_compressor.h" +#include "mafianet/file_list_transfer.h" +#include "mafianet/file_list.h" // FLP_Printf #include "AutopatcherServer.h" #include "AutopatcherMySQLRepository.h" -#include "mafianet/PacketizedTCP.h" -#include "mafianet/Gets.h" -#include "mafianet/LinuxAdapter.h" -#include "mafianet/OsxAdapter.h" +#include "mafianet/packetized_tcp.h" +#include "mafianet/gets.h" +#include "mafianet/linux_adapter.h" +#include "mafianet/osx_adapter.h" #ifdef _WIN32 -#include "mafianet/WindowsIncludes.h" // Sleep +#include "mafianet/windows_includes.h" // Sleep #else #include // usleep #endif diff --git a/Samples/AutopatcherClient/AutopatcherClientTest.cpp b/Samples/AutopatcherClient/AutopatcherClientTest.cpp index 49806356a..585426367 100644 --- a/Samples/AutopatcherClient/AutopatcherClientTest.cpp +++ b/Samples/AutopatcherClient/AutopatcherClientTest.cpp @@ -17,7 +17,7 @@ #include #include #include // used for std::numeric_limits -#include "mafianet/Kbhit.h" +#include "mafianet/kbhit.h" // Platform-specific includes for path constants and process execution #ifdef _WIN32 @@ -37,22 +37,22 @@ #define _unlink unlink #endif -#include "mafianet/GetTime.h" -#include "mafianet/PeerInterface.h" -#include "mafianet/MessageIdentifiers.h" -#include "mafianet/BitStream.h" -#include "mafianet/StringCompressor.h" -#include "mafianet/PacketizedTCP.h" +#include "mafianet/get_time.h" +#include "mafianet/peer_interface.h" +#include "mafianet/message_identifiers.h" +#include "mafianet/bit_stream.h" +#include "mafianet/string_compressor.h" +#include "mafianet/packetized_tcp.h" // Client only includes -#include "mafianet/FileListTransferCBInterface.h" -#include "mafianet/FileListTransfer.h" +#include "mafianet/file_list_transfer_cb_interface.h" +#include "mafianet/file_list_transfer.h" #include "AutopatcherClient.h" -#include "mafianet/AutopatcherPatchContext.h" -#include "mafianet/Gets.h" -#include "mafianet/Sleep.h" -#include "mafianet/LinuxAdapter.h" -#include "mafianet/OsxAdapter.h" +#include "mafianet/autopatcher_patch_context.h" +#include "mafianet/gets.h" +#include "mafianet/sleep.h" +#include "mafianet/linux_adapter.h" +#include "mafianet/osx_adapter.h" char WORKING_DIRECTORY[MAX_PATH]; char PATH_TO_XDELTA_EXE[MAX_PATH]; diff --git a/Samples/AutopatcherClientGFx3.0/AutopatcherClientGFx3Impl.cpp b/Samples/AutopatcherClientGFx3.0/AutopatcherClientGFx3Impl.cpp index b80135441..5ddbfc401 100644 --- a/Samples/AutopatcherClientGFx3.0/AutopatcherClientGFx3Impl.cpp +++ b/Samples/AutopatcherClientGFx3.0/AutopatcherClientGFx3Impl.cpp @@ -16,23 +16,23 @@ // Common includes #include #include -#include "mafianet/Kbhit.h" +#include "mafianet/kbhit.h" -#include "mafianet/GetTime.h" -#include "mafianet/PeerInterface.h" -#include "mafianet/MessageIdentifiers.h" -#include "mafianet/BitStream.h" -#include "mafianet/StringCompressor.h" -#include "mafianet/PacketizedTCP.h" +#include "mafianet/get_time.h" +#include "mafianet/peer_interface.h" +#include "mafianet/message_identifiers.h" +#include "mafianet/bit_stream.h" +#include "mafianet/string_compressor.h" +#include "mafianet/packetized_tcp.h" // Client only includes -#include "mafianet/FileListTransferCBInterface.h" -#include "mafianet/FileListTransfer.h" +#include "mafianet/file_list_transfer_cb_interface.h" +#include "mafianet/file_list_transfer.h" #include "AutopatcherClient.h" -#include "mafianet/AutopatcherPatchContext.h" -#include "mafianet/Sleep.h" -#include "mafianet/LinuxAdapter.h" -#include "mafianet/OsxAdapter.h" +#include "mafianet/autopatcher_patch_context.h" +#include "mafianet/sleep.h" +#include "mafianet/linux_adapter.h" +#include "mafianet/osx_adapter.h" #include "AutopatcherClientGFx3Impl.h" diff --git a/Samples/AutopatcherClientGFx3.0/AutopatcherClientGFx3Impl.h b/Samples/AutopatcherClientGFx3.0/AutopatcherClientGFx3Impl.h index 360879e3e..6ffeed524 100644 --- a/Samples/AutopatcherClientGFx3.0/AutopatcherClientGFx3Impl.h +++ b/Samples/AutopatcherClientGFx3.0/AutopatcherClientGFx3Impl.h @@ -13,7 +13,7 @@ * license found in the license.txt file in the root directory of this source tree. */ -#include "mafianet/Types.h" +#include "mafianet/types.h" #include "FxGameDelegate.h" namespace MafiaNet { diff --git a/Samples/AutopatcherClientRestarter/main.cpp b/Samples/AutopatcherClientRestarter/main.cpp index a39547e51..b107dd963 100644 --- a/Samples/AutopatcherClientRestarter/main.cpp +++ b/Samples/AutopatcherClientRestarter/main.cpp @@ -15,7 +15,7 @@ #include #if defined(_WIN32) -#include "mafianet/WindowsIncludes.h" // Sleep and CreateProcess +#include "mafianet/windows_includes.h" // Sleep and CreateProcess #include // system #else #include // usleep @@ -26,9 +26,9 @@ #include #endif -#include "mafianet/Gets.h" -#include "mafianet/LinuxAdapter.h" -#include "mafianet/OsxAdapter.h" +#include "mafianet/gets.h" +#include "mafianet/linux_adapter.h" +#include "mafianet/osx_adapter.h" #include diff --git a/Samples/AutopatcherClient_SelfScaling/AutopatcherClientTest.cpp b/Samples/AutopatcherClient_SelfScaling/AutopatcherClientTest.cpp index 3906e439a..e2c3cd3c2 100644 --- a/Samples/AutopatcherClient_SelfScaling/AutopatcherClientTest.cpp +++ b/Samples/AutopatcherClient_SelfScaling/AutopatcherClientTest.cpp @@ -25,26 +25,26 @@ #include #include #include // used for std::numeric_limits -#include "mafianet/Kbhit.h" +#include "mafianet/kbhit.h" -#include "mafianet/GetTime.h" -#include "mafianet/PeerInterface.h" -#include "mafianet/MessageIdentifiers.h" -#include "mafianet/BitStream.h" -#include "mafianet/StringCompressor.h" -#include "mafianet/PacketizedTCP.h" -#include "mafianet/Socket2.h" +#include "mafianet/get_time.h" +#include "mafianet/peer_interface.h" +#include "mafianet/message_identifiers.h" +#include "mafianet/bit_stream.h" +#include "mafianet/string_compressor.h" +#include "mafianet/packetized_tcp.h" +#include "mafianet/socket2.h" // Client only includes -#include "mafianet/FileListTransferCBInterface.h" -#include "mafianet/FileListTransfer.h" +#include "mafianet/file_list_transfer_cb_interface.h" +#include "mafianet/file_list_transfer.h" #include "AutopatcherClient.h" -#include "mafianet/AutopatcherPatchContext.h" -#include "mafianet/Gets.h" -#include "mafianet/Sleep.h" -#include "mafianet/CloudClient.h" -#include "mafianet/LinuxAdapter.h" -#include "mafianet/OsxAdapter.h" +#include "mafianet/autopatcher_patch_context.h" +#include "mafianet/gets.h" +#include "mafianet/sleep.h" +#include "mafianet/cloud_client.h" +#include "mafianet/linux_adapter.h" +#include "mafianet/osx_adapter.h" void GetServers(MafiaNet::CloudClient *cloudClient, MafiaNet::RakNetGUID serverGuid); void GetClientSubscription(MafiaNet::CloudClient *cloudClient, MafiaNet::RakNetGUID serverGuid); diff --git a/Samples/AutopatcherServer/AutopatcherServerTest.cpp b/Samples/AutopatcherServer/AutopatcherServerTest.cpp index 07280469a..94f639ffc 100644 --- a/Samples/AutopatcherServer/AutopatcherServerTest.cpp +++ b/Samples/AutopatcherServer/AutopatcherServerTest.cpp @@ -18,11 +18,11 @@ #include #ifdef _WIN32 -// Pull in winsock2.h (via WindowsIncludes.h) BEFORE windows.h. Including +// Pull in winsock2.h (via windows_includes.h) BEFORE windows.h. Including // directly drags in the legacy Winsock 1 header, which then // clashes with the winsock2.h pulled in later, causing struct redefinition // errors (sockaddr, fd_set, ...) under MSVC. -#include "mafianet/WindowsIncludes.h" +#include "mafianet/windows_includes.h" #include #else #include @@ -32,19 +32,19 @@ #endif #endif -#include "mafianet/Kbhit.h" +#include "mafianet/kbhit.h" -#include "mafianet/GetTime.h" -#include "mafianet/PeerInterface.h" -#include "mafianet/MessageIdentifiers.h" -#include "mafianet/BitStream.h" -#include "mafianet/StringCompressor.h" -#include "mafianet/FileListTransfer.h" -#include "mafianet/FileList.h" // FLP_Printf -#include "mafianet/PacketizedTCP.h" -#include "mafianet/Gets.h" -#include "mafianet/LinuxAdapter.h" -#include "mafianet/OsxAdapter.h" +#include "mafianet/get_time.h" +#include "mafianet/peer_interface.h" +#include "mafianet/message_identifiers.h" +#include "mafianet/bit_stream.h" +#include "mafianet/string_compressor.h" +#include "mafianet/file_list_transfer.h" +#include "mafianet/file_list.h" // FLP_Printf +#include "mafianet/packetized_tcp.h" +#include "mafianet/gets.h" +#include "mafianet/linux_adapter.h" +#include "mafianet/osx_adapter.h" // Server only includes #include "AutopatcherServer.h" @@ -52,7 +52,7 @@ #include "AutopatcherPostgreRepository.h" #ifdef _WIN32 -#include "mafianet/WindowsIncludes.h" // Sleep +#include "mafianet/windows_includes.h" // Sleep #else #include // usleep #endif diff --git a/Samples/AutopatcherServer_SelfScaling/main.cpp b/Samples/AutopatcherServer_SelfScaling/main.cpp index a004cf3c5..9bbb6e465 100644 --- a/Samples/AutopatcherServer_SelfScaling/main.cpp +++ b/Samples/AutopatcherServer_SelfScaling/main.cpp @@ -28,31 +28,31 @@ #include #include #include // used for std::numeric_limits -#include "mafianet/Kbhit.h" - -#include "mafianet/GetTime.h" -#include "mafianet/PeerInterface.h" -#include "mafianet/MessageIdentifiers.h" -#include "mafianet/BitStream.h" -#include "mafianet/StringCompressor.h" -#include "mafianet/FileListTransfer.h" -#include "mafianet/FileList.h" // FLP_Printf -#include "mafianet/PacketizedTCP.h" -#include "mafianet/Gets.h" +#include "mafianet/kbhit.h" + +#include "mafianet/get_time.h" +#include "mafianet/peer_interface.h" +#include "mafianet/message_identifiers.h" +#include "mafianet/bit_stream.h" +#include "mafianet/string_compressor.h" +#include "mafianet/file_list_transfer.h" +#include "mafianet/file_list.h" // FLP_Printf +#include "mafianet/packetized_tcp.h" +#include "mafianet/gets.h" #include "CloudServerHelper.h" -#include "mafianet/FullyConnectedMesh2.h" -#include "mafianet/TwoWayAuthentication.h" -#include "mafianet/CloudClient.h" -#include "mafianet/DynDNS.h" -#include "mafianet/PeerInterface.h" -#include "mafianet/Sleep.h" -#include "mafianet/ConnectionGraph2.h" +#include "mafianet/fully_connected_mesh2.h" +#include "mafianet/two_way_authentication.h" +#include "mafianet/cloud_client.h" +#include "mafianet/dyn_dns.h" +#include "mafianet/peer_interface.h" +#include "mafianet/sleep.h" +#include "mafianet/connection_graph2.h" #include "CloudServerHelper.h" -#include "mafianet/HTTPConnection2.h" +#include "mafianet/http_connection2.h" #include "Rackspace2.h" -#include "mafianet/GetTime.h" -#include "mafianet/LinuxAdapter.h" -#include "mafianet/OsxAdapter.h" +#include "mafianet/get_time.h" +#include "mafianet/linux_adapter.h" +#include "mafianet/osx_adapter.h" // See http://www.digip.org/jansson/doc/2.4/ // This is used to make it easier to parse the JSON returned from the master server #include "jansson.h" @@ -63,7 +63,7 @@ #include "AutopatcherPostgreRepository.h" #ifdef _WIN32 -#include "mafianet/WindowsIncludes.h" // Sleep +#include "mafianet/windows_includes.h" // Sleep #else #include // usleep #endif diff --git a/Samples/BigPacketTest/BigPacketTest.cpp b/Samples/BigPacketTest/BigPacketTest.cpp index c908c7714..391dfdb71 100644 --- a/Samples/BigPacketTest/BigPacketTest.cpp +++ b/Samples/BigPacketTest/BigPacketTest.cpp @@ -13,20 +13,20 @@ * license found in the license.txt file in the root directory of this source tree. */ -#include "mafianet/PeerInterface.h" -#include "mafianet/BitStream.h" +#include "mafianet/peer_interface.h" +#include "mafianet/bit_stream.h" #include // For atoi #include // For strlen -#include "mafianet/Statistics.h" -#include "mafianet/GetTime.h" -#include "mafianet/MessageIdentifiers.h" -#include "mafianet/MTUSize.h" +#include "mafianet/statistics.h" +#include "mafianet/get_time.h" +#include "mafianet/message_identifiers.h" +#include "mafianet/mtu_size.h" #include -#include "mafianet/Kbhit.h" -#include "mafianet/Sleep.h" -#include "mafianet/Gets.h" -#include "mafianet/LinuxAdapter.h" -#include "mafianet/OsxAdapter.h" +#include "mafianet/kbhit.h" +#include "mafianet/sleep.h" +#include "mafianet/gets.h" +#include "mafianet/linux_adapter.h" +#include "mafianet/osx_adapter.h" bool quit; bool sentPacket=false; @@ -201,7 +201,7 @@ int main(void) unsigned int total; unsigned int partLength; - // Disable endian swapping on reading this, as it's generated locally in ReliabilityLayer.cpp + // Disable endian swapping on reading this, as it's generated locally in reliability_layer.cpp progressBS.ReadBits( (unsigned char* ) &progress, BYTES_TO_BITS(sizeof(progress)), true ); progressBS.ReadBits( (unsigned char* ) &total, BYTES_TO_BITS(sizeof(total)), true ); progressBS.ReadBits( (unsigned char* ) &partLength, BYTES_TO_BITS(sizeof(partLength)), true ); diff --git a/Samples/BurstTest/BurstTest.cpp b/Samples/BurstTest/BurstTest.cpp index 1d0ee78d2..949ded614 100644 --- a/Samples/BurstTest/BurstTest.cpp +++ b/Samples/BurstTest/BurstTest.cpp @@ -13,25 +13,25 @@ * license found in the license.txt file in the root directory of this source tree. */ -#include "mafianet/PeerInterface.h" -#include "mafianet/GetTime.h" -#include "mafianet/MessageIdentifiers.h" -#include "mafianet/BitStream.h" +#include "mafianet/peer_interface.h" +#include "mafianet/get_time.h" +#include "mafianet/message_identifiers.h" +#include "mafianet/bit_stream.h" #include #include #include #include -#include "mafianet/Rand.h" -#include "mafianet/Statistics.h" -#include "mafianet/Sleep.h" -#include "mafianet/MemoryOverride.h" +#include "mafianet/rand.h" +#include "mafianet/statistics.h" +#include "mafianet/sleep.h" +#include "mafianet/memory_override.h" #include #include // used for std::numeric_limits -#include "mafianet/Gets.h" -#include "mafianet/Kbhit.h" -#include "mafianet/Sleep.h" -#include "mafianet/LinuxAdapter.h" -#include "mafianet/OsxAdapter.h" +#include "mafianet/gets.h" +#include "mafianet/kbhit.h" +#include "mafianet/sleep.h" +#include "mafianet/linux_adapter.h" +#include "mafianet/osx_adapter.h" using namespace MafiaNet; diff --git a/Samples/CMakeLists.txt b/Samples/CMakeLists.txt index cc8c6d3a4..1ba11201d 100644 --- a/Samples/CMakeLists.txt +++ b/Samples/CMakeLists.txt @@ -75,7 +75,7 @@ add_subdirectory(RakVoice) # specific third-party dependencies, platforms, or special configuration: # # - AutopatcherClientGFx3.0 (requires Scaleform GFx) -# - Encryption (requires LIBCAT_SECURITY=1 in NativeFeatureIncludesOverrides.h) +# - Encryption (requires LIBCAT_SECURITY=1 in native_feature_includes_overrides.h) # - AutoPatcherServer_MySQL (requires MySQL) # - CrashRelauncher (Windows-specific) # - iOS (requires iOS SDK) diff --git a/Samples/ChatExample/Client/Chat Example Client.cpp b/Samples/ChatExample/Client/Chat Example Client.cpp index ff467a3c6..dbf482b6d 100644 --- a/Samples/ChatExample/Client/Chat Example Client.cpp +++ b/Samples/ChatExample/Client/Chat Example Client.cpp @@ -19,33 +19,33 @@ // Very basic chat engine example // ---------------------------------------------------------------------- -#include "mafianet/MessageIdentifiers.h" - -#include "mafianet/PeerInterface.h" -#include "mafianet/PeerHandle.h" -#include "mafianet/Statistics.h" -#include "mafianet/Types.h" -#include "mafianet/BitStream.h" -#include "mafianet/PacketLogger.h" +#include "mafianet/message_identifiers.h" + +#include "mafianet/peer_interface.h" +#include "mafianet/peer_handle.h" +#include "mafianet/statistics.h" +#include "mafianet/types.h" +#include "mafianet/bit_stream.h" +#include "mafianet/packet_logger.h" #include #include #include #include #include // used for std::numeric_limits -#include "mafianet/Types.h" -#include "mafianet/Kbhit.h" +#include "mafianet/types.h" +#include "mafianet/kbhit.h" #ifdef _WIN32 -#include "mafianet/WindowsIncludes.h" // Sleep +#include "mafianet/windows_includes.h" // Sleep #else #include // usleep #endif -#include "mafianet/Gets.h" -#include "mafianet/LinuxAdapter.h" -#include "mafianet/OsxAdapter.h" -#include "mafianet/GuidUtil.h" +#include "mafianet/gets.h" +#include "mafianet/linux_adapter.h" +#include "mafianet/osx_adapter.h" +#include "mafianet/guid_util.h" #if LIBCAT_SECURITY==1 -#include "mafianet/SecureHandshake.h" // Include header for secure handshake +#include "mafianet/secure_handshake.h" // Include header for secure handshake #endif int main(void) diff --git a/Samples/ChatExample/Server/Chat Example Server.cpp b/Samples/ChatExample/Server/Chat Example Server.cpp index 421dd9251..84d43295e 100644 --- a/Samples/ChatExample/Server/Chat Example Server.cpp +++ b/Samples/ChatExample/Server/Chat Example Server.cpp @@ -19,29 +19,29 @@ // Very basic chat engine example // ---------------------------------------------------------------------- -#include "mafianet/MessageIdentifiers.h" - -#include "mafianet/PeerInterface.h" -#include "mafianet/Statistics.h" -#include "mafianet/Types.h" -#include "mafianet/BitStream.h" -#include "mafianet/Sleep.h" -#include "mafianet/PacketLogger.h" +#include "mafianet/message_identifiers.h" + +#include "mafianet/peer_interface.h" +#include "mafianet/statistics.h" +#include "mafianet/types.h" +#include "mafianet/bit_stream.h" +#include "mafianet/sleep.h" +#include "mafianet/packet_logger.h" #include #include #include #include #include // used for std::numeric_limits -#include "mafianet/Kbhit.h" +#include "mafianet/kbhit.h" #include #include -#include "mafianet/Gets.h" -#include "mafianet/LinuxAdapter.h" -#include "mafianet/OsxAdapter.h" -#include "mafianet/GuidUtil.h" +#include "mafianet/gets.h" +#include "mafianet/linux_adapter.h" +#include "mafianet/osx_adapter.h" +#include "mafianet/guid_util.h" #if LIBCAT_SECURITY==1 -#include "mafianet/SecureHandshake.h" // Include header for secure handshake +#include "mafianet/secure_handshake.h" // Include header for secure handshake #endif #if defined(_CONSOLE_2) diff --git a/Samples/CloudClient/CloudClientSample.cpp b/Samples/CloudClient/CloudClientSample.cpp index 3e70ab5f7..f6e51982f 100644 --- a/Samples/CloudClient/CloudClientSample.cpp +++ b/Samples/CloudClient/CloudClientSample.cpp @@ -13,11 +13,11 @@ * license found in the license.txt file in the root directory of this source tree. */ -#include "mafianet/MessageIdentifiers.h" -#include "mafianet/BitStream.h" -#include "mafianet/CloudClient.h" -#include "mafianet/PeerInterface.h" -#include "mafianet/Sleep.h" +#include "mafianet/message_identifiers.h" +#include "mafianet/bit_stream.h" +#include "mafianet/cloud_client.h" +#include "mafianet/peer_interface.h" +#include "mafianet/sleep.h" #include #include // used for std::numeric_limits diff --git a/Samples/CloudServer/CloudServerHelper.cpp b/Samples/CloudServer/CloudServerHelper.cpp index 6e20b3dcc..1b41230fd 100644 --- a/Samples/CloudServer/CloudServerHelper.cpp +++ b/Samples/CloudServer/CloudServerHelper.cpp @@ -14,22 +14,22 @@ */ #include "CloudServerHelper.h" -#include "mafianet/Sleep.h" - -#include "mafianet/Gets.h" -#include "mafianet/MessageIdentifiers.h" -#include "mafianet/BitStream.h" -#include "mafianet/FullyConnectedMesh2.h" -#include "mafianet/TwoWayAuthentication.h" -#include "mafianet/CloudClient.h" -#include "mafianet/DynDNS.h" -#include "mafianet/SocketLayer.h" -#include "mafianet/PeerInterface.h" -#include "mafianet/ConnectionGraph2.h" +#include "mafianet/sleep.h" + +#include "mafianet/gets.h" +#include "mafianet/message_identifiers.h" +#include "mafianet/bit_stream.h" +#include "mafianet/fully_connected_mesh2.h" +#include "mafianet/two_way_authentication.h" +#include "mafianet/cloud_client.h" +#include "mafianet/dyn_dns.h" +#include "mafianet/socket_layer.h" +#include "mafianet/peer_interface.h" +#include "mafianet/connection_graph2.h" #include #include // used for std::numeric_limits -#include "mafianet/LinuxAdapter.h" -#include "mafianet/OsxAdapter.h" +#include "mafianet/linux_adapter.h" +#include "mafianet/osx_adapter.h" using namespace MafiaNet; #define CLOUD_SERVER_CONNECTION_COUNT_PRIMARY_KEY "CloudConnCount" diff --git a/Samples/CloudServer/CloudServerHelper.h b/Samples/CloudServer/CloudServerHelper.h index 2e932823d..130637e71 100644 --- a/Samples/CloudServer/CloudServerHelper.h +++ b/Samples/CloudServer/CloudServerHelper.h @@ -16,7 +16,7 @@ #ifndef __CLOUD_SERVER_HELPER_H #define __CLOUD_SERVER_HELPER_H -#include "mafianet/CloudServer.h" +#include "mafianet/cloud_server.h" namespace MafiaNet { diff --git a/Samples/CloudServer/CloudServerSample.cpp b/Samples/CloudServer/CloudServerSample.cpp index c64e8e26b..11952f87b 100644 --- a/Samples/CloudServer/CloudServerSample.cpp +++ b/Samples/CloudServer/CloudServerSample.cpp @@ -14,15 +14,15 @@ */ #include "CloudServerHelper.h" -#include "mafianet/MessageIdentifiers.h" -#include "mafianet/BitStream.h" -#include "mafianet/FullyConnectedMesh2.h" -#include "mafianet/TwoWayAuthentication.h" -#include "mafianet/CloudClient.h" -#include "mafianet/DynDNS.h" -#include "mafianet/PeerInterface.h" -#include "mafianet/Sleep.h" -#include "mafianet/ConnectionGraph2.h" +#include "mafianet/message_identifiers.h" +#include "mafianet/bit_stream.h" +#include "mafianet/fully_connected_mesh2.h" +#include "mafianet/two_way_authentication.h" +#include "mafianet/cloud_client.h" +#include "mafianet/dyn_dns.h" +#include "mafianet/peer_interface.h" +#include "mafianet/sleep.h" +#include "mafianet/connection_graph2.h" int main(int argc, char **argv) { diff --git a/Samples/CloudTest/CloudTest.cpp b/Samples/CloudTest/CloudTest.cpp index 86b409866..99032d55e 100644 --- a/Samples/CloudTest/CloudTest.cpp +++ b/Samples/CloudTest/CloudTest.cpp @@ -13,15 +13,15 @@ * license found in the license.txt file in the root directory of this source tree. */ -#include "mafianet/PeerInterface.h" -#include "mafianet/BitStream.h" -#include "mafianet/GetTime.h" -#include "mafianet/Sleep.h" -#include "mafianet/Gets.h" -#include "mafianet/MessageIdentifiers.h" -#include "mafianet/CloudServer.h" -#include "mafianet/CloudClient.h" -#include "mafianet/Kbhit.h" +#include "mafianet/peer_interface.h" +#include "mafianet/bit_stream.h" +#include "mafianet/get_time.h" +#include "mafianet/sleep.h" +#include "mafianet/gets.h" +#include "mafianet/message_identifiers.h" +#include "mafianet/cloud_server.h" +#include "mafianet/cloud_client.h" +#include "mafianet/kbhit.h" enum { diff --git a/Samples/CommandConsoleClient/main.cpp b/Samples/CommandConsoleClient/main.cpp index c7baee82c..2472104b0 100644 --- a/Samples/CommandConsoleClient/main.cpp +++ b/Samples/CommandConsoleClient/main.cpp @@ -13,29 +13,29 @@ * license found in the license.txt file in the root directory of this source tree. */ -#include "mafianet/PeerInterface.h" +#include "mafianet/peer_interface.h" -#include "mafianet/MessageIdentifiers.h" -#include "mafianet/BitStream.h" +#include "mafianet/message_identifiers.h" +#include "mafianet/bit_stream.h" #include #include #include #include // used for std::numeric_limits -#include "mafianet/Kbhit.h" +#include "mafianet/kbhit.h" #ifdef _WIN32 -#include "mafianet/WindowsIncludes.h" // Sleep +#include "mafianet/windows_includes.h" // Sleep #else #include // usleep #include -#include "mafianet/LinuxAdapter.h" -#include "mafianet/LinuxStrings.h" -#include "mafianet/OsxAdapter.h" +#include "mafianet/linux_adapter.h" +#include "mafianet/linux_strings.h" +#include "mafianet/osx_adapter.h" //linux doesn't have stricmp but strcasecmp is same functionality #define stricmp strcasecmp #endif -#include "mafianet/Gets.h" +#include "mafianet/gets.h" int main() diff --git a/Samples/CommandConsoleServer/main.cpp b/Samples/CommandConsoleServer/main.cpp index a173bbcd9..d04524366 100644 --- a/Samples/CommandConsoleServer/main.cpp +++ b/Samples/CommandConsoleServer/main.cpp @@ -17,16 +17,16 @@ /// \brief Test the command console implementations -#include "mafianet/TCPInterface.h" -#include "mafianet/ConsoleServer.h" -#include "mafianet/CommandParser.h" -#include "mafianet/TelnetTransport.h" +#include "mafianet/tcp_interface.h" +#include "mafianet/console_server.h" +#include "mafianet/command_parser.h" +#include "mafianet/telnet_transport.h" -#include "mafianet/PeerInterface.h" -#include "mafianet/LogCommandParser.h" -#include "mafianet/GetTime.h" -#include "mafianet/Transport2.h" -#include "mafianet/LinuxStrings.h" +#include "mafianet/peer_interface.h" +#include "mafianet/log_command_parser.h" +#include "mafianet/get_time.h" +#include "mafianet/transport2.h" +#include "mafianet/linux_strings.h" #include diff --git a/Samples/ComprehensivePCGame/ComprehensivePCGame.cpp b/Samples/ComprehensivePCGame/ComprehensivePCGame.cpp index 73d13aa8a..469c85f15 100644 --- a/Samples/ComprehensivePCGame/ComprehensivePCGame.cpp +++ b/Samples/ComprehensivePCGame/ComprehensivePCGame.cpp @@ -17,35 +17,35 @@ #include #include #include // used for std::numeric_limits -#include "mafianet/GetTime.h" -#include "mafianet/Rand.h" -#include "mafianet/PeerInterface.h" -#include "mafianet/MessageIdentifiers.h" -#include "mafianet/FullyConnectedMesh2.h" -#include "mafianet/TeamManager.h" -#include "mafianet/Kbhit.h" -#include "mafianet/Sleep.h" -#include "mafianet/Types.h" -#include "mafianet/BitStream.h" -#include "mafianet/SocketLayer.h" -#include "mafianet/ReplicaManager3.h" -#include "mafianet/NetworkIDManager.h" -#include "mafianet/Gets.h" -#include "mafianet/Itoa.h" -#include "mafianet/NatPunchthroughClient.h" -#include "mafianet/NatTypeDetectionClient.h" +#include "mafianet/get_time.h" +#include "mafianet/rand.h" +#include "mafianet/peer_interface.h" +#include "mafianet/message_identifiers.h" +#include "mafianet/fully_connected_mesh2.h" +#include "mafianet/team_manager.h" +#include "mafianet/kbhit.h" +#include "mafianet/sleep.h" +#include "mafianet/types.h" +#include "mafianet/bit_stream.h" +#include "mafianet/socket_layer.h" +#include "mafianet/replica_manager3.h" +#include "mafianet/network_id_manager.h" +#include "mafianet/gets.h" +#include "mafianet/itoa.h" +#include "mafianet/nat_punchthrough_client.h" +#include "mafianet/nat_type_detection_client.h" #include "miniupnpc.h" #include "upnpcommands.h" #include "upnperrors.h" -#include "mafianet/TCPInterface.h" -#include "mafianet/ReadyEvent.h" -#include "mafianet/PacketLogger.h" -#include "mafianet/RPC4Plugin.h" -#include "mafianet/HTTPConnection2.h" -#include "mafianet/LinuxAdapter.h" -#include "mafianet/OsxAdapter.h" -#include "mafianet/LinuxStrings.h" -#include "mafianet/GuidUtil.h" +#include "mafianet/tcp_interface.h" +#include "mafianet/ready_event.h" +#include "mafianet/packet_logger.h" +#include "mafianet/rpc4_plugin.h" +#include "mafianet/http_connection2.h" +#include "mafianet/linux_adapter.h" +#include "mafianet/osx_adapter.h" +#include "mafianet/linux_strings.h" +#include "mafianet/guid_util.h" // See http://www.digip.org/jansson/doc/2.4/ // This is used to make it easier to parse the JSON returned from the master server #include "jansson.h" diff --git a/Samples/ComprehensiveTest/ComprehensiveTest.cpp b/Samples/ComprehensiveTest/ComprehensiveTest.cpp index 02996eb2e..e371e61e6 100644 --- a/Samples/ComprehensiveTest/ComprehensiveTest.cpp +++ b/Samples/ComprehensiveTest/ComprehensiveTest.cpp @@ -13,22 +13,22 @@ * license found in the license.txt file in the root directory of this source tree. */ -#include "mafianet/PeerInterface.h" +#include "mafianet/peer_interface.h" -#include "mafianet/BitStream.h" +#include "mafianet/bit_stream.h" #include // For atoi #include // For strlen -#include "mafianet/Rand.h" -#include "mafianet/Statistics.h" -#include "mafianet/MessageIdentifiers.h" +#include "mafianet/rand.h" +#include "mafianet/statistics.h" +#include "mafianet/message_identifiers.h" #include -#include "mafianet/GetTime.h" -#include "mafianet/LinuxAdapter.h" -#include "mafianet/OsxAdapter.h" +#include "mafianet/get_time.h" +#include "mafianet/linux_adapter.h" +#include "mafianet/osx_adapter.h" using namespace MafiaNet; #ifdef _WIN32 -#include "mafianet/WindowsIncludes.h" // Sleep +#include "mafianet/windows_includes.h" // Sleep #else #include // usleep #include diff --git a/Samples/CrashReporter/CrashReporter.cpp b/Samples/CrashReporter/CrashReporter.cpp index bdd90fffd..75aebc1a4 100644 --- a/Samples/CrashReporter/CrashReporter.cpp +++ b/Samples/CrashReporter/CrashReporter.cpp @@ -18,7 +18,7 @@ #ifdef WIN32 #include -#include "mafianet/WindowsIncludes.h" +#include "mafianet/windows_includes.h" #pragma warning(push) // disable warning 4091 (triggers for enum typedefs in DbgHelp.h in Windows SDK 7.1 and Windows SDK 8.1) #pragma warning(disable:4091) @@ -28,12 +28,12 @@ #include #include "SendFileTo.h" #include "CrashReporter.h" -#include "mafianet/EmailSender.h" -#include "mafianet/FileList.h" -#include "mafianet/FileOperations.h" -#include "mafianet/SimpleMutex.h" -#include "mafianet/LinuxAdapter.h" -#include "mafianet/OsxAdapter.h" +#include "mafianet/email_sender.h" +#include "mafianet/file_list.h" +#include "mafianet/file_operations.h" +#include "mafianet/simple_mutex.h" +#include "mafianet/linux_adapter.h" +#include "mafianet/osx_adapter.h" using namespace MafiaNet; diff --git a/Samples/CrashReporter/CrashReporter.h b/Samples/CrashReporter/CrashReporter.h index bceed4254..0347e91ba 100644 --- a/Samples/CrashReporter/CrashReporter.h +++ b/Samples/CrashReporter/CrashReporter.h @@ -65,7 +65,7 @@ // #include "DbgHelp.h" // Link with Dbghelp.lib ws2_32.lib -#include "mafianet/Defines.h" // provides the MNet short-hand alias for the MafiaNet namespace +#include "mafianet/defines.h" // provides the MNet short-hand alias for the MafiaNet namespace namespace MafiaNet { // Possible actions to take on a crash. If you want to restart the app as well, see the CrashRelauncher sample. diff --git a/Samples/CrashReporter/SendFileTo.cpp b/Samples/CrashReporter/SendFileTo.cpp index 8f8bf7426..1e45c6980 100644 --- a/Samples/CrashReporter/SendFileTo.cpp +++ b/Samples/CrashReporter/SendFileTo.cpp @@ -13,14 +13,14 @@ * license found in the license.txt file in the root directory of this source tree. */ -#include "mafianet/WindowsIncludes.h" +#include "mafianet/windows_includes.h" #include "SendFileTo.h" #include #include #include #include -#include "mafianet/LinuxAdapter.h" -#include "mafianet/OsxAdapter.h" +#include "mafianet/linux_adapter.h" +#include "mafianet/osx_adapter.h" bool CSendFileTo::SendMail(HWND hWndParent, const char *strAttachmentFilePath, const char *strAttachmentFileName, const char *strSubject, const char *strBody, const char *strRecipient) { diff --git a/Samples/CrashReporter/SendFileTo.h b/Samples/CrashReporter/SendFileTo.h index 13e1b624c..6364d25bf 100644 --- a/Samples/CrashReporter/SendFileTo.h +++ b/Samples/CrashReporter/SendFileTo.h @@ -18,7 +18,7 @@ #ifndef __SENDFILETO_H__ #define __SENDFILETO_H__ -#include "mafianet/WindowsIncludes.h" +#include "mafianet/windows_includes.h" #include diff --git a/Samples/CrashReporter/main.cpp b/Samples/CrashReporter/main.cpp index 442f6ca71..c88728780 100644 --- a/Samples/CrashReporter/main.cpp +++ b/Samples/CrashReporter/main.cpp @@ -40,17 +40,17 @@ // The third way is save build labels or branches in source control and get that version (you only need source code + .exe + .pdb) before debugging. // After debugging, restore your previous work. -#include "mafianet/SocketLayer.h" +#include "mafianet/socket_layer.h" #include "CrashReporter.h" // This is the only required file for the crash reporter. You must link in Dbghelp.lib #include // Printf, for the sample code -#include "mafianet/Kbhit.h" // getch, for the sample code +#include "mafianet/kbhit.h" // getch, for the sample code #pragma warning(push) // disable warning 4091 (triggers for enum typedefs in DbgHelp.h in Windows SDK 7.1 and Windows SDK 8.1) #pragma warning(disable:4091) #include #pragma warning(pop) -#include "mafianet/Gets.h" +#include "mafianet/gets.h" void function1(int a) { @@ -74,7 +74,7 @@ void RunGame(void) // If you don't plan to debug the crash reporter itself, you can remove _DEBUG_CRASH_REPORTER #ifdef _DEBUG_CRASH_REPORTER -#include "mafianet/WindowsIncludes.h" +#include "mafianet/windows_includes.h" extern void DumpMiniDump(PEXCEPTION_POINTERS excpInfo); #endif diff --git a/Samples/CrossConnectionTest/CrossConnectionTest.cpp b/Samples/CrossConnectionTest/CrossConnectionTest.cpp index d7213f768..59074e6a7 100644 --- a/Samples/CrossConnectionTest/CrossConnectionTest.cpp +++ b/Samples/CrossConnectionTest/CrossConnectionTest.cpp @@ -17,16 +17,16 @@ /// \brief Tests connecting two peers at the same time with the internet simulator running. -#include "mafianet/PeerInterface.h" +#include "mafianet/peer_interface.h" -#include "mafianet/PacketLogger.h" -#include "mafianet/Rand.h" -#include "mafianet/Kbhit.h" +#include "mafianet/packet_logger.h" +#include "mafianet/rand.h" +#include "mafianet/kbhit.h" #include // Printf -#include "mafianet/Sleep.h" -#include "mafianet/MessageIdentifiers.h" -#include "mafianet/BitStream.h" -#include "mafianet/GetTime.h" +#include "mafianet/sleep.h" +#include "mafianet/message_identifiers.h" +#include "mafianet/bit_stream.h" +#include "mafianet/get_time.h" using namespace MafiaNet; diff --git a/Samples/DirectoryDeltaTransfer/CMakeLists.txt b/Samples/DirectoryDeltaTransfer/CMakeLists.txt index 3791e2c54..998a1a32c 100644 --- a/Samples/DirectoryDeltaTransfer/CMakeLists.txt +++ b/Samples/DirectoryDeltaTransfer/CMakeLists.txt @@ -1,10 +1,10 @@ # DirectoryDeltaTransfer sample -# There are two test files with main() - build only DirectoryDeltaTransfer.cpp +# There are two test files with main() - build only directory_delta_transfer.cpp mafianet_add_sample( NAME DirectoryDeltaTransfer FOLDER "FileTransfer" - SOURCES DirectoryDeltaTransfer.cpp + SOURCES directory_delta_transfer.cpp ) # Optionally build the test version as a separate target diff --git a/Samples/DirectoryDeltaTransfer/DirectoryDeltaTransfer.cpp b/Samples/DirectoryDeltaTransfer/DirectoryDeltaTransfer.cpp index bf4a992c6..677b307b0 100644 --- a/Samples/DirectoryDeltaTransfer/DirectoryDeltaTransfer.cpp +++ b/Samples/DirectoryDeltaTransfer/DirectoryDeltaTransfer.cpp @@ -13,16 +13,16 @@ * license found in the license.txt file in the root directory of this source tree. */ -#include "mafianet/GetTime.h" -#include "mafianet/PeerInterface.h" -#include "mafianet/MessageIdentifiers.h" -#include "mafianet/Statistics.h" -#include "mafianet/DirectoryDeltaTransfer.h" -#include "mafianet/FileListTransfer.h" -#include "mafianet/FileList.h" -#include "mafianet/DataCompressor.h" -#include "mafianet/FileListTransferCBInterface.h" -#include "mafianet/Gets.h" +#include "mafianet/get_time.h" +#include "mafianet/peer_interface.h" +#include "mafianet/message_identifiers.h" +#include "mafianet/statistics.h" +#include "mafianet/directory_delta_transfer.h" +#include "mafianet/file_list_transfer.h" +#include "mafianet/file_list.h" +#include "mafianet/data_compressor.h" +#include "mafianet/file_list_transfer_cb_interface.h" +#include "mafianet/gets.h" #include #include #include @@ -32,7 +32,7 @@ #include #else #include // usleep -#include "mafianet/Kbhit.h" +#include "mafianet/kbhit.h" #endif using namespace MafiaNet; diff --git a/Samples/DirectoryDeltaTransfer/DirectoryDeltaTransferTest.cpp b/Samples/DirectoryDeltaTransfer/DirectoryDeltaTransferTest.cpp index 29fb30507..dd722bff0 100644 --- a/Samples/DirectoryDeltaTransfer/DirectoryDeltaTransferTest.cpp +++ b/Samples/DirectoryDeltaTransfer/DirectoryDeltaTransferTest.cpp @@ -13,28 +13,28 @@ * license found in the license.txt file in the root directory of this source tree. */ -#include "mafianet/GetTime.h" -#include "mafianet/PeerInterface.h" -#include "mafianet/MessageIdentifiers.h" -#include "mafianet/Statistics.h" -#include "mafianet/DirectoryDeltaTransfer.h" -#include "mafianet/FileListTransfer.h" +#include "mafianet/get_time.h" +#include "mafianet/peer_interface.h" +#include "mafianet/message_identifiers.h" +#include "mafianet/statistics.h" +#include "mafianet/directory_delta_transfer.h" +#include "mafianet/file_list_transfer.h" #include #include #include // used for std::numeric_limits -#include "mafianet/Kbhit.h" -#include "mafianet/FileList.h" -#include "mafianet/DataCompressor.h" -#include "mafianet/FileListTransferCBInterface.h" -#include "mafianet/Sleep.h" -#include "mafianet/IncrementalReadInterface.h" -#include "mafianet/PacketizedTCP.h" -#include "mafianet/Gets.h" -#include "mafianet/LinuxAdapter.h" -#include "mafianet/OsxAdapter.h" +#include "mafianet/kbhit.h" +#include "mafianet/file_list.h" +#include "mafianet/data_compressor.h" +#include "mafianet/file_list_transfer_cb_interface.h" +#include "mafianet/sleep.h" +#include "mafianet/incremental_read_interface.h" +#include "mafianet/packetized_tcp.h" +#include "mafianet/gets.h" +#include "mafianet/linux_adapter.h" +#include "mafianet/osx_adapter.h" #ifdef _WIN32 -#include "mafianet/WindowsIncludes.h" // Sleep +#include "mafianet/windows_includes.h" // Sleep #else #include // usleep #endif diff --git a/Samples/DroppedConnectionTest/DroppedConnectionTest.cpp b/Samples/DroppedConnectionTest/DroppedConnectionTest.cpp index 77098ea43..9f2b96c38 100644 --- a/Samples/DroppedConnectionTest/DroppedConnectionTest.cpp +++ b/Samples/DroppedConnectionTest/DroppedConnectionTest.cpp @@ -13,17 +13,17 @@ * license found in the license.txt file in the root directory of this source tree. */ -#include "mafianet/PeerInterface.h" -#include "mafianet/Rand.h" // randomMT -#include "mafianet/MessageIdentifiers.h" // Enumerations -#include "mafianet/Types.h" // SystemAddress -#include "mafianet/Kbhit.h" -#include "mafianet/Gets.h" +#include "mafianet/peer_interface.h" +#include "mafianet/rand.h" // randomMT +#include "mafianet/message_identifiers.h" // Enumerations +#include "mafianet/types.h" // SystemAddress +#include "mafianet/kbhit.h" +#include "mafianet/gets.h" #include using namespace MafiaNet; #ifdef _WIN32 -#include "mafianet/WindowsIncludes.h" // Sleep +#include "mafianet/windows_includes.h" // Sleep #else #include #include diff --git a/Samples/Encryption/Encryption.cpp b/Samples/Encryption/Encryption.cpp index e571d3cc6..19c93b4e7 100644 --- a/Samples/Encryption/Encryption.cpp +++ b/Samples/Encryption/Encryption.cpp @@ -16,25 +16,25 @@ #include #include #include -#include "mafianet/GetTime.h" -#include "mafianet/Rand.h" -#include "mafianet/Rand.h" -#include "mafianet/PeerInterface.h" -#include "mafianet/MessageIdentifiers.h" - -#include "mafianet/Types.h" -#include "mafianet/NativeFeatureIncludes.h" +#include "mafianet/get_time.h" +#include "mafianet/rand.h" +#include "mafianet/rand.h" +#include "mafianet/peer_interface.h" +#include "mafianet/message_identifiers.h" + +#include "mafianet/types.h" +#include "mafianet/native_feature_includes.h" #include -#include "mafianet/Sleep.h" -#include "mafianet/BitStream.h" -#include "mafianet/SecureHandshake.h" // Include header for secure handshake -#include "mafianet/Gets.h" -#include "mafianet/LinuxAdapter.h" -#include "mafianet/OsxAdapter.h" +#include "mafianet/sleep.h" +#include "mafianet/bit_stream.h" +#include "mafianet/secure_handshake.h" // Include header for secure handshake +#include "mafianet/gets.h" +#include "mafianet/linux_adapter.h" +#include "mafianet/osx_adapter.h" using namespace MafiaNet; #if LIBCAT_SECURITY!=1 -#error "Define LIBCAT_SECURITY 1 in NativeFeatureIncludesOverrides.h to enable Encryption" +#error "Define LIBCAT_SECURITY 1 in native_feature_includes_overrides.h to enable Encryption" #endif void PrintOptions(void) diff --git a/Samples/FCMHost/FCM2HostTest.cpp b/Samples/FCMHost/FCM2HostTest.cpp index 1c9c45deb..5b794ebe0 100644 --- a/Samples/FCMHost/FCM2HostTest.cpp +++ b/Samples/FCMHost/FCM2HostTest.cpp @@ -16,19 +16,19 @@ #include #include #include -#include "mafianet/GetTime.h" -#include "mafianet/PeerInterface.h" -#include "mafianet/MessageIdentifiers.h" -#include "mafianet/Types.h" -#include "mafianet/Sleep.h" -#include "mafianet/FullyConnectedMesh2.h" -#include "mafianet/ConnectionGraph2.h" +#include "mafianet/get_time.h" +#include "mafianet/peer_interface.h" +#include "mafianet/message_identifiers.h" +#include "mafianet/types.h" +#include "mafianet/sleep.h" +#include "mafianet/fully_connected_mesh2.h" +#include "mafianet/connection_graph2.h" #include -#include "mafianet/SocketLayer.h" -#include "mafianet/Kbhit.h" -#include "mafianet/PacketLogger.h" -#include "mafianet/BitStream.h" -#include "mafianet/GuidUtil.h" +#include "mafianet/socket_layer.h" +#include "mafianet/kbhit.h" +#include "mafianet/packet_logger.h" +#include "mafianet/bit_stream.h" +#include "mafianet/guid_util.h" using namespace MafiaNet; diff --git a/Samples/FCMHostSimultaneous/FCM2HostSimultaneousTest.cpp b/Samples/FCMHostSimultaneous/FCM2HostSimultaneousTest.cpp index 1be93ccf1..64bdcfb01 100644 --- a/Samples/FCMHostSimultaneous/FCM2HostSimultaneousTest.cpp +++ b/Samples/FCMHostSimultaneous/FCM2HostSimultaneousTest.cpp @@ -16,20 +16,20 @@ #include #include #include -#include "mafianet/GetTime.h" -#include "mafianet/PeerInterface.h" -#include "mafianet/MessageIdentifiers.h" - -#include "mafianet/Types.h" -#include "mafianet/Sleep.h" -#include "mafianet/FullyConnectedMesh2.h" -#include "mafianet/ConnectionGraph2.h" +#include "mafianet/get_time.h" +#include "mafianet/peer_interface.h" +#include "mafianet/message_identifiers.h" + +#include "mafianet/types.h" +#include "mafianet/sleep.h" +#include "mafianet/fully_connected_mesh2.h" +#include "mafianet/connection_graph2.h" #include -#include "mafianet/SocketLayer.h" -#include "mafianet/Kbhit.h" -#include "mafianet/PacketLogger.h" -#include "mafianet/Gets.h" -#include "mafianet/GuidUtil.h" +#include "mafianet/socket_layer.h" +#include "mafianet/kbhit.h" +#include "mafianet/packet_logger.h" +#include "mafianet/gets.h" +#include "mafianet/guid_util.h" using namespace MafiaNet; diff --git a/Samples/FCMVerifiedJoinSimultaneous/FCM2VerifiedJoinSimultaneousTest.cpp b/Samples/FCMVerifiedJoinSimultaneous/FCM2VerifiedJoinSimultaneousTest.cpp index b269ea76c..5bc4ef3f5 100644 --- a/Samples/FCMVerifiedJoinSimultaneous/FCM2VerifiedJoinSimultaneousTest.cpp +++ b/Samples/FCMVerifiedJoinSimultaneous/FCM2VerifiedJoinSimultaneousTest.cpp @@ -16,20 +16,20 @@ #include #include #include -#include "mafianet/GetTime.h" -#include "mafianet/PeerInterface.h" -#include "mafianet/MessageIdentifiers.h" -#include "mafianet/Types.h" -#include "mafianet/Sleep.h" -#include "mafianet/FullyConnectedMesh2.h" -#include "mafianet/ConnectionGraph2.h" +#include "mafianet/get_time.h" +#include "mafianet/peer_interface.h" +#include "mafianet/message_identifiers.h" +#include "mafianet/types.h" +#include "mafianet/sleep.h" +#include "mafianet/fully_connected_mesh2.h" +#include "mafianet/connection_graph2.h" #include -#include "mafianet/SocketLayer.h" -#include "mafianet/Kbhit.h" -#include "mafianet/PacketLogger.h" -#include "mafianet/Gets.h" -#include "mafianet/BitStream.h" -#include "mafianet/GuidUtil.h" +#include "mafianet/socket_layer.h" +#include "mafianet/kbhit.h" +#include "mafianet/packet_logger.h" +#include "mafianet/gets.h" +#include "mafianet/bit_stream.h" +#include "mafianet/guid_util.h" using namespace MafiaNet; diff --git a/Samples/FileListTransfer/main.cpp b/Samples/FileListTransfer/main.cpp index f31e65d73..ce94f0090 100644 --- a/Samples/FileListTransfer/main.cpp +++ b/Samples/FileListTransfer/main.cpp @@ -13,23 +13,23 @@ * license found in the license.txt file in the root directory of this source tree. */ -#include "mafianet/PeerInterface.h" -#include "mafianet/FileListTransfer.h" -#include "mafianet/Sleep.h" +#include "mafianet/peer_interface.h" +#include "mafianet/file_list_transfer.h" +#include "mafianet/sleep.h" -#include "mafianet/MessageIdentifiers.h" -#include "mafianet/FileListTransferCBInterface.h" -#include "mafianet/FileOperations.h" -#include "mafianet/SuperFastHash.h" -#include "mafianet/Assert.h" -#include "mafianet/BitStream.h" -#include "mafianet/IncrementalReadInterface.h" -#include "mafianet/PacketizedTCP.h" -#include "mafianet/SocketLayer.h" +#include "mafianet/message_identifiers.h" +#include "mafianet/file_list_transfer_cb_interface.h" +#include "mafianet/file_operations.h" +#include "mafianet/super_fast_hash.h" +#include "mafianet/assert.h" +#include "mafianet/bit_stream.h" +#include "mafianet/incremental_read_interface.h" +#include "mafianet/packetized_tcp.h" +#include "mafianet/socket_layer.h" #include -#include "mafianet/Gets.h" -#include "mafianet/LinuxAdapter.h" -#include "mafianet/OsxAdapter.h" +#include "mafianet/gets.h" +#include "mafianet/linux_adapter.h" +#include "mafianet/osx_adapter.h" MafiaNet::RakString file; MafiaNet::RakString fileCopy; diff --git a/Samples/FlowControlTest/FlowControlTest.cpp b/Samples/FlowControlTest/FlowControlTest.cpp index be7b7b8ff..03306635a 100644 --- a/Samples/FlowControlTest/FlowControlTest.cpp +++ b/Samples/FlowControlTest/FlowControlTest.cpp @@ -13,19 +13,19 @@ * license found in the license.txt file in the root directory of this source tree. */ -#include "mafianet/PeerInterface.h" -#include "mafianet/GetTime.h" -#include "mafianet/MessageIdentifiers.h" -#include "mafianet/Statistics.h" +#include "mafianet/peer_interface.h" +#include "mafianet/get_time.h" +#include "mafianet/message_identifiers.h" +#include "mafianet/statistics.h" #include #include #include #include #include // used for std::numeric_limits -#include "mafianet/Gets.h" -#include "mafianet/Kbhit.h" -#include "mafianet/LinuxAdapter.h" -#include "mafianet/OsxAdapter.h" +#include "mafianet/gets.h" +#include "mafianet/kbhit.h" +#include "mafianet/linux_adapter.h" +#include "mafianet/osx_adapter.h" using namespace MafiaNet; diff --git a/Samples/FullyConnectedMesh/FCMTest.cpp b/Samples/FullyConnectedMesh/FCMTest.cpp index 668002c53..d25d16810 100644 --- a/Samples/FullyConnectedMesh/FCMTest.cpp +++ b/Samples/FullyConnectedMesh/FCMTest.cpp @@ -16,16 +16,16 @@ #include #include #include -#include "mafianet/GetTime.h" -#include "mafianet/Rand.h" -#include "mafianet/PeerInterface.h" -#include "mafianet/MessageIdentifiers.h" +#include "mafianet/get_time.h" +#include "mafianet/rand.h" +#include "mafianet/peer_interface.h" +#include "mafianet/message_identifiers.h" -#include "mafianet/FullyConnectedMesh2.h" -#include "mafianet/ConnectionGraph2.h" +#include "mafianet/fully_connected_mesh2.h" +#include "mafianet/connection_graph2.h" #include -#include "mafianet/Kbhit.h" -#include "mafianet/Sleep.h" +#include "mafianet/kbhit.h" +#include "mafianet/sleep.h" static const unsigned short NUM_PEERS=8; MafiaNet::RakPeerInterface *rakPeer[NUM_PEERS]; diff --git a/Samples/LANServerDiscovery/LANServerDiscovery.cpp b/Samples/LANServerDiscovery/LANServerDiscovery.cpp index 1eb3daee8..fe07d6b8f 100644 --- a/Samples/LANServerDiscovery/LANServerDiscovery.cpp +++ b/Samples/LANServerDiscovery/LANServerDiscovery.cpp @@ -18,23 +18,23 @@ // Filename ChatExample.cpp // Very basic chat engine example // ---------------------------------------------------------------------- -#include "mafianet/MessageIdentifiers.h" +#include "mafianet/message_identifiers.h" -#include "mafianet/PeerInterface.h" -#include "mafianet/PeerInterface.h" -#include "mafianet/Types.h" -#include "mafianet/GetTime.h" -#include "mafianet/BitStream.h" +#include "mafianet/peer_interface.h" +#include "mafianet/peer_interface.h" +#include "mafianet/types.h" +#include "mafianet/get_time.h" +#include "mafianet/bit_stream.h" #include #include #include #include #include // used for std::numeric_limits -#include "mafianet/Sleep.h" -#include "mafianet/Gets.h" -#include "mafianet/LinuxAdapter.h" -#include "mafianet/OsxAdapter.h" -#include "mafianet/GuidUtil.h" +#include "mafianet/sleep.h" +#include "mafianet/gets.h" +#include "mafianet/linux_adapter.h" +#include "mafianet/osx_adapter.h" +#include "mafianet/guid_util.h" int main(void) { diff --git a/Samples/Lobby2Client/Lobby2ClientSample.cpp b/Samples/Lobby2Client/Lobby2ClientSample.cpp index cad236856..604ae4b36 100644 --- a/Samples/Lobby2Client/Lobby2ClientSample.cpp +++ b/Samples/Lobby2Client/Lobby2ClientSample.cpp @@ -14,21 +14,21 @@ */ #include "Lobby2Message.h" -#include "mafianet/PeerInterface.h" +#include "mafianet/peer_interface.h" -#include "mafianet/MessageIdentifiers.h" +#include "mafianet/message_identifiers.h" #include "Lobby2Client.h" -#include "mafianet/Kbhit.h" -#include "mafianet/Sleep.h" +#include "mafianet/kbhit.h" +#include "mafianet/sleep.h" #include "RoomsErrorCodes.h" -#include "mafianet/DS_Queue.h" +#include "mafianet/ds_queue.h" #include #include #include // used for std::numeric_limits -#include "mafianet/LinuxStrings.h" -#include "mafianet/Gets.h" -#include "mafianet/LinuxAdapter.h" -#include "mafianet/OsxAdapter.h" +#include "mafianet/linux_strings.h" +#include "mafianet/gets.h" +#include "mafianet/linux_adapter.h" +#include "mafianet/osx_adapter.h" static const int NUM_CONNECTIONS=2; MafiaNet::Lobby2Client lobby2Client[NUM_CONNECTIONS]; diff --git a/Samples/Lobby2ClientGFx3.0/Lobby2ClientGFx3Impl.cpp b/Samples/Lobby2ClientGFx3.0/Lobby2ClientGFx3Impl.cpp index 3a35ab49b..e2097eb3b 100644 --- a/Samples/Lobby2ClientGFx3.0/Lobby2ClientGFx3Impl.cpp +++ b/Samples/Lobby2ClientGFx3.0/Lobby2ClientGFx3Impl.cpp @@ -17,10 +17,10 @@ #include #include -#include "mafianet/GetTime.h" -#include "mafianet/PeerInterface.h" -#include "mafianet/MessageIdentifiers.h" -#include "mafianet/BitStream.h" +#include "mafianet/get_time.h" +#include "mafianet/peer_interface.h" +#include "mafianet/message_identifiers.h" +#include "mafianet/bit_stream.h" #include "Lobby2ClientGFx3Impl.h" #include "Lobby2Client.h" diff --git a/Samples/Lobby2ClientGFx3.0/Lobby2ClientGFx3Impl.h b/Samples/Lobby2ClientGFx3.0/Lobby2ClientGFx3Impl.h index f1732a68d..907c6d581 100644 --- a/Samples/Lobby2ClientGFx3.0/Lobby2ClientGFx3Impl.h +++ b/Samples/Lobby2ClientGFx3.0/Lobby2ClientGFx3Impl.h @@ -16,11 +16,11 @@ #ifndef __LOBBY_2_CLIENT_GFX3_IMPL_H #define __LOBBY_2_CLIENT_GFX3_IMPL_H -#include "mafianet/WindowsIncludes.h" -#include "mafianet/Types.h" +#include "mafianet/windows_includes.h" +#include "mafianet/types.h" #include "FxGameDelegate.h" #include "Lobby2Message.h" -#include "mafianet/PluginInterface2.h" +#include "mafianet/plugin_interface2.h" #define ACTIONSCRIPT_CALLABLE_HEADER(functionName) virtual void functionName(const FxDelegateArgs& pparams); #define ACTIONSCRIPT_CALLABLE_FUNCTION(className, functionName) \ diff --git a/Samples/Lobby2Server_PGSQL/Lobby2ServerSample_PGSQL.cpp b/Samples/Lobby2Server_PGSQL/Lobby2ServerSample_PGSQL.cpp index c16e656c0..006f00391 100644 --- a/Samples/Lobby2Server_PGSQL/Lobby2ServerSample_PGSQL.cpp +++ b/Samples/Lobby2Server_PGSQL/Lobby2ServerSample_PGSQL.cpp @@ -14,20 +14,20 @@ */ #include "Lobby2Message.h" -#include "mafianet/PeerInterface.h" +#include "mafianet/peer_interface.h" -#include "mafianet/MessageIdentifiers.h" -#include "mafianet/Kbhit.h" -#include "mafianet/Sleep.h" +#include "mafianet/message_identifiers.h" +#include "mafianet/kbhit.h" +#include "mafianet/sleep.h" #include "Lobby2Server_PGSQL.h" #include "Lobby2Message_PGSQL.h" #include "ProfanityFilter.h" #include #include #include // used for std::numeric_limits -#include "mafianet/Gets.h" -#include "mafianet/LinuxAdapter.h" -#include "mafianet/OsxAdapter.h" +#include "mafianet/gets.h" +#include "mafianet/linux_adapter.h" +#include "mafianet/osx_adapter.h" #ifdef __INTEGRATE_LOBBY2_WITH_ROOMS_PLUGIN @@ -35,11 +35,11 @@ #endif //#define _ALSO_ACT_AS_NAT_PUNCH_SERVER -#include "mafianet/NatPunchthroughServer.h" -#include "mafianet/UDPProxyCoordinator.h" -#include "mafianet/UDPProxyServer.h" -#include "mafianet/NatTypeDetectionServer.h" -#include "mafianet/SocketLayer.h" +#include "mafianet/nat_punchthrough_server.h" +#include "mafianet/udp_proxy_coordinator.h" +#include "mafianet/udp_proxy_server.h" +#include "mafianet/nat_type_detection_server.h" +#include "mafianet/socket_layer.h" static const char *COORDINATOR_PASSWORD="Dummy Coordinator Password"; void main(void) diff --git a/Samples/Lobby3/main.cpp b/Samples/Lobby3/main.cpp index d52777679..2efddd79d 100644 --- a/Samples/Lobby3/main.cpp +++ b/Samples/Lobby3/main.cpp @@ -17,17 +17,17 @@ #include #include #include -#include "mafianet/Gets.h" +#include "mafianet/gets.h" -#include "mafianet/TCPInterface.h" -#include "mafianet/String.h" -#include "mafianet/Sleep.h" -#include "mafianet/DR_SHA1.h" -#include "mafianet/BitStream.h" -#include "mafianet/LinuxAdapter.h" -#include "mafianet/OsxAdapter.h" +#include "mafianet/tcp_interface.h" +#include "mafianet/string.h" +#include "mafianet/sleep.h" +#include "mafianet/dr_sha1.h" +#include "mafianet/bit_stream.h" +#include "mafianet/linux_adapter.h" +#include "mafianet/osx_adapter.h" -#include "mafianet/Base64Encoder.h" +#include "mafianet/base64_encoder.h" // See http://www.digip.org/jansson/doc/2.4/ // This is used to make it easier to parse the JSON returned from the master server diff --git a/Samples/LobbyDB_PostgreSQL/LobbyDB_PostgreSQLTest.cpp b/Samples/LobbyDB_PostgreSQL/LobbyDB_PostgreSQLTest.cpp index bc05a5b0d..322f84377 100644 --- a/Samples/LobbyDB_PostgreSQL/LobbyDB_PostgreSQLTest.cpp +++ b/Samples/LobbyDB_PostgreSQL/LobbyDB_PostgreSQLTest.cpp @@ -11,11 +11,11 @@ // Common includes #include #include -#include "mafianet/Kbhit.h" -#include "mafianet/GetTime.h" +#include "mafianet/kbhit.h" +#include "mafianet/get_time.h" #include "FunctionThread.h" #include "LobbyDB_PostgreSQL.h" -#include "mafianet/EpochTimeToString.h" +#include "mafianet/epoch_time_to_string.h" #ifdef _WIN32 #include // Sleep diff --git a/Samples/LoopbackPerformanceTest/LoopbackPerformanceTest.cpp b/Samples/LoopbackPerformanceTest/LoopbackPerformanceTest.cpp index e25f0aded..63f0b6e19 100644 --- a/Samples/LoopbackPerformanceTest/LoopbackPerformanceTest.cpp +++ b/Samples/LoopbackPerformanceTest/LoopbackPerformanceTest.cpp @@ -13,16 +13,16 @@ * license found in the license.txt file in the root directory of this source tree. */ -#include "mafianet/PeerInterface.h" -#include "mafianet/MessageIdentifiers.h" // Enumerations -#include "mafianet/GetTime.h" -#include "mafianet/Statistics.h" +#include "mafianet/peer_interface.h" +#include "mafianet/message_identifiers.h" // Enumerations +#include "mafianet/get_time.h" +#include "mafianet/statistics.h" #include #include -#include "mafianet/Gets.h" +#include "mafianet/gets.h" #ifdef _WIN32 -#include "mafianet/WindowsIncludes.h" // Sleep +#include "mafianet/windows_includes.h" // Sleep #define SLEEP(arg) ( Sleep( (arg) ) ) #else #include // usleep diff --git a/Samples/MasterServer/MasterClient.cpp b/Samples/MasterServer/MasterClient.cpp index 1af500877..d7d996240 100644 --- a/Samples/MasterServer/MasterClient.cpp +++ b/Samples/MasterServer/MasterClient.cpp @@ -15,11 +15,11 @@ #include "MasterClient.h" #include "MasterServerMessageIDs.h" -#include "mafianet/PeerInterface.h" -#include "mafianet/MessageIdentifiers.h" -#include "mafianet/StringCompressor.h" -#include "mafianet/GetTime.h" -#include "mafianet/PacketPriority.h" +#include "mafianet/peer_interface.h" +#include "mafianet/message_identifiers.h" +#include "mafianet/string_compressor.h" +#include "mafianet/get_time.h" +#include "mafianet/packet_priority.h" #include using namespace MafiaNet; diff --git a/Samples/MasterServer/MasterClient.h b/Samples/MasterServer/MasterClient.h index 00940d60d..a44f5fca0 100644 --- a/Samples/MasterServer/MasterClient.h +++ b/Samples/MasterServer/MasterClient.h @@ -23,7 +23,7 @@ #define __MASTER_CLIENT_H #include "MasterCommon.h" -#include "mafianet/BitStream.h" +#include "mafianet/bit_stream.h" /// \ingroup MasterServer /// \brief implements the master client diff --git a/Samples/MasterServer/MasterClientMain.cpp b/Samples/MasterServer/MasterClientMain.cpp index 78e44d851..f12dd9671 100644 --- a/Samples/MasterServer/MasterClientMain.cpp +++ b/Samples/MasterServer/MasterClientMain.cpp @@ -18,11 +18,11 @@ #include "MasterCommon.h" #include "MasterClient.h" -#include "mafianet/StringCompressor.h" -#include "mafianet/BitStream.h" -#include "mafianet/PeerInterface.h" -#include "mafianet/MessageIdentifiers.h" -#include "mafianet/Gets.h" +#include "mafianet/string_compressor.h" +#include "mafianet/bit_stream.h" +#include "mafianet/peer_interface.h" +#include "mafianet/message_identifiers.h" +#include "mafianet/gets.h" #include #include diff --git a/Samples/MasterServer/MasterCommon.h b/Samples/MasterServer/MasterCommon.h index 9d044202c..319783503 100644 --- a/Samples/MasterServer/MasterCommon.h +++ b/Samples/MasterServer/MasterCommon.h @@ -18,10 +18,10 @@ #ifndef __MASTER_COMMON_H #define __MASTER_COMMON_H -#include "mafianet/DS_List.h" -#include "mafianet/Types.h" -#include "mafianet/BitStream.h" -#include "mafianet/PluginInterface2.h" +#include "mafianet/ds_list.h" +#include "mafianet/types.h" +#include "mafianet/bit_stream.h" +#include "mafianet/plugin_interface2.h" using namespace MafiaNet; // IP, Port, Ping - case sensitive! diff --git a/Samples/MasterServer/MasterServer.cpp b/Samples/MasterServer/MasterServer.cpp index bd916b2bf..798b73f72 100644 --- a/Samples/MasterServer/MasterServer.cpp +++ b/Samples/MasterServer/MasterServer.cpp @@ -15,13 +15,13 @@ #include "MasterServer.h" #include "MasterServerMessageIDs.h" -#include "mafianet/PeerInterface.h" -#include "mafianet/BitStream.h" -#include "mafianet/MessageIdentifiers.h" -#include "mafianet/StringCompressor.h" -#include "mafianet/GetTime.h" -#include "mafianet/Statistics.h" -#include "mafianet/PacketPriority.h" +#include "mafianet/peer_interface.h" +#include "mafianet/bit_stream.h" +#include "mafianet/message_identifiers.h" +#include "mafianet/string_compressor.h" +#include "mafianet/get_time.h" +#include "mafianet/statistics.h" +#include "mafianet/packet_priority.h" using namespace MafiaNet; // Uncomment this define for debugging printfs diff --git a/Samples/MasterServer/MasterServer.h b/Samples/MasterServer/MasterServer.h index 231634feb..6480c5e02 100644 --- a/Samples/MasterServer/MasterServer.h +++ b/Samples/MasterServer/MasterServer.h @@ -21,7 +21,7 @@ #define __MASTER_SERVER_H #include "MasterCommon.h" -#include "mafianet/Types.h" +#include "mafianet/types.h" /// \ingroup MASTER_SERVER_GROUP /// \brief implements the master server diff --git a/Samples/MasterServer/MasterServerMain.cpp b/Samples/MasterServer/MasterServerMain.cpp index 66130120e..cd9febf11 100644 --- a/Samples/MasterServer/MasterServerMain.cpp +++ b/Samples/MasterServer/MasterServerMain.cpp @@ -17,8 +17,8 @@ #include "MasterCommon.h" #include "MasterServer.h" -#include "mafianet/PeerInterface.h" -#include "mafianet/Gets.h" +#include "mafianet/peer_interface.h" +#include "mafianet/gets.h" #include #include #ifdef WIN32 diff --git a/Samples/MasterServer/MasterServerMessageIDs.h b/Samples/MasterServer/MasterServerMessageIDs.h index c9fd382d3..468cb9a68 100644 --- a/Samples/MasterServer/MasterServerMessageIDs.h +++ b/Samples/MasterServer/MasterServerMessageIDs.h @@ -20,7 +20,7 @@ #ifndef __MASTER_SERVER_MESSAGE_IDS_H #define __MASTER_SERVER_MESSAGE_IDS_H -#include "mafianet/MessageIdentifiers.h" +#include "mafianet/message_identifiers.h" /// Master Server message IDs - these were removed from core MafiaNet /// and are now sample-specific. They start at ID_USER_PACKET_ENUM. diff --git a/Samples/MasterServer/mastercommon.cpp b/Samples/MasterServer/mastercommon.cpp index c029b87b7..1209b6c09 100644 --- a/Samples/MasterServer/mastercommon.cpp +++ b/Samples/MasterServer/mastercommon.cpp @@ -14,12 +14,12 @@ */ #include "MasterCommon.h" -#include "mafianet/PeerInterface.h" -#include "mafianet/Defines.h" +#include "mafianet/peer_interface.h" +#include "mafianet/defines.h" #include -#include "mafianet/GetTime.h" -#include "mafianet/StringCompressor.h" -#include "mafianet/BitStream.h" +#include "mafianet/get_time.h" +#include "mafianet/string_compressor.h" +#include "mafianet/bit_stream.h" using namespace MafiaNet; // For debugging diff --git a/Samples/MasterServer2/main.cpp b/Samples/MasterServer2/main.cpp index eee7fc359..c63202ed0 100644 --- a/Samples/MasterServer2/main.cpp +++ b/Samples/MasterServer2/main.cpp @@ -61,11 +61,11 @@ void main_sockets(void) printf(outputBuffer); } -#include "mafianet/TCPInterface.h" -#include "mafianet/String.h" -#include "mafianet/Sleep.h" +#include "mafianet/tcp_interface.h" +#include "mafianet/string.h" +#include "mafianet/sleep.h" #include "jansson.h" -#include "mafianet/GetTime.h" +#include "mafianet/get_time.h" #define MASTER_SERVER_ADDRESS "masterserver2.raknet.com" #define MASTER_SERVER_PORT 80 @@ -112,7 +112,7 @@ void main_RakNet_Post(void) tcp->Stop(); } -#include "mafianet/HTTPConnection2.h" +#include "mafianet/http_connection2.h" void main_RakNet_Get(void) { HTTPConnection2 *httpConnection2; diff --git a/Samples/MessageFilter/MessageFilterTest.cpp b/Samples/MessageFilter/MessageFilterTest.cpp index d7396e138..dd5fdfeb9 100644 --- a/Samples/MessageFilter/MessageFilterTest.cpp +++ b/Samples/MessageFilter/MessageFilterTest.cpp @@ -13,11 +13,11 @@ * license found in the license.txt file in the root directory of this source tree. */ -#include "mafianet/PeerInterface.h" +#include "mafianet/peer_interface.h" -#include "mafianet/MessageFilter.h" -#include "mafianet/MessageIdentifiers.h" -#include "mafianet/Sleep.h" +#include "mafianet/message_filter.h" +#include "mafianet/message_identifiers.h" +#include "mafianet/sleep.h" #include int main() diff --git a/Samples/MessageSizeTest/MessageSizeTest.cpp b/Samples/MessageSizeTest/MessageSizeTest.cpp index 75cd0ab39..6959a60c3 100644 --- a/Samples/MessageSizeTest/MessageSizeTest.cpp +++ b/Samples/MessageSizeTest/MessageSizeTest.cpp @@ -13,18 +13,18 @@ * license found in the license.txt file in the root directory of this source tree. */ -#include "mafianet/PeerInterface.h" -#include "mafianet/GetTime.h" -#include "mafianet/MessageIdentifiers.h" -#include "mafianet/BitStream.h" +#include "mafianet/peer_interface.h" +#include "mafianet/get_time.h" +#include "mafianet/message_identifiers.h" +#include "mafianet/bit_stream.h" #include #include #include #include -#include "mafianet/Rand.h" -#include "mafianet/Statistics.h" -#include "mafianet/Sleep.h" -#include "mafianet/MemoryOverride.h" +#include "mafianet/rand.h" +#include "mafianet/statistics.h" +#include "mafianet/sleep.h" +#include "mafianet/memory_override.h" using namespace MafiaNet; diff --git a/Samples/NATCompleteClient/main.cpp b/Samples/NATCompleteClient/main.cpp index 3dda7f07b..e40721ff8 100644 --- a/Samples/NATCompleteClient/main.cpp +++ b/Samples/NATCompleteClient/main.cpp @@ -13,27 +13,27 @@ * license found in the license.txt file in the root directory of this source tree. */ -#include "mafianet/PeerInterface.h" -#include "mafianet/Sleep.h" +#include "mafianet/peer_interface.h" +#include "mafianet/sleep.h" #include #include #include #include // used for std::numeric_limits -#include "mafianet/Kbhit.h" -#include "mafianet/MessageIdentifiers.h" -#include "mafianet/BitStream.h" -#include "mafianet/Sleep.h" -#include "mafianet/NatPunchthroughClient.h" -#include "mafianet/NatTypeDetectionClient.h" -#include "mafianet/Getche.h" -#include "mafianet/GetTime.h" -#include "mafianet/Router2.h" -#include "mafianet/UDPProxyClient.h" -#include "mafianet/Gets.h" -#include "mafianet/Itoa.h" -#include "mafianet/LinuxAdapter.h" -#include "mafianet/OsxAdapter.h" -#include "mafianet/GuidUtil.h" +#include "mafianet/kbhit.h" +#include "mafianet/message_identifiers.h" +#include "mafianet/bit_stream.h" +#include "mafianet/sleep.h" +#include "mafianet/nat_punchthrough_client.h" +#include "mafianet/nat_type_detection_client.h" +#include "mafianet/getche.h" +#include "mafianet/get_time.h" +#include "mafianet/router2.h" +#include "mafianet/udp_proxy_client.h" +#include "mafianet/gets.h" +#include "mafianet/itoa.h" +#include "mafianet/linux_adapter.h" +#include "mafianet/osx_adapter.h" +#include "mafianet/guid_util.h" // To include miniupnp, see Samples\NATCompleteClient\readme.txt #include "miniupnpc.h" diff --git a/Samples/NATCompleteServer/main.cpp b/Samples/NATCompleteServer/main.cpp index 032af4700..9501f961e 100644 --- a/Samples/NATCompleteServer/main.cpp +++ b/Samples/NATCompleteServer/main.cpp @@ -13,29 +13,29 @@ * license found in the license.txt file in the root directory of this source tree. */ -#include "mafianet/PeerInterface.h" -#include "mafianet/Sleep.h" +#include "mafianet/peer_interface.h" +#include "mafianet/sleep.h" #include #include #include #include // used for std::numeric_limits -#include "mafianet/Kbhit.h" -#include "mafianet/MessageIdentifiers.h" -#include "mafianet/BitStream.h" -#include "mafianet/Sleep.h" -#include "mafianet/UDPProxyServer.h" -#include "mafianet/UDPProxyCoordinator.h" -#include "mafianet/NatPunchthroughServer.h" -#include "mafianet/NatTypeDetectionServer.h" -#include "mafianet/SocketLayer.h" -#include "mafianet/Getche.h" -#include "mafianet/Gets.h" +#include "mafianet/kbhit.h" +#include "mafianet/message_identifiers.h" +#include "mafianet/bit_stream.h" +#include "mafianet/sleep.h" +#include "mafianet/udp_proxy_server.h" +#include "mafianet/udp_proxy_coordinator.h" +#include "mafianet/nat_punchthrough_server.h" +#include "mafianet/nat_type_detection_server.h" +#include "mafianet/socket_layer.h" +#include "mafianet/getche.h" +#include "mafianet/gets.h" #include "CloudServerHelper.h" -#include "mafianet/CloudClient.h" -#include "mafianet/Statistics.h" -#include "mafianet/RelayPlugin.h" -#include "mafianet/LinuxAdapter.h" -#include "mafianet/OsxAdapter.h" +#include "mafianet/cloud_client.h" +#include "mafianet/statistics.h" +#include "mafianet/relay_plugin.h" +#include "mafianet/linux_adapter.h" +#include "mafianet/osx_adapter.h" //#define VERBOSE_LOGGING diff --git a/Samples/OfflineMessagesTest/OfflineMessagesTest.cpp b/Samples/OfflineMessagesTest/OfflineMessagesTest.cpp index 8fc5df83d..d655ef751 100644 --- a/Samples/OfflineMessagesTest/OfflineMessagesTest.cpp +++ b/Samples/OfflineMessagesTest/OfflineMessagesTest.cpp @@ -13,19 +13,19 @@ * license found in the license.txt file in the root directory of this source tree. */ -#include "mafianet/PeerInterface.h" +#include "mafianet/peer_interface.h" -#include "mafianet/BitStream.h" +#include "mafianet/bit_stream.h" #include // For atoi #include // For strlen #include -#include "mafianet/MessageIdentifiers.h" -#include "mafianet/GetTime.h" -#include "mafianet/Gets.h" -#include "mafianet/GuidUtil.h" +#include "mafianet/message_identifiers.h" +#include "mafianet/get_time.h" +#include "mafianet/gets.h" +#include "mafianet/guid_util.h" #ifdef _WIN32 -#include "mafianet/WindowsIncludes.h" // Sleep +#include "mafianet/windows_includes.h" // Sleep #else #include // usleep #include diff --git a/Samples/PHPDirectoryServer2/PHPDirectoryServer2.cpp b/Samples/PHPDirectoryServer2/PHPDirectoryServer2.cpp index 8f45f8352..329906082 100644 --- a/Samples/PHPDirectoryServer2/PHPDirectoryServer2.cpp +++ b/Samples/PHPDirectoryServer2/PHPDirectoryServer2.cpp @@ -26,16 +26,16 @@ /// License as published by the Free Software Foundation #include "PHPDirectoryServer2.h" -#include "mafianet/HTTPConnection.h" -#include "mafianet/Sleep.h" -#include "mafianet/String.h" -#include "mafianet/Types.h" -#include "mafianet/GetTime.h" -#include "mafianet/Assert.h" +#include "mafianet/http_connection.h" +#include "mafianet/sleep.h" +#include "mafianet/string.h" +#include "mafianet/types.h" +#include "mafianet/get_time.h" +#include "mafianet/assert.h" #include #include #include -#include "mafianet/Itoa.h" +#include "mafianet/itoa.h" // Column with this header contains the name of the game, passed to UploadTable() static const char *GAME_NAME_COMMAND="__GAME_NAME"; diff --git a/Samples/PHPDirectoryServer2/PHPDirectoryServer2.h b/Samples/PHPDirectoryServer2/PHPDirectoryServer2.h index 1c613afd6..dd114851f 100644 --- a/Samples/PHPDirectoryServer2/PHPDirectoryServer2.h +++ b/Samples/PHPDirectoryServer2/PHPDirectoryServer2.h @@ -30,13 +30,13 @@ #ifndef __PHP_DIRECTORY_SERVER_2 #define __PHP_DIRECTORY_SERVER_2 -#include "mafianet/Export.h" -#include "mafianet/String.h" -#include "mafianet/HTTPConnection.h" -#include "mafianet/Types.h" -#include "mafianet/DS_Queue.h" -#include "mafianet/DS_Table.h" -#include "mafianet/DS_Map.h" +#include "mafianet/export.h" +#include "mafianet/string.h" +#include "mafianet/http_connection.h" +#include "mafianet/types.h" +#include "mafianet/ds_queue.h" +#include "mafianet/ds_table.h" +#include "mafianet/ds_map.h" namespace MafiaNet { diff --git a/Samples/PHPDirectoryServer2/main.cpp b/Samples/PHPDirectoryServer2/main.cpp index 246028a92..ae5b478bb 100644 --- a/Samples/PHPDirectoryServer2/main.cpp +++ b/Samples/PHPDirectoryServer2/main.cpp @@ -17,20 +17,20 @@ /// \brief This file is a sample for using HTTPConnection and PHPDirectoryServer2 -#include "mafianet/TCPInterface.h" -#include "mafianet/HTTPConnection.h" +#include "mafianet/tcp_interface.h" +#include "mafianet/http_connection.h" #include "PHPDirectoryServer2.h" -#include "mafianet/Sleep.h" -#include "mafianet/String.h" -#include "mafianet/GetTime.h" -#include "mafianet/DS_Table.h" +#include "mafianet/sleep.h" +#include "mafianet/string.h" +#include "mafianet/get_time.h" +#include "mafianet/ds_table.h" #include #include #include -#include "mafianet/Gets.h" -#include "mafianet/Getche.h" -#include "mafianet/LinuxAdapter.h" -#include "mafianet/OsxAdapter.h" +#include "mafianet/gets.h" +#include "mafianet/getche.h" +#include "mafianet/linux_adapter.h" +#include "mafianet/osx_adapter.h" using namespace MafiaNet; diff --git a/Samples/PacketConsoleLogger/main.cpp b/Samples/PacketConsoleLogger/main.cpp index 86cd3e27f..4901ee05d 100644 --- a/Samples/PacketConsoleLogger/main.cpp +++ b/Samples/PacketConsoleLogger/main.cpp @@ -13,16 +13,16 @@ * license found in the license.txt file in the root directory of this source tree. */ -#include "mafianet/TelnetTransport.h" -#include "mafianet/ConsoleServer.h" -#include "mafianet/LogCommandParser.h" -#include "mafianet/PacketConsoleLogger.h" -#include "mafianet/PeerInterface.h" -#include "mafianet/Sleep.h" +#include "mafianet/telnet_transport.h" +#include "mafianet/console_server.h" +#include "mafianet/log_command_parser.h" +#include "mafianet/packet_console_logger.h" +#include "mafianet/peer_interface.h" +#include "mafianet/sleep.h" #include -#include "mafianet/Getche.h" -#include "mafianet/MessageIdentifiers.h" -#include "mafianet/Kbhit.h" +#include "mafianet/getche.h" +#include "mafianet/message_identifiers.h" +#include "mafianet/kbhit.h" using namespace MafiaNet; diff --git a/Samples/PacketLogger/PacketLoggerTest.cpp b/Samples/PacketLogger/PacketLoggerTest.cpp index 1ee6e8da7..ef581a63a 100644 --- a/Samples/PacketLogger/PacketLoggerTest.cpp +++ b/Samples/PacketLogger/PacketLoggerTest.cpp @@ -16,17 +16,17 @@ #include #include #include -#include "mafianet/GetTime.h" -#include "mafianet/Rand.h" -#include "mafianet/PeerInterface.h" -#include "mafianet/MessageIdentifiers.h" -#include "mafianet/Gets.h" -#include "mafianet/PacketLogger.h" +#include "mafianet/get_time.h" +#include "mafianet/rand.h" +#include "mafianet/peer_interface.h" +#include "mafianet/message_identifiers.h" +#include "mafianet/gets.h" +#include "mafianet/packet_logger.h" #include -#include "mafianet/Kbhit.h" +#include "mafianet/kbhit.h" #ifdef _WIN32 -#include "mafianet/WindowsIncludes.h" // Sleep +#include "mafianet/windows_includes.h" // Sleep #else #include // usleep #endif diff --git a/Samples/Ping/Ping.cpp b/Samples/Ping/Ping.cpp index e1178540e..6045c907f 100644 --- a/Samples/Ping/Ping.cpp +++ b/Samples/Ping/Ping.cpp @@ -18,22 +18,22 @@ // Filename Ping.cpp // Very basic chat engine example // ---------------------------------------------------------------------- -#include "mafianet/MessageIdentifiers.h" +#include "mafianet/message_identifiers.h" -#include "mafianet/PeerInterface.h" -#include "mafianet/PeerInterface.h" -#include "mafianet/Types.h" -#include "mafianet/GetTime.h" -#include "mafianet/BitStream.h" +#include "mafianet/peer_interface.h" +#include "mafianet/peer_interface.h" +#include "mafianet/types.h" +#include "mafianet/get_time.h" +#include "mafianet/bit_stream.h" #include #include #include #include #include // used for std::numeric_limits -#include "mafianet/Gets.h" -#include "mafianet/Kbhit.h" -#include "mafianet/LinuxAdapter.h" -#include "mafianet/OsxAdapter.h" +#include "mafianet/gets.h" +#include "mafianet/kbhit.h" +#include "mafianet/linux_adapter.h" +#include "mafianet/osx_adapter.h" int main(void) { diff --git a/Samples/RPC3/RPC3Sample.cpp b/Samples/RPC3/RPC3Sample.cpp index 3de859849..ef5c4c4cc 100644 --- a/Samples/RPC3/RPC3Sample.cpp +++ b/Samples/RPC3/RPC3Sample.cpp @@ -14,20 +14,20 @@ */ #include "RPC3.h" -#include "mafianet/PeerInterface.h" +#include "mafianet/peer_interface.h" #include -#include "mafianet/Kbhit.h" +#include "mafianet/kbhit.h" #include #include -#include "mafianet/BitStream.h" -#include "mafianet/MessageIdentifiers.h" -#include "mafianet/StringCompressor.h" -#include "mafianet/Sleep.h" -#include "mafianet/NetworkIDObject.h" -#include "mafianet/NetworkIDManager.h" -#include "mafianet/GetTime.h" -#include "mafianet/Gets.h" +#include "mafianet/bit_stream.h" +#include "mafianet/message_identifiers.h" +#include "mafianet/string_compressor.h" +#include "mafianet/sleep.h" +#include "mafianet/network_id_object.h" +#include "mafianet/network_id_manager.h" +#include "mafianet/get_time.h" +#include "mafianet/gets.h" // This has to be a pointer, because it uses UNASSIGNED_NETWORK_ID, initialized globally MafiaNet::RPC3 *rpc3Inst; @@ -39,7 +39,7 @@ struct NormalizedVector float x,y,z; }; -// Shift operators have to be in the namespace MafiaNet or they might use the default one in BitStream.h instead. Error occurs with std::string +// Shift operators have to be in the namespace MafiaNet or they might use the default one in bit_stream.h instead. Error occurs with std::string namespace MafiaNet { // Specialize the << and >> operator to serialize each element of NormalizedVector individually diff --git a/Samples/RPC4/RPC4Sample.cpp b/Samples/RPC4/RPC4Sample.cpp index 6309d761d..4d8fc46c8 100644 --- a/Samples/RPC4/RPC4Sample.cpp +++ b/Samples/RPC4/RPC4Sample.cpp @@ -13,19 +13,19 @@ * license found in the license.txt file in the root directory of this source tree. */ -#include "mafianet/RPC4Plugin.h" -#include "mafianet/PeerInterface.h" +#include "mafianet/rpc4_plugin.h" +#include "mafianet/peer_interface.h" #include -#include "mafianet/Kbhit.h" +#include "mafianet/kbhit.h" #include #include #include // used for std::numeric_limits -#include "mafianet/Sleep.h" -#include "mafianet/BitStream.h" -#include "mafianet/MessageIdentifiers.h" -#include "mafianet/Gets.h" -#include "mafianet/LinuxAdapter.h" -#include "mafianet/OsxAdapter.h" +#include "mafianet/sleep.h" +#include "mafianet/bit_stream.h" +#include "mafianet/message_identifiers.h" +#include "mafianet/gets.h" +#include "mafianet/linux_adapter.h" +#include "mafianet/osx_adapter.h" using namespace MafiaNet; diff --git a/Samples/RackspaceConsole/main.cpp b/Samples/RackspaceConsole/main.cpp index 41e10c18f..e19a4d024 100644 --- a/Samples/RackspaceConsole/main.cpp +++ b/Samples/RackspaceConsole/main.cpp @@ -13,15 +13,15 @@ * license found in the license.txt file in the root directory of this source tree. */ -#include "mafianet/Rackspace.h" +#include "mafianet/rackspace.h" #include -#include "mafianet/Gets.h" -#include "mafianet/Rackspace.h" -#include "mafianet/TCPInterface.h" -#include "mafianet/Kbhit.h" -#include "mafianet/Sleep.h" -#include "mafianet/LinuxAdapter.h" -#include "mafianet/OsxAdapter.h" +#include "mafianet/gets.h" +#include "mafianet/rackspace.h" +#include "mafianet/tcp_interface.h" +#include "mafianet/kbhit.h" +#include "mafianet/sleep.h" +#include "mafianet/linux_adapter.h" +#include "mafianet/osx_adapter.h" struct CommandAndDescription { diff --git a/Samples/RakVoice/main.cpp b/Samples/RakVoice/main.cpp index 954091ce6..f8c187309 100644 --- a/Samples/RakVoice/main.cpp +++ b/Samples/RakVoice/main.cpp @@ -18,21 +18,21 @@ #include #include // used for std::numeric_limits #include "portaudio.h" -#include "mafianet/Kbhit.h" -#include "mafianet/PeerInterface.h" -#include "mafianet/MessageIdentifiers.h" - -#include "mafianet/RakVoice.h" -#include "mafianet/Statistics.h" -#include "mafianet/NatPunchthroughClient.h" -#include "mafianet/BitStream.h" -#include "mafianet/Getche.h" -#include "mafianet/Gets.h" -#include "mafianet/LinuxAdapter.h" -#include "mafianet/OsxAdapter.h" -#include "mafianet/GuidUtil.h" - -/// To test sending to myself. Also uncomment in RakVoice.cpp +#include "mafianet/kbhit.h" +#include "mafianet/peer_interface.h" +#include "mafianet/message_identifiers.h" + +#include "mafianet/voice.h" +#include "mafianet/statistics.h" +#include "mafianet/nat_punchthrough_client.h" +#include "mafianet/bit_stream.h" +#include "mafianet/getche.h" +#include "mafianet/gets.h" +#include "mafianet/linux_adapter.h" +#include "mafianet/osx_adapter.h" +#include "mafianet/guid_util.h" + +/// To test sending to myself. Also uncomment in voice.cpp //#define _TEST_LOOPBACK // RakVoice only works with 16-bits sound data diff --git a/Samples/RakVoiceDSound/DSoundVoiceAdapter.cpp b/Samples/RakVoiceDSound/DSoundVoiceAdapter.cpp index cd1b9cc1f..1c264234b 100644 --- a/Samples/RakVoiceDSound/DSoundVoiceAdapter.cpp +++ b/Samples/RakVoiceDSound/DSoundVoiceAdapter.cpp @@ -14,8 +14,8 @@ */ #include "DSoundVoiceAdapter.h" -#include "mafianet/Assert.h" -#include "mafianet/PeerInterface.h" +#include "mafianet/assert.h" +#include "mafianet/peer_interface.h" #include /// To test sending to myself diff --git a/Samples/RakVoiceDSound/DSoundVoiceAdapter.h b/Samples/RakVoiceDSound/DSoundVoiceAdapter.h index 04713dbbc..fd662b922 100644 --- a/Samples/RakVoiceDSound/DSoundVoiceAdapter.h +++ b/Samples/RakVoiceDSound/DSoundVoiceAdapter.h @@ -31,7 +31,7 @@ of each frame. #ifndef __DSOUNDVOICEADAPTER_H #define __DSOUNDVOICEADAPTER_H -#include "mafianet/RakVoice.h" +#include "mafianet/voice.h" // If you get: // Error 1 fatal error C1083: Cannot open include file: 'dsound.h': No such file or directory diff --git a/Samples/RakVoiceDSound/main.cpp b/Samples/RakVoiceDSound/main.cpp index 5e071c508..6e08bfb47 100644 --- a/Samples/RakVoiceDSound/main.cpp +++ b/Samples/RakVoiceDSound/main.cpp @@ -16,25 +16,25 @@ #define INTERACTIVE #if defined(INTERACTIVE) -#include "mafianet/Kbhit.h" +#include "mafianet/kbhit.h" #endif #include #include #include #include // used for std::numeric_limits -#include "mafianet/PeerInterface.h" -#include "mafianet/MessageIdentifiers.h" - -#include "mafianet/Sleep.h" -#include "mafianet/RakVoice.h" -#include "mafianet/Statistics.h" -#include "mafianet/GetTime.h" -#include "mafianet/Assert.h" -#include "mafianet/Gets.h" +#include "mafianet/peer_interface.h" +#include "mafianet/message_identifiers.h" + +#include "mafianet/sleep.h" +#include "mafianet/voice.h" +#include "mafianet/statistics.h" +#include "mafianet/get_time.h" +#include "mafianet/assert.h" +#include "mafianet/gets.h" #include "DSoundVoiceAdapter.h" -#include "mafianet/LinuxAdapter.h" -#include "mafianet/OsxAdapter.h" +#include "mafianet/linux_adapter.h" +#include "mafianet/osx_adapter.h" // Reads and writes per second of the sound data // Opus supports: 8000, 16000, 24000, 48000 diff --git a/Samples/RakVoiceFMOD/FMODVoiceAdapter.cpp b/Samples/RakVoiceFMOD/FMODVoiceAdapter.cpp index 1812c1359..1839f2cf7 100644 --- a/Samples/RakVoiceFMOD/FMODVoiceAdapter.cpp +++ b/Samples/RakVoiceFMOD/FMODVoiceAdapter.cpp @@ -16,8 +16,8 @@ #include #include #include -#include "mafianet/PeerInterface.h" -#include "mafianet/MessageIdentifiers.h" +#include "mafianet/peer_interface.h" +#include "mafianet/message_identifiers.h" #include "FMODVoiceAdapter.h" #include "fmod_errors.h" diff --git a/Samples/RakVoiceFMOD/FMODVoiceAdapter.h b/Samples/RakVoiceFMOD/FMODVoiceAdapter.h index 2723a2544..f6bace49d 100644 --- a/Samples/RakVoiceFMOD/FMODVoiceAdapter.h +++ b/Samples/RakVoiceFMOD/FMODVoiceAdapter.h @@ -20,7 +20,7 @@ #ifndef __FMODVOICEBRIDGE_H #define __FMODVOICEBRIDGE_H -#include "mafianet/RakVoice.h" +#include "mafianet/voice.h" // If you get: // Error 1 fatal error C1083: Cannot open include file: 'fmod.hpp': No such file or directory c:\raknet\samples\rakvoicefmod\fmodvoiceadapter.h 9 diff --git a/Samples/RakVoiceFMOD/main.cpp b/Samples/RakVoiceFMOD/main.cpp index 03f5221af..ca2591f51 100644 --- a/Samples/RakVoiceFMOD/main.cpp +++ b/Samples/RakVoiceFMOD/main.cpp @@ -16,23 +16,23 @@ #define INTERACTIVE #if defined(INTERACTIVE) -#include "mafianet/Kbhit.h" +#include "mafianet/kbhit.h" #endif #include #include #include -#include "mafianet/PeerInterface.h" -#include "mafianet/MessageIdentifiers.h" -#include "mafianet/Gets.h" - -#include "mafianet/Sleep.h" -#include "mafianet/RakVoice.h" -#include "mafianet/Statistics.h" -#include "mafianet/GetTime.h" -#include "mafianet/Assert.h" -#include "mafianet/LinuxAdapter.h" -#include "mafianet/OsxAdapter.h" +#include "mafianet/peer_interface.h" +#include "mafianet/message_identifiers.h" +#include "mafianet/gets.h" + +#include "mafianet/sleep.h" +#include "mafianet/voice.h" +#include "mafianet/statistics.h" +#include "mafianet/get_time.h" +#include "mafianet/assert.h" +#include "mafianet/linux_adapter.h" +#include "mafianet/osx_adapter.h" #include "fmod.hpp" #include "fmod_errors.h" diff --git a/Samples/RankingServerDB/RankingServerDBTest.cpp b/Samples/RankingServerDB/RankingServerDBTest.cpp index 3908fc50f..bb55db05d 100644 --- a/Samples/RankingServerDB/RankingServerDBTest.cpp +++ b/Samples/RankingServerDB/RankingServerDBTest.cpp @@ -12,7 +12,7 @@ #include #include #include -#include "mafianet/GetTime.h" +#include "mafianet/get_time.h" #include "FunctionThread.h" #include "RankingServer_PostgreSQL.h" diff --git a/Samples/RankingServerDBTest/RankingServerDBTest.cpp b/Samples/RankingServerDBTest/RankingServerDBTest.cpp index eef87ba76..29635fa9d 100644 --- a/Samples/RankingServerDBTest/RankingServerDBTest.cpp +++ b/Samples/RankingServerDBTest/RankingServerDBTest.cpp @@ -11,8 +11,8 @@ // Common includes #include #include -#include "mafianet/Kbhit.h" -#include "mafianet/GetTime.h" +#include "mafianet/kbhit.h" +#include "mafianet/get_time.h" #include "FunctionThread.h" #include "RankingServer_PostgreSQL.h" diff --git a/Samples/ReadyEvent/ReadyEventSample.cpp b/Samples/ReadyEvent/ReadyEventSample.cpp index ec264e74d..f30050831 100644 --- a/Samples/ReadyEvent/ReadyEventSample.cpp +++ b/Samples/ReadyEvent/ReadyEventSample.cpp @@ -16,22 +16,22 @@ #include #include #include -#include "mafianet/GetTime.h" -#include "mafianet/Rand.h" -#include "mafianet/PeerInterface.h" -#include "mafianet/MessageIdentifiers.h" -#include "mafianet/ReadyEvent.h" +#include "mafianet/get_time.h" +#include "mafianet/rand.h" +#include "mafianet/peer_interface.h" +#include "mafianet/message_identifiers.h" +#include "mafianet/ready_event.h" #include #include // used for std::numeric_limits -#include "mafianet/Kbhit.h" -#include "mafianet/Sleep.h" -#include "mafianet/SocketLayer.h" -#include "mafianet/FullyConnectedMesh2.h" -#include "mafianet/ConnectionGraph2.h" -#include "mafianet/LinuxAdapter.h" -#include "mafianet/OsxAdapter.h" -#include "mafianet/Gets.h" -#include "mafianet/GuidUtil.h" +#include "mafianet/kbhit.h" +#include "mafianet/sleep.h" +#include "mafianet/socket_layer.h" +#include "mafianet/fully_connected_mesh2.h" +#include "mafianet/connection_graph2.h" +#include "mafianet/linux_adapter.h" +#include "mafianet/osx_adapter.h" +#include "mafianet/gets.h" +#include "mafianet/guid_util.h" void PrintConnections(); diff --git a/Samples/RelayPluginTest/main.cpp b/Samples/RelayPluginTest/main.cpp index 178ce9b1d..161b1fdeb 100644 --- a/Samples/RelayPluginTest/main.cpp +++ b/Samples/RelayPluginTest/main.cpp @@ -13,15 +13,15 @@ * license found in the license.txt file in the root directory of this source tree. */ -#include "mafianet/PeerInterface.h" -#include "mafianet/Sleep.h" -#include "mafianet/RelayPlugin.h" -#include "mafianet/Gets.h" -#include "mafianet/Kbhit.h" -#include "mafianet/BitStream.h" -#include "mafianet/MessageIdentifiers.h" -#include "mafianet/LinuxAdapter.h" -#include "mafianet/OsxAdapter.h" +#include "mafianet/peer_interface.h" +#include "mafianet/sleep.h" +#include "mafianet/relay_plugin.h" +#include "mafianet/gets.h" +#include "mafianet/kbhit.h" +#include "mafianet/bit_stream.h" +#include "mafianet/message_identifiers.h" +#include "mafianet/linux_adapter.h" +#include "mafianet/osx_adapter.h" #include // used for std::numeric_limits using namespace MafiaNet; diff --git a/Samples/ReliableOrderedTest/ReliableOrderedTest.cpp b/Samples/ReliableOrderedTest/ReliableOrderedTest.cpp index f32df0bfc..c18571ed4 100644 --- a/Samples/ReliableOrderedTest/ReliableOrderedTest.cpp +++ b/Samples/ReliableOrderedTest/ReliableOrderedTest.cpp @@ -13,29 +13,29 @@ * license found in the license.txt file in the root directory of this source tree. */ -#include "mafianet/PeerInterface.h" -#include "mafianet/GetTime.h" -#include "mafianet/MessageIdentifiers.h" -#include "mafianet/BitStream.h" +#include "mafianet/peer_interface.h" +#include "mafianet/get_time.h" +#include "mafianet/message_identifiers.h" +#include "mafianet/bit_stream.h" #include #include #include #include -#include "mafianet/Rand.h" -#include "mafianet/Statistics.h" -#include "mafianet/Sleep.h" -#include "mafianet/MemoryOverride.h" +#include "mafianet/rand.h" +#include "mafianet/statistics.h" +#include "mafianet/sleep.h" +#include "mafianet/memory_override.h" #include #include // used for std::numeric_limits -#include "mafianet/Gets.h" -#include "mafianet/Kbhit.h" -#include "mafianet/LinuxAdapter.h" -#include "mafianet/OsxAdapter.h" +#include "mafianet/gets.h" +#include "mafianet/kbhit.h" +#include "mafianet/linux_adapter.h" +#include "mafianet/osx_adapter.h" using namespace MafiaNet; #ifdef _WIN32 -#include "mafianet/WindowsIncludes.h" // Sleep +#include "mafianet/windows_includes.h" // Sleep #else #include // usleep #endif diff --git a/Samples/ReplicaManager3/main.cpp b/Samples/ReplicaManager3/main.cpp index bedf7a572..5f7d1342d 100644 --- a/Samples/ReplicaManager3/main.cpp +++ b/Samples/ReplicaManager3/main.cpp @@ -15,28 +15,28 @@ // Demonstrates ReplicaManager 3: A system to automatically create, destroy, and serialize objects -#include "mafianet/StringTable.h" -#include "mafianet/PeerInterface.h" +#include "mafianet/string_table.h" +#include "mafianet/peer_interface.h" #include -#include "mafianet/Kbhit.h" +#include "mafianet/kbhit.h" #include -#include "mafianet/BitStream.h" -#include "mafianet/MessageIdentifiers.h" -#include "mafianet/ReplicaManager3.h" -#include "mafianet/NetworkIDManager.h" -#include "mafianet/Sleep.h" -#include "mafianet/FormatString.h" -#include "mafianet/String.h" -#include "mafianet/GetTime.h" -#include "mafianet/SocketLayer.h" -#include "mafianet/Getche.h" -#include "mafianet/Rand.h" -#include "mafianet/VariableDeltaSerializer.h" -#include "mafianet/Gets.h" -#include "mafianet/LinuxAdapter.h" -#include "mafianet/OsxAdapter.h" -#include "mafianet/GuidUtil.h" +#include "mafianet/bit_stream.h" +#include "mafianet/message_identifiers.h" +#include "mafianet/replica_manager3.h" +#include "mafianet/network_id_manager.h" +#include "mafianet/sleep.h" +#include "mafianet/format_string.h" +#include "mafianet/string.h" +#include "mafianet/get_time.h" +#include "mafianet/socket_layer.h" +#include "mafianet/getche.h" +#include "mafianet/rand.h" +#include "mafianet/variable_delta_serializer.h" +#include "mafianet/gets.h" +#include "mafianet/linux_adapter.h" +#include "mafianet/osx_adapter.h" +#include "mafianet/guid_util.h" enum { diff --git a/Samples/ReplicatedLogin/ReplicatedLogin.cpp b/Samples/ReplicatedLogin/ReplicatedLogin.cpp index ef83dcbae..8e35d89ae 100644 --- a/Samples/ReplicatedLogin/ReplicatedLogin.cpp +++ b/Samples/ReplicatedLogin/ReplicatedLogin.cpp @@ -13,17 +13,17 @@ * license found in the license.txt file in the root directory of this source tree. */ -#include "mafianet/PeerInterface.h" -#include "mafianet/BitStream.h" -#include "mafianet/GetTime.h" -#include "mafianet/Sleep.h" -#include "mafianet/Gets.h" -#include "mafianet/MessageIdentifiers.h" -#include "mafianet/Kbhit.h" -#include "mafianet/ReplicaManager3.h" -#include "mafianet/PeerInterface.h" -#include "mafianet/NetworkIDManager.h" -#include "mafianet/GuidUtil.h" +#include "mafianet/peer_interface.h" +#include "mafianet/bit_stream.h" +#include "mafianet/get_time.h" +#include "mafianet/sleep.h" +#include "mafianet/gets.h" +#include "mafianet/message_identifiers.h" +#include "mafianet/kbhit.h" +#include "mafianet/replica_manager3.h" +#include "mafianet/peer_interface.h" +#include "mafianet/network_id_manager.h" +#include "mafianet/guid_util.h" using namespace MafiaNet; diff --git a/Samples/Rooms/RoomsSample.cpp b/Samples/Rooms/RoomsSample.cpp index 07565db48..c054ddd17 100644 --- a/Samples/Rooms/RoomsSample.cpp +++ b/Samples/Rooms/RoomsSample.cpp @@ -14,13 +14,13 @@ */ #include "RoomsPlugin.h" -#include "mafianet/PeerInterface.h" +#include "mafianet/peer_interface.h" #include "ProfanityFilter.h" -#include "mafianet/MessageIdentifiers.h" -#include "mafianet/Kbhit.h" +#include "mafianet/message_identifiers.h" +#include "mafianet/kbhit.h" #include -#include "mafianet/Gets.h" +#include "mafianet/gets.h" struct SampleCallbacks : public MafiaNet::RoomsCallback { diff --git a/Samples/RoomsBrowserGFx3/RakNet/RoomsBrowserGFx3_RakNet.cpp b/Samples/RoomsBrowserGFx3/RakNet/RoomsBrowserGFx3_RakNet.cpp index 8fd7cb152..e947ea683 100644 --- a/Samples/RoomsBrowserGFx3/RakNet/RoomsBrowserGFx3_RakNet.cpp +++ b/Samples/RoomsBrowserGFx3/RakNet/RoomsBrowserGFx3_RakNet.cpp @@ -16,9 +16,9 @@ #include "RoomsBrowserGFx3_RakNet.h" #include "Lobby2Client.h" #include "XMLParser.h" -#include "mafianet/MessageIdentifiers.h" +#include "mafianet/message_identifiers.h" #include "RoomTypes.h" -#include "mafianet/GetTime.h" +#include "mafianet/get_time.h" using namespace MafiaNet; diff --git a/Samples/RoomsBrowserGFx3/RakNet/RoomsBrowserGFx3_RakNet.h b/Samples/RoomsBrowserGFx3/RakNet/RoomsBrowserGFx3_RakNet.h index 247aebfb8..847af84df 100644 --- a/Samples/RoomsBrowserGFx3/RakNet/RoomsBrowserGFx3_RakNet.h +++ b/Samples/RoomsBrowserGFx3/RakNet/RoomsBrowserGFx3_RakNet.h @@ -16,10 +16,10 @@ #ifndef __ROOMS_BROWSER_GFX3_RAKNET #define __ROOMS_BROWSER_GFX3_RAKNET -#include "mafianet/WindowsIncludes.h" -#include "mafianet/Types.h" +#include "mafianet/windows_includes.h" +#include "mafianet/types.h" #include "Lobby2Message.h" -#include "mafianet/PluginInterface2.h" +#include "mafianet/plugin_interface2.h" #include "RoomsBrowserGFx3.h" #include "RoomsPlugin.h" diff --git a/Samples/RoomsBrowserGFx3/RoomsBrowserGFx3.h b/Samples/RoomsBrowserGFx3/RoomsBrowserGFx3.h index b9b31fe19..cc1ba5829 100644 --- a/Samples/RoomsBrowserGFx3/RoomsBrowserGFx3.h +++ b/Samples/RoomsBrowserGFx3/RoomsBrowserGFx3.h @@ -13,9 +13,9 @@ * license found in the license.txt file in the root directory of this source tree. */ -#include "mafianet/WindowsIncludes.h" +#include "mafianet/windows_includes.h" #include "FxGameDelegate.h" -#include "mafianet/String.h" +#include "mafianet/string.h" #define ACTIONSCRIPT_CALLABLE_HEADER(functionName) virtual void functionName(const FxDelegateArgs& pparams); #define ACTIONSCRIPT_CALLABLE_FUNCTION(className, functionName) \ diff --git a/Samples/Router2/Router2Sample.cpp b/Samples/Router2/Router2Sample.cpp index 6f2500fc4..edbd81e8c 100644 --- a/Samples/Router2/Router2Sample.cpp +++ b/Samples/Router2/Router2Sample.cpp @@ -13,25 +13,25 @@ * license found in the license.txt file in the root directory of this source tree. */ -#include "mafianet/PeerInterface.h" +#include "mafianet/peer_interface.h" #include -#include "mafianet/Kbhit.h" +#include "mafianet/kbhit.h" #include #include #include // used for std::numeric_limits -#include "mafianet/BitStream.h" -#include "mafianet/MessageIdentifiers.h" -#include "mafianet/Router2.h" -#include "mafianet/Sleep.h" -#include "mafianet/GetTime.h" -#include "mafianet/Rand.h" -#include "mafianet/Assert.h" -#include "mafianet/SocketLayer.h" -#include "mafianet/Getche.h" -#include "mafianet/Gets.h" -#include "mafianet/LinuxAdapter.h" -#include "mafianet/OsxAdapter.h" -#include "mafianet/GuidUtil.h" +#include "mafianet/bit_stream.h" +#include "mafianet/message_identifiers.h" +#include "mafianet/router2.h" +#include "mafianet/sleep.h" +#include "mafianet/get_time.h" +#include "mafianet/rand.h" +#include "mafianet/assert.h" +#include "mafianet/socket_layer.h" +#include "mafianet/getche.h" +#include "mafianet/gets.h" +#include "mafianet/linux_adapter.h" +#include "mafianet/osx_adapter.h" +#include "mafianet/guid_util.h" using namespace MafiaNet; diff --git a/Samples/SendEmail/main.cpp b/Samples/SendEmail/main.cpp index 439254bd4..86002888d 100644 --- a/Samples/SendEmail/main.cpp +++ b/Samples/SendEmail/main.cpp @@ -13,12 +13,12 @@ * license found in the license.txt file in the root directory of this source tree. */ -#include "mafianet/EmailSender.h" -#include "mafianet/FileList.h" +#include "mafianet/email_sender.h" +#include "mafianet/file_list.h" #include -#include "mafianet/Gets.h" -#include "mafianet/LinuxAdapter.h" -#include "mafianet/OsxAdapter.h" +#include "mafianet/gets.h" +#include "mafianet/linux_adapter.h" +#include "mafianet/osx_adapter.h" int main() { diff --git a/Samples/ServerClientTest2/ServerClientTest2.cpp b/Samples/ServerClientTest2/ServerClientTest2.cpp index 6e6732783..22f874f21 100644 --- a/Samples/ServerClientTest2/ServerClientTest2.cpp +++ b/Samples/ServerClientTest2/ServerClientTest2.cpp @@ -13,31 +13,31 @@ * license found in the license.txt file in the root directory of this source tree. */ -#include "mafianet/PeerInterface.h" +#include "mafianet/peer_interface.h" -#include "mafianet/BitStream.h" +#include "mafianet/bit_stream.h" #include // For atoi #include // For strlen -#include "mafianet/Rand.h" -#include "mafianet/Statistics.h" -#include "mafianet/MessageIdentifiers.h" +#include "mafianet/rand.h" +#include "mafianet/statistics.h" +#include "mafianet/message_identifiers.h" #include -#include "mafianet/Kbhit.h" -#include "mafianet/GetTime.h" -#include "mafianet/Assert.h" -#include "mafianet/Sleep.h" -#include "mafianet/Gets.h" -#include "mafianet/LinuxAdapter.h" -#include "mafianet/OsxAdapter.h" +#include "mafianet/kbhit.h" +#include "mafianet/get_time.h" +#include "mafianet/assert.h" +#include "mafianet/sleep.h" +#include "mafianet/gets.h" +#include "mafianet/linux_adapter.h" +#include "mafianet/osx_adapter.h" using namespace MafiaNet; #ifdef _WIN32 -#include "mafianet/WindowsIncludes.h" // Sleep64 +#include "mafianet/windows_includes.h" // Sleep64 #else #include // usleep #include -#include "mafianet/Getche.h" +#include "mafianet/getche.h" #endif static const int NUM_CLIENTS=100; diff --git a/Samples/StatisticsHistoryTest/StatisticsHistoryTest.cpp b/Samples/StatisticsHistoryTest/StatisticsHistoryTest.cpp index 50545cc0b..e3e03b523 100644 --- a/Samples/StatisticsHistoryTest/StatisticsHistoryTest.cpp +++ b/Samples/StatisticsHistoryTest/StatisticsHistoryTest.cpp @@ -19,12 +19,12 @@ #include #include #include -#include "mafianet/GetTime.h" -#include "mafianet/PeerInterface.h" -#include "mafianet/MessageIdentifiers.h" -#include "mafianet/StatisticsHistory.h" +#include "mafianet/get_time.h" +#include "mafianet/peer_interface.h" +#include "mafianet/message_identifiers.h" +#include "mafianet/statistics_history.h" #include -#include "mafianet/Sleep.h" +#include "mafianet/sleep.h" using namespace MafiaNet; diff --git a/Samples/SteamLobby/main.cpp b/Samples/SteamLobby/main.cpp index c7d069e59..0c1bd5d57 100644 --- a/Samples/SteamLobby/main.cpp +++ b/Samples/SteamLobby/main.cpp @@ -15,19 +15,19 @@ #include #include -#include "Lobby2Client_Steam.h" // If Lobby2Client_Steam.h is included before SocketLayer.h, then it will use the steam send functions +#include "Lobby2Client_Steam.h" // If Lobby2Client_Steam.h is included before socket_layer.h, then it will use the steam send functions #include "Lobby2Message_Steam.h" -#include "mafianet/Time.h" -#include "mafianet/Sleep.h" -#include "mafianet/Types.h" -#include "mafianet/PeerInterface.h" -#include "mafianet/GetTime.h" -#include "mafianet/MessageIdentifiers.h" +#include "mafianet/time.h" +#include "mafianet/sleep.h" +#include "mafianet/types.h" +#include "mafianet/peer_interface.h" +#include "mafianet/get_time.h" +#include "mafianet/message_identifiers.h" #include -#include -#include "mafianet/Gets.h" -#include "mafianet/FullyConnectedMesh2.h" -#include "mafianet/GuidUtil.h" +#include +#include "mafianet/gets.h" +#include "mafianet/fully_connected_mesh2.h" +#include "mafianet/guid_util.h" #pragma warning( push ) #pragma warning(disable:4127) // conditional expression is constant (with Steamworks 1.23a) #include "steam_api.h" diff --git a/Samples/TeamManager/TeamManagerTest.cpp b/Samples/TeamManager/TeamManagerTest.cpp index a87ff0fc1..2378a34e8 100644 --- a/Samples/TeamManager/TeamManagerTest.cpp +++ b/Samples/TeamManager/TeamManagerTest.cpp @@ -16,22 +16,22 @@ #include #include #include -#include "mafianet/GetTime.h" -#include "mafianet/Rand.h" -#include "mafianet/PeerInterface.h" -#include "mafianet/MessageIdentifiers.h" -#include "mafianet/FullyConnectedMesh2.h" -#include "mafianet/TeamManager.h" -#include "mafianet/Kbhit.h" -#include "mafianet/Sleep.h" -#include "mafianet/Types.h" -#include "mafianet/BitStream.h" -#include "mafianet/SocketLayer.h" -#include "mafianet/ReplicaManager3.h" -#include "mafianet/NetworkIDManager.h" -#include "mafianet/OsxAdapter.h" -#include "mafianet/Gets.h" -#include "mafianet/GuidUtil.h" +#include "mafianet/get_time.h" +#include "mafianet/rand.h" +#include "mafianet/peer_interface.h" +#include "mafianet/message_identifiers.h" +#include "mafianet/fully_connected_mesh2.h" +#include "mafianet/team_manager.h" +#include "mafianet/kbhit.h" +#include "mafianet/sleep.h" +#include "mafianet/types.h" +#include "mafianet/bit_stream.h" +#include "mafianet/socket_layer.h" +#include "mafianet/replica_manager3.h" +#include "mafianet/network_id_manager.h" +#include "mafianet/osx_adapter.h" +#include "mafianet/gets.h" +#include "mafianet/guid_util.h" using namespace MafiaNet; diff --git a/Samples/TestDLL/main.cpp b/Samples/TestDLL/main.cpp index a31133095..74ca13c2e 100644 --- a/Samples/TestDLL/main.cpp +++ b/Samples/TestDLL/main.cpp @@ -13,17 +13,17 @@ * license found in the license.txt file in the root directory of this source tree. */ -#include "mafianet/PeerInterface.h" -#include "mafianet/FileOperations.h" -#include "mafianet/MemoryOverride.h" -#include "mafianet/ConsoleServer.h" -#include "mafianet/LogCommandParser.h" -#include "mafianet/CommandParser.h" -#include "mafianet/PacketLogger.h" -#include "mafianet/DS_List.h" -#include "mafianet/SocketLayer.h" -#include "mafianet/Sleep.h" -#include "mafianet/TCPInterface.h" +#include "mafianet/peer_interface.h" +#include "mafianet/file_operations.h" +#include "mafianet/memory_override.h" +#include "mafianet/console_server.h" +#include "mafianet/log_command_parser.h" +#include "mafianet/command_parser.h" +#include "mafianet/packet_logger.h" +#include "mafianet/ds_list.h" +#include "mafianet/socket_layer.h" +#include "mafianet/sleep.h" +#include "mafianet/tcp_interface.h" using namespace MafiaNet; diff --git a/Samples/ThreadTest/ThreadTest.cpp b/Samples/ThreadTest/ThreadTest.cpp index 97b9836cf..0ca3c0284 100644 --- a/Samples/ThreadTest/ThreadTest.cpp +++ b/Samples/ThreadTest/ThreadTest.cpp @@ -17,17 +17,17 @@ /// \brief Tests multiple readers and writers on the same instance of RakPeer. -#include "mafianet/PeerInterface.h" +#include "mafianet/peer_interface.h" -#include "mafianet/GetTime.h" -#include "mafianet/Statistics.h" -#include "mafianet/MessageIdentifiers.h" -#include "mafianet/Kbhit.h" +#include "mafianet/get_time.h" +#include "mafianet/statistics.h" +#include "mafianet/message_identifiers.h" +#include "mafianet/kbhit.h" #include // Printf -#include "mafianet/WindowsIncludes.h" // Sleep +#include "mafianet/windows_includes.h" // Sleep //#include -#include "mafianet/Thread.h" -#include "mafianet/Sleep.h" +#include "mafianet/thread.h" +#include "mafianet/sleep.h" using namespace MafiaNet; RakPeerInterface *peer1, *peer2; diff --git a/Samples/Timestamping/Timestamping.cpp b/Samples/Timestamping/Timestamping.cpp index 164af32cd..3b62da5c1 100644 --- a/Samples/Timestamping/Timestamping.cpp +++ b/Samples/Timestamping/Timestamping.cpp @@ -13,21 +13,21 @@ * license found in the license.txt file in the root directory of this source tree. */ -#include "mafianet/PeerInterface.h" +#include "mafianet/peer_interface.h" -#include "mafianet/BitStream.h" -#include "mafianet/MessageIdentifiers.h" -#include "mafianet/GetTime.h" -#include "mafianet/Sleep.h" +#include "mafianet/bit_stream.h" +#include "mafianet/message_identifiers.h" +#include "mafianet/get_time.h" +#include "mafianet/sleep.h" using namespace MafiaNet; #include #include #include -#include "mafianet/Gets.h" -#include "mafianet/Kbhit.h" -#include "mafianet/LinuxAdapter.h" -#include "mafianet/OsxAdapter.h" +#include "mafianet/gets.h" +#include "mafianet/kbhit.h" +#include "mafianet/linux_adapter.h" +#include "mafianet/osx_adapter.h" int main(void) diff --git a/Samples/TitleValidationDB_PostgreSQL/TitleValidationDB_PostgreSQLTest.cpp b/Samples/TitleValidationDB_PostgreSQL/TitleValidationDB_PostgreSQLTest.cpp index 02e825c26..41dfd6aff 100644 --- a/Samples/TitleValidationDB_PostgreSQL/TitleValidationDB_PostgreSQLTest.cpp +++ b/Samples/TitleValidationDB_PostgreSQL/TitleValidationDB_PostgreSQLTest.cpp @@ -11,11 +11,11 @@ // Common includes #include #include -#include "mafianet/Kbhit.h" -#include "mafianet/GetTime.h" +#include "mafianet/kbhit.h" +#include "mafianet/get_time.h" #include "FunctionThread.h" #include "TitleValidationDB_PostgreSQL.h" -#include "mafianet/EpochTimeToString.h" +#include "mafianet/epoch_time_to_string.h" #ifdef _WIN32 #include // Sleep diff --git a/Samples/TwoWayAuthentication/TwoWayAuthenticationTest.cpp b/Samples/TwoWayAuthentication/TwoWayAuthenticationTest.cpp index 8bcab783d..7e9972535 100644 --- a/Samples/TwoWayAuthentication/TwoWayAuthenticationTest.cpp +++ b/Samples/TwoWayAuthentication/TwoWayAuthenticationTest.cpp @@ -16,13 +16,13 @@ #include #include #include -#include "mafianet/GetTime.h" -#include "mafianet/Rand.h" -#include "mafianet/PeerInterface.h" -#include "mafianet/MessageIdentifiers.h" -#include "mafianet/BitStream.h" -#include "mafianet/TwoWayAuthentication.h" -#include "mafianet/Sleep.h" +#include "mafianet/get_time.h" +#include "mafianet/rand.h" +#include "mafianet/peer_interface.h" +#include "mafianet/message_identifiers.h" +#include "mafianet/bit_stream.h" +#include "mafianet/two_way_authentication.h" +#include "mafianet/sleep.h" static const int NUM_PEERS=2; MafiaNet::RakPeerInterface *rakPeer[NUM_PEERS]; diff --git a/Samples/UDPForwarder/main.cpp b/Samples/UDPForwarder/main.cpp index cb5c8f72e..8702445bb 100644 --- a/Samples/UDPForwarder/main.cpp +++ b/Samples/UDPForwarder/main.cpp @@ -13,18 +13,18 @@ * license found in the license.txt file in the root directory of this source tree. */ -#include "mafianet/PeerInterface.h" -#include "mafianet/Sleep.h" +#include "mafianet/peer_interface.h" +#include "mafianet/sleep.h" #include #include #include -#include "mafianet/Kbhit.h" -#include "mafianet/MessageIdentifiers.h" -#include "mafianet/BitStream.h" -#include "mafianet/Sleep.h" -#include "mafianet/UDPForwarder.h" -#include "mafianet/SocketLayer.h" +#include "mafianet/kbhit.h" +#include "mafianet/message_identifiers.h" +#include "mafianet/bit_stream.h" +#include "mafianet/sleep.h" +#include "mafianet/udp_forwarder.h" +#include "mafianet/socket_layer.h" int main() { diff --git a/Samples/VirtualWorld/main.cpp b/Samples/VirtualWorld/main.cpp index d1b28f26a..3972f0a85 100644 --- a/Samples/VirtualWorld/main.cpp +++ b/Samples/VirtualWorld/main.cpp @@ -8,8 +8,8 @@ // Virtual World (dimension) sample. // // Demonstrates scoping player visibility at runtime with the virtual world -// feature layered on ReplicaManager3 (see mafianet/VirtualWorld.h and -// mafianet/VirtualWorldReplica3.h). This is the SA-MP SetPlayerVirtualWorld / +// feature layered on ReplicaManager3 (see mafianet/virtual_world.h and +// mafianet/virtual_world_replica3.h). This is the SA-MP SetPlayerVirtualWorld / // routing-bucket model: a player dropped into a dimension only sees players in // that same dimension, switchable on the fly with no reconnect. // @@ -27,14 +27,14 @@ // The sample is non-interactive: it drives the peers, prints what each client // sees at each step, and returns 0 only if visibility matched expectations. -#include "mafianet/PeerInterface.h" -#include "mafianet/ReplicaManager3.h" -#include "mafianet/VirtualWorld.h" -#include "mafianet/VirtualWorldReplica3.h" -#include "mafianet/NetworkIDManager.h" -#include "mafianet/BitStream.h" -#include "mafianet/MessageIdentifiers.h" -#include "mafianet/Sleep.h" +#include "mafianet/peer_interface.h" +#include "mafianet/replica_manager3.h" +#include "mafianet/virtual_world.h" +#include "mafianet/virtual_world_replica3.h" +#include "mafianet/network_id_manager.h" +#include "mafianet/bit_stream.h" +#include "mafianet/message_identifiers.h" +#include "mafianet/sleep.h" #include diff --git a/Samples/iOS/ChatClient/ChatClient.xcodeproj/project.pbxproj b/Samples/iOS/ChatClient/ChatClient.xcodeproj/project.pbxproj index a92ba664d..eed0243b8 100644 --- a/Samples/iOS/ChatClient/ChatClient.xcodeproj/project.pbxproj +++ b/Samples/iOS/ChatClient/ChatClient.xcodeproj/project.pbxproj @@ -7,103 +7,103 @@ objects = { /* Begin PBXBuildFile section */ - B23EA3C3147F5A43002B8C06 /* _FindFirst.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B23EA2CE147F5A43002B8C06 /* _FindFirst.cpp */; }; - B23EA3C4147F5A43002B8C06 /* BitStream.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B23EA2D2147F5A43002B8C06 /* BitStream.cpp */; }; - B23EA3C5147F5A43002B8C06 /* CCRakNetSlidingWindow.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B23EA2D4147F5A43002B8C06 /* CCRakNetSlidingWindow.cpp */; }; - B23EA3C6147F5A43002B8C06 /* CCRakNetUDT.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B23EA2D6147F5A43002B8C06 /* CCRakNetUDT.cpp */; }; - B23EA3C7147F5A43002B8C06 /* CheckSum.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B23EA2D8147F5A43002B8C06 /* CheckSum.cpp */; }; - B23EA3C8147F5A43002B8C06 /* CloudClient.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B23EA2DA147F5A43002B8C06 /* CloudClient.cpp */; }; - B23EA3C9147F5A43002B8C06 /* CloudCommon.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B23EA2DC147F5A43002B8C06 /* CloudCommon.cpp */; }; - B23EA3CA147F5A43002B8C06 /* CloudServer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B23EA2DE147F5A43002B8C06 /* CloudServer.cpp */; }; + B23EA3C3147F5A43002B8C06 /* find_first.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B23EA2CE147F5A43002B8C06 /* find_first.cpp */; }; + B23EA3C4147F5A43002B8C06 /* bit_stream.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B23EA2D2147F5A43002B8C06 /* bit_stream.cpp */; }; + B23EA3C5147F5A43002B8C06 /* cc_sliding_window.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B23EA2D4147F5A43002B8C06 /* cc_sliding_window.cpp */; }; + B23EA3C6147F5A43002B8C06 /* cc_udt.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B23EA2D6147F5A43002B8C06 /* cc_udt.cpp */; }; + B23EA3C7147F5A43002B8C06 /* check_sum.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B23EA2D8147F5A43002B8C06 /* check_sum.cpp */; }; + B23EA3C8147F5A43002B8C06 /* cloud_client.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B23EA2DA147F5A43002B8C06 /* cloud_client.cpp */; }; + B23EA3C9147F5A43002B8C06 /* cloud_common.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B23EA2DC147F5A43002B8C06 /* cloud_common.cpp */; }; + B23EA3CA147F5A43002B8C06 /* cloud_server.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B23EA2DE147F5A43002B8C06 /* cloud_server.cpp */; }; B23EA3CB147F5A43002B8C06 /* CMakeLists.txt in Resources */ = {isa = PBXBuildFile; fileRef = B23EA2E0147F5A43002B8C06 /* CMakeLists.txt */; }; - B23EA3CC147F5A43002B8C06 /* CommandParserInterface.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B23EA2E1147F5A43002B8C06 /* CommandParserInterface.cpp */; }; - B23EA3CD147F5A43002B8C06 /* ConnectionGraph2.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B23EA2E3147F5A43002B8C06 /* ConnectionGraph2.cpp */; }; - B23EA3CE147F5A43002B8C06 /* ConsoleServer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B23EA2E5147F5A43002B8C06 /* ConsoleServer.cpp */; }; - B23EA3CF147F5A43002B8C06 /* DataCompressor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B23EA2E7147F5A43002B8C06 /* DataCompressor.cpp */; }; - B23EA3D0147F5A43002B8C06 /* DirectoryDeltaTransfer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B23EA2E9147F5A43002B8C06 /* DirectoryDeltaTransfer.cpp */; }; - B23EA3D1147F5A43002B8C06 /* DS_BytePool.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B23EA2ED147F5A43002B8C06 /* DS_BytePool.cpp */; }; - B23EA3D2147F5A43002B8C06 /* DS_ByteQueue.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B23EA2EF147F5A43002B8C06 /* DS_ByteQueue.cpp */; }; - B23EA3D3147F5A43002B8C06 /* DS_HuffmanEncodingTree.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B23EA2F3147F5A43002B8C06 /* DS_HuffmanEncodingTree.cpp */; }; - B23EA3D4147F5A43002B8C06 /* DS_Table.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B23EA301147F5A43002B8C06 /* DS_Table.cpp */; }; - B23EA3D5147F5A43002B8C06 /* DynDNS.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B23EA306147F5A43002B8C06 /* DynDNS.cpp */; }; - B23EA3D6147F5A43002B8C06 /* EmailSender.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B23EA308147F5A43002B8C06 /* EmailSender.cpp */; }; + B23EA3CC147F5A43002B8C06 /* command_parser_interface.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B23EA2E1147F5A43002B8C06 /* command_parser_interface.cpp */; }; + B23EA3CD147F5A43002B8C06 /* connection_graph2.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B23EA2E3147F5A43002B8C06 /* connection_graph2.cpp */; }; + B23EA3CE147F5A43002B8C06 /* console_server.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B23EA2E5147F5A43002B8C06 /* console_server.cpp */; }; + B23EA3CF147F5A43002B8C06 /* data_compressor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B23EA2E7147F5A43002B8C06 /* data_compressor.cpp */; }; + B23EA3D0147F5A43002B8C06 /* directory_delta_transfer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B23EA2E9147F5A43002B8C06 /* directory_delta_transfer.cpp */; }; + B23EA3D1147F5A43002B8C06 /* ds_byte_pool.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B23EA2ED147F5A43002B8C06 /* ds_byte_pool.cpp */; }; + B23EA3D2147F5A43002B8C06 /* ds_byte_queue.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B23EA2EF147F5A43002B8C06 /* ds_byte_queue.cpp */; }; + B23EA3D3147F5A43002B8C06 /* ds_huffman_encoding_tree.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B23EA2F3147F5A43002B8C06 /* ds_huffman_encoding_tree.cpp */; }; + B23EA3D4147F5A43002B8C06 /* ds_table.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B23EA301147F5A43002B8C06 /* ds_table.cpp */; }; + B23EA3D5147F5A43002B8C06 /* dyn_dns.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B23EA306147F5A43002B8C06 /* dyn_dns.cpp */; }; + B23EA3D6147F5A43002B8C06 /* email_sender.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B23EA308147F5A43002B8C06 /* email_sender.cpp */; }; B23EA3D7147F5A43002B8C06 /* EncodeClassName.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B23EA30A147F5A43002B8C06 /* EncodeClassName.cpp */; }; - B23EA3D8147F5A43002B8C06 /* EpochTimeToString.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B23EA30B147F5A43002B8C06 /* EpochTimeToString.cpp */; }; - B23EA3D9147F5A43002B8C06 /* FileList.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B23EA30E147F5A43002B8C06 /* FileList.cpp */; }; - B23EA3DA147F5A43002B8C06 /* FileListTransfer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B23EA311147F5A43002B8C06 /* FileListTransfer.cpp */; }; - B23EA3DB147F5A43002B8C06 /* FileOperations.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B23EA314147F5A43002B8C06 /* FileOperations.cpp */; }; - B23EA3DC147F5A43002B8C06 /* FormatString.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B23EA316147F5A43002B8C06 /* FormatString.cpp */; }; - B23EA3DD147F5A43002B8C06 /* FullyConnectedMesh2.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B23EA318147F5A43002B8C06 /* FullyConnectedMesh2.cpp */; }; - B23EA3DE147F5A43002B8C06 /* Getche.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B23EA31A147F5A43002B8C06 /* Getche.cpp */; }; - B23EA3DF147F5A43002B8C06 /* Gets.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B23EA31C147F5A43002B8C06 /* Gets.cpp */; }; - B23EA3E0147F5A43002B8C06 /* GetTime.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B23EA31E147F5A43002B8C06 /* GetTime.cpp */; }; - B23EA3E1147F5A43002B8C06 /* GetTimeOfDay.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B23EA320147F5A43002B8C06 /* GetTimeOfDay.cpp */; }; - B23EA3E2147F5A43002B8C06 /* GridSectorizer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B23EA322147F5A43002B8C06 /* GridSectorizer.cpp */; }; - B23EA3E3147F5A43002B8C06 /* HTTPConnection.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B23EA324147F5A43002B8C06 /* HTTPConnection.cpp */; }; - B23EA3E4147F5A43002B8C06 /* IncrementalReadInterface.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B23EA326147F5A43002B8C06 /* IncrementalReadInterface.cpp */; }; - B23EA3E5147F5A43002B8C06 /* Itoa.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B23EA329147F5A43002B8C06 /* Itoa.cpp */; }; - B23EA3E6147F5A43002B8C06 /* LinuxStrings.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B23EA32C147F5A43002B8C06 /* LinuxStrings.cpp */; }; - B23EA3E7147F5A43002B8C06 /* LocklessTypes.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B23EA32E147F5A43002B8C06 /* LocklessTypes.cpp */; }; - B23EA3E8147F5A43002B8C06 /* LogCommandParser.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B23EA330147F5A43002B8C06 /* LogCommandParser.cpp */; }; - B23EA3E9147F5A43002B8C06 /* MessageFilter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B23EA332147F5A43002B8C06 /* MessageFilter.cpp */; }; - B23EA3EA147F5A43002B8C06 /* NatPunchthroughClient.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B23EA339147F5A43002B8C06 /* NatPunchthroughClient.cpp */; }; - B23EA3EB147F5A43002B8C06 /* NatPunchthroughServer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B23EA33B147F5A43002B8C06 /* NatPunchthroughServer.cpp */; }; - B23EA3EC147F5A43002B8C06 /* NatTypeDetectionClient.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B23EA33D147F5A43002B8C06 /* NatTypeDetectionClient.cpp */; }; - B23EA3ED147F5A43002B8C06 /* NatTypeDetectionCommon.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B23EA33F147F5A43002B8C06 /* NatTypeDetectionCommon.cpp */; }; - B23EA3EE147F5A43002B8C06 /* NatTypeDetectionServer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B23EA341147F5A43002B8C06 /* NatTypeDetectionServer.cpp */; }; - B23EA3EF147F5A43002B8C06 /* NetworkIDManager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B23EA343147F5A43002B8C06 /* NetworkIDManager.cpp */; }; - B23EA3F0147F5A43002B8C06 /* NetworkIDObject.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B23EA345147F5A43002B8C06 /* NetworkIDObject.cpp */; }; - B23EA3F1147F5A43002B8C06 /* PacketConsoleLogger.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B23EA347147F5A43002B8C06 /* PacketConsoleLogger.cpp */; }; - B23EA3F2147F5A43002B8C06 /* PacketFileLogger.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B23EA349147F5A43002B8C06 /* PacketFileLogger.cpp */; }; - B23EA3F3147F5A43002B8C06 /* PacketizedTCP.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B23EA34B147F5A43002B8C06 /* PacketizedTCP.cpp */; }; - B23EA3F4147F5A43002B8C06 /* PacketLogger.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B23EA34D147F5A43002B8C06 /* PacketLogger.cpp */; }; - B23EA3F5147F5A43002B8C06 /* PacketOutputWindowLogger.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B23EA34F147F5A43002B8C06 /* PacketOutputWindowLogger.cpp */; }; - B23EA3F6147F5A43002B8C06 /* PluginInterface2.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B23EA353147F5A43002B8C06 /* PluginInterface2.cpp */; }; - B23EA3F7147F5A43002B8C06 /* Rackspace.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B23EA356147F5A43002B8C06 /* Rackspace.cpp */; }; - B23EA3F8147F5A43002B8C06 /* RakMemoryOverride.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B23EA35A147F5A43002B8C06 /* RakMemoryOverride.cpp */; }; + B23EA3D8147F5A43002B8C06 /* epoch_time_to_string.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B23EA30B147F5A43002B8C06 /* epoch_time_to_string.cpp */; }; + B23EA3D9147F5A43002B8C06 /* file_list.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B23EA30E147F5A43002B8C06 /* file_list.cpp */; }; + B23EA3DA147F5A43002B8C06 /* file_list_transfer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B23EA311147F5A43002B8C06 /* file_list_transfer.cpp */; }; + B23EA3DB147F5A43002B8C06 /* file_operations.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B23EA314147F5A43002B8C06 /* file_operations.cpp */; }; + B23EA3DC147F5A43002B8C06 /* format_string.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B23EA316147F5A43002B8C06 /* format_string.cpp */; }; + B23EA3DD147F5A43002B8C06 /* fully_connected_mesh2.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B23EA318147F5A43002B8C06 /* fully_connected_mesh2.cpp */; }; + B23EA3DE147F5A43002B8C06 /* getche.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B23EA31A147F5A43002B8C06 /* getche.cpp */; }; + B23EA3DF147F5A43002B8C06 /* gets.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B23EA31C147F5A43002B8C06 /* gets.cpp */; }; + B23EA3E0147F5A43002B8C06 /* get_time.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B23EA31E147F5A43002B8C06 /* get_time.cpp */; }; + B23EA3E1147F5A43002B8C06 /* get_time_of_day.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B23EA320147F5A43002B8C06 /* get_time_of_day.cpp */; }; + B23EA3E2147F5A43002B8C06 /* grid_sectorizer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B23EA322147F5A43002B8C06 /* grid_sectorizer.cpp */; }; + B23EA3E3147F5A43002B8C06 /* http_connection.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B23EA324147F5A43002B8C06 /* http_connection.cpp */; }; + B23EA3E4147F5A43002B8C06 /* incremental_read_interface.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B23EA326147F5A43002B8C06 /* incremental_read_interface.cpp */; }; + B23EA3E5147F5A43002B8C06 /* itoa.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B23EA329147F5A43002B8C06 /* itoa.cpp */; }; + B23EA3E6147F5A43002B8C06 /* linux_strings.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B23EA32C147F5A43002B8C06 /* linux_strings.cpp */; }; + B23EA3E7147F5A43002B8C06 /* lockless_types.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B23EA32E147F5A43002B8C06 /* lockless_types.cpp */; }; + B23EA3E8147F5A43002B8C06 /* log_command_parser.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B23EA330147F5A43002B8C06 /* log_command_parser.cpp */; }; + B23EA3E9147F5A43002B8C06 /* message_filter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B23EA332147F5A43002B8C06 /* message_filter.cpp */; }; + B23EA3EA147F5A43002B8C06 /* nat_punchthrough_client.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B23EA339147F5A43002B8C06 /* nat_punchthrough_client.cpp */; }; + B23EA3EB147F5A43002B8C06 /* nat_punchthrough_server.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B23EA33B147F5A43002B8C06 /* nat_punchthrough_server.cpp */; }; + B23EA3EC147F5A43002B8C06 /* nat_type_detection_client.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B23EA33D147F5A43002B8C06 /* nat_type_detection_client.cpp */; }; + B23EA3ED147F5A43002B8C06 /* nat_type_detection_common.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B23EA33F147F5A43002B8C06 /* nat_type_detection_common.cpp */; }; + B23EA3EE147F5A43002B8C06 /* nat_type_detection_server.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B23EA341147F5A43002B8C06 /* nat_type_detection_server.cpp */; }; + B23EA3EF147F5A43002B8C06 /* network_id_manager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B23EA343147F5A43002B8C06 /* network_id_manager.cpp */; }; + B23EA3F0147F5A43002B8C06 /* network_id_object.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B23EA345147F5A43002B8C06 /* network_id_object.cpp */; }; + B23EA3F1147F5A43002B8C06 /* packet_console_logger.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B23EA347147F5A43002B8C06 /* packet_console_logger.cpp */; }; + B23EA3F2147F5A43002B8C06 /* packet_file_logger.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B23EA349147F5A43002B8C06 /* packet_file_logger.cpp */; }; + B23EA3F3147F5A43002B8C06 /* packetized_tcp.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B23EA34B147F5A43002B8C06 /* packetized_tcp.cpp */; }; + B23EA3F4147F5A43002B8C06 /* packet_logger.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B23EA34D147F5A43002B8C06 /* packet_logger.cpp */; }; + B23EA3F5147F5A43002B8C06 /* packet_output_window_logger.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B23EA34F147F5A43002B8C06 /* packet_output_window_logger.cpp */; }; + B23EA3F6147F5A43002B8C06 /* plugin_interface2.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B23EA353147F5A43002B8C06 /* plugin_interface2.cpp */; }; + B23EA3F7147F5A43002B8C06 /* rackspace.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B23EA356147F5A43002B8C06 /* rackspace.cpp */; }; + B23EA3F8147F5A43002B8C06 /* memory_override.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B23EA35A147F5A43002B8C06 /* memory_override.cpp */; }; B23EA3F9147F5A43002B8C06 /* RakNet_vc8.vcproj in Resources */ = {isa = PBXBuildFile; fileRef = B23EA35C147F5A43002B8C06 /* RakNet_vc8.vcproj */; }; B23EA3FA147F5A43002B8C06 /* RakNet_vc9.vcproj in Resources */ = {isa = PBXBuildFile; fileRef = B23EA35D147F5A43002B8C06 /* RakNet_vc9.vcproj */; }; B23EA3FB147F5A43002B8C06 /* RakNet.vcproj in Resources */ = {isa = PBXBuildFile; fileRef = B23EA35E147F5A43002B8C06 /* RakNet.vcproj */; }; - B23EA3FC147F5A43002B8C06 /* RakNetCommandParser.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B23EA35F147F5A43002B8C06 /* RakNetCommandParser.cpp */; }; + B23EA3FC147F5A43002B8C06 /* command_parser.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B23EA35F147F5A43002B8C06 /* command_parser.cpp */; }; B23EA3FD147F5A43002B8C06 /* RakNetSocket.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B23EA364147F5A43002B8C06 /* RakNetSocket.cpp */; }; - B23EA3FE147F5A43002B8C06 /* RakNetStatistics.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B23EA366147F5A43002B8C06 /* RakNetStatistics.cpp */; }; - B23EA3FF147F5A43002B8C06 /* RakNetTransport2.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B23EA369147F5A43002B8C06 /* RakNetTransport2.cpp */; }; - B23EA400147F5A43002B8C06 /* RakNetTypes.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B23EA36B147F5A43002B8C06 /* RakNetTypes.cpp */; }; - B23EA401147F5A43002B8C06 /* RakPeer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B23EA36E147F5A43002B8C06 /* RakPeer.cpp */; }; - B23EA402147F5A43002B8C06 /* RakSleep.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B23EA371147F5A43002B8C06 /* RakSleep.cpp */; }; - B23EA403147F5A43002B8C06 /* RakString.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B23EA373147F5A43002B8C06 /* RakString.cpp */; }; - B23EA404147F5A43002B8C06 /* RakThread.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B23EA375147F5A43002B8C06 /* RakThread.cpp */; }; - B23EA405147F5A43002B8C06 /* RakWString.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B23EA377147F5A43002B8C06 /* RakWString.cpp */; }; - B23EA406147F5A43002B8C06 /* Rand.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B23EA379147F5A43002B8C06 /* Rand.cpp */; }; + B23EA3FE147F5A43002B8C06 /* statistics.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B23EA366147F5A43002B8C06 /* statistics.cpp */; }; + B23EA3FF147F5A43002B8C06 /* transport2.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B23EA369147F5A43002B8C06 /* transport2.cpp */; }; + B23EA400147F5A43002B8C06 /* types.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B23EA36B147F5A43002B8C06 /* types.cpp */; }; + B23EA401147F5A43002B8C06 /* peer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B23EA36E147F5A43002B8C06 /* peer.cpp */; }; + B23EA402147F5A43002B8C06 /* sleep.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B23EA371147F5A43002B8C06 /* sleep.cpp */; }; + B23EA403147F5A43002B8C06 /* string.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B23EA373147F5A43002B8C06 /* string.cpp */; }; + B23EA404147F5A43002B8C06 /* thread.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B23EA375147F5A43002B8C06 /* thread.cpp */; }; + B23EA405147F5A43002B8C06 /* wstring.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B23EA377147F5A43002B8C06 /* wstring.cpp */; }; + B23EA406147F5A43002B8C06 /* rand.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B23EA379147F5A43002B8C06 /* rand.cpp */; }; B23EA407147F5A43002B8C06 /* rdlmalloc.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B23EA37C147F5A43002B8C06 /* rdlmalloc.cpp */; }; - B23EA408147F5A43002B8C06 /* ReadyEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B23EA37E147F5A43002B8C06 /* ReadyEvent.cpp */; }; - B23EA409147F5A43002B8C06 /* ReliabilityLayer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B23EA381147F5A43002B8C06 /* ReliabilityLayer.cpp */; }; - B23EA40A147F5A43002B8C06 /* ReplicaManager3.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B23EA384147F5A43002B8C06 /* ReplicaManager3.cpp */; }; - B23EA40B147F5A43002B8C06 /* Router2.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B23EA386147F5A43002B8C06 /* Router2.cpp */; }; - B23EA40C147F5A43002B8C06 /* RPC4Plugin.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B23EA388147F5A43002B8C06 /* RPC4Plugin.cpp */; }; - B23EA40D147F5A43002B8C06 /* SecureHandshake.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B23EA38A147F5A43002B8C06 /* SecureHandshake.cpp */; }; - B23EA40E147F5A43002B8C06 /* SendToThread.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B23EA38C147F5A43002B8C06 /* SendToThread.cpp */; }; + B23EA408147F5A43002B8C06 /* ready_event.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B23EA37E147F5A43002B8C06 /* ready_event.cpp */; }; + B23EA409147F5A43002B8C06 /* reliability_layer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B23EA381147F5A43002B8C06 /* reliability_layer.cpp */; }; + B23EA40A147F5A43002B8C06 /* replica_manager3.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B23EA384147F5A43002B8C06 /* replica_manager3.cpp */; }; + B23EA40B147F5A43002B8C06 /* router2.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B23EA386147F5A43002B8C06 /* router2.cpp */; }; + B23EA40C147F5A43002B8C06 /* rpc4_plugin.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B23EA388147F5A43002B8C06 /* rpc4_plugin.cpp */; }; + B23EA40D147F5A43002B8C06 /* secure_handshake.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B23EA38A147F5A43002B8C06 /* secure_handshake.cpp */; }; + B23EA40E147F5A43002B8C06 /* send_to_thread.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B23EA38C147F5A43002B8C06 /* send_to_thread.cpp */; }; B23EA40F147F5A43002B8C06 /* SHA1.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B23EA38E147F5A43002B8C06 /* SHA1.cpp */; }; - B23EA410147F5A43002B8C06 /* SignaledEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B23EA390147F5A43002B8C06 /* SignaledEvent.cpp */; }; - B23EA411147F5A43002B8C06 /* SimpleMutex.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B23EA392147F5A43002B8C06 /* SimpleMutex.cpp */; }; - B23EA412147F5A43002B8C06 /* SocketLayer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B23EA398147F5A43002B8C06 /* SocketLayer.cpp */; }; - B23EA413147F5A43002B8C06 /* StringCompressor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B23EA39A147F5A43002B8C06 /* StringCompressor.cpp */; }; - B23EA414147F5A43002B8C06 /* StringTable.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B23EA39C147F5A43002B8C06 /* StringTable.cpp */; }; - B23EA415147F5A43002B8C06 /* SuperFastHash.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B23EA39E147F5A43002B8C06 /* SuperFastHash.cpp */; }; - B23EA416147F5A43002B8C06 /* TableSerializer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B23EA3A0147F5A43002B8C06 /* TableSerializer.cpp */; }; - B23EA417147F5A43002B8C06 /* TCPInterface.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B23EA3A2147F5A43002B8C06 /* TCPInterface.cpp */; }; - B23EA418147F5A43002B8C06 /* TeamBalancer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B23EA3A4147F5A43002B8C06 /* TeamBalancer.cpp */; }; - B23EA419147F5A43002B8C06 /* TelnetTransport.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B23EA3A6147F5A43002B8C06 /* TelnetTransport.cpp */; }; - B23EA41A147F5A43002B8C06 /* ThreadsafePacketLogger.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B23EA3A9147F5A43002B8C06 /* ThreadsafePacketLogger.cpp */; }; - B23EA41B147F5A43002B8C06 /* TwoWayAuthentication.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B23EA3AC147F5A43002B8C06 /* TwoWayAuthentication.cpp */; }; - B23EA41C147F5A43002B8C06 /* UDPForwarder.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B23EA3AE147F5A43002B8C06 /* UDPForwarder.cpp */; }; - B23EA41D147F5A43002B8C06 /* UDPProxyClient.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B23EA3B0147F5A43002B8C06 /* UDPProxyClient.cpp */; }; - B23EA41E147F5A43002B8C06 /* UDPProxyCoordinator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B23EA3B3147F5A43002B8C06 /* UDPProxyCoordinator.cpp */; }; - B23EA41F147F5A43002B8C06 /* UDPProxyServer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B23EA3B5147F5A43002B8C06 /* UDPProxyServer.cpp */; }; - B23EA420147F5A43002B8C06 /* VariableDeltaSerializer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B23EA3B7147F5A43002B8C06 /* VariableDeltaSerializer.cpp */; }; - B23EA421147F5A43002B8C06 /* VariableListDeltaTracker.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B23EA3B9147F5A43002B8C06 /* VariableListDeltaTracker.cpp */; }; - B23EA422147F5A43002B8C06 /* VariadicSQLParser.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B23EA3BB147F5A43002B8C06 /* VariadicSQLParser.cpp */; }; - B23EA424147F5A43002B8C06 /* WSAStartupSingleton.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B23EA3C0147F5A43002B8C06 /* WSAStartupSingleton.cpp */; }; + B23EA410147F5A43002B8C06 /* signaled_event.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B23EA390147F5A43002B8C06 /* signaled_event.cpp */; }; + B23EA411147F5A43002B8C06 /* simple_mutex.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B23EA392147F5A43002B8C06 /* simple_mutex.cpp */; }; + B23EA412147F5A43002B8C06 /* socket_layer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B23EA398147F5A43002B8C06 /* socket_layer.cpp */; }; + B23EA413147F5A43002B8C06 /* string_compressor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B23EA39A147F5A43002B8C06 /* string_compressor.cpp */; }; + B23EA414147F5A43002B8C06 /* string_table.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B23EA39C147F5A43002B8C06 /* string_table.cpp */; }; + B23EA415147F5A43002B8C06 /* super_fast_hash.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B23EA39E147F5A43002B8C06 /* super_fast_hash.cpp */; }; + B23EA416147F5A43002B8C06 /* table_serializer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B23EA3A0147F5A43002B8C06 /* table_serializer.cpp */; }; + B23EA417147F5A43002B8C06 /* tcp_interface.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B23EA3A2147F5A43002B8C06 /* tcp_interface.cpp */; }; + B23EA418147F5A43002B8C06 /* team_balancer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B23EA3A4147F5A43002B8C06 /* team_balancer.cpp */; }; + B23EA419147F5A43002B8C06 /* telnet_transport.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B23EA3A6147F5A43002B8C06 /* telnet_transport.cpp */; }; + B23EA41A147F5A43002B8C06 /* threadsafe_packet_logger.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B23EA3A9147F5A43002B8C06 /* threadsafe_packet_logger.cpp */; }; + B23EA41B147F5A43002B8C06 /* two_way_authentication.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B23EA3AC147F5A43002B8C06 /* two_way_authentication.cpp */; }; + B23EA41C147F5A43002B8C06 /* udp_forwarder.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B23EA3AE147F5A43002B8C06 /* udp_forwarder.cpp */; }; + B23EA41D147F5A43002B8C06 /* udp_proxy_client.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B23EA3B0147F5A43002B8C06 /* udp_proxy_client.cpp */; }; + B23EA41E147F5A43002B8C06 /* udp_proxy_coordinator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B23EA3B3147F5A43002B8C06 /* udp_proxy_coordinator.cpp */; }; + B23EA41F147F5A43002B8C06 /* udp_proxy_server.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B23EA3B5147F5A43002B8C06 /* udp_proxy_server.cpp */; }; + B23EA420147F5A43002B8C06 /* variable_delta_serializer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B23EA3B7147F5A43002B8C06 /* variable_delta_serializer.cpp */; }; + B23EA421147F5A43002B8C06 /* variable_list_delta_tracker.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B23EA3B9147F5A43002B8C06 /* variable_list_delta_tracker.cpp */; }; + B23EA422147F5A43002B8C06 /* variadic_sql_parser.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B23EA3BB147F5A43002B8C06 /* variadic_sql_parser.cpp */; }; + B23EA424147F5A43002B8C06 /* wsa_startup_singleton.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B23EA3C0147F5A43002B8C06 /* wsa_startup_singleton.cpp */; }; B24A1D60147EDC330029E45E /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B24A1D5F147EDC330029E45E /* UIKit.framework */; }; B24A1D62147EDC330029E45E /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B24A1D61147EDC330029E45E /* Foundation.framework */; }; B24A1D64147EDC330029E45E /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B24A1D63147EDC330029E45E /* CoreGraphics.framework */; }; @@ -117,247 +117,247 @@ /* End PBXBuildFile section */ /* Begin PBXFileReference section */ - B23EA2CE147F5A43002B8C06 /* _FindFirst.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = _FindFirst.cpp; path = ../../../Source/_FindFirst.cpp; sourceTree = ""; }; - B23EA2CF147F5A43002B8C06 /* _FindFirst.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = _FindFirst.h; path = ../../../Source/_FindFirst.h; sourceTree = ""; }; - B23EA2D0147F5A43002B8C06 /* AutopatcherPatchContext.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AutopatcherPatchContext.h; path = ../../../Source/AutopatcherPatchContext.h; sourceTree = ""; }; - B23EA2D1147F5A43002B8C06 /* AutopatcherRepositoryInterface.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AutopatcherRepositoryInterface.h; path = ../../../Source/AutopatcherRepositoryInterface.h; sourceTree = ""; }; - B23EA2D2147F5A43002B8C06 /* BitStream.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = BitStream.cpp; path = ../../../Source/BitStream.cpp; sourceTree = ""; }; - B23EA2D3147F5A43002B8C06 /* BitStream.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = BitStream.h; path = ../../../Source/BitStream.h; sourceTree = ""; }; - B23EA2D4147F5A43002B8C06 /* CCRakNetSlidingWindow.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CCRakNetSlidingWindow.cpp; path = ../../../Source/CCRakNetSlidingWindow.cpp; sourceTree = ""; }; - B23EA2D5147F5A43002B8C06 /* CCRakNetSlidingWindow.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CCRakNetSlidingWindow.h; path = ../../../Source/CCRakNetSlidingWindow.h; sourceTree = ""; }; - B23EA2D6147F5A43002B8C06 /* CCRakNetUDT.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CCRakNetUDT.cpp; path = ../../../Source/CCRakNetUDT.cpp; sourceTree = ""; }; - B23EA2D7147F5A43002B8C06 /* CCRakNetUDT.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CCRakNetUDT.h; path = ../../../Source/CCRakNetUDT.h; sourceTree = ""; }; - B23EA2D8147F5A43002B8C06 /* CheckSum.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CheckSum.cpp; path = ../../../Source/CheckSum.cpp; sourceTree = ""; }; - B23EA2D9147F5A43002B8C06 /* CheckSum.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CheckSum.h; path = ../../../Source/CheckSum.h; sourceTree = ""; }; - B23EA2DA147F5A43002B8C06 /* CloudClient.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CloudClient.cpp; path = ../../../Source/CloudClient.cpp; sourceTree = ""; }; - B23EA2DB147F5A43002B8C06 /* CloudClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CloudClient.h; path = ../../../Source/CloudClient.h; sourceTree = ""; }; - B23EA2DC147F5A43002B8C06 /* CloudCommon.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CloudCommon.cpp; path = ../../../Source/CloudCommon.cpp; sourceTree = ""; }; - B23EA2DD147F5A43002B8C06 /* CloudCommon.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CloudCommon.h; path = ../../../Source/CloudCommon.h; sourceTree = ""; }; - B23EA2DE147F5A43002B8C06 /* CloudServer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CloudServer.cpp; path = ../../../Source/CloudServer.cpp; sourceTree = ""; }; - B23EA2DF147F5A43002B8C06 /* CloudServer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CloudServer.h; path = ../../../Source/CloudServer.h; sourceTree = ""; }; + B23EA2CE147F5A43002B8C06 /* find_first.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = find_first.cpp; path = ../../../Source/find_first.cpp; sourceTree = ""; }; + B23EA2CF147F5A43002B8C06 /* find_first.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = find_first.h; path = ../../../Source/find_first.h; sourceTree = ""; }; + B23EA2D0147F5A43002B8C06 /* autopatcher_patch_context.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = autopatcher_patch_context.h; path = ../../../Source/autopatcher_patch_context.h; sourceTree = ""; }; + B23EA2D1147F5A43002B8C06 /* autopatcher_repository_interface.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = autopatcher_repository_interface.h; path = ../../../Source/autopatcher_repository_interface.h; sourceTree = ""; }; + B23EA2D2147F5A43002B8C06 /* bit_stream.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = bit_stream.cpp; path = ../../../Source/bit_stream.cpp; sourceTree = ""; }; + B23EA2D3147F5A43002B8C06 /* bit_stream.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = bit_stream.h; path = ../../../Source/bit_stream.h; sourceTree = ""; }; + B23EA2D4147F5A43002B8C06 /* cc_sliding_window.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = cc_sliding_window.cpp; path = ../../../Source/cc_sliding_window.cpp; sourceTree = ""; }; + B23EA2D5147F5A43002B8C06 /* cc_sliding_window.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = cc_sliding_window.h; path = ../../../Source/cc_sliding_window.h; sourceTree = ""; }; + B23EA2D6147F5A43002B8C06 /* cc_udt.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = cc_udt.cpp; path = ../../../Source/cc_udt.cpp; sourceTree = ""; }; + B23EA2D7147F5A43002B8C06 /* cc_udt.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = cc_udt.h; path = ../../../Source/cc_udt.h; sourceTree = ""; }; + B23EA2D8147F5A43002B8C06 /* check_sum.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = check_sum.cpp; path = ../../../Source/check_sum.cpp; sourceTree = ""; }; + B23EA2D9147F5A43002B8C06 /* check_sum.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = check_sum.h; path = ../../../Source/check_sum.h; sourceTree = ""; }; + B23EA2DA147F5A43002B8C06 /* cloud_client.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = cloud_client.cpp; path = ../../../Source/cloud_client.cpp; sourceTree = ""; }; + B23EA2DB147F5A43002B8C06 /* cloud_client.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = cloud_client.h; path = ../../../Source/cloud_client.h; sourceTree = ""; }; + B23EA2DC147F5A43002B8C06 /* cloud_common.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = cloud_common.cpp; path = ../../../Source/cloud_common.cpp; sourceTree = ""; }; + B23EA2DD147F5A43002B8C06 /* cloud_common.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = cloud_common.h; path = ../../../Source/cloud_common.h; sourceTree = ""; }; + B23EA2DE147F5A43002B8C06 /* cloud_server.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = cloud_server.cpp; path = ../../../Source/cloud_server.cpp; sourceTree = ""; }; + B23EA2DF147F5A43002B8C06 /* cloud_server.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = cloud_server.h; path = ../../../Source/cloud_server.h; sourceTree = ""; }; B23EA2E0147F5A43002B8C06 /* CMakeLists.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = CMakeLists.txt; path = ../../../Source/CMakeLists.txt; sourceTree = ""; }; - B23EA2E1147F5A43002B8C06 /* CommandParserInterface.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CommandParserInterface.cpp; path = ../../../Source/CommandParserInterface.cpp; sourceTree = ""; }; - B23EA2E2147F5A43002B8C06 /* CommandParserInterface.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CommandParserInterface.h; path = ../../../Source/CommandParserInterface.h; sourceTree = ""; }; - B23EA2E3147F5A43002B8C06 /* ConnectionGraph2.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ConnectionGraph2.cpp; path = ../../../Source/ConnectionGraph2.cpp; sourceTree = ""; }; - B23EA2E4147F5A43002B8C06 /* ConnectionGraph2.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ConnectionGraph2.h; path = ../../../Source/ConnectionGraph2.h; sourceTree = ""; }; - B23EA2E5147F5A43002B8C06 /* ConsoleServer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ConsoleServer.cpp; path = ../../../Source/ConsoleServer.cpp; sourceTree = ""; }; - B23EA2E6147F5A43002B8C06 /* ConsoleServer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ConsoleServer.h; path = ../../../Source/ConsoleServer.h; sourceTree = ""; }; - B23EA2E7147F5A43002B8C06 /* DataCompressor.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = DataCompressor.cpp; path = ../../../Source/DataCompressor.cpp; sourceTree = ""; }; - B23EA2E8147F5A43002B8C06 /* DataCompressor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DataCompressor.h; path = ../../../Source/DataCompressor.h; sourceTree = ""; }; - B23EA2E9147F5A43002B8C06 /* DirectoryDeltaTransfer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = DirectoryDeltaTransfer.cpp; path = ../../../Source/DirectoryDeltaTransfer.cpp; sourceTree = ""; }; - B23EA2EA147F5A43002B8C06 /* DirectoryDeltaTransfer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DirectoryDeltaTransfer.h; path = ../../../Source/DirectoryDeltaTransfer.h; sourceTree = ""; }; - B23EA2EB147F5A43002B8C06 /* DS_BinarySearchTree.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DS_BinarySearchTree.h; path = ../../../Source/DS_BinarySearchTree.h; sourceTree = ""; }; - B23EA2EC147F5A43002B8C06 /* DS_BPlusTree.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DS_BPlusTree.h; path = ../../../Source/DS_BPlusTree.h; sourceTree = ""; }; - B23EA2ED147F5A43002B8C06 /* DS_BytePool.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = DS_BytePool.cpp; path = ../../../Source/DS_BytePool.cpp; sourceTree = ""; }; - B23EA2EE147F5A43002B8C06 /* DS_BytePool.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DS_BytePool.h; path = ../../../Source/DS_BytePool.h; sourceTree = ""; }; - B23EA2EF147F5A43002B8C06 /* DS_ByteQueue.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = DS_ByteQueue.cpp; path = ../../../Source/DS_ByteQueue.cpp; sourceTree = ""; }; - B23EA2F0147F5A43002B8C06 /* DS_ByteQueue.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DS_ByteQueue.h; path = ../../../Source/DS_ByteQueue.h; sourceTree = ""; }; - B23EA2F1147F5A43002B8C06 /* DS_Hash.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DS_Hash.h; path = ../../../Source/DS_Hash.h; sourceTree = ""; }; - B23EA2F2147F5A43002B8C06 /* DS_Heap.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DS_Heap.h; path = ../../../Source/DS_Heap.h; sourceTree = ""; }; - B23EA2F3147F5A43002B8C06 /* DS_HuffmanEncodingTree.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = DS_HuffmanEncodingTree.cpp; path = ../../../Source/DS_HuffmanEncodingTree.cpp; sourceTree = ""; }; - B23EA2F4147F5A43002B8C06 /* DS_HuffmanEncodingTree.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DS_HuffmanEncodingTree.h; path = ../../../Source/DS_HuffmanEncodingTree.h; sourceTree = ""; }; - B23EA2F5147F5A43002B8C06 /* DS_HuffmanEncodingTreeFactory.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DS_HuffmanEncodingTreeFactory.h; path = ../../../Source/DS_HuffmanEncodingTreeFactory.h; sourceTree = ""; }; - B23EA2F6147F5A43002B8C06 /* DS_HuffmanEncodingTreeNode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DS_HuffmanEncodingTreeNode.h; path = ../../../Source/DS_HuffmanEncodingTreeNode.h; sourceTree = ""; }; - B23EA2F7147F5A43002B8C06 /* DS_LinkedList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DS_LinkedList.h; path = ../../../Source/DS_LinkedList.h; sourceTree = ""; }; - B23EA2F8147F5A43002B8C06 /* DS_List.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DS_List.h; path = ../../../Source/DS_List.h; sourceTree = ""; }; - B23EA2F9147F5A43002B8C06 /* DS_Map.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DS_Map.h; path = ../../../Source/DS_Map.h; sourceTree = ""; }; - B23EA2FA147F5A43002B8C06 /* DS_MemoryPool.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DS_MemoryPool.h; path = ../../../Source/DS_MemoryPool.h; sourceTree = ""; }; - B23EA2FB147F5A43002B8C06 /* DS_Multilist.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DS_Multilist.h; path = ../../../Source/DS_Multilist.h; sourceTree = ""; }; - B23EA2FC147F5A43002B8C06 /* DS_OrderedChannelHeap.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DS_OrderedChannelHeap.h; path = ../../../Source/DS_OrderedChannelHeap.h; sourceTree = ""; }; - B23EA2FD147F5A43002B8C06 /* DS_OrderedList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DS_OrderedList.h; path = ../../../Source/DS_OrderedList.h; sourceTree = ""; }; - B23EA2FE147F5A43002B8C06 /* DS_Queue.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DS_Queue.h; path = ../../../Source/DS_Queue.h; sourceTree = ""; }; - B23EA2FF147F5A43002B8C06 /* DS_QueueLinkedList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DS_QueueLinkedList.h; path = ../../../Source/DS_QueueLinkedList.h; sourceTree = ""; }; - B23EA300147F5A43002B8C06 /* DS_RangeList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DS_RangeList.h; path = ../../../Source/DS_RangeList.h; sourceTree = ""; }; - B23EA301147F5A43002B8C06 /* DS_Table.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = DS_Table.cpp; path = ../../../Source/DS_Table.cpp; sourceTree = ""; }; - B23EA302147F5A43002B8C06 /* DS_Table.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DS_Table.h; path = ../../../Source/DS_Table.h; sourceTree = ""; }; - B23EA303147F5A43002B8C06 /* DS_ThreadsafeAllocatingQueue.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DS_ThreadsafeAllocatingQueue.h; path = ../../../Source/DS_ThreadsafeAllocatingQueue.h; sourceTree = ""; }; - B23EA304147F5A43002B8C06 /* DS_Tree.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DS_Tree.h; path = ../../../Source/DS_Tree.h; sourceTree = ""; }; - B23EA305147F5A43002B8C06 /* DS_WeightedGraph.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DS_WeightedGraph.h; path = ../../../Source/DS_WeightedGraph.h; sourceTree = ""; }; - B23EA306147F5A43002B8C06 /* DynDNS.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = DynDNS.cpp; path = ../../../Source/DynDNS.cpp; sourceTree = ""; }; - B23EA307147F5A43002B8C06 /* DynDNS.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DynDNS.h; path = ../../../Source/DynDNS.h; sourceTree = ""; }; - B23EA308147F5A43002B8C06 /* EmailSender.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = EmailSender.cpp; path = ../../../Source/EmailSender.cpp; sourceTree = ""; }; - B23EA309147F5A43002B8C06 /* EmailSender.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = EmailSender.h; path = ../../../Source/EmailSender.h; sourceTree = ""; }; + B23EA2E1147F5A43002B8C06 /* command_parser_interface.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = command_parser_interface.cpp; path = ../../../Source/command_parser_interface.cpp; sourceTree = ""; }; + B23EA2E2147F5A43002B8C06 /* command_parser_interface.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = command_parser_interface.h; path = ../../../Source/command_parser_interface.h; sourceTree = ""; }; + B23EA2E3147F5A43002B8C06 /* connection_graph2.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = connection_graph2.cpp; path = ../../../Source/connection_graph2.cpp; sourceTree = ""; }; + B23EA2E4147F5A43002B8C06 /* connection_graph2.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = connection_graph2.h; path = ../../../Source/connection_graph2.h; sourceTree = ""; }; + B23EA2E5147F5A43002B8C06 /* console_server.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = console_server.cpp; path = ../../../Source/console_server.cpp; sourceTree = ""; }; + B23EA2E6147F5A43002B8C06 /* console_server.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = console_server.h; path = ../../../Source/console_server.h; sourceTree = ""; }; + B23EA2E7147F5A43002B8C06 /* data_compressor.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = data_compressor.cpp; path = ../../../Source/data_compressor.cpp; sourceTree = ""; }; + B23EA2E8147F5A43002B8C06 /* data_compressor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = data_compressor.h; path = ../../../Source/data_compressor.h; sourceTree = ""; }; + B23EA2E9147F5A43002B8C06 /* directory_delta_transfer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = directory_delta_transfer.cpp; path = ../../../Source/directory_delta_transfer.cpp; sourceTree = ""; }; + B23EA2EA147F5A43002B8C06 /* directory_delta_transfer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = directory_delta_transfer.h; path = ../../../Source/directory_delta_transfer.h; sourceTree = ""; }; + B23EA2EB147F5A43002B8C06 /* ds_binary_search_tree.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ds_binary_search_tree.h; path = ../../../Source/ds_binary_search_tree.h; sourceTree = ""; }; + B23EA2EC147F5A43002B8C06 /* ds_bplus_tree.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ds_bplus_tree.h; path = ../../../Source/ds_bplus_tree.h; sourceTree = ""; }; + B23EA2ED147F5A43002B8C06 /* ds_byte_pool.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ds_byte_pool.cpp; path = ../../../Source/ds_byte_pool.cpp; sourceTree = ""; }; + B23EA2EE147F5A43002B8C06 /* ds_byte_pool.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ds_byte_pool.h; path = ../../../Source/ds_byte_pool.h; sourceTree = ""; }; + B23EA2EF147F5A43002B8C06 /* ds_byte_queue.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ds_byte_queue.cpp; path = ../../../Source/ds_byte_queue.cpp; sourceTree = ""; }; + B23EA2F0147F5A43002B8C06 /* ds_byte_queue.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ds_byte_queue.h; path = ../../../Source/ds_byte_queue.h; sourceTree = ""; }; + B23EA2F1147F5A43002B8C06 /* ds_hash.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ds_hash.h; path = ../../../Source/ds_hash.h; sourceTree = ""; }; + B23EA2F2147F5A43002B8C06 /* ds_heap.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ds_heap.h; path = ../../../Source/ds_heap.h; sourceTree = ""; }; + B23EA2F3147F5A43002B8C06 /* ds_huffman_encoding_tree.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ds_huffman_encoding_tree.cpp; path = ../../../Source/ds_huffman_encoding_tree.cpp; sourceTree = ""; }; + B23EA2F4147F5A43002B8C06 /* ds_huffman_encoding_tree.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ds_huffman_encoding_tree.h; path = ../../../Source/ds_huffman_encoding_tree.h; sourceTree = ""; }; + B23EA2F5147F5A43002B8C06 /* ds_huffman_encoding_tree_factory.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ds_huffman_encoding_tree_factory.h; path = ../../../Source/ds_huffman_encoding_tree_factory.h; sourceTree = ""; }; + B23EA2F6147F5A43002B8C06 /* ds_huffman_encoding_tree_node.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ds_huffman_encoding_tree_node.h; path = ../../../Source/ds_huffman_encoding_tree_node.h; sourceTree = ""; }; + B23EA2F7147F5A43002B8C06 /* ds_linked_list.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ds_linked_list.h; path = ../../../Source/ds_linked_list.h; sourceTree = ""; }; + B23EA2F8147F5A43002B8C06 /* ds_list.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ds_list.h; path = ../../../Source/ds_list.h; sourceTree = ""; }; + B23EA2F9147F5A43002B8C06 /* ds_map.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ds_map.h; path = ../../../Source/ds_map.h; sourceTree = ""; }; + B23EA2FA147F5A43002B8C06 /* ds_memory_pool.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ds_memory_pool.h; path = ../../../Source/ds_memory_pool.h; sourceTree = ""; }; + B23EA2FB147F5A43002B8C06 /* ds_multilist.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ds_multilist.h; path = ../../../Source/ds_multilist.h; sourceTree = ""; }; + B23EA2FC147F5A43002B8C06 /* ds_ordered_channel_heap.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ds_ordered_channel_heap.h; path = ../../../Source/ds_ordered_channel_heap.h; sourceTree = ""; }; + B23EA2FD147F5A43002B8C06 /* ds_ordered_list.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ds_ordered_list.h; path = ../../../Source/ds_ordered_list.h; sourceTree = ""; }; + B23EA2FE147F5A43002B8C06 /* ds_queue.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ds_queue.h; path = ../../../Source/ds_queue.h; sourceTree = ""; }; + B23EA2FF147F5A43002B8C06 /* ds_queue_linked_list.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ds_queue_linked_list.h; path = ../../../Source/ds_queue_linked_list.h; sourceTree = ""; }; + B23EA300147F5A43002B8C06 /* ds_range_list.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ds_range_list.h; path = ../../../Source/ds_range_list.h; sourceTree = ""; }; + B23EA301147F5A43002B8C06 /* ds_table.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ds_table.cpp; path = ../../../Source/ds_table.cpp; sourceTree = ""; }; + B23EA302147F5A43002B8C06 /* ds_table.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ds_table.h; path = ../../../Source/ds_table.h; sourceTree = ""; }; + B23EA303147F5A43002B8C06 /* ds_threadsafe_allocating_queue.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ds_threadsafe_allocating_queue.h; path = ../../../Source/ds_threadsafe_allocating_queue.h; sourceTree = ""; }; + B23EA304147F5A43002B8C06 /* ds_tree.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ds_tree.h; path = ../../../Source/ds_tree.h; sourceTree = ""; }; + B23EA305147F5A43002B8C06 /* ds_weighted_graph.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ds_weighted_graph.h; path = ../../../Source/ds_weighted_graph.h; sourceTree = ""; }; + B23EA306147F5A43002B8C06 /* dyn_dns.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = dyn_dns.cpp; path = ../../../Source/dyn_dns.cpp; sourceTree = ""; }; + B23EA307147F5A43002B8C06 /* dyn_dns.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = dyn_dns.h; path = ../../../Source/dyn_dns.h; sourceTree = ""; }; + B23EA308147F5A43002B8C06 /* email_sender.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = email_sender.cpp; path = ../../../Source/email_sender.cpp; sourceTree = ""; }; + B23EA309147F5A43002B8C06 /* email_sender.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = email_sender.h; path = ../../../Source/email_sender.h; sourceTree = ""; }; B23EA30A147F5A43002B8C06 /* EncodeClassName.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = EncodeClassName.cpp; path = ../../../Source/EncodeClassName.cpp; sourceTree = ""; }; - B23EA30B147F5A43002B8C06 /* EpochTimeToString.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = EpochTimeToString.cpp; path = ../../../Source/EpochTimeToString.cpp; sourceTree = ""; }; - B23EA30C147F5A43002B8C06 /* EpochTimeToString.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = EpochTimeToString.h; path = ../../../Source/EpochTimeToString.h; sourceTree = ""; }; - B23EA30D147F5A43002B8C06 /* Export.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Export.h; path = ../../../Source/Export.h; sourceTree = ""; }; - B23EA30E147F5A43002B8C06 /* FileList.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = FileList.cpp; path = ../../../Source/FileList.cpp; sourceTree = ""; }; - B23EA30F147F5A43002B8C06 /* FileList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = FileList.h; path = ../../../Source/FileList.h; sourceTree = ""; }; - B23EA310147F5A43002B8C06 /* FileListNodeContext.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = FileListNodeContext.h; path = ../../../Source/FileListNodeContext.h; sourceTree = ""; }; - B23EA311147F5A43002B8C06 /* FileListTransfer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = FileListTransfer.cpp; path = ../../../Source/FileListTransfer.cpp; sourceTree = ""; }; - B23EA312147F5A43002B8C06 /* FileListTransfer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = FileListTransfer.h; path = ../../../Source/FileListTransfer.h; sourceTree = ""; }; - B23EA313147F5A43002B8C06 /* FileListTransferCBInterface.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = FileListTransferCBInterface.h; path = ../../../Source/FileListTransferCBInterface.h; sourceTree = ""; }; - B23EA314147F5A43002B8C06 /* FileOperations.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = FileOperations.cpp; path = ../../../Source/FileOperations.cpp; sourceTree = ""; }; - B23EA315147F5A43002B8C06 /* FileOperations.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = FileOperations.h; path = ../../../Source/FileOperations.h; sourceTree = ""; }; - B23EA316147F5A43002B8C06 /* FormatString.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = FormatString.cpp; path = ../../../Source/FormatString.cpp; sourceTree = ""; }; - B23EA317147F5A43002B8C06 /* FormatString.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = FormatString.h; path = ../../../Source/FormatString.h; sourceTree = ""; }; - B23EA318147F5A43002B8C06 /* FullyConnectedMesh2.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = FullyConnectedMesh2.cpp; path = ../../../Source/FullyConnectedMesh2.cpp; sourceTree = ""; }; - B23EA319147F5A43002B8C06 /* FullyConnectedMesh2.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = FullyConnectedMesh2.h; path = ../../../Source/FullyConnectedMesh2.h; sourceTree = ""; }; - B23EA31A147F5A43002B8C06 /* Getche.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Getche.cpp; path = ../../../Source/Getche.cpp; sourceTree = ""; }; - B23EA31B147F5A43002B8C06 /* Getche.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Getche.h; path = ../../../Source/Getche.h; sourceTree = ""; }; - B23EA31C147F5A43002B8C06 /* Gets.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Gets.cpp; path = ../../../Source/Gets.cpp; sourceTree = ""; }; - B23EA31D147F5A43002B8C06 /* Gets.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Gets.h; path = ../../../Source/Gets.h; sourceTree = ""; }; - B23EA31E147F5A43002B8C06 /* GetTime.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = GetTime.cpp; path = ../../../Source/GetTime.cpp; sourceTree = ""; }; - B23EA31F147F5A43002B8C06 /* GetTime.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = GetTime.h; path = ../../../Source/GetTime.h; sourceTree = ""; }; - B23EA320147F5A43002B8C06 /* GetTimeOfDay.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = GetTimeOfDay.cpp; path = ../../../Source/GetTimeOfDay.cpp; sourceTree = ""; }; + B23EA30B147F5A43002B8C06 /* epoch_time_to_string.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = epoch_time_to_string.cpp; path = ../../../Source/epoch_time_to_string.cpp; sourceTree = ""; }; + B23EA30C147F5A43002B8C06 /* epoch_time_to_string.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = epoch_time_to_string.h; path = ../../../Source/epoch_time_to_string.h; sourceTree = ""; }; + B23EA30D147F5A43002B8C06 /* export.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = export.h; path = ../../../Source/export.h; sourceTree = ""; }; + B23EA30E147F5A43002B8C06 /* file_list.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = file_list.cpp; path = ../../../Source/file_list.cpp; sourceTree = ""; }; + B23EA30F147F5A43002B8C06 /* file_list.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = file_list.h; path = ../../../Source/file_list.h; sourceTree = ""; }; + B23EA310147F5A43002B8C06 /* file_list_node_context.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = file_list_node_context.h; path = ../../../Source/file_list_node_context.h; sourceTree = ""; }; + B23EA311147F5A43002B8C06 /* file_list_transfer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = file_list_transfer.cpp; path = ../../../Source/file_list_transfer.cpp; sourceTree = ""; }; + B23EA312147F5A43002B8C06 /* file_list_transfer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = file_list_transfer.h; path = ../../../Source/file_list_transfer.h; sourceTree = ""; }; + B23EA313147F5A43002B8C06 /* file_list_transfer_cb_interface.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = file_list_transfer_cb_interface.h; path = ../../../Source/file_list_transfer_cb_interface.h; sourceTree = ""; }; + B23EA314147F5A43002B8C06 /* file_operations.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = file_operations.cpp; path = ../../../Source/file_operations.cpp; sourceTree = ""; }; + B23EA315147F5A43002B8C06 /* file_operations.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = file_operations.h; path = ../../../Source/file_operations.h; sourceTree = ""; }; + B23EA316147F5A43002B8C06 /* format_string.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = format_string.cpp; path = ../../../Source/format_string.cpp; sourceTree = ""; }; + B23EA317147F5A43002B8C06 /* format_string.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = format_string.h; path = ../../../Source/format_string.h; sourceTree = ""; }; + B23EA318147F5A43002B8C06 /* fully_connected_mesh2.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = fully_connected_mesh2.cpp; path = ../../../Source/fully_connected_mesh2.cpp; sourceTree = ""; }; + B23EA319147F5A43002B8C06 /* fully_connected_mesh2.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = fully_connected_mesh2.h; path = ../../../Source/fully_connected_mesh2.h; sourceTree = ""; }; + B23EA31A147F5A43002B8C06 /* getche.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = getche.cpp; path = ../../../Source/getche.cpp; sourceTree = ""; }; + B23EA31B147F5A43002B8C06 /* getche.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = getche.h; path = ../../../Source/getche.h; sourceTree = ""; }; + B23EA31C147F5A43002B8C06 /* gets.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = gets.cpp; path = ../../../Source/gets.cpp; sourceTree = ""; }; + B23EA31D147F5A43002B8C06 /* gets.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = gets.h; path = ../../../Source/gets.h; sourceTree = ""; }; + B23EA31E147F5A43002B8C06 /* get_time.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = get_time.cpp; path = ../../../Source/get_time.cpp; sourceTree = ""; }; + B23EA31F147F5A43002B8C06 /* get_time.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = get_time.h; path = ../../../Source/get_time.h; sourceTree = ""; }; + B23EA320147F5A43002B8C06 /* get_time_of_day.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = get_time_of_day.cpp; path = ../../../Source/get_time_of_day.cpp; sourceTree = ""; }; B23EA321147F5A43002B8C06 /* gettimeofday.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = gettimeofday.h; path = ../../../Source/gettimeofday.h; sourceTree = ""; }; - B23EA322147F5A43002B8C06 /* GridSectorizer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = GridSectorizer.cpp; path = ../../../Source/GridSectorizer.cpp; sourceTree = ""; }; - B23EA323147F5A43002B8C06 /* GridSectorizer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = GridSectorizer.h; path = ../../../Source/GridSectorizer.h; sourceTree = ""; }; - B23EA324147F5A43002B8C06 /* HTTPConnection.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = HTTPConnection.cpp; path = ../../../Source/HTTPConnection.cpp; sourceTree = ""; }; - B23EA325147F5A43002B8C06 /* HTTPConnection.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = HTTPConnection.h; path = ../../../Source/HTTPConnection.h; sourceTree = ""; }; - B23EA326147F5A43002B8C06 /* IncrementalReadInterface.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = IncrementalReadInterface.cpp; path = ../../../Source/IncrementalReadInterface.cpp; sourceTree = ""; }; - B23EA327147F5A43002B8C06 /* IncrementalReadInterface.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = IncrementalReadInterface.h; path = ../../../Source/IncrementalReadInterface.h; sourceTree = ""; }; - B23EA328147F5A43002B8C06 /* InternalPacket.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = InternalPacket.h; path = ../../../Source/InternalPacket.h; sourceTree = ""; }; - B23EA329147F5A43002B8C06 /* Itoa.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Itoa.cpp; path = ../../../Source/Itoa.cpp; sourceTree = ""; }; - B23EA32A147F5A43002B8C06 /* Itoa.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Itoa.h; path = ../../../Source/Itoa.h; sourceTree = ""; }; - B23EA32B147F5A43002B8C06 /* Kbhit.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Kbhit.h; path = ../../../Source/Kbhit.h; sourceTree = ""; }; - B23EA32C147F5A43002B8C06 /* LinuxStrings.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LinuxStrings.cpp; path = ../../../Source/LinuxStrings.cpp; sourceTree = ""; }; - B23EA32D147F5A43002B8C06 /* LinuxStrings.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = LinuxStrings.h; path = ../../../Source/LinuxStrings.h; sourceTree = ""; }; - B23EA32E147F5A43002B8C06 /* LocklessTypes.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LocklessTypes.cpp; path = ../../../Source/LocklessTypes.cpp; sourceTree = ""; }; - B23EA32F147F5A43002B8C06 /* LocklessTypes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = LocklessTypes.h; path = ../../../Source/LocklessTypes.h; sourceTree = ""; }; - B23EA330147F5A43002B8C06 /* LogCommandParser.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LogCommandParser.cpp; path = ../../../Source/LogCommandParser.cpp; sourceTree = ""; }; - B23EA331147F5A43002B8C06 /* LogCommandParser.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = LogCommandParser.h; path = ../../../Source/LogCommandParser.h; sourceTree = ""; }; - B23EA332147F5A43002B8C06 /* MessageFilter.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = MessageFilter.cpp; path = ../../../Source/MessageFilter.cpp; sourceTree = ""; }; - B23EA333147F5A43002B8C06 /* MessageFilter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MessageFilter.h; path = ../../../Source/MessageFilter.h; sourceTree = ""; }; - B23EA334147F5A43002B8C06 /* MessageIdentifiers.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MessageIdentifiers.h; path = ../../../Source/MessageIdentifiers.h; sourceTree = ""; }; - B23EA335147F5A43002B8C06 /* MTUSize.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MTUSize.h; path = ../../../Source/MTUSize.h; sourceTree = ""; }; - B23EA336147F5A43002B8C06 /* NativeFeatureIncludes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = NativeFeatureIncludes.h; path = ../../../Source/NativeFeatureIncludes.h; sourceTree = ""; }; - B23EA337147F5A43002B8C06 /* NativeFeatureIncludesOverrides.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = NativeFeatureIncludesOverrides.h; path = ../../../Source/NativeFeatureIncludesOverrides.h; sourceTree = ""; }; - B23EA338147F5A43002B8C06 /* NativeTypes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = NativeTypes.h; path = ../../../Source/NativeTypes.h; sourceTree = ""; }; - B23EA339147F5A43002B8C06 /* NatPunchthroughClient.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = NatPunchthroughClient.cpp; path = ../../../Source/NatPunchthroughClient.cpp; sourceTree = ""; }; - B23EA33A147F5A43002B8C06 /* NatPunchthroughClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = NatPunchthroughClient.h; path = ../../../Source/NatPunchthroughClient.h; sourceTree = ""; }; - B23EA33B147F5A43002B8C06 /* NatPunchthroughServer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = NatPunchthroughServer.cpp; path = ../../../Source/NatPunchthroughServer.cpp; sourceTree = ""; }; - B23EA33C147F5A43002B8C06 /* NatPunchthroughServer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = NatPunchthroughServer.h; path = ../../../Source/NatPunchthroughServer.h; sourceTree = ""; }; - B23EA33D147F5A43002B8C06 /* NatTypeDetectionClient.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = NatTypeDetectionClient.cpp; path = ../../../Source/NatTypeDetectionClient.cpp; sourceTree = ""; }; - B23EA33E147F5A43002B8C06 /* NatTypeDetectionClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = NatTypeDetectionClient.h; path = ../../../Source/NatTypeDetectionClient.h; sourceTree = ""; }; - B23EA33F147F5A43002B8C06 /* NatTypeDetectionCommon.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = NatTypeDetectionCommon.cpp; path = ../../../Source/NatTypeDetectionCommon.cpp; sourceTree = ""; }; - B23EA340147F5A43002B8C06 /* NatTypeDetectionCommon.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = NatTypeDetectionCommon.h; path = ../../../Source/NatTypeDetectionCommon.h; sourceTree = ""; }; - B23EA341147F5A43002B8C06 /* NatTypeDetectionServer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = NatTypeDetectionServer.cpp; path = ../../../Source/NatTypeDetectionServer.cpp; sourceTree = ""; }; - B23EA342147F5A43002B8C06 /* NatTypeDetectionServer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = NatTypeDetectionServer.h; path = ../../../Source/NatTypeDetectionServer.h; sourceTree = ""; }; - B23EA343147F5A43002B8C06 /* NetworkIDManager.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = NetworkIDManager.cpp; path = ../../../Source/NetworkIDManager.cpp; sourceTree = ""; }; - B23EA344147F5A43002B8C06 /* NetworkIDManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = NetworkIDManager.h; path = ../../../Source/NetworkIDManager.h; sourceTree = ""; }; - B23EA345147F5A43002B8C06 /* NetworkIDObject.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = NetworkIDObject.cpp; path = ../../../Source/NetworkIDObject.cpp; sourceTree = ""; }; - B23EA346147F5A43002B8C06 /* NetworkIDObject.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = NetworkIDObject.h; path = ../../../Source/NetworkIDObject.h; sourceTree = ""; }; - B23EA347147F5A43002B8C06 /* PacketConsoleLogger.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = PacketConsoleLogger.cpp; path = ../../../Source/PacketConsoleLogger.cpp; sourceTree = ""; }; - B23EA348147F5A43002B8C06 /* PacketConsoleLogger.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PacketConsoleLogger.h; path = ../../../Source/PacketConsoleLogger.h; sourceTree = ""; }; - B23EA349147F5A43002B8C06 /* PacketFileLogger.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = PacketFileLogger.cpp; path = ../../../Source/PacketFileLogger.cpp; sourceTree = ""; }; - B23EA34A147F5A43002B8C06 /* PacketFileLogger.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PacketFileLogger.h; path = ../../../Source/PacketFileLogger.h; sourceTree = ""; }; - B23EA34B147F5A43002B8C06 /* PacketizedTCP.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = PacketizedTCP.cpp; path = ../../../Source/PacketizedTCP.cpp; sourceTree = ""; }; - B23EA34C147F5A43002B8C06 /* PacketizedTCP.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PacketizedTCP.h; path = ../../../Source/PacketizedTCP.h; sourceTree = ""; }; - B23EA34D147F5A43002B8C06 /* PacketLogger.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = PacketLogger.cpp; path = ../../../Source/PacketLogger.cpp; sourceTree = ""; }; - B23EA34E147F5A43002B8C06 /* PacketLogger.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PacketLogger.h; path = ../../../Source/PacketLogger.h; sourceTree = ""; }; - B23EA34F147F5A43002B8C06 /* PacketOutputWindowLogger.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = PacketOutputWindowLogger.cpp; path = ../../../Source/PacketOutputWindowLogger.cpp; sourceTree = ""; }; - B23EA350147F5A43002B8C06 /* PacketOutputWindowLogger.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PacketOutputWindowLogger.h; path = ../../../Source/PacketOutputWindowLogger.h; sourceTree = ""; }; - B23EA351147F5A43002B8C06 /* PacketPool.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PacketPool.h; path = ../../../Source/PacketPool.h; sourceTree = ""; }; - B23EA352147F5A43002B8C06 /* PacketPriority.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PacketPriority.h; path = ../../../Source/PacketPriority.h; sourceTree = ""; }; - B23EA353147F5A43002B8C06 /* PluginInterface2.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = PluginInterface2.cpp; path = ../../../Source/PluginInterface2.cpp; sourceTree = ""; }; - B23EA354147F5A43002B8C06 /* PluginInterface2.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PluginInterface2.h; path = ../../../Source/PluginInterface2.h; sourceTree = ""; }; - B23EA356147F5A43002B8C06 /* Rackspace.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Rackspace.cpp; path = ../../../Source/Rackspace.cpp; sourceTree = ""; }; - B23EA357147F5A43002B8C06 /* Rackspace.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Rackspace.h; path = ../../../Source/Rackspace.h; sourceTree = ""; }; + B23EA322147F5A43002B8C06 /* grid_sectorizer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = grid_sectorizer.cpp; path = ../../../Source/grid_sectorizer.cpp; sourceTree = ""; }; + B23EA323147F5A43002B8C06 /* grid_sectorizer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = grid_sectorizer.h; path = ../../../Source/grid_sectorizer.h; sourceTree = ""; }; + B23EA324147F5A43002B8C06 /* http_connection.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = http_connection.cpp; path = ../../../Source/http_connection.cpp; sourceTree = ""; }; + B23EA325147F5A43002B8C06 /* http_connection.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = http_connection.h; path = ../../../Source/http_connection.h; sourceTree = ""; }; + B23EA326147F5A43002B8C06 /* incremental_read_interface.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = incremental_read_interface.cpp; path = ../../../Source/incremental_read_interface.cpp; sourceTree = ""; }; + B23EA327147F5A43002B8C06 /* incremental_read_interface.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = incremental_read_interface.h; path = ../../../Source/incremental_read_interface.h; sourceTree = ""; }; + B23EA328147F5A43002B8C06 /* internal_packet.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = internal_packet.h; path = ../../../Source/internal_packet.h; sourceTree = ""; }; + B23EA329147F5A43002B8C06 /* itoa.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = itoa.cpp; path = ../../../Source/itoa.cpp; sourceTree = ""; }; + B23EA32A147F5A43002B8C06 /* itoa.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = itoa.h; path = ../../../Source/itoa.h; sourceTree = ""; }; + B23EA32B147F5A43002B8C06 /* kbhit.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = kbhit.h; path = ../../../Source/kbhit.h; sourceTree = ""; }; + B23EA32C147F5A43002B8C06 /* linux_strings.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = linux_strings.cpp; path = ../../../Source/linux_strings.cpp; sourceTree = ""; }; + B23EA32D147F5A43002B8C06 /* linux_strings.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = linux_strings.h; path = ../../../Source/linux_strings.h; sourceTree = ""; }; + B23EA32E147F5A43002B8C06 /* lockless_types.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = lockless_types.cpp; path = ../../../Source/lockless_types.cpp; sourceTree = ""; }; + B23EA32F147F5A43002B8C06 /* lockless_types.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = lockless_types.h; path = ../../../Source/lockless_types.h; sourceTree = ""; }; + B23EA330147F5A43002B8C06 /* log_command_parser.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = log_command_parser.cpp; path = ../../../Source/log_command_parser.cpp; sourceTree = ""; }; + B23EA331147F5A43002B8C06 /* log_command_parser.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = log_command_parser.h; path = ../../../Source/log_command_parser.h; sourceTree = ""; }; + B23EA332147F5A43002B8C06 /* message_filter.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = message_filter.cpp; path = ../../../Source/message_filter.cpp; sourceTree = ""; }; + B23EA333147F5A43002B8C06 /* message_filter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = message_filter.h; path = ../../../Source/message_filter.h; sourceTree = ""; }; + B23EA334147F5A43002B8C06 /* message_identifiers.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = message_identifiers.h; path = ../../../Source/message_identifiers.h; sourceTree = ""; }; + B23EA335147F5A43002B8C06 /* mtu_size.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = mtu_size.h; path = ../../../Source/mtu_size.h; sourceTree = ""; }; + B23EA336147F5A43002B8C06 /* native_feature_includes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = native_feature_includes.h; path = ../../../Source/native_feature_includes.h; sourceTree = ""; }; + B23EA337147F5A43002B8C06 /* native_feature_includes_overrides.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = native_feature_includes_overrides.h; path = ../../../Source/native_feature_includes_overrides.h; sourceTree = ""; }; + B23EA338147F5A43002B8C06 /* native_types.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = native_types.h; path = ../../../Source/native_types.h; sourceTree = ""; }; + B23EA339147F5A43002B8C06 /* nat_punchthrough_client.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = nat_punchthrough_client.cpp; path = ../../../Source/nat_punchthrough_client.cpp; sourceTree = ""; }; + B23EA33A147F5A43002B8C06 /* nat_punchthrough_client.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = nat_punchthrough_client.h; path = ../../../Source/nat_punchthrough_client.h; sourceTree = ""; }; + B23EA33B147F5A43002B8C06 /* nat_punchthrough_server.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = nat_punchthrough_server.cpp; path = ../../../Source/nat_punchthrough_server.cpp; sourceTree = ""; }; + B23EA33C147F5A43002B8C06 /* nat_punchthrough_server.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = nat_punchthrough_server.h; path = ../../../Source/nat_punchthrough_server.h; sourceTree = ""; }; + B23EA33D147F5A43002B8C06 /* nat_type_detection_client.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = nat_type_detection_client.cpp; path = ../../../Source/nat_type_detection_client.cpp; sourceTree = ""; }; + B23EA33E147F5A43002B8C06 /* nat_type_detection_client.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = nat_type_detection_client.h; path = ../../../Source/nat_type_detection_client.h; sourceTree = ""; }; + B23EA33F147F5A43002B8C06 /* nat_type_detection_common.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = nat_type_detection_common.cpp; path = ../../../Source/nat_type_detection_common.cpp; sourceTree = ""; }; + B23EA340147F5A43002B8C06 /* nat_type_detection_common.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = nat_type_detection_common.h; path = ../../../Source/nat_type_detection_common.h; sourceTree = ""; }; + B23EA341147F5A43002B8C06 /* nat_type_detection_server.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = nat_type_detection_server.cpp; path = ../../../Source/nat_type_detection_server.cpp; sourceTree = ""; }; + B23EA342147F5A43002B8C06 /* nat_type_detection_server.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = nat_type_detection_server.h; path = ../../../Source/nat_type_detection_server.h; sourceTree = ""; }; + B23EA343147F5A43002B8C06 /* network_id_manager.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = network_id_manager.cpp; path = ../../../Source/network_id_manager.cpp; sourceTree = ""; }; + B23EA344147F5A43002B8C06 /* network_id_manager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = network_id_manager.h; path = ../../../Source/network_id_manager.h; sourceTree = ""; }; + B23EA345147F5A43002B8C06 /* network_id_object.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = network_id_object.cpp; path = ../../../Source/network_id_object.cpp; sourceTree = ""; }; + B23EA346147F5A43002B8C06 /* network_id_object.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = network_id_object.h; path = ../../../Source/network_id_object.h; sourceTree = ""; }; + B23EA347147F5A43002B8C06 /* packet_console_logger.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = packet_console_logger.cpp; path = ../../../Source/packet_console_logger.cpp; sourceTree = ""; }; + B23EA348147F5A43002B8C06 /* packet_console_logger.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = packet_console_logger.h; path = ../../../Source/packet_console_logger.h; sourceTree = ""; }; + B23EA349147F5A43002B8C06 /* packet_file_logger.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = packet_file_logger.cpp; path = ../../../Source/packet_file_logger.cpp; sourceTree = ""; }; + B23EA34A147F5A43002B8C06 /* packet_file_logger.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = packet_file_logger.h; path = ../../../Source/packet_file_logger.h; sourceTree = ""; }; + B23EA34B147F5A43002B8C06 /* packetized_tcp.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = packetized_tcp.cpp; path = ../../../Source/packetized_tcp.cpp; sourceTree = ""; }; + B23EA34C147F5A43002B8C06 /* packetized_tcp.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = packetized_tcp.h; path = ../../../Source/packetized_tcp.h; sourceTree = ""; }; + B23EA34D147F5A43002B8C06 /* packet_logger.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = packet_logger.cpp; path = ../../../Source/packet_logger.cpp; sourceTree = ""; }; + B23EA34E147F5A43002B8C06 /* packet_logger.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = packet_logger.h; path = ../../../Source/packet_logger.h; sourceTree = ""; }; + B23EA34F147F5A43002B8C06 /* packet_output_window_logger.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = packet_output_window_logger.cpp; path = ../../../Source/packet_output_window_logger.cpp; sourceTree = ""; }; + B23EA350147F5A43002B8C06 /* packet_output_window_logger.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = packet_output_window_logger.h; path = ../../../Source/packet_output_window_logger.h; sourceTree = ""; }; + B23EA351147F5A43002B8C06 /* packet_pool.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = packet_pool.h; path = ../../../Source/packet_pool.h; sourceTree = ""; }; + B23EA352147F5A43002B8C06 /* packet_priority.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = packet_priority.h; path = ../../../Source/packet_priority.h; sourceTree = ""; }; + B23EA353147F5A43002B8C06 /* plugin_interface2.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = plugin_interface2.cpp; path = ../../../Source/plugin_interface2.cpp; sourceTree = ""; }; + B23EA354147F5A43002B8C06 /* plugin_interface2.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = plugin_interface2.h; path = ../../../Source/plugin_interface2.h; sourceTree = ""; }; + B23EA356147F5A43002B8C06 /* rackspace.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = rackspace.cpp; path = ../../../Source/rackspace.cpp; sourceTree = ""; }; + B23EA357147F5A43002B8C06 /* rackspace.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = rackspace.h; path = ../../../Source/rackspace.h; sourceTree = ""; }; B23EA358147F5A43002B8C06 /* RakAlloca.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RakAlloca.h; path = ../../../Source/RakAlloca.h; sourceTree = ""; }; B23EA359147F5A43002B8C06 /* RakAssert.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RakAssert.h; path = ../../../Source/RakAssert.h; sourceTree = ""; }; - B23EA35A147F5A43002B8C06 /* RakMemoryOverride.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = RakMemoryOverride.cpp; path = ../../../Source/RakMemoryOverride.cpp; sourceTree = ""; }; + B23EA35A147F5A43002B8C06 /* memory_override.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = memory_override.cpp; path = ../../../Source/memory_override.cpp; sourceTree = ""; }; B23EA35B147F5A43002B8C06 /* RakMemoryOverride.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RakMemoryOverride.h; path = ../../../Source/RakMemoryOverride.h; sourceTree = ""; }; B23EA35C147F5A43002B8C06 /* RakNet_vc8.vcproj */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; name = RakNet_vc8.vcproj; path = ../../../Source/RakNet_vc8.vcproj; sourceTree = ""; }; B23EA35D147F5A43002B8C06 /* RakNet_vc9.vcproj */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; name = RakNet_vc9.vcproj; path = ../../../Source/RakNet_vc9.vcproj; sourceTree = ""; }; B23EA35E147F5A43002B8C06 /* RakNet.vcproj */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; name = RakNet.vcproj; path = ../../../Source/RakNet.vcproj; sourceTree = ""; }; - B23EA35F147F5A43002B8C06 /* RakNetCommandParser.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = RakNetCommandParser.cpp; path = ../../../Source/RakNetCommandParser.cpp; sourceTree = ""; }; + B23EA35F147F5A43002B8C06 /* command_parser.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = command_parser.cpp; path = ../../../Source/command_parser.cpp; sourceTree = ""; }; B23EA360147F5A43002B8C06 /* RakNetCommandParser.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RakNetCommandParser.h; path = ../../../Source/RakNetCommandParser.h; sourceTree = ""; }; B23EA361147F5A43002B8C06 /* RakNetDefines.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RakNetDefines.h; path = ../../../Source/RakNetDefines.h; sourceTree = ""; }; B23EA362147F5A43002B8C06 /* RakNetDefinesOverrides.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RakNetDefinesOverrides.h; path = ../../../Source/RakNetDefinesOverrides.h; sourceTree = ""; }; B23EA363147F5A43002B8C06 /* RakNetSmartPtr.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RakNetSmartPtr.h; path = ../../../Source/RakNetSmartPtr.h; sourceTree = ""; }; B23EA364147F5A43002B8C06 /* RakNetSocket.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = RakNetSocket.cpp; path = ../../../Source/RakNetSocket.cpp; sourceTree = ""; }; B23EA365147F5A43002B8C06 /* RakNetSocket.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RakNetSocket.h; path = ../../../Source/RakNetSocket.h; sourceTree = ""; }; - B23EA366147F5A43002B8C06 /* RakNetStatistics.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = RakNetStatistics.cpp; path = ../../../Source/RakNetStatistics.cpp; sourceTree = ""; }; + B23EA366147F5A43002B8C06 /* statistics.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = statistics.cpp; path = ../../../Source/statistics.cpp; sourceTree = ""; }; B23EA367147F5A43002B8C06 /* RakNetStatistics.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RakNetStatistics.h; path = ../../../Source/RakNetStatistics.h; sourceTree = ""; }; B23EA368147F5A43002B8C06 /* RakNetTime.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RakNetTime.h; path = ../../../Source/RakNetTime.h; sourceTree = ""; }; - B23EA369147F5A43002B8C06 /* RakNetTransport2.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = RakNetTransport2.cpp; path = ../../../Source/RakNetTransport2.cpp; sourceTree = ""; }; + B23EA369147F5A43002B8C06 /* transport2.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = transport2.cpp; path = ../../../Source/transport2.cpp; sourceTree = ""; }; B23EA36A147F5A43002B8C06 /* RakNetTransport2.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RakNetTransport2.h; path = ../../../Source/RakNetTransport2.h; sourceTree = ""; }; - B23EA36B147F5A43002B8C06 /* RakNetTypes.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = RakNetTypes.cpp; path = ../../../Source/RakNetTypes.cpp; sourceTree = ""; }; + B23EA36B147F5A43002B8C06 /* types.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = types.cpp; path = ../../../Source/types.cpp; sourceTree = ""; }; B23EA36C147F5A43002B8C06 /* RakNetTypes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RakNetTypes.h; path = ../../../Source/RakNetTypes.h; sourceTree = ""; }; B23EA36D147F5A43002B8C06 /* RakNetVersion.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RakNetVersion.h; path = ../../../Source/RakNetVersion.h; sourceTree = ""; }; - B23EA36E147F5A43002B8C06 /* RakPeer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = RakPeer.cpp; path = ../../../Source/RakPeer.cpp; sourceTree = ""; }; + B23EA36E147F5A43002B8C06 /* peer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = peer.cpp; path = ../../../Source/peer.cpp; sourceTree = ""; }; B23EA36F147F5A43002B8C06 /* RakPeer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RakPeer.h; path = ../../../Source/RakPeer.h; sourceTree = ""; }; B23EA370147F5A43002B8C06 /* RakPeerInterface.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RakPeerInterface.h; path = ../../../Source/RakPeerInterface.h; sourceTree = ""; }; - B23EA371147F5A43002B8C06 /* RakSleep.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = RakSleep.cpp; path = ../../../Source/RakSleep.cpp; sourceTree = ""; }; + B23EA371147F5A43002B8C06 /* sleep.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = sleep.cpp; path = ../../../Source/sleep.cpp; sourceTree = ""; }; B23EA372147F5A43002B8C06 /* RakSleep.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RakSleep.h; path = ../../../Source/RakSleep.h; sourceTree = ""; }; - B23EA373147F5A43002B8C06 /* RakString.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = RakString.cpp; path = ../../../Source/RakString.cpp; sourceTree = ""; }; + B23EA373147F5A43002B8C06 /* string.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = string.cpp; path = ../../../Source/string.cpp; sourceTree = ""; }; B23EA374147F5A43002B8C06 /* RakString.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RakString.h; path = ../../../Source/RakString.h; sourceTree = ""; }; - B23EA375147F5A43002B8C06 /* RakThread.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = RakThread.cpp; path = ../../../Source/RakThread.cpp; sourceTree = ""; }; + B23EA375147F5A43002B8C06 /* thread.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = thread.cpp; path = ../../../Source/thread.cpp; sourceTree = ""; }; B23EA376147F5A43002B8C06 /* RakThread.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RakThread.h; path = ../../../Source/RakThread.h; sourceTree = ""; }; - B23EA377147F5A43002B8C06 /* RakWString.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = RakWString.cpp; path = ../../../Source/RakWString.cpp; sourceTree = ""; }; + B23EA377147F5A43002B8C06 /* wstring.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = wstring.cpp; path = ../../../Source/wstring.cpp; sourceTree = ""; }; B23EA378147F5A43002B8C06 /* RakWString.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RakWString.h; path = ../../../Source/RakWString.h; sourceTree = ""; }; - B23EA379147F5A43002B8C06 /* Rand.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Rand.cpp; path = ../../../Source/Rand.cpp; sourceTree = ""; }; - B23EA37A147F5A43002B8C06 /* Rand.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Rand.h; path = ../../../Source/Rand.h; sourceTree = ""; }; + B23EA379147F5A43002B8C06 /* rand.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = rand.cpp; path = ../../../Source/rand.cpp; sourceTree = ""; }; + B23EA37A147F5A43002B8C06 /* rand.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = rand.h; path = ../../../Source/rand.h; sourceTree = ""; }; B23EA37B147F5A43002B8C06 /* rdlmalloc-options.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "rdlmalloc-options.h"; path = "../../../Source/rdlmalloc-options.h"; sourceTree = ""; }; B23EA37C147F5A43002B8C06 /* rdlmalloc.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = rdlmalloc.cpp; path = ../../../Source/rdlmalloc.cpp; sourceTree = ""; }; B23EA37D147F5A43002B8C06 /* rdlmalloc.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = rdlmalloc.h; path = ../../../Source/rdlmalloc.h; sourceTree = ""; }; - B23EA37E147F5A43002B8C06 /* ReadyEvent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ReadyEvent.cpp; path = ../../../Source/ReadyEvent.cpp; sourceTree = ""; }; - B23EA37F147F5A43002B8C06 /* ReadyEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ReadyEvent.h; path = ../../../Source/ReadyEvent.h; sourceTree = ""; }; - B23EA380147F5A43002B8C06 /* RefCountedObj.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RefCountedObj.h; path = ../../../Source/RefCountedObj.h; sourceTree = ""; }; - B23EA381147F5A43002B8C06 /* ReliabilityLayer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ReliabilityLayer.cpp; path = ../../../Source/ReliabilityLayer.cpp; sourceTree = ""; }; - B23EA382147F5A43002B8C06 /* ReliabilityLayer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ReliabilityLayer.h; path = ../../../Source/ReliabilityLayer.h; sourceTree = ""; }; - B23EA383147F5A43002B8C06 /* ReplicaEnums.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ReplicaEnums.h; path = ../../../Source/ReplicaEnums.h; sourceTree = ""; }; - B23EA384147F5A43002B8C06 /* ReplicaManager3.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ReplicaManager3.cpp; path = ../../../Source/ReplicaManager3.cpp; sourceTree = ""; }; - B23EA385147F5A43002B8C06 /* ReplicaManager3.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ReplicaManager3.h; path = ../../../Source/ReplicaManager3.h; sourceTree = ""; }; - B23EA386147F5A43002B8C06 /* Router2.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Router2.cpp; path = ../../../Source/Router2.cpp; sourceTree = ""; }; - B23EA387147F5A43002B8C06 /* Router2.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Router2.h; path = ../../../Source/Router2.h; sourceTree = ""; }; - B23EA388147F5A43002B8C06 /* RPC4Plugin.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = RPC4Plugin.cpp; path = ../../../Source/RPC4Plugin.cpp; sourceTree = ""; }; - B23EA389147F5A43002B8C06 /* RPC4Plugin.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RPC4Plugin.h; path = ../../../Source/RPC4Plugin.h; sourceTree = ""; }; - B23EA38A147F5A43002B8C06 /* SecureHandshake.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SecureHandshake.cpp; path = ../../../Source/SecureHandshake.cpp; sourceTree = ""; }; - B23EA38B147F5A43002B8C06 /* SecureHandshake.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SecureHandshake.h; path = ../../../Source/SecureHandshake.h; sourceTree = ""; }; - B23EA38C147F5A43002B8C06 /* SendToThread.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SendToThread.cpp; path = ../../../Source/SendToThread.cpp; sourceTree = ""; }; - B23EA38D147F5A43002B8C06 /* SendToThread.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SendToThread.h; path = ../../../Source/SendToThread.h; sourceTree = ""; }; + B23EA37E147F5A43002B8C06 /* ready_event.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ready_event.cpp; path = ../../../Source/ready_event.cpp; sourceTree = ""; }; + B23EA37F147F5A43002B8C06 /* ready_event.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ready_event.h; path = ../../../Source/ready_event.h; sourceTree = ""; }; + B23EA380147F5A43002B8C06 /* ref_counted_obj.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ref_counted_obj.h; path = ../../../Source/ref_counted_obj.h; sourceTree = ""; }; + B23EA381147F5A43002B8C06 /* reliability_layer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = reliability_layer.cpp; path = ../../../Source/reliability_layer.cpp; sourceTree = ""; }; + B23EA382147F5A43002B8C06 /* reliability_layer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = reliability_layer.h; path = ../../../Source/reliability_layer.h; sourceTree = ""; }; + B23EA383147F5A43002B8C06 /* replica_enums.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = replica_enums.h; path = ../../../Source/replica_enums.h; sourceTree = ""; }; + B23EA384147F5A43002B8C06 /* replica_manager3.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = replica_manager3.cpp; path = ../../../Source/replica_manager3.cpp; sourceTree = ""; }; + B23EA385147F5A43002B8C06 /* replica_manager3.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = replica_manager3.h; path = ../../../Source/replica_manager3.h; sourceTree = ""; }; + B23EA386147F5A43002B8C06 /* router2.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = router2.cpp; path = ../../../Source/router2.cpp; sourceTree = ""; }; + B23EA387147F5A43002B8C06 /* router2.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = router2.h; path = ../../../Source/router2.h; sourceTree = ""; }; + B23EA388147F5A43002B8C06 /* rpc4_plugin.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = rpc4_plugin.cpp; path = ../../../Source/rpc4_plugin.cpp; sourceTree = ""; }; + B23EA389147F5A43002B8C06 /* rpc4_plugin.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = rpc4_plugin.h; path = ../../../Source/rpc4_plugin.h; sourceTree = ""; }; + B23EA38A147F5A43002B8C06 /* secure_handshake.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = secure_handshake.cpp; path = ../../../Source/secure_handshake.cpp; sourceTree = ""; }; + B23EA38B147F5A43002B8C06 /* secure_handshake.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = secure_handshake.h; path = ../../../Source/secure_handshake.h; sourceTree = ""; }; + B23EA38C147F5A43002B8C06 /* send_to_thread.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = send_to_thread.cpp; path = ../../../Source/send_to_thread.cpp; sourceTree = ""; }; + B23EA38D147F5A43002B8C06 /* send_to_thread.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = send_to_thread.h; path = ../../../Source/send_to_thread.h; sourceTree = ""; }; B23EA38E147F5A43002B8C06 /* SHA1.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SHA1.cpp; path = ../../../Source/SHA1.cpp; sourceTree = ""; }; B23EA38F147F5A43002B8C06 /* SHA1.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SHA1.h; path = ../../../Source/SHA1.h; sourceTree = ""; }; - B23EA390147F5A43002B8C06 /* SignaledEvent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SignaledEvent.cpp; path = ../../../Source/SignaledEvent.cpp; sourceTree = ""; }; - B23EA391147F5A43002B8C06 /* SignaledEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SignaledEvent.h; path = ../../../Source/SignaledEvent.h; sourceTree = ""; }; - B23EA392147F5A43002B8C06 /* SimpleMutex.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SimpleMutex.cpp; path = ../../../Source/SimpleMutex.cpp; sourceTree = ""; }; - B23EA393147F5A43002B8C06 /* SimpleMutex.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SimpleMutex.h; path = ../../../Source/SimpleMutex.h; sourceTree = ""; }; - B23EA394147F5A43002B8C06 /* SimpleTCPServer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SimpleTCPServer.h; path = ../../../Source/SimpleTCPServer.h; sourceTree = ""; }; - B23EA395147F5A43002B8C06 /* SingleProducerConsumer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SingleProducerConsumer.h; path = ../../../Source/SingleProducerConsumer.h; sourceTree = ""; }; - B23EA396147F5A43002B8C06 /* SocketDefines.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SocketDefines.h; path = ../../../Source/SocketDefines.h; sourceTree = ""; }; - B23EA397147F5A43002B8C06 /* SocketIncludes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SocketIncludes.h; path = ../../../Source/SocketIncludes.h; sourceTree = ""; }; - B23EA398147F5A43002B8C06 /* SocketLayer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SocketLayer.cpp; path = ../../../Source/SocketLayer.cpp; sourceTree = ""; }; - B23EA399147F5A43002B8C06 /* SocketLayer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SocketLayer.h; path = ../../../Source/SocketLayer.h; sourceTree = ""; }; - B23EA39A147F5A43002B8C06 /* StringCompressor.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = StringCompressor.cpp; path = ../../../Source/StringCompressor.cpp; sourceTree = ""; }; - B23EA39B147F5A43002B8C06 /* StringCompressor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = StringCompressor.h; path = ../../../Source/StringCompressor.h; sourceTree = ""; }; - B23EA39C147F5A43002B8C06 /* StringTable.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = StringTable.cpp; path = ../../../Source/StringTable.cpp; sourceTree = ""; }; - B23EA39D147F5A43002B8C06 /* StringTable.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = StringTable.h; path = ../../../Source/StringTable.h; sourceTree = ""; }; - B23EA39E147F5A43002B8C06 /* SuperFastHash.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SuperFastHash.cpp; path = ../../../Source/SuperFastHash.cpp; sourceTree = ""; }; - B23EA39F147F5A43002B8C06 /* SuperFastHash.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SuperFastHash.h; path = ../../../Source/SuperFastHash.h; sourceTree = ""; }; - B23EA3A0147F5A43002B8C06 /* TableSerializer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = TableSerializer.cpp; path = ../../../Source/TableSerializer.cpp; sourceTree = ""; }; - B23EA3A1147F5A43002B8C06 /* TableSerializer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TableSerializer.h; path = ../../../Source/TableSerializer.h; sourceTree = ""; }; - B23EA3A2147F5A43002B8C06 /* TCPInterface.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = TCPInterface.cpp; path = ../../../Source/TCPInterface.cpp; sourceTree = ""; }; - B23EA3A3147F5A43002B8C06 /* TCPInterface.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TCPInterface.h; path = ../../../Source/TCPInterface.h; sourceTree = ""; }; - B23EA3A4147F5A43002B8C06 /* TeamBalancer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = TeamBalancer.cpp; path = ../../../Source/TeamBalancer.cpp; sourceTree = ""; }; - B23EA3A5147F5A43002B8C06 /* TeamBalancer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TeamBalancer.h; path = ../../../Source/TeamBalancer.h; sourceTree = ""; }; - B23EA3A6147F5A43002B8C06 /* TelnetTransport.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = TelnetTransport.cpp; path = ../../../Source/TelnetTransport.cpp; sourceTree = ""; }; - B23EA3A7147F5A43002B8C06 /* TelnetTransport.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TelnetTransport.h; path = ../../../Source/TelnetTransport.h; sourceTree = ""; }; - B23EA3A8147F5A43002B8C06 /* ThreadPool.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ThreadPool.h; path = ../../../Source/ThreadPool.h; sourceTree = ""; }; - B23EA3A9147F5A43002B8C06 /* ThreadsafePacketLogger.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ThreadsafePacketLogger.cpp; path = ../../../Source/ThreadsafePacketLogger.cpp; sourceTree = ""; }; - B23EA3AA147F5A43002B8C06 /* ThreadsafePacketLogger.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ThreadsafePacketLogger.h; path = ../../../Source/ThreadsafePacketLogger.h; sourceTree = ""; }; - B23EA3AB147F5A43002B8C06 /* TransportInterface.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TransportInterface.h; path = ../../../Source/TransportInterface.h; sourceTree = ""; }; - B23EA3AC147F5A43002B8C06 /* TwoWayAuthentication.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = TwoWayAuthentication.cpp; path = ../../../Source/TwoWayAuthentication.cpp; sourceTree = ""; }; - B23EA3AD147F5A43002B8C06 /* TwoWayAuthentication.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TwoWayAuthentication.h; path = ../../../Source/TwoWayAuthentication.h; sourceTree = ""; }; - B23EA3AE147F5A43002B8C06 /* UDPForwarder.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = UDPForwarder.cpp; path = ../../../Source/UDPForwarder.cpp; sourceTree = ""; }; - B23EA3AF147F5A43002B8C06 /* UDPForwarder.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = UDPForwarder.h; path = ../../../Source/UDPForwarder.h; sourceTree = ""; }; - B23EA3B0147F5A43002B8C06 /* UDPProxyClient.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = UDPProxyClient.cpp; path = ../../../Source/UDPProxyClient.cpp; sourceTree = ""; }; - B23EA3B1147F5A43002B8C06 /* UDPProxyClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = UDPProxyClient.h; path = ../../../Source/UDPProxyClient.h; sourceTree = ""; }; - B23EA3B2147F5A43002B8C06 /* UDPProxyCommon.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = UDPProxyCommon.h; path = ../../../Source/UDPProxyCommon.h; sourceTree = ""; }; - B23EA3B3147F5A43002B8C06 /* UDPProxyCoordinator.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = UDPProxyCoordinator.cpp; path = ../../../Source/UDPProxyCoordinator.cpp; sourceTree = ""; }; - B23EA3B4147F5A43002B8C06 /* UDPProxyCoordinator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = UDPProxyCoordinator.h; path = ../../../Source/UDPProxyCoordinator.h; sourceTree = ""; }; - B23EA3B5147F5A43002B8C06 /* UDPProxyServer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = UDPProxyServer.cpp; path = ../../../Source/UDPProxyServer.cpp; sourceTree = ""; }; - B23EA3B6147F5A43002B8C06 /* UDPProxyServer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = UDPProxyServer.h; path = ../../../Source/UDPProxyServer.h; sourceTree = ""; }; - B23EA3B7147F5A43002B8C06 /* VariableDeltaSerializer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = VariableDeltaSerializer.cpp; path = ../../../Source/VariableDeltaSerializer.cpp; sourceTree = ""; }; - B23EA3B8147F5A43002B8C06 /* VariableDeltaSerializer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = VariableDeltaSerializer.h; path = ../../../Source/VariableDeltaSerializer.h; sourceTree = ""; }; - B23EA3B9147F5A43002B8C06 /* VariableListDeltaTracker.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = VariableListDeltaTracker.cpp; path = ../../../Source/VariableListDeltaTracker.cpp; sourceTree = ""; }; - B23EA3BA147F5A43002B8C06 /* VariableListDeltaTracker.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = VariableListDeltaTracker.h; path = ../../../Source/VariableListDeltaTracker.h; sourceTree = ""; }; - B23EA3BB147F5A43002B8C06 /* VariadicSQLParser.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = VariadicSQLParser.cpp; path = ../../../Source/VariadicSQLParser.cpp; sourceTree = ""; }; - B23EA3BC147F5A43002B8C06 /* VariadicSQLParser.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = VariadicSQLParser.h; path = ../../../Source/VariadicSQLParser.h; sourceTree = ""; }; - B23EA3BF147F5A43002B8C06 /* WindowsIncludes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = WindowsIncludes.h; path = ../../../Source/WindowsIncludes.h; sourceTree = ""; }; - B23EA3C0147F5A43002B8C06 /* WSAStartupSingleton.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = WSAStartupSingleton.cpp; path = ../../../Source/WSAStartupSingleton.cpp; sourceTree = ""; }; - B23EA3C1147F5A43002B8C06 /* WSAStartupSingleton.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = WSAStartupSingleton.h; path = ../../../Source/WSAStartupSingleton.h; sourceTree = ""; }; + B23EA390147F5A43002B8C06 /* signaled_event.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = signaled_event.cpp; path = ../../../Source/signaled_event.cpp; sourceTree = ""; }; + B23EA391147F5A43002B8C06 /* signaled_event.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = signaled_event.h; path = ../../../Source/signaled_event.h; sourceTree = ""; }; + B23EA392147F5A43002B8C06 /* simple_mutex.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = simple_mutex.cpp; path = ../../../Source/simple_mutex.cpp; sourceTree = ""; }; + B23EA393147F5A43002B8C06 /* simple_mutex.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = simple_mutex.h; path = ../../../Source/simple_mutex.h; sourceTree = ""; }; + B23EA394147F5A43002B8C06 /* simple_tcp_server.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = simple_tcp_server.h; path = ../../../Source/simple_tcp_server.h; sourceTree = ""; }; + B23EA395147F5A43002B8C06 /* single_producer_consumer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = single_producer_consumer.h; path = ../../../Source/single_producer_consumer.h; sourceTree = ""; }; + B23EA396147F5A43002B8C06 /* socket_defines.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = socket_defines.h; path = ../../../Source/socket_defines.h; sourceTree = ""; }; + B23EA397147F5A43002B8C06 /* socket_includes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = socket_includes.h; path = ../../../Source/socket_includes.h; sourceTree = ""; }; + B23EA398147F5A43002B8C06 /* socket_layer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = socket_layer.cpp; path = ../../../Source/socket_layer.cpp; sourceTree = ""; }; + B23EA399147F5A43002B8C06 /* socket_layer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = socket_layer.h; path = ../../../Source/socket_layer.h; sourceTree = ""; }; + B23EA39A147F5A43002B8C06 /* string_compressor.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = string_compressor.cpp; path = ../../../Source/string_compressor.cpp; sourceTree = ""; }; + B23EA39B147F5A43002B8C06 /* string_compressor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = string_compressor.h; path = ../../../Source/string_compressor.h; sourceTree = ""; }; + B23EA39C147F5A43002B8C06 /* string_table.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = string_table.cpp; path = ../../../Source/string_table.cpp; sourceTree = ""; }; + B23EA39D147F5A43002B8C06 /* string_table.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = string_table.h; path = ../../../Source/string_table.h; sourceTree = ""; }; + B23EA39E147F5A43002B8C06 /* super_fast_hash.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = super_fast_hash.cpp; path = ../../../Source/super_fast_hash.cpp; sourceTree = ""; }; + B23EA39F147F5A43002B8C06 /* super_fast_hash.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = super_fast_hash.h; path = ../../../Source/super_fast_hash.h; sourceTree = ""; }; + B23EA3A0147F5A43002B8C06 /* table_serializer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = table_serializer.cpp; path = ../../../Source/table_serializer.cpp; sourceTree = ""; }; + B23EA3A1147F5A43002B8C06 /* table_serializer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = table_serializer.h; path = ../../../Source/table_serializer.h; sourceTree = ""; }; + B23EA3A2147F5A43002B8C06 /* tcp_interface.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = tcp_interface.cpp; path = ../../../Source/tcp_interface.cpp; sourceTree = ""; }; + B23EA3A3147F5A43002B8C06 /* tcp_interface.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = tcp_interface.h; path = ../../../Source/tcp_interface.h; sourceTree = ""; }; + B23EA3A4147F5A43002B8C06 /* team_balancer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = team_balancer.cpp; path = ../../../Source/team_balancer.cpp; sourceTree = ""; }; + B23EA3A5147F5A43002B8C06 /* team_balancer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = team_balancer.h; path = ../../../Source/team_balancer.h; sourceTree = ""; }; + B23EA3A6147F5A43002B8C06 /* telnet_transport.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = telnet_transport.cpp; path = ../../../Source/telnet_transport.cpp; sourceTree = ""; }; + B23EA3A7147F5A43002B8C06 /* telnet_transport.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = telnet_transport.h; path = ../../../Source/telnet_transport.h; sourceTree = ""; }; + B23EA3A8147F5A43002B8C06 /* thread_pool.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = thread_pool.h; path = ../../../Source/thread_pool.h; sourceTree = ""; }; + B23EA3A9147F5A43002B8C06 /* threadsafe_packet_logger.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = threadsafe_packet_logger.cpp; path = ../../../Source/threadsafe_packet_logger.cpp; sourceTree = ""; }; + B23EA3AA147F5A43002B8C06 /* threadsafe_packet_logger.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = threadsafe_packet_logger.h; path = ../../../Source/threadsafe_packet_logger.h; sourceTree = ""; }; + B23EA3AB147F5A43002B8C06 /* transport_interface.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = transport_interface.h; path = ../../../Source/transport_interface.h; sourceTree = ""; }; + B23EA3AC147F5A43002B8C06 /* two_way_authentication.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = two_way_authentication.cpp; path = ../../../Source/two_way_authentication.cpp; sourceTree = ""; }; + B23EA3AD147F5A43002B8C06 /* two_way_authentication.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = two_way_authentication.h; path = ../../../Source/two_way_authentication.h; sourceTree = ""; }; + B23EA3AE147F5A43002B8C06 /* udp_forwarder.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = udp_forwarder.cpp; path = ../../../Source/udp_forwarder.cpp; sourceTree = ""; }; + B23EA3AF147F5A43002B8C06 /* udp_forwarder.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = udp_forwarder.h; path = ../../../Source/udp_forwarder.h; sourceTree = ""; }; + B23EA3B0147F5A43002B8C06 /* udp_proxy_client.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = udp_proxy_client.cpp; path = ../../../Source/udp_proxy_client.cpp; sourceTree = ""; }; + B23EA3B1147F5A43002B8C06 /* udp_proxy_client.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = udp_proxy_client.h; path = ../../../Source/udp_proxy_client.h; sourceTree = ""; }; + B23EA3B2147F5A43002B8C06 /* udp_proxy_common.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = udp_proxy_common.h; path = ../../../Source/udp_proxy_common.h; sourceTree = ""; }; + B23EA3B3147F5A43002B8C06 /* udp_proxy_coordinator.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = udp_proxy_coordinator.cpp; path = ../../../Source/udp_proxy_coordinator.cpp; sourceTree = ""; }; + B23EA3B4147F5A43002B8C06 /* udp_proxy_coordinator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = udp_proxy_coordinator.h; path = ../../../Source/udp_proxy_coordinator.h; sourceTree = ""; }; + B23EA3B5147F5A43002B8C06 /* udp_proxy_server.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = udp_proxy_server.cpp; path = ../../../Source/udp_proxy_server.cpp; sourceTree = ""; }; + B23EA3B6147F5A43002B8C06 /* udp_proxy_server.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = udp_proxy_server.h; path = ../../../Source/udp_proxy_server.h; sourceTree = ""; }; + B23EA3B7147F5A43002B8C06 /* variable_delta_serializer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = variable_delta_serializer.cpp; path = ../../../Source/variable_delta_serializer.cpp; sourceTree = ""; }; + B23EA3B8147F5A43002B8C06 /* variable_delta_serializer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = variable_delta_serializer.h; path = ../../../Source/variable_delta_serializer.h; sourceTree = ""; }; + B23EA3B9147F5A43002B8C06 /* variable_list_delta_tracker.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = variable_list_delta_tracker.cpp; path = ../../../Source/variable_list_delta_tracker.cpp; sourceTree = ""; }; + B23EA3BA147F5A43002B8C06 /* variable_list_delta_tracker.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = variable_list_delta_tracker.h; path = ../../../Source/variable_list_delta_tracker.h; sourceTree = ""; }; + B23EA3BB147F5A43002B8C06 /* variadic_sql_parser.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = variadic_sql_parser.cpp; path = ../../../Source/variadic_sql_parser.cpp; sourceTree = ""; }; + B23EA3BC147F5A43002B8C06 /* variadic_sql_parser.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = variadic_sql_parser.h; path = ../../../Source/variadic_sql_parser.h; sourceTree = ""; }; + B23EA3BF147F5A43002B8C06 /* windows_includes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = windows_includes.h; path = ../../../Source/windows_includes.h; sourceTree = ""; }; + B23EA3C0147F5A43002B8C06 /* wsa_startup_singleton.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = wsa_startup_singleton.cpp; path = ../../../Source/wsa_startup_singleton.cpp; sourceTree = ""; }; + B23EA3C1147F5A43002B8C06 /* wsa_startup_singleton.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = wsa_startup_singleton.h; path = ../../../Source/wsa_startup_singleton.h; sourceTree = ""; }; B24A1D5B147EDC330029E45E /* ChatClient.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = ChatClient.app; sourceTree = BUILT_PRODUCTS_DIR; }; B24A1D5F147EDC330029E45E /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; B24A1D61147EDC330029E45E /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; @@ -450,247 +450,247 @@ B24A1D7F147EDC580029E45E /* RakNet */ = { isa = PBXGroup; children = ( - B23EA2CE147F5A43002B8C06 /* _FindFirst.cpp */, - B23EA2CF147F5A43002B8C06 /* _FindFirst.h */, - B23EA2D0147F5A43002B8C06 /* AutopatcherPatchContext.h */, - B23EA2D1147F5A43002B8C06 /* AutopatcherRepositoryInterface.h */, - B23EA2D2147F5A43002B8C06 /* BitStream.cpp */, - B23EA2D3147F5A43002B8C06 /* BitStream.h */, - B23EA2D4147F5A43002B8C06 /* CCRakNetSlidingWindow.cpp */, - B23EA2D5147F5A43002B8C06 /* CCRakNetSlidingWindow.h */, - B23EA2D6147F5A43002B8C06 /* CCRakNetUDT.cpp */, - B23EA2D7147F5A43002B8C06 /* CCRakNetUDT.h */, - B23EA2D8147F5A43002B8C06 /* CheckSum.cpp */, - B23EA2D9147F5A43002B8C06 /* CheckSum.h */, - B23EA2DA147F5A43002B8C06 /* CloudClient.cpp */, - B23EA2DB147F5A43002B8C06 /* CloudClient.h */, - B23EA2DC147F5A43002B8C06 /* CloudCommon.cpp */, - B23EA2DD147F5A43002B8C06 /* CloudCommon.h */, - B23EA2DE147F5A43002B8C06 /* CloudServer.cpp */, - B23EA2DF147F5A43002B8C06 /* CloudServer.h */, + B23EA2CE147F5A43002B8C06 /* find_first.cpp */, + B23EA2CF147F5A43002B8C06 /* find_first.h */, + B23EA2D0147F5A43002B8C06 /* autopatcher_patch_context.h */, + B23EA2D1147F5A43002B8C06 /* autopatcher_repository_interface.h */, + B23EA2D2147F5A43002B8C06 /* bit_stream.cpp */, + B23EA2D3147F5A43002B8C06 /* bit_stream.h */, + B23EA2D4147F5A43002B8C06 /* cc_sliding_window.cpp */, + B23EA2D5147F5A43002B8C06 /* cc_sliding_window.h */, + B23EA2D6147F5A43002B8C06 /* cc_udt.cpp */, + B23EA2D7147F5A43002B8C06 /* cc_udt.h */, + B23EA2D8147F5A43002B8C06 /* check_sum.cpp */, + B23EA2D9147F5A43002B8C06 /* check_sum.h */, + B23EA2DA147F5A43002B8C06 /* cloud_client.cpp */, + B23EA2DB147F5A43002B8C06 /* cloud_client.h */, + B23EA2DC147F5A43002B8C06 /* cloud_common.cpp */, + B23EA2DD147F5A43002B8C06 /* cloud_common.h */, + B23EA2DE147F5A43002B8C06 /* cloud_server.cpp */, + B23EA2DF147F5A43002B8C06 /* cloud_server.h */, B23EA2E0147F5A43002B8C06 /* CMakeLists.txt */, - B23EA2E1147F5A43002B8C06 /* CommandParserInterface.cpp */, - B23EA2E2147F5A43002B8C06 /* CommandParserInterface.h */, - B23EA2E3147F5A43002B8C06 /* ConnectionGraph2.cpp */, - B23EA2E4147F5A43002B8C06 /* ConnectionGraph2.h */, - B23EA2E5147F5A43002B8C06 /* ConsoleServer.cpp */, - B23EA2E6147F5A43002B8C06 /* ConsoleServer.h */, - B23EA2E7147F5A43002B8C06 /* DataCompressor.cpp */, - B23EA2E8147F5A43002B8C06 /* DataCompressor.h */, - B23EA2E9147F5A43002B8C06 /* DirectoryDeltaTransfer.cpp */, - B23EA2EA147F5A43002B8C06 /* DirectoryDeltaTransfer.h */, - B23EA2EB147F5A43002B8C06 /* DS_BinarySearchTree.h */, - B23EA2EC147F5A43002B8C06 /* DS_BPlusTree.h */, - B23EA2ED147F5A43002B8C06 /* DS_BytePool.cpp */, - B23EA2EE147F5A43002B8C06 /* DS_BytePool.h */, - B23EA2EF147F5A43002B8C06 /* DS_ByteQueue.cpp */, - B23EA2F0147F5A43002B8C06 /* DS_ByteQueue.h */, - B23EA2F1147F5A43002B8C06 /* DS_Hash.h */, - B23EA2F2147F5A43002B8C06 /* DS_Heap.h */, - B23EA2F3147F5A43002B8C06 /* DS_HuffmanEncodingTree.cpp */, - B23EA2F4147F5A43002B8C06 /* DS_HuffmanEncodingTree.h */, - B23EA2F5147F5A43002B8C06 /* DS_HuffmanEncodingTreeFactory.h */, - B23EA2F6147F5A43002B8C06 /* DS_HuffmanEncodingTreeNode.h */, - B23EA2F7147F5A43002B8C06 /* DS_LinkedList.h */, - B23EA2F8147F5A43002B8C06 /* DS_List.h */, - B23EA2F9147F5A43002B8C06 /* DS_Map.h */, - B23EA2FA147F5A43002B8C06 /* DS_MemoryPool.h */, - B23EA2FB147F5A43002B8C06 /* DS_Multilist.h */, - B23EA2FC147F5A43002B8C06 /* DS_OrderedChannelHeap.h */, - B23EA2FD147F5A43002B8C06 /* DS_OrderedList.h */, - B23EA2FE147F5A43002B8C06 /* DS_Queue.h */, - B23EA2FF147F5A43002B8C06 /* DS_QueueLinkedList.h */, - B23EA300147F5A43002B8C06 /* DS_RangeList.h */, - B23EA301147F5A43002B8C06 /* DS_Table.cpp */, - B23EA302147F5A43002B8C06 /* DS_Table.h */, - B23EA303147F5A43002B8C06 /* DS_ThreadsafeAllocatingQueue.h */, - B23EA304147F5A43002B8C06 /* DS_Tree.h */, - B23EA305147F5A43002B8C06 /* DS_WeightedGraph.h */, - B23EA306147F5A43002B8C06 /* DynDNS.cpp */, - B23EA307147F5A43002B8C06 /* DynDNS.h */, - B23EA308147F5A43002B8C06 /* EmailSender.cpp */, - B23EA309147F5A43002B8C06 /* EmailSender.h */, + B23EA2E1147F5A43002B8C06 /* command_parser_interface.cpp */, + B23EA2E2147F5A43002B8C06 /* command_parser_interface.h */, + B23EA2E3147F5A43002B8C06 /* connection_graph2.cpp */, + B23EA2E4147F5A43002B8C06 /* connection_graph2.h */, + B23EA2E5147F5A43002B8C06 /* console_server.cpp */, + B23EA2E6147F5A43002B8C06 /* console_server.h */, + B23EA2E7147F5A43002B8C06 /* data_compressor.cpp */, + B23EA2E8147F5A43002B8C06 /* data_compressor.h */, + B23EA2E9147F5A43002B8C06 /* directory_delta_transfer.cpp */, + B23EA2EA147F5A43002B8C06 /* directory_delta_transfer.h */, + B23EA2EB147F5A43002B8C06 /* ds_binary_search_tree.h */, + B23EA2EC147F5A43002B8C06 /* ds_bplus_tree.h */, + B23EA2ED147F5A43002B8C06 /* ds_byte_pool.cpp */, + B23EA2EE147F5A43002B8C06 /* ds_byte_pool.h */, + B23EA2EF147F5A43002B8C06 /* ds_byte_queue.cpp */, + B23EA2F0147F5A43002B8C06 /* ds_byte_queue.h */, + B23EA2F1147F5A43002B8C06 /* ds_hash.h */, + B23EA2F2147F5A43002B8C06 /* ds_heap.h */, + B23EA2F3147F5A43002B8C06 /* ds_huffman_encoding_tree.cpp */, + B23EA2F4147F5A43002B8C06 /* ds_huffman_encoding_tree.h */, + B23EA2F5147F5A43002B8C06 /* ds_huffman_encoding_tree_factory.h */, + B23EA2F6147F5A43002B8C06 /* ds_huffman_encoding_tree_node.h */, + B23EA2F7147F5A43002B8C06 /* ds_linked_list.h */, + B23EA2F8147F5A43002B8C06 /* ds_list.h */, + B23EA2F9147F5A43002B8C06 /* ds_map.h */, + B23EA2FA147F5A43002B8C06 /* ds_memory_pool.h */, + B23EA2FB147F5A43002B8C06 /* ds_multilist.h */, + B23EA2FC147F5A43002B8C06 /* ds_ordered_channel_heap.h */, + B23EA2FD147F5A43002B8C06 /* ds_ordered_list.h */, + B23EA2FE147F5A43002B8C06 /* ds_queue.h */, + B23EA2FF147F5A43002B8C06 /* ds_queue_linked_list.h */, + B23EA300147F5A43002B8C06 /* ds_range_list.h */, + B23EA301147F5A43002B8C06 /* ds_table.cpp */, + B23EA302147F5A43002B8C06 /* ds_table.h */, + B23EA303147F5A43002B8C06 /* ds_threadsafe_allocating_queue.h */, + B23EA304147F5A43002B8C06 /* ds_tree.h */, + B23EA305147F5A43002B8C06 /* ds_weighted_graph.h */, + B23EA306147F5A43002B8C06 /* dyn_dns.cpp */, + B23EA307147F5A43002B8C06 /* dyn_dns.h */, + B23EA308147F5A43002B8C06 /* email_sender.cpp */, + B23EA309147F5A43002B8C06 /* email_sender.h */, B23EA30A147F5A43002B8C06 /* EncodeClassName.cpp */, - B23EA30B147F5A43002B8C06 /* EpochTimeToString.cpp */, - B23EA30C147F5A43002B8C06 /* EpochTimeToString.h */, - B23EA30D147F5A43002B8C06 /* Export.h */, - B23EA30E147F5A43002B8C06 /* FileList.cpp */, - B23EA30F147F5A43002B8C06 /* FileList.h */, - B23EA310147F5A43002B8C06 /* FileListNodeContext.h */, - B23EA311147F5A43002B8C06 /* FileListTransfer.cpp */, - B23EA312147F5A43002B8C06 /* FileListTransfer.h */, - B23EA313147F5A43002B8C06 /* FileListTransferCBInterface.h */, - B23EA314147F5A43002B8C06 /* FileOperations.cpp */, - B23EA315147F5A43002B8C06 /* FileOperations.h */, - B23EA316147F5A43002B8C06 /* FormatString.cpp */, - B23EA317147F5A43002B8C06 /* FormatString.h */, - B23EA318147F5A43002B8C06 /* FullyConnectedMesh2.cpp */, - B23EA319147F5A43002B8C06 /* FullyConnectedMesh2.h */, - B23EA31A147F5A43002B8C06 /* Getche.cpp */, - B23EA31B147F5A43002B8C06 /* Getche.h */, - B23EA31C147F5A43002B8C06 /* Gets.cpp */, - B23EA31D147F5A43002B8C06 /* Gets.h */, - B23EA31E147F5A43002B8C06 /* GetTime.cpp */, - B23EA31F147F5A43002B8C06 /* GetTime.h */, - B23EA320147F5A43002B8C06 /* GetTimeOfDay.cpp */, + B23EA30B147F5A43002B8C06 /* epoch_time_to_string.cpp */, + B23EA30C147F5A43002B8C06 /* epoch_time_to_string.h */, + B23EA30D147F5A43002B8C06 /* export.h */, + B23EA30E147F5A43002B8C06 /* file_list.cpp */, + B23EA30F147F5A43002B8C06 /* file_list.h */, + B23EA310147F5A43002B8C06 /* file_list_node_context.h */, + B23EA311147F5A43002B8C06 /* file_list_transfer.cpp */, + B23EA312147F5A43002B8C06 /* file_list_transfer.h */, + B23EA313147F5A43002B8C06 /* file_list_transfer_cb_interface.h */, + B23EA314147F5A43002B8C06 /* file_operations.cpp */, + B23EA315147F5A43002B8C06 /* file_operations.h */, + B23EA316147F5A43002B8C06 /* format_string.cpp */, + B23EA317147F5A43002B8C06 /* format_string.h */, + B23EA318147F5A43002B8C06 /* fully_connected_mesh2.cpp */, + B23EA319147F5A43002B8C06 /* fully_connected_mesh2.h */, + B23EA31A147F5A43002B8C06 /* getche.cpp */, + B23EA31B147F5A43002B8C06 /* getche.h */, + B23EA31C147F5A43002B8C06 /* gets.cpp */, + B23EA31D147F5A43002B8C06 /* gets.h */, + B23EA31E147F5A43002B8C06 /* get_time.cpp */, + B23EA31F147F5A43002B8C06 /* get_time.h */, + B23EA320147F5A43002B8C06 /* get_time_of_day.cpp */, B23EA321147F5A43002B8C06 /* gettimeofday.h */, - B23EA322147F5A43002B8C06 /* GridSectorizer.cpp */, - B23EA323147F5A43002B8C06 /* GridSectorizer.h */, - B23EA324147F5A43002B8C06 /* HTTPConnection.cpp */, - B23EA325147F5A43002B8C06 /* HTTPConnection.h */, - B23EA326147F5A43002B8C06 /* IncrementalReadInterface.cpp */, - B23EA327147F5A43002B8C06 /* IncrementalReadInterface.h */, - B23EA328147F5A43002B8C06 /* InternalPacket.h */, - B23EA329147F5A43002B8C06 /* Itoa.cpp */, - B23EA32A147F5A43002B8C06 /* Itoa.h */, - B23EA32B147F5A43002B8C06 /* Kbhit.h */, - B23EA32C147F5A43002B8C06 /* LinuxStrings.cpp */, - B23EA32D147F5A43002B8C06 /* LinuxStrings.h */, - B23EA32E147F5A43002B8C06 /* LocklessTypes.cpp */, - B23EA32F147F5A43002B8C06 /* LocklessTypes.h */, - B23EA330147F5A43002B8C06 /* LogCommandParser.cpp */, - B23EA331147F5A43002B8C06 /* LogCommandParser.h */, - B23EA332147F5A43002B8C06 /* MessageFilter.cpp */, - B23EA333147F5A43002B8C06 /* MessageFilter.h */, - B23EA334147F5A43002B8C06 /* MessageIdentifiers.h */, - B23EA335147F5A43002B8C06 /* MTUSize.h */, - B23EA336147F5A43002B8C06 /* NativeFeatureIncludes.h */, - B23EA337147F5A43002B8C06 /* NativeFeatureIncludesOverrides.h */, - B23EA338147F5A43002B8C06 /* NativeTypes.h */, - B23EA339147F5A43002B8C06 /* NatPunchthroughClient.cpp */, - B23EA33A147F5A43002B8C06 /* NatPunchthroughClient.h */, - B23EA33B147F5A43002B8C06 /* NatPunchthroughServer.cpp */, - B23EA33C147F5A43002B8C06 /* NatPunchthroughServer.h */, - B23EA33D147F5A43002B8C06 /* NatTypeDetectionClient.cpp */, - B23EA33E147F5A43002B8C06 /* NatTypeDetectionClient.h */, - B23EA33F147F5A43002B8C06 /* NatTypeDetectionCommon.cpp */, - B23EA340147F5A43002B8C06 /* NatTypeDetectionCommon.h */, - B23EA341147F5A43002B8C06 /* NatTypeDetectionServer.cpp */, - B23EA342147F5A43002B8C06 /* NatTypeDetectionServer.h */, - B23EA343147F5A43002B8C06 /* NetworkIDManager.cpp */, - B23EA344147F5A43002B8C06 /* NetworkIDManager.h */, - B23EA345147F5A43002B8C06 /* NetworkIDObject.cpp */, - B23EA346147F5A43002B8C06 /* NetworkIDObject.h */, - B23EA347147F5A43002B8C06 /* PacketConsoleLogger.cpp */, - B23EA348147F5A43002B8C06 /* PacketConsoleLogger.h */, - B23EA349147F5A43002B8C06 /* PacketFileLogger.cpp */, - B23EA34A147F5A43002B8C06 /* PacketFileLogger.h */, - B23EA34B147F5A43002B8C06 /* PacketizedTCP.cpp */, - B23EA34C147F5A43002B8C06 /* PacketizedTCP.h */, - B23EA34D147F5A43002B8C06 /* PacketLogger.cpp */, - B23EA34E147F5A43002B8C06 /* PacketLogger.h */, - B23EA34F147F5A43002B8C06 /* PacketOutputWindowLogger.cpp */, - B23EA350147F5A43002B8C06 /* PacketOutputWindowLogger.h */, - B23EA351147F5A43002B8C06 /* PacketPool.h */, - B23EA352147F5A43002B8C06 /* PacketPriority.h */, - B23EA353147F5A43002B8C06 /* PluginInterface2.cpp */, - B23EA354147F5A43002B8C06 /* PluginInterface2.h */, - B23EA356147F5A43002B8C06 /* Rackspace.cpp */, - B23EA357147F5A43002B8C06 /* Rackspace.h */, + B23EA322147F5A43002B8C06 /* grid_sectorizer.cpp */, + B23EA323147F5A43002B8C06 /* grid_sectorizer.h */, + B23EA324147F5A43002B8C06 /* http_connection.cpp */, + B23EA325147F5A43002B8C06 /* http_connection.h */, + B23EA326147F5A43002B8C06 /* incremental_read_interface.cpp */, + B23EA327147F5A43002B8C06 /* incremental_read_interface.h */, + B23EA328147F5A43002B8C06 /* internal_packet.h */, + B23EA329147F5A43002B8C06 /* itoa.cpp */, + B23EA32A147F5A43002B8C06 /* itoa.h */, + B23EA32B147F5A43002B8C06 /* kbhit.h */, + B23EA32C147F5A43002B8C06 /* linux_strings.cpp */, + B23EA32D147F5A43002B8C06 /* linux_strings.h */, + B23EA32E147F5A43002B8C06 /* lockless_types.cpp */, + B23EA32F147F5A43002B8C06 /* lockless_types.h */, + B23EA330147F5A43002B8C06 /* log_command_parser.cpp */, + B23EA331147F5A43002B8C06 /* log_command_parser.h */, + B23EA332147F5A43002B8C06 /* message_filter.cpp */, + B23EA333147F5A43002B8C06 /* message_filter.h */, + B23EA334147F5A43002B8C06 /* message_identifiers.h */, + B23EA335147F5A43002B8C06 /* mtu_size.h */, + B23EA336147F5A43002B8C06 /* native_feature_includes.h */, + B23EA337147F5A43002B8C06 /* native_feature_includes_overrides.h */, + B23EA338147F5A43002B8C06 /* native_types.h */, + B23EA339147F5A43002B8C06 /* nat_punchthrough_client.cpp */, + B23EA33A147F5A43002B8C06 /* nat_punchthrough_client.h */, + B23EA33B147F5A43002B8C06 /* nat_punchthrough_server.cpp */, + B23EA33C147F5A43002B8C06 /* nat_punchthrough_server.h */, + B23EA33D147F5A43002B8C06 /* nat_type_detection_client.cpp */, + B23EA33E147F5A43002B8C06 /* nat_type_detection_client.h */, + B23EA33F147F5A43002B8C06 /* nat_type_detection_common.cpp */, + B23EA340147F5A43002B8C06 /* nat_type_detection_common.h */, + B23EA341147F5A43002B8C06 /* nat_type_detection_server.cpp */, + B23EA342147F5A43002B8C06 /* nat_type_detection_server.h */, + B23EA343147F5A43002B8C06 /* network_id_manager.cpp */, + B23EA344147F5A43002B8C06 /* network_id_manager.h */, + B23EA345147F5A43002B8C06 /* network_id_object.cpp */, + B23EA346147F5A43002B8C06 /* network_id_object.h */, + B23EA347147F5A43002B8C06 /* packet_console_logger.cpp */, + B23EA348147F5A43002B8C06 /* packet_console_logger.h */, + B23EA349147F5A43002B8C06 /* packet_file_logger.cpp */, + B23EA34A147F5A43002B8C06 /* packet_file_logger.h */, + B23EA34B147F5A43002B8C06 /* packetized_tcp.cpp */, + B23EA34C147F5A43002B8C06 /* packetized_tcp.h */, + B23EA34D147F5A43002B8C06 /* packet_logger.cpp */, + B23EA34E147F5A43002B8C06 /* packet_logger.h */, + B23EA34F147F5A43002B8C06 /* packet_output_window_logger.cpp */, + B23EA350147F5A43002B8C06 /* packet_output_window_logger.h */, + B23EA351147F5A43002B8C06 /* packet_pool.h */, + B23EA352147F5A43002B8C06 /* packet_priority.h */, + B23EA353147F5A43002B8C06 /* plugin_interface2.cpp */, + B23EA354147F5A43002B8C06 /* plugin_interface2.h */, + B23EA356147F5A43002B8C06 /* rackspace.cpp */, + B23EA357147F5A43002B8C06 /* rackspace.h */, B23EA358147F5A43002B8C06 /* RakAlloca.h */, B23EA359147F5A43002B8C06 /* RakAssert.h */, - B23EA35A147F5A43002B8C06 /* RakMemoryOverride.cpp */, + B23EA35A147F5A43002B8C06 /* memory_override.cpp */, B23EA35B147F5A43002B8C06 /* RakMemoryOverride.h */, B23EA35C147F5A43002B8C06 /* RakNet_vc8.vcproj */, B23EA35D147F5A43002B8C06 /* RakNet_vc9.vcproj */, B23EA35E147F5A43002B8C06 /* RakNet.vcproj */, - B23EA35F147F5A43002B8C06 /* RakNetCommandParser.cpp */, + B23EA35F147F5A43002B8C06 /* command_parser.cpp */, B23EA360147F5A43002B8C06 /* RakNetCommandParser.h */, B23EA361147F5A43002B8C06 /* RakNetDefines.h */, B23EA362147F5A43002B8C06 /* RakNetDefinesOverrides.h */, B23EA363147F5A43002B8C06 /* RakNetSmartPtr.h */, B23EA364147F5A43002B8C06 /* RakNetSocket.cpp */, B23EA365147F5A43002B8C06 /* RakNetSocket.h */, - B23EA366147F5A43002B8C06 /* RakNetStatistics.cpp */, + B23EA366147F5A43002B8C06 /* statistics.cpp */, B23EA367147F5A43002B8C06 /* RakNetStatistics.h */, B23EA368147F5A43002B8C06 /* RakNetTime.h */, - B23EA369147F5A43002B8C06 /* RakNetTransport2.cpp */, + B23EA369147F5A43002B8C06 /* transport2.cpp */, B23EA36A147F5A43002B8C06 /* RakNetTransport2.h */, - B23EA36B147F5A43002B8C06 /* RakNetTypes.cpp */, + B23EA36B147F5A43002B8C06 /* types.cpp */, B23EA36C147F5A43002B8C06 /* RakNetTypes.h */, B23EA36D147F5A43002B8C06 /* RakNetVersion.h */, - B23EA36E147F5A43002B8C06 /* RakPeer.cpp */, + B23EA36E147F5A43002B8C06 /* peer.cpp */, B23EA36F147F5A43002B8C06 /* RakPeer.h */, B23EA370147F5A43002B8C06 /* RakPeerInterface.h */, - B23EA371147F5A43002B8C06 /* RakSleep.cpp */, + B23EA371147F5A43002B8C06 /* sleep.cpp */, B23EA372147F5A43002B8C06 /* RakSleep.h */, - B23EA373147F5A43002B8C06 /* RakString.cpp */, + B23EA373147F5A43002B8C06 /* string.cpp */, B23EA374147F5A43002B8C06 /* RakString.h */, - B23EA375147F5A43002B8C06 /* RakThread.cpp */, + B23EA375147F5A43002B8C06 /* thread.cpp */, B23EA376147F5A43002B8C06 /* RakThread.h */, - B23EA377147F5A43002B8C06 /* RakWString.cpp */, + B23EA377147F5A43002B8C06 /* wstring.cpp */, B23EA378147F5A43002B8C06 /* RakWString.h */, - B23EA379147F5A43002B8C06 /* Rand.cpp */, - B23EA37A147F5A43002B8C06 /* Rand.h */, + B23EA379147F5A43002B8C06 /* rand.cpp */, + B23EA37A147F5A43002B8C06 /* rand.h */, B23EA37B147F5A43002B8C06 /* rdlmalloc-options.h */, B23EA37C147F5A43002B8C06 /* rdlmalloc.cpp */, B23EA37D147F5A43002B8C06 /* rdlmalloc.h */, - B23EA37E147F5A43002B8C06 /* ReadyEvent.cpp */, - B23EA37F147F5A43002B8C06 /* ReadyEvent.h */, - B23EA380147F5A43002B8C06 /* RefCountedObj.h */, - B23EA381147F5A43002B8C06 /* ReliabilityLayer.cpp */, - B23EA382147F5A43002B8C06 /* ReliabilityLayer.h */, - B23EA383147F5A43002B8C06 /* ReplicaEnums.h */, - B23EA384147F5A43002B8C06 /* ReplicaManager3.cpp */, - B23EA385147F5A43002B8C06 /* ReplicaManager3.h */, - B23EA386147F5A43002B8C06 /* Router2.cpp */, - B23EA387147F5A43002B8C06 /* Router2.h */, - B23EA388147F5A43002B8C06 /* RPC4Plugin.cpp */, - B23EA389147F5A43002B8C06 /* RPC4Plugin.h */, - B23EA38A147F5A43002B8C06 /* SecureHandshake.cpp */, - B23EA38B147F5A43002B8C06 /* SecureHandshake.h */, - B23EA38C147F5A43002B8C06 /* SendToThread.cpp */, - B23EA38D147F5A43002B8C06 /* SendToThread.h */, + B23EA37E147F5A43002B8C06 /* ready_event.cpp */, + B23EA37F147F5A43002B8C06 /* ready_event.h */, + B23EA380147F5A43002B8C06 /* ref_counted_obj.h */, + B23EA381147F5A43002B8C06 /* reliability_layer.cpp */, + B23EA382147F5A43002B8C06 /* reliability_layer.h */, + B23EA383147F5A43002B8C06 /* replica_enums.h */, + B23EA384147F5A43002B8C06 /* replica_manager3.cpp */, + B23EA385147F5A43002B8C06 /* replica_manager3.h */, + B23EA386147F5A43002B8C06 /* router2.cpp */, + B23EA387147F5A43002B8C06 /* router2.h */, + B23EA388147F5A43002B8C06 /* rpc4_plugin.cpp */, + B23EA389147F5A43002B8C06 /* rpc4_plugin.h */, + B23EA38A147F5A43002B8C06 /* secure_handshake.cpp */, + B23EA38B147F5A43002B8C06 /* secure_handshake.h */, + B23EA38C147F5A43002B8C06 /* send_to_thread.cpp */, + B23EA38D147F5A43002B8C06 /* send_to_thread.h */, B23EA38E147F5A43002B8C06 /* SHA1.cpp */, B23EA38F147F5A43002B8C06 /* SHA1.h */, - B23EA390147F5A43002B8C06 /* SignaledEvent.cpp */, - B23EA391147F5A43002B8C06 /* SignaledEvent.h */, - B23EA392147F5A43002B8C06 /* SimpleMutex.cpp */, - B23EA393147F5A43002B8C06 /* SimpleMutex.h */, - B23EA394147F5A43002B8C06 /* SimpleTCPServer.h */, - B23EA395147F5A43002B8C06 /* SingleProducerConsumer.h */, - B23EA396147F5A43002B8C06 /* SocketDefines.h */, - B23EA397147F5A43002B8C06 /* SocketIncludes.h */, - B23EA398147F5A43002B8C06 /* SocketLayer.cpp */, - B23EA399147F5A43002B8C06 /* SocketLayer.h */, - B23EA39A147F5A43002B8C06 /* StringCompressor.cpp */, - B23EA39B147F5A43002B8C06 /* StringCompressor.h */, - B23EA39C147F5A43002B8C06 /* StringTable.cpp */, - B23EA39D147F5A43002B8C06 /* StringTable.h */, - B23EA39E147F5A43002B8C06 /* SuperFastHash.cpp */, - B23EA39F147F5A43002B8C06 /* SuperFastHash.h */, - B23EA3A0147F5A43002B8C06 /* TableSerializer.cpp */, - B23EA3A1147F5A43002B8C06 /* TableSerializer.h */, - B23EA3A2147F5A43002B8C06 /* TCPInterface.cpp */, - B23EA3A3147F5A43002B8C06 /* TCPInterface.h */, - B23EA3A4147F5A43002B8C06 /* TeamBalancer.cpp */, - B23EA3A5147F5A43002B8C06 /* TeamBalancer.h */, - B23EA3A6147F5A43002B8C06 /* TelnetTransport.cpp */, - B23EA3A7147F5A43002B8C06 /* TelnetTransport.h */, - B23EA3A8147F5A43002B8C06 /* ThreadPool.h */, - B23EA3A9147F5A43002B8C06 /* ThreadsafePacketLogger.cpp */, - B23EA3AA147F5A43002B8C06 /* ThreadsafePacketLogger.h */, - B23EA3AB147F5A43002B8C06 /* TransportInterface.h */, - B23EA3AC147F5A43002B8C06 /* TwoWayAuthentication.cpp */, - B23EA3AD147F5A43002B8C06 /* TwoWayAuthentication.h */, - B23EA3AE147F5A43002B8C06 /* UDPForwarder.cpp */, - B23EA3AF147F5A43002B8C06 /* UDPForwarder.h */, - B23EA3B0147F5A43002B8C06 /* UDPProxyClient.cpp */, - B23EA3B1147F5A43002B8C06 /* UDPProxyClient.h */, - B23EA3B2147F5A43002B8C06 /* UDPProxyCommon.h */, - B23EA3B3147F5A43002B8C06 /* UDPProxyCoordinator.cpp */, - B23EA3B4147F5A43002B8C06 /* UDPProxyCoordinator.h */, - B23EA3B5147F5A43002B8C06 /* UDPProxyServer.cpp */, - B23EA3B6147F5A43002B8C06 /* UDPProxyServer.h */, - B23EA3B7147F5A43002B8C06 /* VariableDeltaSerializer.cpp */, - B23EA3B8147F5A43002B8C06 /* VariableDeltaSerializer.h */, - B23EA3B9147F5A43002B8C06 /* VariableListDeltaTracker.cpp */, - B23EA3BA147F5A43002B8C06 /* VariableListDeltaTracker.h */, - B23EA3BB147F5A43002B8C06 /* VariadicSQLParser.cpp */, - B23EA3BC147F5A43002B8C06 /* VariadicSQLParser.h */, - B23EA3BF147F5A43002B8C06 /* WindowsIncludes.h */, - B23EA3C0147F5A43002B8C06 /* WSAStartupSingleton.cpp */, - B23EA3C1147F5A43002B8C06 /* WSAStartupSingleton.h */, + B23EA390147F5A43002B8C06 /* signaled_event.cpp */, + B23EA391147F5A43002B8C06 /* signaled_event.h */, + B23EA392147F5A43002B8C06 /* simple_mutex.cpp */, + B23EA393147F5A43002B8C06 /* simple_mutex.h */, + B23EA394147F5A43002B8C06 /* simple_tcp_server.h */, + B23EA395147F5A43002B8C06 /* single_producer_consumer.h */, + B23EA396147F5A43002B8C06 /* socket_defines.h */, + B23EA397147F5A43002B8C06 /* socket_includes.h */, + B23EA398147F5A43002B8C06 /* socket_layer.cpp */, + B23EA399147F5A43002B8C06 /* socket_layer.h */, + B23EA39A147F5A43002B8C06 /* string_compressor.cpp */, + B23EA39B147F5A43002B8C06 /* string_compressor.h */, + B23EA39C147F5A43002B8C06 /* string_table.cpp */, + B23EA39D147F5A43002B8C06 /* string_table.h */, + B23EA39E147F5A43002B8C06 /* super_fast_hash.cpp */, + B23EA39F147F5A43002B8C06 /* super_fast_hash.h */, + B23EA3A0147F5A43002B8C06 /* table_serializer.cpp */, + B23EA3A1147F5A43002B8C06 /* table_serializer.h */, + B23EA3A2147F5A43002B8C06 /* tcp_interface.cpp */, + B23EA3A3147F5A43002B8C06 /* tcp_interface.h */, + B23EA3A4147F5A43002B8C06 /* team_balancer.cpp */, + B23EA3A5147F5A43002B8C06 /* team_balancer.h */, + B23EA3A6147F5A43002B8C06 /* telnet_transport.cpp */, + B23EA3A7147F5A43002B8C06 /* telnet_transport.h */, + B23EA3A8147F5A43002B8C06 /* thread_pool.h */, + B23EA3A9147F5A43002B8C06 /* threadsafe_packet_logger.cpp */, + B23EA3AA147F5A43002B8C06 /* threadsafe_packet_logger.h */, + B23EA3AB147F5A43002B8C06 /* transport_interface.h */, + B23EA3AC147F5A43002B8C06 /* two_way_authentication.cpp */, + B23EA3AD147F5A43002B8C06 /* two_way_authentication.h */, + B23EA3AE147F5A43002B8C06 /* udp_forwarder.cpp */, + B23EA3AF147F5A43002B8C06 /* udp_forwarder.h */, + B23EA3B0147F5A43002B8C06 /* udp_proxy_client.cpp */, + B23EA3B1147F5A43002B8C06 /* udp_proxy_client.h */, + B23EA3B2147F5A43002B8C06 /* udp_proxy_common.h */, + B23EA3B3147F5A43002B8C06 /* udp_proxy_coordinator.cpp */, + B23EA3B4147F5A43002B8C06 /* udp_proxy_coordinator.h */, + B23EA3B5147F5A43002B8C06 /* udp_proxy_server.cpp */, + B23EA3B6147F5A43002B8C06 /* udp_proxy_server.h */, + B23EA3B7147F5A43002B8C06 /* variable_delta_serializer.cpp */, + B23EA3B8147F5A43002B8C06 /* variable_delta_serializer.h */, + B23EA3B9147F5A43002B8C06 /* variable_list_delta_tracker.cpp */, + B23EA3BA147F5A43002B8C06 /* variable_list_delta_tracker.h */, + B23EA3BB147F5A43002B8C06 /* variadic_sql_parser.cpp */, + B23EA3BC147F5A43002B8C06 /* variadic_sql_parser.h */, + B23EA3BF147F5A43002B8C06 /* windows_includes.h */, + B23EA3C0147F5A43002B8C06 /* wsa_startup_singleton.cpp */, + B23EA3C1147F5A43002B8C06 /* wsa_startup_singleton.h */, ); name = RakNet; sourceTree = ""; @@ -766,99 +766,99 @@ B24A1D70147EDC330029E45E /* AppDelegate.mm in Sources */, B24A1D73147EDC330029E45E /* ViewController.mm in Sources */, B24A1F26147F1C640029E45E /* ServerDetailsViewController.m in Sources */, - B23EA3C3147F5A43002B8C06 /* _FindFirst.cpp in Sources */, - B23EA3C4147F5A43002B8C06 /* BitStream.cpp in Sources */, - B23EA3C5147F5A43002B8C06 /* CCRakNetSlidingWindow.cpp in Sources */, - B23EA3C6147F5A43002B8C06 /* CCRakNetUDT.cpp in Sources */, - B23EA3C7147F5A43002B8C06 /* CheckSum.cpp in Sources */, - B23EA3C8147F5A43002B8C06 /* CloudClient.cpp in Sources */, - B23EA3C9147F5A43002B8C06 /* CloudCommon.cpp in Sources */, - B23EA3CA147F5A43002B8C06 /* CloudServer.cpp in Sources */, - B23EA3CC147F5A43002B8C06 /* CommandParserInterface.cpp in Sources */, - B23EA3CD147F5A43002B8C06 /* ConnectionGraph2.cpp in Sources */, - B23EA3CE147F5A43002B8C06 /* ConsoleServer.cpp in Sources */, - B23EA3CF147F5A43002B8C06 /* DataCompressor.cpp in Sources */, - B23EA3D0147F5A43002B8C06 /* DirectoryDeltaTransfer.cpp in Sources */, - B23EA3D1147F5A43002B8C06 /* DS_BytePool.cpp in Sources */, - B23EA3D2147F5A43002B8C06 /* DS_ByteQueue.cpp in Sources */, - B23EA3D3147F5A43002B8C06 /* DS_HuffmanEncodingTree.cpp in Sources */, - B23EA3D4147F5A43002B8C06 /* DS_Table.cpp in Sources */, - B23EA3D5147F5A43002B8C06 /* DynDNS.cpp in Sources */, - B23EA3D6147F5A43002B8C06 /* EmailSender.cpp in Sources */, + B23EA3C3147F5A43002B8C06 /* find_first.cpp in Sources */, + B23EA3C4147F5A43002B8C06 /* bit_stream.cpp in Sources */, + B23EA3C5147F5A43002B8C06 /* cc_sliding_window.cpp in Sources */, + B23EA3C6147F5A43002B8C06 /* cc_udt.cpp in Sources */, + B23EA3C7147F5A43002B8C06 /* check_sum.cpp in Sources */, + B23EA3C8147F5A43002B8C06 /* cloud_client.cpp in Sources */, + B23EA3C9147F5A43002B8C06 /* cloud_common.cpp in Sources */, + B23EA3CA147F5A43002B8C06 /* cloud_server.cpp in Sources */, + B23EA3CC147F5A43002B8C06 /* command_parser_interface.cpp in Sources */, + B23EA3CD147F5A43002B8C06 /* connection_graph2.cpp in Sources */, + B23EA3CE147F5A43002B8C06 /* console_server.cpp in Sources */, + B23EA3CF147F5A43002B8C06 /* data_compressor.cpp in Sources */, + B23EA3D0147F5A43002B8C06 /* directory_delta_transfer.cpp in Sources */, + B23EA3D1147F5A43002B8C06 /* ds_byte_pool.cpp in Sources */, + B23EA3D2147F5A43002B8C06 /* ds_byte_queue.cpp in Sources */, + B23EA3D3147F5A43002B8C06 /* ds_huffman_encoding_tree.cpp in Sources */, + B23EA3D4147F5A43002B8C06 /* ds_table.cpp in Sources */, + B23EA3D5147F5A43002B8C06 /* dyn_dns.cpp in Sources */, + B23EA3D6147F5A43002B8C06 /* email_sender.cpp in Sources */, B23EA3D7147F5A43002B8C06 /* EncodeClassName.cpp in Sources */, - B23EA3D8147F5A43002B8C06 /* EpochTimeToString.cpp in Sources */, - B23EA3D9147F5A43002B8C06 /* FileList.cpp in Sources */, - B23EA3DA147F5A43002B8C06 /* FileListTransfer.cpp in Sources */, - B23EA3DB147F5A43002B8C06 /* FileOperations.cpp in Sources */, - B23EA3DC147F5A43002B8C06 /* FormatString.cpp in Sources */, - B23EA3DD147F5A43002B8C06 /* FullyConnectedMesh2.cpp in Sources */, - B23EA3DE147F5A43002B8C06 /* Getche.cpp in Sources */, - B23EA3DF147F5A43002B8C06 /* Gets.cpp in Sources */, - B23EA3E0147F5A43002B8C06 /* GetTime.cpp in Sources */, - B23EA3E1147F5A43002B8C06 /* GetTimeOfDay.cpp in Sources */, - B23EA3E2147F5A43002B8C06 /* GridSectorizer.cpp in Sources */, - B23EA3E3147F5A43002B8C06 /* HTTPConnection.cpp in Sources */, - B23EA3E4147F5A43002B8C06 /* IncrementalReadInterface.cpp in Sources */, - B23EA3E5147F5A43002B8C06 /* Itoa.cpp in Sources */, - B23EA3E6147F5A43002B8C06 /* LinuxStrings.cpp in Sources */, - B23EA3E7147F5A43002B8C06 /* LocklessTypes.cpp in Sources */, - B23EA3E8147F5A43002B8C06 /* LogCommandParser.cpp in Sources */, - B23EA3E9147F5A43002B8C06 /* MessageFilter.cpp in Sources */, - B23EA3EA147F5A43002B8C06 /* NatPunchthroughClient.cpp in Sources */, - B23EA3EB147F5A43002B8C06 /* NatPunchthroughServer.cpp in Sources */, - B23EA3EC147F5A43002B8C06 /* NatTypeDetectionClient.cpp in Sources */, - B23EA3ED147F5A43002B8C06 /* NatTypeDetectionCommon.cpp in Sources */, - B23EA3EE147F5A43002B8C06 /* NatTypeDetectionServer.cpp in Sources */, - B23EA3EF147F5A43002B8C06 /* NetworkIDManager.cpp in Sources */, - B23EA3F0147F5A43002B8C06 /* NetworkIDObject.cpp in Sources */, - B23EA3F1147F5A43002B8C06 /* PacketConsoleLogger.cpp in Sources */, - B23EA3F2147F5A43002B8C06 /* PacketFileLogger.cpp in Sources */, - B23EA3F3147F5A43002B8C06 /* PacketizedTCP.cpp in Sources */, - B23EA3F4147F5A43002B8C06 /* PacketLogger.cpp in Sources */, - B23EA3F5147F5A43002B8C06 /* PacketOutputWindowLogger.cpp in Sources */, - B23EA3F6147F5A43002B8C06 /* PluginInterface2.cpp in Sources */, - B23EA3F7147F5A43002B8C06 /* Rackspace.cpp in Sources */, - B23EA3F8147F5A43002B8C06 /* RakMemoryOverride.cpp in Sources */, - B23EA3FC147F5A43002B8C06 /* RakNetCommandParser.cpp in Sources */, + B23EA3D8147F5A43002B8C06 /* epoch_time_to_string.cpp in Sources */, + B23EA3D9147F5A43002B8C06 /* file_list.cpp in Sources */, + B23EA3DA147F5A43002B8C06 /* file_list_transfer.cpp in Sources */, + B23EA3DB147F5A43002B8C06 /* file_operations.cpp in Sources */, + B23EA3DC147F5A43002B8C06 /* format_string.cpp in Sources */, + B23EA3DD147F5A43002B8C06 /* fully_connected_mesh2.cpp in Sources */, + B23EA3DE147F5A43002B8C06 /* getche.cpp in Sources */, + B23EA3DF147F5A43002B8C06 /* gets.cpp in Sources */, + B23EA3E0147F5A43002B8C06 /* get_time.cpp in Sources */, + B23EA3E1147F5A43002B8C06 /* get_time_of_day.cpp in Sources */, + B23EA3E2147F5A43002B8C06 /* grid_sectorizer.cpp in Sources */, + B23EA3E3147F5A43002B8C06 /* http_connection.cpp in Sources */, + B23EA3E4147F5A43002B8C06 /* incremental_read_interface.cpp in Sources */, + B23EA3E5147F5A43002B8C06 /* itoa.cpp in Sources */, + B23EA3E6147F5A43002B8C06 /* linux_strings.cpp in Sources */, + B23EA3E7147F5A43002B8C06 /* lockless_types.cpp in Sources */, + B23EA3E8147F5A43002B8C06 /* log_command_parser.cpp in Sources */, + B23EA3E9147F5A43002B8C06 /* message_filter.cpp in Sources */, + B23EA3EA147F5A43002B8C06 /* nat_punchthrough_client.cpp in Sources */, + B23EA3EB147F5A43002B8C06 /* nat_punchthrough_server.cpp in Sources */, + B23EA3EC147F5A43002B8C06 /* nat_type_detection_client.cpp in Sources */, + B23EA3ED147F5A43002B8C06 /* nat_type_detection_common.cpp in Sources */, + B23EA3EE147F5A43002B8C06 /* nat_type_detection_server.cpp in Sources */, + B23EA3EF147F5A43002B8C06 /* network_id_manager.cpp in Sources */, + B23EA3F0147F5A43002B8C06 /* network_id_object.cpp in Sources */, + B23EA3F1147F5A43002B8C06 /* packet_console_logger.cpp in Sources */, + B23EA3F2147F5A43002B8C06 /* packet_file_logger.cpp in Sources */, + B23EA3F3147F5A43002B8C06 /* packetized_tcp.cpp in Sources */, + B23EA3F4147F5A43002B8C06 /* packet_logger.cpp in Sources */, + B23EA3F5147F5A43002B8C06 /* packet_output_window_logger.cpp in Sources */, + B23EA3F6147F5A43002B8C06 /* plugin_interface2.cpp in Sources */, + B23EA3F7147F5A43002B8C06 /* rackspace.cpp in Sources */, + B23EA3F8147F5A43002B8C06 /* memory_override.cpp in Sources */, + B23EA3FC147F5A43002B8C06 /* command_parser.cpp in Sources */, B23EA3FD147F5A43002B8C06 /* RakNetSocket.cpp in Sources */, - B23EA3FE147F5A43002B8C06 /* RakNetStatistics.cpp in Sources */, - B23EA3FF147F5A43002B8C06 /* RakNetTransport2.cpp in Sources */, - B23EA400147F5A43002B8C06 /* RakNetTypes.cpp in Sources */, - B23EA401147F5A43002B8C06 /* RakPeer.cpp in Sources */, - B23EA402147F5A43002B8C06 /* RakSleep.cpp in Sources */, - B23EA403147F5A43002B8C06 /* RakString.cpp in Sources */, - B23EA404147F5A43002B8C06 /* RakThread.cpp in Sources */, - B23EA405147F5A43002B8C06 /* RakWString.cpp in Sources */, - B23EA406147F5A43002B8C06 /* Rand.cpp in Sources */, + B23EA3FE147F5A43002B8C06 /* statistics.cpp in Sources */, + B23EA3FF147F5A43002B8C06 /* transport2.cpp in Sources */, + B23EA400147F5A43002B8C06 /* types.cpp in Sources */, + B23EA401147F5A43002B8C06 /* peer.cpp in Sources */, + B23EA402147F5A43002B8C06 /* sleep.cpp in Sources */, + B23EA403147F5A43002B8C06 /* string.cpp in Sources */, + B23EA404147F5A43002B8C06 /* thread.cpp in Sources */, + B23EA405147F5A43002B8C06 /* wstring.cpp in Sources */, + B23EA406147F5A43002B8C06 /* rand.cpp in Sources */, B23EA407147F5A43002B8C06 /* rdlmalloc.cpp in Sources */, - B23EA408147F5A43002B8C06 /* ReadyEvent.cpp in Sources */, - B23EA409147F5A43002B8C06 /* ReliabilityLayer.cpp in Sources */, - B23EA40A147F5A43002B8C06 /* ReplicaManager3.cpp in Sources */, - B23EA40B147F5A43002B8C06 /* Router2.cpp in Sources */, - B23EA40C147F5A43002B8C06 /* RPC4Plugin.cpp in Sources */, - B23EA40D147F5A43002B8C06 /* SecureHandshake.cpp in Sources */, - B23EA40E147F5A43002B8C06 /* SendToThread.cpp in Sources */, + B23EA408147F5A43002B8C06 /* ready_event.cpp in Sources */, + B23EA409147F5A43002B8C06 /* reliability_layer.cpp in Sources */, + B23EA40A147F5A43002B8C06 /* replica_manager3.cpp in Sources */, + B23EA40B147F5A43002B8C06 /* router2.cpp in Sources */, + B23EA40C147F5A43002B8C06 /* rpc4_plugin.cpp in Sources */, + B23EA40D147F5A43002B8C06 /* secure_handshake.cpp in Sources */, + B23EA40E147F5A43002B8C06 /* send_to_thread.cpp in Sources */, B23EA40F147F5A43002B8C06 /* SHA1.cpp in Sources */, - B23EA410147F5A43002B8C06 /* SignaledEvent.cpp in Sources */, - B23EA411147F5A43002B8C06 /* SimpleMutex.cpp in Sources */, - B23EA412147F5A43002B8C06 /* SocketLayer.cpp in Sources */, - B23EA413147F5A43002B8C06 /* StringCompressor.cpp in Sources */, - B23EA414147F5A43002B8C06 /* StringTable.cpp in Sources */, - B23EA415147F5A43002B8C06 /* SuperFastHash.cpp in Sources */, - B23EA416147F5A43002B8C06 /* TableSerializer.cpp in Sources */, - B23EA417147F5A43002B8C06 /* TCPInterface.cpp in Sources */, - B23EA418147F5A43002B8C06 /* TeamBalancer.cpp in Sources */, - B23EA419147F5A43002B8C06 /* TelnetTransport.cpp in Sources */, - B23EA41A147F5A43002B8C06 /* ThreadsafePacketLogger.cpp in Sources */, - B23EA41B147F5A43002B8C06 /* TwoWayAuthentication.cpp in Sources */, - B23EA41C147F5A43002B8C06 /* UDPForwarder.cpp in Sources */, - B23EA41D147F5A43002B8C06 /* UDPProxyClient.cpp in Sources */, - B23EA41E147F5A43002B8C06 /* UDPProxyCoordinator.cpp in Sources */, - B23EA41F147F5A43002B8C06 /* UDPProxyServer.cpp in Sources */, - B23EA420147F5A43002B8C06 /* VariableDeltaSerializer.cpp in Sources */, - B23EA421147F5A43002B8C06 /* VariableListDeltaTracker.cpp in Sources */, - B23EA422147F5A43002B8C06 /* VariadicSQLParser.cpp in Sources */, - B23EA424147F5A43002B8C06 /* WSAStartupSingleton.cpp in Sources */, + B23EA410147F5A43002B8C06 /* signaled_event.cpp in Sources */, + B23EA411147F5A43002B8C06 /* simple_mutex.cpp in Sources */, + B23EA412147F5A43002B8C06 /* socket_layer.cpp in Sources */, + B23EA413147F5A43002B8C06 /* string_compressor.cpp in Sources */, + B23EA414147F5A43002B8C06 /* string_table.cpp in Sources */, + B23EA415147F5A43002B8C06 /* super_fast_hash.cpp in Sources */, + B23EA416147F5A43002B8C06 /* table_serializer.cpp in Sources */, + B23EA417147F5A43002B8C06 /* tcp_interface.cpp in Sources */, + B23EA418147F5A43002B8C06 /* team_balancer.cpp in Sources */, + B23EA419147F5A43002B8C06 /* telnet_transport.cpp in Sources */, + B23EA41A147F5A43002B8C06 /* threadsafe_packet_logger.cpp in Sources */, + B23EA41B147F5A43002B8C06 /* two_way_authentication.cpp in Sources */, + B23EA41C147F5A43002B8C06 /* udp_forwarder.cpp in Sources */, + B23EA41D147F5A43002B8C06 /* udp_proxy_client.cpp in Sources */, + B23EA41E147F5A43002B8C06 /* udp_proxy_coordinator.cpp in Sources */, + B23EA41F147F5A43002B8C06 /* udp_proxy_server.cpp in Sources */, + B23EA420147F5A43002B8C06 /* variable_delta_serializer.cpp in Sources */, + B23EA421147F5A43002B8C06 /* variable_list_delta_tracker.cpp in Sources */, + B23EA422147F5A43002B8C06 /* variadic_sql_parser.cpp in Sources */, + B23EA424147F5A43002B8C06 /* wsa_startup_singleton.cpp in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; diff --git a/Samples/iOS/ChatClient/ChatClient/ViewController.h b/Samples/iOS/ChatClient/ChatClient/ViewController.h index 0d34efa6c..a83e69278 100644 --- a/Samples/iOS/ChatClient/ChatClient/ViewController.h +++ b/Samples/iOS/ChatClient/ChatClient/ViewController.h @@ -15,17 +15,17 @@ #import // RakNet headers -#include "mafianet/MessageIdentifiers.h" -#include "mafianet/PeerInterface.h" -#include "mafianet/Statistics.h" -#include "mafianet/Types.h" -#include "mafianet/BitStream.h" -#include "mafianet/PacketLogger.h" +#include "mafianet/message_identifiers.h" +#include "mafianet/peer_interface.h" +#include "mafianet/statistics.h" +#include "mafianet/types.h" +#include "mafianet/bit_stream.h" +#include "mafianet/packet_logger.h" #include #include #include #include -#include "mafianet/Types.h" +#include "mafianet/types.h" // For simplicity, this sample doesn't support secure connections #if LIBCAT_SECURITY==1 diff --git a/Source/CMakeLists.txt b/Source/CMakeLists.txt index 9611da9d7..5ddd97d52 100644 --- a/Source/CMakeLists.txt +++ b/Source/CMakeLists.txt @@ -9,103 +9,103 @@ # Source files (explicit list, no GLOB) set(MAFIANET_SOURCES - src/_FindFirst.cpp - src/Base64Encoder.cpp - src/BitStream.cpp - src/CCRakNetSlidingWindow.cpp - src/CCRakNetUDT.cpp - src/CheckSum.cpp - src/CloudClient.cpp - src/CloudCommon.cpp - src/CloudServer.cpp - src/ConnectionGraph2.cpp - src/DataCompressor.cpp - src/DirectoryDeltaTransfer.cpp - src/DR_SHA1.cpp - src/DS_BytePool.cpp - src/DS_ByteQueue.cpp - src/DS_HuffmanEncodingTree.cpp - src/DS_Table.cpp - src/DynDNS.cpp - src/EpochTimeToString.cpp - src/FileList.cpp - src/FileListTransfer.cpp - src/FileOperations.cpp - src/FormatString.cpp - src/FullyConnectedMesh2.cpp - src/Getche.cpp - src/Gets.cpp - src/GetTime.cpp - src/GetTimeOfDay.cpp - src/GridSectorizer.cpp - src/GuidUtil.cpp - src/IncrementalReadInterface.cpp - src/Itoa.cpp - src/LinuxAdapter.cpp - src/LinuxStrings.cpp - src/LocklessTypes.cpp - src/MessageFilter.cpp - src/MmsgBatch.cpp - src/MtuBlackHole.cpp - src/NatPunchthroughClient.cpp - src/NatPunchthroughServer.cpp - src/NatTypeDetectionClient.cpp - src/NatTypeDetectionCommon.cpp - src/NatTypeDetectionServer.cpp - src/NetworkIDManager.cpp - src/NetworkIDObject.cpp - src/OsxAdapter.cpp - src/PacketFileLogger.cpp - src/PacketizedTCP.cpp - src/PacketLogger.cpp - src/PacketOutputWindowLogger.cpp - src/PeerHandle.cpp - src/PluginInterface2.cpp - src/PointGridSectorizer.cpp - src/Rackspace.cpp - src/RakMemoryOverride.cpp - src/RakNetSocket2.cpp - src/RakNetSocket2_Berkley.cpp - src/RakNetSocket2_Windows_Linux.cpp - src/RakNetStatistics.cpp - src/RakNetTypes.cpp - src/RakPeer.cpp - src/RakSleep.cpp - src/RakString.cpp - src/RakThread.cpp - src/RakVoice.cpp - src/RakWString.cpp - src/Rand.cpp - src/RandSync.cpp - src/ReadyEvent.cpp - src/RelayPlugin.cpp - src/ReliabilityLayer.cpp - src/ReplicaManager3.cpp - src/Router2.cpp - src/RPC4Plugin.cpp - src/SecureHandshake.cpp - src/SendToThread.cpp - src/SignaledEvent.cpp - src/SimpleMutex.cpp - src/SocketLayer.cpp - src/StatisticsHistory.cpp - src/StringCompressor.cpp - src/StringTable.cpp - src/SuperFastHash.cpp - src/TableSerializer.cpp - src/TCPInterface.cpp - src/TeamBalancer.cpp - src/TeamManager.cpp - src/ThreadsafePacketLogger.cpp - src/TwoWayAuthentication.cpp - src/UDPForwarder.cpp - src/UDPProxyClient.cpp - src/UDPProxyCoordinator.cpp - src/UDPProxyServer.cpp - src/VariableDeltaSerializer.cpp - src/VariableListDeltaTracker.cpp - src/VariadicSQLParser.cpp - src/WSAStartupSingleton.cpp + src/find_first.cpp + src/base64_encoder.cpp + src/bit_stream.cpp + src/cc_sliding_window.cpp + src/cc_udt.cpp + src/check_sum.cpp + src/cloud_client.cpp + src/cloud_common.cpp + src/cloud_server.cpp + src/connection_graph2.cpp + src/data_compressor.cpp + src/directory_delta_transfer.cpp + src/dr_sha1.cpp + src/ds_byte_pool.cpp + src/ds_byte_queue.cpp + src/ds_huffman_encoding_tree.cpp + src/ds_table.cpp + src/dyn_dns.cpp + src/epoch_time_to_string.cpp + src/file_list.cpp + src/file_list_transfer.cpp + src/file_operations.cpp + src/format_string.cpp + src/fully_connected_mesh2.cpp + src/getche.cpp + src/gets.cpp + src/get_time.cpp + src/get_time_of_day.cpp + src/grid_sectorizer.cpp + src/guid_util.cpp + src/incremental_read_interface.cpp + src/itoa.cpp + src/linux_adapter.cpp + src/linux_strings.cpp + src/lockless_types.cpp + src/message_filter.cpp + src/mmsg_batch.cpp + src/mtu_black_hole.cpp + src/nat_punchthrough_client.cpp + src/nat_punchthrough_server.cpp + src/nat_type_detection_client.cpp + src/nat_type_detection_common.cpp + src/nat_type_detection_server.cpp + src/network_id_manager.cpp + src/network_id_object.cpp + src/osx_adapter.cpp + src/packet_file_logger.cpp + src/packetized_tcp.cpp + src/packet_logger.cpp + src/packet_output_window_logger.cpp + src/peer_handle.cpp + src/plugin_interface2.cpp + src/point_grid_sectorizer.cpp + src/rackspace.cpp + src/memory_override.cpp + src/socket2.cpp + src/socket2_berkley.cpp + src/socket2_windows_linux.cpp + src/statistics.cpp + src/types.cpp + src/peer.cpp + src/sleep.cpp + src/string.cpp + src/thread.cpp + src/voice.cpp + src/wstring.cpp + src/rand.cpp + src/rand_sync.cpp + src/ready_event.cpp + src/relay_plugin.cpp + src/reliability_layer.cpp + src/replica_manager3.cpp + src/router2.cpp + src/rpc4_plugin.cpp + src/secure_handshake.cpp + src/send_to_thread.cpp + src/signaled_event.cpp + src/simple_mutex.cpp + src/socket_layer.cpp + src/statistics_history.cpp + src/string_compressor.cpp + src/string_table.cpp + src/super_fast_hash.cpp + src/table_serializer.cpp + src/tcp_interface.cpp + src/team_balancer.cpp + src/team_manager.cpp + src/threadsafe_packet_logger.cpp + src/two_way_authentication.cpp + src/udp_forwarder.cpp + src/udp_proxy_client.cpp + src/udp_proxy_coordinator.cpp + src/udp_proxy_server.cpp + src/variable_delta_serializer.cpp + src/variable_list_delta_tracker.cpp + src/variadic_sql_parser.cpp + src/wsa_startup_singleton.cpp ) # Extras: utilities that are not game networking (SMTP, HTTP client, telnet and @@ -113,16 +113,16 @@ set(MAFIANET_SOURCES # MafiaNetExtras target when MAFIANET_BUILD_EXTRAS is ON; their headers stay in # include/mafianet/ so include paths are unchanged. See issue #50, stage 2. set(MAFIANET_EXTRAS_SOURCES - src/CommandParserInterface.cpp - src/ConsoleServer.cpp - src/EmailSender.cpp - src/HTTPConnection.cpp - src/HTTPConnection2.cpp - src/LogCommandParser.cpp - src/PacketConsoleLogger.cpp - src/RakNetCommandParser.cpp - src/RakNetTransport2.cpp - src/TelnetTransport.cpp + src/command_parser_interface.cpp + src/console_server.cpp + src/email_sender.cpp + src/http_connection.cpp + src/http_connection2.cpp + src/log_command_parser.cpp + src/packet_console_logger.cpp + src/command_parser.cpp + src/transport2.cpp + src/telnet_transport.cpp ) set(MAFIANET_CRYPTO_SOURCES @@ -133,173 +133,166 @@ set(MAFIANET_CRYPTO_SOURCES ) set(MAFIANET_HEADERS - include/mafianet/_FindFirst.h - include/mafianet/Alloca.h - include/mafianet/Assert.h - include/mafianet/AutopatcherPatchContext.h - include/mafianet/AutopatcherRepositoryInterface.h - include/mafianet/Base64Encoder.h - include/mafianet/BitStream.h - include/mafianet/CCRakNetSlidingWindow.h - include/mafianet/CCRakNetUDT.h - include/mafianet/CheckSum.h - include/mafianet/CloudClient.h - include/mafianet/CloudCommon.h - include/mafianet/CloudServer.h - include/mafianet/CommandParser.h - include/mafianet/CommandParserInterface.h - include/mafianet/ConnectionGraph2.h - include/mafianet/ConsoleServer.h - include/mafianet/DataCompressor.h - include/mafianet/DefineOverrides.h - include/mafianet/Defines.h - include/mafianet/DirectoryDeltaTransfer.h - include/mafianet/DR_SHA1.h - include/mafianet/DS_BinarySearchTree.h - include/mafianet/DS_BPlusTree.h - include/mafianet/DS_BytePool.h - include/mafianet/DS_ByteQueue.h - include/mafianet/DS_Hash.h - include/mafianet/DS_Heap.h - include/mafianet/DS_HuffmanEncodingTree.h - include/mafianet/DS_HuffmanEncodingTreeFactory.h - include/mafianet/DS_HuffmanEncodingTreeNode.h - include/mafianet/DS_LinkedList.h - include/mafianet/DS_List.h - include/mafianet/DS_Map.h - include/mafianet/DS_MemoryPool.h - include/mafianet/DS_Multilist.h - include/mafianet/DS_OrderedChannelHeap.h - include/mafianet/DS_OrderedList.h - include/mafianet/DS_Queue.h - include/mafianet/DS_QueueLinkedList.h - include/mafianet/DS_RangeList.h - include/mafianet/DS_Table.h - include/mafianet/DS_ThreadsafeAllocatingQueue.h - include/mafianet/DS_Tree.h - include/mafianet/DS_WeightedGraph.h - include/mafianet/DynDNS.h - include/mafianet/EmailSender.h - include/mafianet/EmptyHeader.h - include/mafianet/EpochTimeToString.h - include/mafianet/Export.h - include/mafianet/FileList.h - include/mafianet/FileListNodeContext.h - include/mafianet/FileListTransfer.h - include/mafianet/FileListTransferCBInterface.h - include/mafianet/FileOperations.h - include/mafianet/FormatString.h - include/mafianet/FullyConnectedMesh2.h - include/mafianet/Getche.h - include/mafianet/Gets.h - include/mafianet/GetTime.h - include/mafianet/GetTimeOfDay.h - include/mafianet/GridSectorizer.h - include/mafianet/GuidUtil.h - include/mafianet/HTTPConnection.h - include/mafianet/HTTPConnection2.h - include/mafianet/IncrementalReadInterface.h - include/mafianet/InternalPacket.h - include/mafianet/Itoa.h - include/mafianet/Kbhit.h - include/mafianet/LinuxAdapter.h - include/mafianet/LinuxStrings.h - include/mafianet/LocklessTypes.h - include/mafianet/LogCommandParser.h - include/mafianet/MemoryOverride.h - include/mafianet/MessageFilter.h - include/mafianet/MessageIdentifiers.h - include/mafianet/MmsgBatch.h - include/mafianet/MtuBlackHole.h - include/mafianet/MTUSize.h - include/mafianet/NativeFeatureIncludes.h - include/mafianet/NativeFeatureIncludesOverrides.h - include/mafianet/NativeTypes.h - include/mafianet/NatPunchthroughClient.h - include/mafianet/NatPunchthroughServer.h - include/mafianet/NatTypeDetectionClient.h - include/mafianet/NatTypeDetectionCommon.h - include/mafianet/NatTypeDetectionServer.h - include/mafianet/NetworkIDManager.h - include/mafianet/NetworkIDObject.h - include/mafianet/OsxAdapter.h - include/mafianet/PacketConsoleLogger.h - include/mafianet/PacketFileLogger.h - include/mafianet/PacketizedTCP.h - include/mafianet/PacketLogger.h - include/mafianet/PacketOutputWindowLogger.h - include/mafianet/PacketPool.h - include/mafianet/PacketPriority.h - include/mafianet/PeerHandle.h - include/mafianet/Peer.h - include/mafianet/PeerInterface.h - include/mafianet/PluginInterface2.h - include/mafianet/PointGridSectorizer.h - include/mafianet/Rackspace.h - include/mafianet/RakVoice.h - include/mafianet/Rand.h - include/mafianet/RandSync.h - include/mafianet/ReadyEvent.h - include/mafianet/RefCountedObj.h - include/mafianet/RelayPlugin.h - include/mafianet/ReliabilityLayer.h - include/mafianet/ReplicaEnums.h - include/mafianet/ReplicaManager3.h - include/mafianet/Router2.h - include/mafianet/RPC4Plugin.h - include/mafianet/SecureHandshake.h - include/mafianet/SendToThread.h - include/mafianet/SignaledEvent.h - include/mafianet/SimpleMutex.h - include/mafianet/SimpleTCPServer.h - include/mafianet/SingleProducerConsumer.h - include/mafianet/Sleep.h - include/mafianet/mafianet.h - include/mafianet/SmartPtr.h - include/mafianet/Socket2.h - include/mafianet/SocketDefines.h - include/mafianet/SocketIncludes.h - include/mafianet/SocketLayer.h - include/mafianet/Statistics.h - include/mafianet/StatisticsHistory.h - include/mafianet/String.h - include/mafianet/StringCompressor.h - include/mafianet/StringTable.h - include/mafianet/SuperFastHash.h - include/mafianet/TableSerializer.h - include/mafianet/TCPInterface.h - include/mafianet/TeamBalancer.h - include/mafianet/TeamManager.h - include/mafianet/TelnetTransport.h - include/mafianet/Thread.h - include/mafianet/ThreadPool.h - include/mafianet/ThreadsafePacketLogger.h - include/mafianet/Time.h - include/mafianet/Transport2.h - include/mafianet/TransportInterface.h - include/mafianet/TwoWayAuthentication.h - include/mafianet/Types.h - include/mafianet/UDPForwarder.h - include/mafianet/UDPProxyClient.h - include/mafianet/UDPProxyCommon.h - include/mafianet/UDPProxyCoordinator.h - include/mafianet/UDPProxyServer.h - include/mafianet/VariableDeltaSerializer.h - include/mafianet/VariableListDeltaTracker.h - include/mafianet/VariadicSQLParser.h - include/mafianet/Version.h - include/mafianet/VirtualWorld.h - include/mafianet/VirtualWorldReplica3.h - include/mafianet/WindowsIncludes.h - include/mafianet/WSAStartupSingleton.h - include/mafianet/WString.h -) - -# Deprecated lowercase forwarding headers (one release cycle, see docs/changelog.rst) -set(MAFIANET_DEPRECATED_HEADERS + include/mafianet/find_first.h + include/mafianet/alloca.h + include/mafianet/assert.h + include/mafianet/autopatcher_patch_context.h + include/mafianet/autopatcher_repository_interface.h + include/mafianet/base64_encoder.h + include/mafianet/bit_stream.h + include/mafianet/cc_sliding_window.h + include/mafianet/cc_udt.h + include/mafianet/check_sum.h + include/mafianet/cloud_client.h + include/mafianet/cloud_common.h + include/mafianet/cloud_server.h + include/mafianet/command_parser.h + include/mafianet/command_parser_interface.h + include/mafianet/connection_graph2.h + include/mafianet/console_server.h + include/mafianet/data_compressor.h + include/mafianet/define_overrides.h + include/mafianet/defines.h + include/mafianet/directory_delta_transfer.h + include/mafianet/dr_sha1.h + include/mafianet/ds_binary_search_tree.h + include/mafianet/ds_bplus_tree.h + include/mafianet/ds_byte_pool.h + include/mafianet/ds_byte_queue.h + include/mafianet/ds_hash.h + include/mafianet/ds_heap.h + include/mafianet/ds_huffman_encoding_tree.h + include/mafianet/ds_huffman_encoding_tree_factory.h + include/mafianet/ds_huffman_encoding_tree_node.h + include/mafianet/ds_linked_list.h + include/mafianet/ds_list.h + include/mafianet/ds_map.h + include/mafianet/ds_memory_pool.h + include/mafianet/ds_multilist.h + include/mafianet/ds_ordered_channel_heap.h + include/mafianet/ds_ordered_list.h + include/mafianet/ds_queue.h + include/mafianet/ds_queue_linked_list.h + include/mafianet/ds_range_list.h + include/mafianet/ds_table.h + include/mafianet/ds_threadsafe_allocating_queue.h + include/mafianet/ds_tree.h + include/mafianet/ds_weighted_graph.h + include/mafianet/dyn_dns.h + include/mafianet/email_sender.h + include/mafianet/empty_header.h + include/mafianet/epoch_time_to_string.h + include/mafianet/export.h + include/mafianet/file_list.h + include/mafianet/file_list_node_context.h + include/mafianet/file_list_transfer.h + include/mafianet/file_list_transfer_cb_interface.h + include/mafianet/file_operations.h + include/mafianet/format_string.h + include/mafianet/fully_connected_mesh2.h + include/mafianet/getche.h + include/mafianet/gets.h + include/mafianet/get_time.h + include/mafianet/get_time_of_day.h + include/mafianet/grid_sectorizer.h include/mafianet/guid_util.h + include/mafianet/http_connection.h + include/mafianet/http_connection2.h + include/mafianet/incremental_read_interface.h + include/mafianet/internal_packet.h + include/mafianet/itoa.h + include/mafianet/kbhit.h include/mafianet/linux_adapter.h + include/mafianet/linux_strings.h + include/mafianet/lockless_types.h + include/mafianet/log_command_parser.h + include/mafianet/memory_override.h + include/mafianet/message_filter.h + include/mafianet/message_identifiers.h + include/mafianet/mmsg_batch.h + include/mafianet/mtu_black_hole.h + include/mafianet/mtu_size.h + include/mafianet/native_feature_includes.h + include/mafianet/native_feature_includes_overrides.h + include/mafianet/native_types.h + include/mafianet/nat_punchthrough_client.h + include/mafianet/nat_punchthrough_server.h + include/mafianet/nat_type_detection_client.h + include/mafianet/nat_type_detection_common.h + include/mafianet/nat_type_detection_server.h + include/mafianet/network_id_manager.h + include/mafianet/network_id_object.h include/mafianet/osx_adapter.h + include/mafianet/packet_console_logger.h + include/mafianet/packet_file_logger.h + include/mafianet/packetized_tcp.h + include/mafianet/packet_logger.h + include/mafianet/packet_output_window_logger.h + include/mafianet/packet_pool.h + include/mafianet/packet_priority.h + include/mafianet/peer_handle.h + include/mafianet/peer.h + include/mafianet/peer_interface.h + include/mafianet/plugin_interface2.h + include/mafianet/point_grid_sectorizer.h + include/mafianet/rackspace.h + include/mafianet/voice.h + include/mafianet/rand.h + include/mafianet/rand_sync.h + include/mafianet/ready_event.h + include/mafianet/ref_counted_obj.h + include/mafianet/relay_plugin.h + include/mafianet/reliability_layer.h + include/mafianet/replica_enums.h + include/mafianet/replica_manager3.h + include/mafianet/router2.h + include/mafianet/rpc4_plugin.h + include/mafianet/secure_handshake.h + include/mafianet/send_to_thread.h + include/mafianet/signaled_event.h + include/mafianet/simple_mutex.h + include/mafianet/simple_tcp_server.h + include/mafianet/single_producer_consumer.h + include/mafianet/sleep.h + include/mafianet/mafianet.h + include/mafianet/smart_ptr.h + include/mafianet/socket2.h + include/mafianet/socket_defines.h + include/mafianet/socket_includes.h + include/mafianet/socket_layer.h + include/mafianet/statistics.h + include/mafianet/statistics_history.h + include/mafianet/string.h + include/mafianet/string_compressor.h + include/mafianet/string_table.h + include/mafianet/super_fast_hash.h + include/mafianet/table_serializer.h + include/mafianet/tcp_interface.h + include/mafianet/team_balancer.h + include/mafianet/team_manager.h + include/mafianet/telnet_transport.h + include/mafianet/thread.h + include/mafianet/thread_pool.h + include/mafianet/threadsafe_packet_logger.h + include/mafianet/time.h + include/mafianet/transport2.h + include/mafianet/transport_interface.h + include/mafianet/two_way_authentication.h + include/mafianet/types.h + include/mafianet/udp_forwarder.h + include/mafianet/udp_proxy_client.h + include/mafianet/udp_proxy_common.h + include/mafianet/udp_proxy_coordinator.h + include/mafianet/udp_proxy_server.h + include/mafianet/variable_delta_serializer.h + include/mafianet/variable_list_delta_tracker.h + include/mafianet/variadic_sql_parser.h + include/mafianet/version.h + include/mafianet/virtual_world.h + include/mafianet/virtual_world_replica3.h + include/mafianet/windows_includes.h + include/mafianet/wsa_startup_singleton.h + include/mafianet/wstring.h ) set(MAFIANET_CRYPTO_HEADERS @@ -318,11 +311,10 @@ set(MAFIANET_ALL_SOURCES set(MAFIANET_ALL_HEADERS ${MAFIANET_HEADERS} - ${MAFIANET_DEPRECATED_HEADERS} ${MAFIANET_CRYPTO_HEADERS} ) -# Optional plugins, one per _RAKNET_SUPPORT_ flag in NativeFeatureIncludes.h. +# Optional plugins, one per _RAKNET_SUPPORT_ flag in native_feature_includes.h. # Anything not in this list (BitStream, RakPeer, the reliability layer, the # socket layer, RakVoice, ...) is the core and always builds. Keep this list in # sync with the header when adding or removing a plugin. @@ -421,7 +413,7 @@ function(mafianet_configure_target target_name) $<$:NDEBUG> PUBLIC # Plugins compiled out of this build. PUBLIC so a consumer's view of - # NativeFeatureIncludes.h matches the library it links against. + # native_feature_includes.h matches the library it links against. ${MAFIANET_FEATURE_DEFINITIONS} ) diff --git a/Source/include/mafianet/GuidUtil.h b/Source/include/mafianet/GuidUtil.h deleted file mode 100644 index 8d2ec7355..000000000 --- a/Source/include/mafianet/GuidUtil.h +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright (c) 2024, MafiaHub - * - * This source code is licensed under the MIT-style license found in the - * license.txt file in the root directory of this source tree. - */ - -/// \file -/// \brief Modern, additive value-type accessors layered over the legacy -/// RakNet/SLikeNet value types (\a RakNetGUID, \a SystemAddress). -/// -/// These free functions live alongside the legacy struct methods rather than -/// inside them, so they don't touch the wire-transmitted ABI of \a RakNetGUID. -/// They favour ownership over shared static buffers and \a std::optional over -/// sentinel return values, giving callers thread-safe, leak-free primitives to -/// build cleaner APIs on top of. - -#ifndef __MAFIANET_GUID_UTIL_H -#define __MAFIANET_GUID_UTIL_H - -#include -#include - -#include "Types.h" -#include "PeerInterface.h" - -namespace MafiaNet { - -/// Return the GUID as an owned \a std::string. -/// -/// Unlike the legacy \a RakNetGUID::ToString() member (which returned a pointer -/// into a rotating, process-wide static buffer and was explicitly NOT thread -/// safe), this allocates a fresh string on every call and shares no state, so -/// it is safe to call concurrently from multiple threads. It is implemented on -/// top of the thread-safe \a RakNetGUID::ToString(char*, size_t) member. -RAK_DLL_EXPORT std::string to_string(const RakNetGUID& g); - -/// Look up the SystemAddress currently connected to \a g. -/// -/// A thin facade over \a RakPeerInterface::GetSystemAddressFromGuid that maps -/// the legacy \a UNASSIGNED_SYSTEM_ADDRESS "none" sentinel to \a std::nullopt, -/// so callers can use ordinary optional handling instead of comparing against a -/// magic value. -RAK_DLL_EXPORT std::optional connected_address(RakPeerInterface& peer, const RakNetGUID& g); - -} // namespace MafiaNet - -#endif // __MAFIANET_GUID_UTIL_H diff --git a/Source/include/mafianet/LinuxAdapter.h b/Source/include/mafianet/LinuxAdapter.h deleted file mode 100644 index ee83d384f..000000000 --- a/Source/include/mafianet/LinuxAdapter.h +++ /dev/null @@ -1,88 +0,0 @@ -/* - * Copyright (c) 2016-2019, SLikeSoft UG (haftungsbeschränkt) - * - * This source code is licensed under the MIT-style license found in the - * license.txt file in the root directory of this source tree. - * - * - * This file declares adapters for all MS-specific functions used throughout MafiaNet. - */ -#pragma once - -#ifdef __linux__ -#define _TRUNCATE ((size_t)-1) -typedef int errno_t; - -#include // for va_start, va_end, va_list -#include // for FILE -#include // for time_t - -// MS specific security enhanced functions -errno_t fopen_s(FILE **pfile, const char *filename, const char *mode); -errno_t localtime_s(struct tm* _tm, const time_t *time); -errno_t mbstowcs_s(size_t *pReturnValue, wchar_t *wcstr, size_t sizeInWords, const char *mbstr, size_t count); -int sprintf_s(char *buffer, size_t sizeOfBuffer, const char *format, ...); -errno_t strcat_s(char *strDestination, size_t numberOfElements, const char *strSource); -errno_t strcpy_s(char* strDestination, size_t numberOfElements, const char *strSource); -errno_t strerror_s(char* buffer, size_t numberOfElements, int errnum); -errno_t strncat_s(char *strDest, size_t numberOfElements, const char *strSource, size_t count); -errno_t strncpy_s(char *strDest, size_t numberOfElements, const char *strSource, size_t count); -int vsnprintf_s(char *buffer, size_t sizeOfBuffer, size_t count, const char *format, va_list argptr); -errno_t wcscat_s(wchar_t *strDestination, size_t numberOfElements, const wchar_t *strSource); -errno_t wcscpy_s(wchar_t* strDestination, size_t numberOfElements, const wchar_t *strSource); - -// corresponding template overloads -template errno_t mbstowcs_s(size_t *pReturnValue, wchar_t(&wcstr)[BufferSize], const char *mbstr, size_t count) -{ - return mbstowcs_s(pReturnValue, wcstr, BufferSize, mbstr, count); -} - -template int sprintf_s(char (&buffer)[BufferSize], const char* format, ...) -{ - va_list arglist; - va_start(arglist, format); - int numCharsWritten = vsnprintf_s(buffer, BufferSize, BufferSize - 1, format, arglist); - va_end(arglist); - - return numCharsWritten; -} - -template errno_t strcat_s(char (&strDestination)[BufferSize], const char* strSource) -{ - return strcat_s(strDestination, BufferSize, strSource); -} - -template errno_t strcpy_s(char (&strDestination)[BufferSize], const char* strSource) -{ - return strcpy_s(strDestination, BufferSize, strSource); -} - -template errno_t strerror_s(char(&buffer)[BufferSize], int errnum) -{ - return strerror_s(buffer, BufferSize, errnum); -} - -template errno_t strncat_s(char(&strDest)[BufferSize], const char *strSource, size_t count) -{ - return strncat_s(strDest, BufferSize, strSource, count); -} - -template errno_t strncpy_s(char(&strDest)[BufferSize], const char *strSource, size_t count) -{ - return strncpy_s(strDest, BufferSize, strSource, count); -} - -template int vsnprintf_s(char (&buffer)[BufferSize], size_t count, const char *format, va_list argptr) -{ - return vsnprintf_s(buffer, BufferSize, count, format, argptr); -} - -// MS gets_s function adapter - wraps MafiaNet's Gets function -// Note: Samples should include this header for gets_s support on Linux -#include "Gets.h" -template char* gets_s(char (&buffer)[BufferSize]) -{ - return Gets(buffer, static_cast(BufferSize)); -} - -#endif diff --git a/Source/include/mafianet/OsxAdapter.h b/Source/include/mafianet/OsxAdapter.h deleted file mode 100644 index 1b0273b57..000000000 --- a/Source/include/mafianet/OsxAdapter.h +++ /dev/null @@ -1,91 +0,0 @@ -/* - * Copyright (c) 2016-2019, SLikeSoft UG (haftungsbeschränkt) - * - * This source code is licensed under the MIT-style license found in the - * license.txt file in the root directory of this source tree. - * - * - * This file declares adapters for all MS-specific functions used throughout MafiaNet. - */ -#pragma once - -#ifdef __APPLE__ -#define _TRUNCATE ((size_t)-1) -typedef int errno_t; - -#include // for va_start, va_end, va_list -#include // for FILE -#include // for time_t - -// MS specific string functions -char *_strlwr(char *str); - -// MS specific security enhanced functions -errno_t fopen_s(FILE **pfile, const char *filename, const char *mode); -errno_t localtime_s(struct tm* _tm, const time_t *time); -errno_t mbstowcs_s(size_t *pReturnValue, wchar_t *wcstr, size_t sizeInWords, const char *mbstr, size_t count); -int sprintf_s(char *buffer, size_t sizeOfBuffer, const char *format, ...); -errno_t strcat_s(char *strDestination, size_t numberOfElements, const char *strSource); -errno_t strcpy_s(char* strDestination, size_t numberOfElements, const char *strSource); -errno_t strerror_s(char* buffer, size_t numberOfElements, int errnum); -errno_t strncat_s(char *strDest, size_t numberOfElements, const char *strSource, size_t count); -errno_t strncpy_s(char *strDest, size_t numberOfElements, const char *strSource, size_t count); -int vsnprintf_s(char *buffer, size_t sizeOfBuffer, size_t count, const char *format, va_list argptr); -errno_t wcscat_s(wchar_t *strDestination, size_t numberOfElements, const wchar_t *strSource); -errno_t wcscpy_s(wchar_t* strDestination, size_t numberOfElements, const wchar_t *strSource); - -// corresponding template overloads -template errno_t mbstowcs_s(size_t *pReturnValue, wchar_t(&wcstr)[BufferSize], const char *mbstr, size_t count) -{ - return mbstowcs_s(pReturnValue, wcstr, BufferSize, mbstr, count); -} - -template int sprintf_s(char (&buffer)[BufferSize], const char* format, ...) -{ - va_list arglist; - va_start(arglist, format); - int numCharsWritten = vsnprintf_s(buffer, BufferSize, BufferSize - 1, format, arglist); - va_end(arglist); - - return numCharsWritten; -} - -template errno_t strcat_s(char (&strDestination)[BufferSize], const char* strSource) -{ - return strcat_s(strDestination, BufferSize, strSource); -} - -template errno_t strcpy_s(char (&strDestination)[BufferSize], const char* strSource) -{ - return strcpy_s(strDestination, BufferSize, strSource); -} - -template errno_t strerror_s(char(&buffer)[BufferSize], int errnum) -{ - return strerror_s(buffer, BufferSize, errnum); -} - -template errno_t strncat_s(char (&strDest)[BufferSize], const char *strSource, size_t count) -{ - return strncat_s(strDest, BufferSize, strSource, count); -} - -template errno_t strncpy_s(char (&strDest)[BufferSize], const char *strSource, size_t count) -{ - return strncpy_s(strDest, BufferSize, strSource, count); -} - -template int vsnprintf_s(char (&buffer)[BufferSize], size_t count, const char *format, va_list argptr) -{ - return vsnprintf_s(buffer, BufferSize, count, format, argptr); -} - -// MS gets_s function adapter - wraps MafiaNet's Gets function -// Note: Samples should include this header for gets_s support on macOS -#include "Gets.h" -template char* gets_s(char (&buffer)[BufferSize]) -{ - return Gets(buffer, static_cast(BufferSize)); -} - -#endif diff --git a/Source/include/mafianet/Aliases.h b/Source/include/mafianet/aliases.h similarity index 89% rename from Source/include/mafianet/Aliases.h rename to Source/include/mafianet/aliases.h index 0819068fd..953c9953f 100644 --- a/Source/include/mafianet/Aliases.h +++ b/Source/include/mafianet/aliases.h @@ -23,9 +23,9 @@ #pragma once -#include "mafianet/PeerInterface.h" // RakPeerInterface -#include "mafianet/Types.h" // RakNetGUID, UNASSIGNED_RAKNET_GUID -#include "mafianet/Statistics.h" // RakNetStatistics +#include "mafianet/peer_interface.h" // RakPeerInterface +#include "mafianet/types.h" // RakNetGUID, UNASSIGNED_RAKNET_GUID +#include "mafianet/statistics.h" // RakNetStatistics namespace MafiaNet { diff --git a/Source/include/mafianet/Alloca.h b/Source/include/mafianet/alloca.h similarity index 100% rename from Source/include/mafianet/Alloca.h rename to Source/include/mafianet/alloca.h diff --git a/Source/include/mafianet/Archive.h b/Source/include/mafianet/archive.h similarity index 98% rename from Source/include/mafianet/Archive.h rename to Source/include/mafianet/archive.h index f7f60469d..37ba6dcef 100644 --- a/Source/include/mafianet/Archive.h +++ b/Source/include/mafianet/archive.h @@ -5,7 +5,7 @@ * license.txt file in the root directory of this source tree. */ -/// \file Archive.h +/// \file archive.h /// \brief A single serialization convention over BitStream (issue #19). /// /// \details A user type describes its wire format once with a member template: @@ -42,7 +42,7 @@ #ifndef __MAFIANET_ARCHIVE_H #define __MAFIANET_ARCHIVE_H -#include "mafianet/BitStream.h" +#include "mafianet/bit_stream.h" #include #include diff --git a/Source/include/mafianet/Assert.h b/Source/include/mafianet/assert.h similarity index 92% rename from Source/include/mafianet/Assert.h rename to Source/include/mafianet/assert.h index 631f9c1b7..554eb6e26 100644 --- a/Source/include/mafianet/Assert.h +++ b/Source/include/mafianet/assert.h @@ -14,4 +14,4 @@ */ #include -#include "Defines.h" +#include "mafianet/defines.h" diff --git a/Source/include/mafianet/AutopatcherPatchContext.h b/Source/include/mafianet/autopatcher_patch_context.h similarity index 100% rename from Source/include/mafianet/AutopatcherPatchContext.h rename to Source/include/mafianet/autopatcher_patch_context.h diff --git a/Source/include/mafianet/AutopatcherRepositoryInterface.h b/Source/include/mafianet/autopatcher_repository_interface.h similarity index 95% rename from Source/include/mafianet/AutopatcherRepositoryInterface.h rename to Source/include/mafianet/autopatcher_repository_interface.h index 4b99cfd99..1632775be 100644 --- a/Source/include/mafianet/AutopatcherRepositoryInterface.h +++ b/Source/include/mafianet/autopatcher_repository_interface.h @@ -14,7 +14,7 @@ */ /// -/// \file AutopatcherRepositoryInterface.h +/// \file autopatcher_repository_interface.h /// \brief An interface used by AutopatcherServer to get the data necessary to run an autopatcher. /// @@ -22,8 +22,8 @@ #ifndef __AUTOPATCHER_REPOSITORY_INTERFACE_H #define __AUTOPATCHER_REPOSITORY_INTERFACE_H -#include "IncrementalReadInterface.h" -#include "SimpleMutex.h" +#include "mafianet/incremental_read_interface.h" +#include "mafianet/simple_mutex.h" namespace MafiaNet { diff --git a/Source/include/mafianet/Base64Encoder.h b/Source/include/mafianet/base64_encoder.h similarity index 92% rename from Source/include/mafianet/Base64Encoder.h rename to Source/include/mafianet/base64_encoder.h index 33d7f4a95..1a03097b8 100644 --- a/Source/include/mafianet/Base64Encoder.h +++ b/Source/include/mafianet/base64_encoder.h @@ -11,7 +11,7 @@ #ifndef __BASE_64_ENCODER_H #define __BASE_64_ENCODER_H -#include "Export.h" +#include "mafianet/export.h" extern "C" { /// \brief Returns how many bytes were written. diff --git a/Source/include/mafianet/BitStream.h b/Source/include/mafianet/bit_stream.h similarity index 97% rename from Source/include/mafianet/BitStream.h rename to Source/include/mafianet/bit_stream.h index 744d6ab24..9edc3549f 100644 --- a/Source/include/mafianet/BitStream.h +++ b/Source/include/mafianet/bit_stream.h @@ -13,7 +13,7 @@ * license found in the license.txt file in the root directory of this source tree. */ -/// \file BitStream.h +/// \file bit_stream.h /// \brief This class allows you to write and read native types as a string of bits. /// \details BitStream is used extensively throughout RakNet and is designed to be used by users as well. /// @@ -21,13 +21,13 @@ #ifndef __BITSTREAM_H #define __BITSTREAM_H -#include "MemoryOverride.h" -#include "Defines.h" -#include "Export.h" -#include "Types.h" -#include "String.h" -#include "WString.h" -#include "Assert.h" +#include "mafianet/memory_override.h" +#include "mafianet/defines.h" +#include "mafianet/export.h" +#include "mafianet/types.h" +#include "mafianet/string.h" +#include "mafianet/wstring.h" +#include "mafianet/assert.h" #include #include #include diff --git a/Source/include/mafianet/CCRakNetSlidingWindow.h b/Source/include/mafianet/cc_sliding_window.h similarity index 95% rename from Source/include/mafianet/CCRakNetSlidingWindow.h rename to Source/include/mafianet/cc_sliding_window.h index 8c6741441..27ba0e373 100644 --- a/Source/include/mafianet/CCRakNetSlidingWindow.h +++ b/Source/include/mafianet/cc_sliding_window.h @@ -40,17 +40,17 @@ else use congestion avoidance */ -#include "Defines.h" +#include "mafianet/defines.h" #if USE_SLIDING_WINDOW_CONGESTION_CONTROL==1 #ifndef __CONGESTION_CONTROL_SLIDING_WINDOW_H #define __CONGESTION_CONTROL_SLIDING_WINDOW_H -#include "NativeTypes.h" -#include "Time.h" -#include "Types.h" -#include "DS_Queue.h" +#include "mafianet/native_types.h" +#include "mafianet/time.h" +#include "mafianet/types.h" +#include "mafianet/ds_queue.h" /// Sizeof an UDP header in byte #define UDP_HEADER_SIZE 28 diff --git a/Source/include/mafianet/CCRakNetUDT.h b/Source/include/mafianet/cc_udt.h similarity index 97% rename from Source/include/mafianet/CCRakNetUDT.h rename to Source/include/mafianet/cc_udt.h index 4eff8b07b..9c8431a4b 100644 --- a/Source/include/mafianet/CCRakNetUDT.h +++ b/Source/include/mafianet/cc_udt.h @@ -13,17 +13,17 @@ * license found in the license.txt file in the root directory of this source tree. */ -#include "Defines.h" +#include "mafianet/defines.h" #if USE_SLIDING_WINDOW_CONGESTION_CONTROL!=1 #ifndef __CONGESTION_CONTROL_UDT_H #define __CONGESTION_CONTROL_UDT_H -#include "NativeTypes.h" -#include "Time.h" -#include "Types.h" -#include "DS_Queue.h" +#include "mafianet/native_types.h" +#include "mafianet/time.h" +#include "mafianet/types.h" +#include "mafianet/ds_queue.h" /// Set to 4 if you are using the iPod Touch TG. See http://www.jenkinssoftware.com/forum/index.php?topic=2717.0 #define CC_TIME_TYPE_BYTES 8 diff --git a/Source/include/mafianet/CheckSum.h b/Source/include/mafianet/check_sum.h similarity index 90% rename from Source/include/mafianet/CheckSum.h rename to Source/include/mafianet/check_sum.h index 73d9c119a..7c2c9e769 100644 --- a/Source/include/mafianet/CheckSum.h +++ b/Source/include/mafianet/check_sum.h @@ -14,14 +14,14 @@ */ /// -/// \file CheckSum.cpp +/// \file check_sum.cpp /// \brief [Internal] CheckSum implementation from http://www.flounder.com/checksum.htm /// #ifndef __CHECKSUM_H #define __CHECKSUM_H -#include "MemoryOverride.h" +#include "mafianet/memory_override.h" /// Generates and validates checksums class CheckSum diff --git a/Source/include/mafianet/CloudClient.h b/Source/include/mafianet/cloud_client.h similarity index 96% rename from Source/include/mafianet/CloudClient.h rename to Source/include/mafianet/cloud_client.h index 2734232f7..083173e03 100644 --- a/Source/include/mafianet/CloudClient.h +++ b/Source/include/mafianet/cloud_client.h @@ -13,21 +13,21 @@ * license found in the license.txt file in the root directory of this source tree. */ -/// \file CloudClient.h +/// \file cloud_client.h /// \brief Queries CloudMemoryServer to download data that other clients have uploaded /// -#include "NativeFeatureIncludes.h" +#include "mafianet/native_feature_includes.h" #if _RAKNET_SUPPORT_CloudClient==1 #ifndef __CLOUD_CLIENT_H #define __CLOUD_CLIENT_H -#include "PluginInterface2.h" -#include "CloudCommon.h" -#include "MemoryOverride.h" -#include "DS_Hash.h" +#include "mafianet/plugin_interface2.h" +#include "mafianet/cloud_common.h" +#include "mafianet/memory_override.h" +#include "mafianet/ds_hash.h" namespace MafiaNet { diff --git a/Source/include/mafianet/CloudCommon.h b/Source/include/mafianet/cloud_common.h similarity index 95% rename from Source/include/mafianet/CloudCommon.h rename to Source/include/mafianet/cloud_common.h index cb746a26b..cfb862440 100644 --- a/Source/include/mafianet/CloudCommon.h +++ b/Source/include/mafianet/cloud_common.h @@ -13,14 +13,14 @@ * license found in the license.txt file in the root directory of this source tree. */ -#include "NativeFeatureIncludes.h" +#include "mafianet/native_feature_includes.h" #if _RAKNET_SUPPORT_CloudClient==1 || _RAKNET_SUPPORT_CloudServer==1 #ifndef __CLOUD_COMMON_H #define __CLOUD_COMMON_H -#include "Types.h" -#include "String.h" +#include "mafianet/types.h" +#include "mafianet/string.h" namespace MafiaNet { diff --git a/Source/include/mafianet/CloudServer.h b/Source/include/mafianet/cloud_server.h similarity index 96% rename from Source/include/mafianet/CloudServer.h rename to Source/include/mafianet/cloud_server.h index 407ff93f9..47855512e 100644 --- a/Source/include/mafianet/CloudServer.h +++ b/Source/include/mafianet/cloud_server.h @@ -13,25 +13,25 @@ * license found in the license.txt file in the root directory of this source tree. */ -/// \file CloudServer.h +/// \file cloud_server.h /// \brief Stores client data, and allows cross-server communication to retrieve this data /// \details TODO /// -#include "NativeFeatureIncludes.h" +#include "mafianet/native_feature_includes.h" #if _RAKNET_SUPPORT_CloudServer==1 #ifndef __CLOUD_SERVER_H #define __CLOUD_SERVER_H -#include "PluginInterface2.h" -#include "MemoryOverride.h" -#include "NativeTypes.h" -#include "String.h" -#include "DS_Hash.h" -#include "CloudCommon.h" -#include "DS_OrderedList.h" +#include "mafianet/plugin_interface2.h" +#include "mafianet/memory_override.h" +#include "mafianet/native_types.h" +#include "mafianet/string.h" +#include "mafianet/ds_hash.h" +#include "mafianet/cloud_common.h" +#include "mafianet/ds_ordered_list.h" /// If the data is smaller than this value, an allocation is avoid. However, this value exists for every row #define CLOUD_SERVER_DATA_STACK_SIZE 32 diff --git a/Source/include/mafianet/CommandParser.h b/Source/include/mafianet/command_parser.h similarity index 93% rename from Source/include/mafianet/CommandParser.h rename to Source/include/mafianet/command_parser.h index d54ba8ef0..fac6d814f 100644 --- a/Source/include/mafianet/CommandParser.h +++ b/Source/include/mafianet/command_parser.h @@ -17,14 +17,14 @@ /// \brief Contains RakNetCommandParser , used to send commands to an instance of RakPeer /// -#include "NativeFeatureIncludes.h" +#include "mafianet/native_feature_includes.h" #if _RAKNET_SUPPORT_RakNetCommandParser==1 #ifndef __RAKNET_COMMAND_PARSER #define __RAKNET_COMMAND_PARSER -#include "CommandParserInterface.h" -#include "Export.h" +#include "mafianet/command_parser_interface.h" +#include "mafianet/export.h" namespace MafiaNet { diff --git a/Source/include/mafianet/CommandParserInterface.h b/Source/include/mafianet/command_parser_interface.h similarity index 96% rename from Source/include/mafianet/CommandParserInterface.h rename to Source/include/mafianet/command_parser_interface.h index 630b4c357..47503a3e4 100644 --- a/Source/include/mafianet/CommandParserInterface.h +++ b/Source/include/mafianet/command_parser_interface.h @@ -13,7 +13,7 @@ * license found in the license.txt file in the root directory of this source tree. */ -/// \file CommandParserInterface.h +/// \file command_parser_interface.h /// \brief Contains CommandParserInterface , from which you derive custom command parsers /// @@ -21,10 +21,10 @@ #ifndef __COMMAND_PARSER_INTERFACE #define __COMMAND_PARSER_INTERFACE -#include "MemoryOverride.h" -#include "Types.h" -#include "DS_OrderedList.h" -#include "Export.h" +#include "mafianet/memory_override.h" +#include "mafianet/types.h" +#include "mafianet/ds_ordered_list.h" +#include "mafianet/export.h" namespace MafiaNet { diff --git a/Source/include/mafianet/ConnectionGraph2.h b/Source/include/mafianet/connection_graph2.h similarity index 92% rename from Source/include/mafianet/ConnectionGraph2.h rename to Source/include/mafianet/connection_graph2.h index 599d06901..65b6f0ef4 100644 --- a/Source/include/mafianet/ConnectionGraph2.h +++ b/Source/include/mafianet/connection_graph2.h @@ -13,24 +13,24 @@ * license found in the license.txt file in the root directory of this source tree. */ -/// \file ConnectionGraph2.h +/// \file connection_graph2.h /// \brief Connection graph plugin, version 2. Tells new systems about existing and new connections /// -#include "NativeFeatureIncludes.h" +#include "mafianet/native_feature_includes.h" #if _RAKNET_SUPPORT_ConnectionGraph2==1 #ifndef __CONNECTION_GRAPH_2_H #define __CONNECTION_GRAPH_2_H -#include "MemoryOverride.h" -#include "Types.h" -#include "PluginInterface2.h" -#include "DS_List.h" -#include "DS_WeightedGraph.h" -#include "GetTime.h" -#include "Export.h" +#include "mafianet/memory_override.h" +#include "mafianet/types.h" +#include "mafianet/plugin_interface2.h" +#include "mafianet/ds_list.h" +#include "mafianet/ds_weighted_graph.h" +#include "mafianet/get_time.h" +#include "mafianet/export.h" namespace MafiaNet { diff --git a/Source/include/mafianet/ConsoleServer.h b/Source/include/mafianet/console_server.h similarity index 91% rename from Source/include/mafianet/ConsoleServer.h rename to Source/include/mafianet/console_server.h index a0dd9b231..dce1806cc 100644 --- a/Source/include/mafianet/ConsoleServer.h +++ b/Source/include/mafianet/console_server.h @@ -13,21 +13,21 @@ * license found in the license.txt file in the root directory of this source tree. */ -/// \file ConsoleServer.h +/// \file console_server.h /// \brief Contains ConsoleServer , used to plugin to your game to accept remote console-based connections /// -#include "NativeFeatureIncludes.h" +#include "mafianet/native_feature_includes.h" #if _RAKNET_SUPPORT_ConsoleServer==1 #ifndef __CONSOLE_SERVER_H #define __CONSOLE_SERVER_H -#include "MemoryOverride.h" -#include "DS_List.h" -#include "Types.h" -#include "Export.h" +#include "mafianet/memory_override.h" +#include "mafianet/ds_list.h" +#include "mafianet/types.h" +#include "mafianet/export.h" namespace MafiaNet { diff --git a/Source/include/mafianet/crypto/factory.h b/Source/include/mafianet/crypto/factory.h index a708c58a5..ff421bdfd 100644 --- a/Source/include/mafianet/crypto/factory.h +++ b/Source/include/mafianet/crypto/factory.h @@ -6,8 +6,8 @@ */ #pragma once -#include "securestring.h" // used for MafiaNet::Crypto::CSecureString -#include "ifileencrypter.h" // used for MafiaNet::Crypto::IFileEncrypter +#include "mafianet/crypto/securestring.h" // used for MafiaNet::Crypto::CSecureString +#include "mafianet/crypto/ifileencrypter.h" // used for MafiaNet::Crypto::IFileEncrypter namespace MafiaNet { diff --git a/Source/include/mafianet/crypto/fileencrypter.h b/Source/include/mafianet/crypto/fileencrypter.h index f61ce1dfe..270def9a1 100644 --- a/Source/include/mafianet/crypto/fileencrypter.h +++ b/Source/include/mafianet/crypto/fileencrypter.h @@ -6,8 +6,8 @@ */ #pragma once -#include "ifileencrypter.h" // used for Crypto::IFileEncrypter -#include "securestring.h" // used for Crypto::CSecureString +#include "mafianet/crypto/ifileencrypter.h" // used for Crypto::IFileEncrypter +#include "mafianet/crypto/securestring.h" // used for Crypto::CSecureString #include // used for RSA namespace MafiaNet diff --git a/Source/include/mafianet/DataCompressor.h b/Source/include/mafianet/data_compressor.h similarity index 88% rename from Source/include/mafianet/DataCompressor.h rename to Source/include/mafianet/data_compressor.h index 0e537be67..fadf14e14 100644 --- a/Source/include/mafianet/DataCompressor.h +++ b/Source/include/mafianet/data_compressor.h @@ -13,7 +13,7 @@ * license found in the license.txt file in the root directory of this source tree. */ -/// \file DataCompressor.h +/// \file data_compressor.h /// \brief DataCompressor does compression on a block of data. /// \details Not very good compression, but it's small and fast so is something you can use per-message at runtime. /// @@ -22,9 +22,9 @@ #ifndef __DATA_COMPRESSOR_H #define __DATA_COMPRESSOR_H -#include "MemoryOverride.h" -#include "DS_HuffmanEncodingTree.h" -#include "Export.h" +#include "mafianet/memory_override.h" +#include "mafianet/ds_huffman_encoding_tree.h" +#include "mafianet/export.h" namespace MafiaNet { diff --git a/Source/include/mafianet/DefineOverrides.h b/Source/include/mafianet/define_overrides.h similarity index 100% rename from Source/include/mafianet/DefineOverrides.h rename to Source/include/mafianet/define_overrides.h diff --git a/Source/include/mafianet/Defines.h b/Source/include/mafianet/defines.h similarity index 97% rename from Source/include/mafianet/Defines.h rename to Source/include/mafianet/defines.h index c276156aa..cb0ad1e94 100644 --- a/Source/include/mafianet/Defines.h +++ b/Source/include/mafianet/defines.h @@ -23,7 +23,7 @@ // If you want to change these defines, put them in RakNetDefinesOverrides so your changes are not lost when updating RakNet // The user should not edit this file -#include "DefineOverrides.h" +#include "mafianet/define_overrides.h" /// Define __GET_TIME_64BIT to have MafiaNet::TimeMS use a 64, rather than 32 bit value. A 32 bit value will overflow after about 5 weeks. /// However, this doubles the bandwidth use for sending times, so don't do it unless you have a reason to. diff --git a/Source/include/mafianet/DirectoryDeltaTransfer.h b/Source/include/mafianet/directory_delta_transfer.h similarity index 95% rename from Source/include/mafianet/DirectoryDeltaTransfer.h rename to Source/include/mafianet/directory_delta_transfer.h index 054a58c69..c0b91ebe0 100644 --- a/Source/include/mafianet/DirectoryDeltaTransfer.h +++ b/Source/include/mafianet/directory_delta_transfer.h @@ -13,24 +13,24 @@ * license found in the license.txt file in the root directory of this source tree. */ -/// \file DirectoryDeltaTransfer.h +/// \file directory_delta_transfer.h /// \brief Simple class to send changes between directories. /// \details In essence, a simple autopatcher that can be used for transmitting levels, skins, etc. /// -#include "NativeFeatureIncludes.h" +#include "mafianet/native_feature_includes.h" #if _RAKNET_SUPPORT_DirectoryDeltaTransfer==1 && _RAKNET_SUPPORT_FileOperations==1 #ifndef __DIRECTORY_DELTA_TRANSFER_H #define __DIRECTORY_DELTA_TRANSFER_H -#include "MemoryOverride.h" -#include "Types.h" -#include "Export.h" -#include "PluginInterface2.h" -#include "DS_Map.h" -#include "PacketPriority.h" +#include "mafianet/memory_override.h" +#include "mafianet/types.h" +#include "mafianet/export.h" +#include "mafianet/plugin_interface2.h" +#include "mafianet/ds_map.h" +#include "mafianet/packet_priority.h" /// \defgroup DIRECTORY_DELTA_TRANSFER_GROUP DirectoryDeltaTransfer /// \brief Simple class to send changes between directories diff --git a/Source/include/mafianet/Dispatcher.h b/Source/include/mafianet/dispatcher.h similarity index 94% rename from Source/include/mafianet/Dispatcher.h rename to Source/include/mafianet/dispatcher.h index 8e481d847..208b7dc94 100644 --- a/Source/include/mafianet/Dispatcher.h +++ b/Source/include/mafianet/dispatcher.h @@ -5,7 +5,7 @@ * license.txt file in the root directory of this source tree. */ -/// \file Dispatcher.h +/// \file dispatcher.h /// \brief A typed message dispatcher over the receive iterator (issue #20). /// /// \details The classic RakNet receive loop is a giant `switch` on the first @@ -50,13 +50,13 @@ #include // std::type_index (T -> id registry) #include // handler / id tables -#include "mafianet/Archive.h" // ReadArchive / WriteArchive -#include "mafianet/BitStream.h" // BitStream over the packet body -#include "mafianet/MessageIdentifiers.h" // ID_TIMESTAMP, ID_USER_PACKET_ENUM -#include "mafianet/PeerHandle.h" // PacketPtr -#include "mafianet/GuidUtil.h" // MafiaNet::to_string (owning, thread-safe) -#include "mafianet/Time.h" // MafiaNet::Time (timestamp-prefix width) -#include "mafianet/Types.h" // Packet, MessageID, RakNetGUID, SystemAddress, PeerGuid +#include "mafianet/archive.h" // ReadArchive / WriteArchive +#include "mafianet/bit_stream.h" // BitStream over the packet body +#include "mafianet/message_identifiers.h" // ID_TIMESTAMP, ID_USER_PACKET_ENUM +#include "mafianet/peer_handle.h" // PacketPtr +#include "mafianet/guid_util.h" // MafiaNet::to_string (owning, thread-safe) +#include "mafianet/time.h" // MafiaNet::Time (timestamp-prefix width) +#include "mafianet/types.h" // Packet, MessageID, RakNetGUID, SystemAddress, PeerGuid namespace MafiaNet { diff --git a/Source/include/mafianet/DR_SHA1.h b/Source/include/mafianet/dr_sha1.h similarity index 95% rename from Source/include/mafianet/DR_SHA1.h rename to Source/include/mafianet/dr_sha1.h index 8ed7cf684..64a4daece 100644 --- a/Source/include/mafianet/DR_SHA1.h +++ b/Source/include/mafianet/dr_sha1.h @@ -116,13 +116,13 @@ #define SHA1_H_A545E61D43E9404E8D736869AB3CBFE7 // KevinJ: -#include "MemoryOverride.h" +#include "mafianet/memory_override.h" #include // Needed for file access #include // Needed for memset and memcpy #include // Needed for strcat and strcpy -#include "Export.h" +#include "mafianet/export.h" //#define MAX_FILE_READ_BUFFER 8000 #define SHA1_LENGTH 20 @@ -159,7 +159,7 @@ // You can define the endian mode in your files without modifying the SHA-1 // source files. Just #define SHA1_LITTLE_ENDIAN or #define SHA1_BIG_ENDIAN -// in your files, before including the DR_SHA1.h header file. If you don't +// in your files, before including the dr_sha1.h header file. If you don't // define anything, the class defaults to little endian. #if !defined(SHA1_LITTLE_ENDIAN) && !defined(SHA1_BIG_ENDIAN) #define SHA1_LITTLE_ENDIAN diff --git a/Source/include/mafianet/DS_BinarySearchTree.h b/Source/include/mafianet/ds_binary_search_tree.h similarity index 95% rename from Source/include/mafianet/DS_BinarySearchTree.h rename to Source/include/mafianet/ds_binary_search_tree.h index 74eeca29c..ddef86337 100644 --- a/Source/include/mafianet/DS_BinarySearchTree.h +++ b/Source/include/mafianet/ds_binary_search_tree.h @@ -13,25 +13,25 @@ * license found in the license.txt file in the root directory of this source tree. */ -/// \file DS_BinarySearchTree.h +/// \file ds_binary_search_tree.h /// \internal /// \brief A binary search tree, and an AVL balanced BST derivation. /// -// Deprecated: DS_BinarySearchTree.h has no consumer in the library and is scheduled for removal in the next +// Deprecated: ds_binary_search_tree.h has no consumer in the library and is scheduled for removal in the next // minor release. Copy it into your project if you depend on it. // Define MAFIANET_SILENCE_DEPRECATED_INCLUDES to suppress the message. #ifndef MAFIANET_SILENCE_DEPRECATED_INCLUDES -#pragma message("mafianet/DS_BinarySearchTree.h is deprecated and will be removed; copy it into your project if you use it") +#pragma message("mafianet/ds_binary_search_tree.h is deprecated and will be removed; copy it into your project if you use it") #endif #ifndef __BINARY_SEARCH_TREE_H #define __BINARY_SEARCH_TREE_H -#include "DS_QueueLinkedList.h" -#include "MemoryOverride.h" -#include "Export.h" +#include "mafianet/ds_queue_linked_list.h" +#include "mafianet/memory_override.h" +#include "mafianet/export.h" /// The namespace DataStructures was only added to avoid compiler errors for commonly named data structures diff --git a/Source/include/mafianet/DS_BPlusTree.h b/Source/include/mafianet/ds_bplus_tree.h similarity index 96% rename from Source/include/mafianet/DS_BPlusTree.h rename to Source/include/mafianet/ds_bplus_tree.h index 59712eac3..ab37211ef 100644 --- a/Source/include/mafianet/DS_BPlusTree.h +++ b/Source/include/mafianet/ds_bplus_tree.h @@ -13,17 +13,17 @@ * license found in the license.txt file in the root directory of this source tree. */ -/// \file DS_BPlusTree.h +/// \file ds_bplus_tree.h /// #ifndef __B_PLUS_TREE_CPP #define __B_PLUS_TREE_CPP -#include "DS_MemoryPool.h" -#include "DS_Queue.h" +#include "mafianet/ds_memory_pool.h" +#include "mafianet/ds_queue.h" #include -#include "Export.h" +#include "mafianet/export.h" // Java // http://www.seanster.com/BplusTree/BplusTree.html @@ -38,7 +38,7 @@ #pragma warning( push ) #endif -#include "MemoryOverride.h" +#include "mafianet/memory_override.h" /// The namespace DataStructures was only added to avoid compiler errors for commonly named data structures /// As these data structures are stand-alone, you can use them outside of RakNet for your own projects if you wish. @@ -1080,14 +1080,14 @@ namespace DataStructures // Code to test this hellish data structure. /* -#include "DS_BPlusTree.h" +#include "mafianet/ds_bplus_tree.h" #include // Handle underflow on root. If there is only one item left then I can go downwards. // Make sure I keep the leftmost pointer valid by traversing it // When I free a leaf, be sure to adjust the pointers around it. -#include "Rand.h" +#include "mafianet/rand.h" void main(void) { diff --git a/Source/include/mafianet/DS_BytePool.h b/Source/include/mafianet/ds_byte_pool.h similarity index 77% rename from Source/include/mafianet/DS_BytePool.h rename to Source/include/mafianet/ds_byte_pool.h index 2a81797ba..c7be27d67 100644 --- a/Source/include/mafianet/DS_BytePool.h +++ b/Source/include/mafianet/ds_byte_pool.h @@ -13,25 +13,25 @@ * license found in the license.txt file in the root directory of this source tree. */ -/// \file DS_BytePool.h +/// \file ds_byte_pool.h /// -// Deprecated: DS_BytePool.h has no consumer in the library and is scheduled for removal in the next +// Deprecated: ds_byte_pool.h has no consumer in the library and is scheduled for removal in the next // minor release. Copy it into your project if you depend on it. // Define MAFIANET_SILENCE_DEPRECATED_INCLUDES to suppress the message. #ifndef MAFIANET_SILENCE_DEPRECATED_INCLUDES -#pragma message("mafianet/DS_BytePool.h is deprecated and will be removed; copy it into your project if you use it") +#pragma message("mafianet/ds_byte_pool.h is deprecated and will be removed; copy it into your project if you use it") #endif #ifndef __BYTE_POOL_H #define __BYTE_POOL_H -#include "MemoryOverride.h" -#include "DS_MemoryPool.h" -#include "Export.h" -#include "SimpleMutex.h" -#include "Assert.h" +#include "mafianet/memory_override.h" +#include "mafianet/ds_memory_pool.h" +#include "mafianet/export.h" +#include "mafianet/simple_mutex.h" +#include "mafianet/assert.h" // #define _DISABLE_BYTE_POOL // #define _THREADSAFE_BYTE_POOL diff --git a/Source/include/mafianet/DS_ByteQueue.h b/Source/include/mafianet/ds_byte_queue.h similarity index 91% rename from Source/include/mafianet/DS_ByteQueue.h rename to Source/include/mafianet/ds_byte_queue.h index 7bd63d221..f47528321 100644 --- a/Source/include/mafianet/DS_ByteQueue.h +++ b/Source/include/mafianet/ds_byte_queue.h @@ -13,7 +13,7 @@ * license found in the license.txt file in the root directory of this source tree. */ -/// \file DS_ByteQueue.h +/// \file ds_byte_queue.h /// \internal /// \brief Byte queue /// @@ -22,8 +22,8 @@ #ifndef __BYTE_QUEUE_H #define __BYTE_QUEUE_H -#include "MemoryOverride.h" -#include "Export.h" +#include "mafianet/memory_override.h" +#include "mafianet/export.h" /// The namespace DataStructures was only added to avoid compiler errors for commonly named data structures /// As these data structures are stand-alone, you can use them outside of RakNet for your own projects if you wish. diff --git a/Source/include/mafianet/DS_Hash.h b/Source/include/mafianet/ds_hash.h similarity index 95% rename from Source/include/mafianet/DS_Hash.h rename to Source/include/mafianet/ds_hash.h index bac6ac3e1..f66ae529d 100644 --- a/Source/include/mafianet/DS_Hash.h +++ b/Source/include/mafianet/ds_hash.h @@ -21,11 +21,11 @@ #ifndef __HASH_H #define __HASH_H -#include "Assert.h" +#include "mafianet/assert.h" #include // memmove -#include "Export.h" -#include "MemoryOverride.h" -#include "String.h" +#include "mafianet/export.h" +#include "mafianet/memory_override.h" +#include "mafianet/string.h" /// The namespace DataStructures was only added to avoid compiler errors for commonly named data structures /// As these data structures are stand-alone, you can use them outside of RakNet for your own projects if you wish. diff --git a/Source/include/mafianet/DS_Heap.h b/Source/include/mafianet/ds_heap.h similarity index 95% rename from Source/include/mafianet/DS_Heap.h rename to Source/include/mafianet/ds_heap.h index 4e863f62c..65856085d 100644 --- a/Source/include/mafianet/DS_Heap.h +++ b/Source/include/mafianet/ds_heap.h @@ -13,7 +13,7 @@ * license found in the license.txt file in the root directory of this source tree. */ -/// \file DS_Heap.h +/// \file ds_heap.h /// \internal /// \brief Heap (Also serves as a priority queue) /// @@ -23,10 +23,10 @@ #ifndef __RAKNET_HEAP_H #define __RAKNET_HEAP_H -#include "MemoryOverride.h" -#include "DS_List.h" -#include "Export.h" -#include "Assert.h" +#include "mafianet/memory_override.h" +#include "mafianet/ds_list.h" +#include "mafianet/export.h" +#include "mafianet/assert.h" #ifdef _MSC_VER #pragma warning( push ) diff --git a/Source/include/mafianet/DS_HuffmanEncodingTree.h b/Source/include/mafianet/ds_huffman_encoding_tree.h similarity index 88% rename from Source/include/mafianet/DS_HuffmanEncodingTree.h rename to Source/include/mafianet/ds_huffman_encoding_tree.h index fa2160105..1d8d4bd8e 100644 --- a/Source/include/mafianet/DS_HuffmanEncodingTree.h +++ b/Source/include/mafianet/ds_huffman_encoding_tree.h @@ -13,7 +13,7 @@ * license found in the license.txt file in the root directory of this source tree. */ -/// \file DS_HuffmanEncodingTree.h +/// \file ds_huffman_encoding_tree.h /// \brief \b [Internal] Generates a huffman encoding tree, used for string and global compression. /// @@ -21,11 +21,11 @@ #ifndef __HUFFMAN_ENCODING_TREE #define __HUFFMAN_ENCODING_TREE -#include "MemoryOverride.h" -#include "DS_HuffmanEncodingTreeNode.h" -#include "BitStream.h" -#include "Export.h" -#include "DS_LinkedList.h" +#include "mafianet/memory_override.h" +#include "mafianet/ds_huffman_encoding_tree_node.h" +#include "mafianet/bit_stream.h" +#include "mafianet/export.h" +#include "mafianet/ds_linked_list.h" namespace MafiaNet { diff --git a/Source/include/mafianet/DS_HuffmanEncodingTreeFactory.h b/Source/include/mafianet/ds_huffman_encoding_tree_factory.h similarity index 85% rename from Source/include/mafianet/DS_HuffmanEncodingTreeFactory.h rename to Source/include/mafianet/ds_huffman_encoding_tree_factory.h index 8d8872d40..25dd0da90 100644 --- a/Source/include/mafianet/DS_HuffmanEncodingTreeFactory.h +++ b/Source/include/mafianet/ds_huffman_encoding_tree_factory.h @@ -13,23 +13,23 @@ * license found in the license.txt file in the root directory of this source tree. */ -/// \file DS_HuffmanEncodingTreeFactory.h +/// \file ds_huffman_encoding_tree_factory.h /// \internal /// \brief Creates instances of the class HuffmanEncodingTree /// -// Deprecated: DS_HuffmanEncodingTreeFactory.h has no consumer in the library and is scheduled for removal in the next +// Deprecated: ds_huffman_encoding_tree_factory.h has no consumer in the library and is scheduled for removal in the next // minor release. Copy it into your project if you depend on it. // Define MAFIANET_SILENCE_DEPRECATED_INCLUDES to suppress the message. #ifndef MAFIANET_SILENCE_DEPRECATED_INCLUDES -#pragma message("mafianet/DS_HuffmanEncodingTreeFactory.h is deprecated and will be removed; copy it into your project if you use it") +#pragma message("mafianet/ds_huffman_encoding_tree_factory.h is deprecated and will be removed; copy it into your project if you use it") #endif #ifndef __HUFFMAN_ENCODING_TREE_FACTORY #define __HUFFMAN_ENCODING_TREE_FACTORY -#include "MemoryOverride.h" +#include "mafianet/memory_override.h" namespace MafiaNet { /// Forward declarations diff --git a/Source/include/mafianet/DS_HuffmanEncodingTreeNode.h b/Source/include/mafianet/ds_huffman_encoding_tree_node.h similarity index 100% rename from Source/include/mafianet/DS_HuffmanEncodingTreeNode.h rename to Source/include/mafianet/ds_huffman_encoding_tree_node.h diff --git a/Source/include/mafianet/DS_LinkedList.h b/Source/include/mafianet/ds_linked_list.h similarity index 96% rename from Source/include/mafianet/DS_LinkedList.h rename to Source/include/mafianet/ds_linked_list.h index f974128a9..72cfabf82 100644 --- a/Source/include/mafianet/DS_LinkedList.h +++ b/Source/include/mafianet/ds_linked_list.h @@ -13,7 +13,7 @@ * license found in the license.txt file in the root directory of this source tree. */ -/// \file DS_LinkedList.h +/// \file ds_linked_list.h /// \internal /// \brief Straightforward linked list data structure. /// @@ -22,8 +22,8 @@ #ifndef __LINKED_LIST_H #define __LINKED_LIST_H -#include "Export.h" -#include "MemoryOverride.h" +#include "mafianet/export.h" +#include "mafianet/memory_override.h" /// The namespace DataStructures was only added to avoid compiler errors for commonly named data structures /// As these data structures are stand-alone, you can use them outside of RakNet for your own projects if you wish. diff --git a/Source/include/mafianet/DS_List.h b/Source/include/mafianet/ds_list.h similarity index 95% rename from Source/include/mafianet/DS_List.h rename to Source/include/mafianet/ds_list.h index 40ac0a07c..c091bbb0a 100644 --- a/Source/include/mafianet/DS_List.h +++ b/Source/include/mafianet/ds_list.h @@ -13,7 +13,7 @@ * license found in the license.txt file in the root directory of this source tree. */ -/// \file DS_List.h +/// \file ds_list.h /// \internal /// \brief Array based list. /// \details Usually the Queue class is used instead, since it has all the same functionality and is only worse at random access. @@ -23,10 +23,10 @@ #ifndef __LIST_H #define __LIST_H -#include "Assert.h" +#include "mafianet/assert.h" #include // memmove -#include "Export.h" -#include "MemoryOverride.h" +#include "mafianet/export.h" +#include "mafianet/memory_override.h" /// Maximum unsigned long static const unsigned int MAX_UNSIGNED_LONG = 4294967295U; diff --git a/Source/include/mafianet/DS_Map.h b/Source/include/mafianet/ds_map.h similarity index 95% rename from Source/include/mafianet/DS_Map.h rename to Source/include/mafianet/ds_map.h index f58cb7ee0..bc241791a 100644 --- a/Source/include/mafianet/DS_Map.h +++ b/Source/include/mafianet/ds_map.h @@ -13,7 +13,7 @@ * license found in the license.txt file in the root directory of this source tree. */ -/// \file DS_Map.h +/// \file ds_map.h /// \internal /// \brief Map /// @@ -22,10 +22,10 @@ #ifndef __RAKNET_MAP_H #define __RAKNET_MAP_H -#include "DS_OrderedList.h" -#include "Export.h" -#include "MemoryOverride.h" -#include "Assert.h" +#include "mafianet/ds_ordered_list.h" +#include "mafianet/export.h" +#include "mafianet/memory_override.h" +#include "mafianet/assert.h" // If I want to change this to a red-black tree, this is a good site: http://www.cs.auckland.ac.nz/software/AlgAnim/red_black.html // This makes insertions and deletions faster. But then traversals are slow, while they are currently fast. diff --git a/Source/include/mafianet/DS_MemoryPool.h b/Source/include/mafianet/ds_memory_pool.h similarity index 94% rename from Source/include/mafianet/DS_MemoryPool.h rename to Source/include/mafianet/ds_memory_pool.h index 2faadf29e..2ae48a8dd 100644 --- a/Source/include/mafianet/DS_MemoryPool.h +++ b/Source/include/mafianet/ds_memory_pool.h @@ -13,7 +13,7 @@ * license found in the license.txt file in the root directory of this source tree. */ -/// \file DS_MemoryPool.h +/// \file ds_memory_pool.h /// @@ -24,10 +24,10 @@ // Use stdlib and not malloc for compatibility #include #endif -#include "Assert.h" -#include "Export.h" +#include "mafianet/assert.h" +#include "mafianet/export.h" -#include "MemoryOverride.h" +#include "mafianet/memory_override.h" // DS_MEMORY_POOL_MAX_FREE_PAGES must be > 1 #define DS_MEMORY_POOL_MAX_FREE_PAGES 4 @@ -304,8 +304,8 @@ namespace DataStructures #endif /* -#include "DS_MemoryPool.h" -#include "DS_List.h" +#include "mafianet/ds_memory_pool.h" +#include "mafianet/ds_list.h" struct TestMemoryPool { diff --git a/Source/include/mafianet/DS_Multilist.h b/Source/include/mafianet/ds_multilist.h similarity index 96% rename from Source/include/mafianet/DS_Multilist.h rename to Source/include/mafianet/ds_multilist.h index e6d7790ba..78f687f84 100644 --- a/Source/include/mafianet/DS_Multilist.h +++ b/Source/include/mafianet/ds_multilist.h @@ -13,7 +13,7 @@ * license found in the license.txt file in the root directory of this source tree. */ -/// \file DS_Multilist.h +/// \file ds_multilist.h /// \internal /// \brief ADT that can represent an unordered list, ordered list, stack, or queue with a common interface /// @@ -21,11 +21,11 @@ #ifndef __MULTILIST_H #define __MULTILIST_H -#include "Assert.h" +#include "mafianet/assert.h" #include // memmove -#include "Export.h" -#include "MemoryOverride.h" -#include "NativeTypes.h" +#include "mafianet/export.h" +#include "mafianet/memory_override.h" +#include "mafianet/native_types.h" /// What algorithm to use to store the data for the Multilist diff --git a/Source/include/mafianet/DS_OrderedChannelHeap.h b/Source/include/mafianet/ds_ordered_channel_heap.h similarity index 93% rename from Source/include/mafianet/DS_OrderedChannelHeap.h rename to Source/include/mafianet/ds_ordered_channel_heap.h index 5071f0bea..e745214fe 100644 --- a/Source/include/mafianet/DS_OrderedChannelHeap.h +++ b/Source/include/mafianet/ds_ordered_channel_heap.h @@ -13,28 +13,28 @@ * license found in the license.txt file in the root directory of this source tree. */ -/// \file DS_OrderedChannelHeap.h +/// \file ds_ordered_channel_heap.h /// \internal /// \brief Ordered Channel Heap . This is a heap where you add to it on multiple ordered channels, with each channel having a different weight. /// -// Deprecated: DS_OrderedChannelHeap.h has no consumer in the library and is scheduled for removal in the next +// Deprecated: ds_ordered_channel_heap.h has no consumer in the library and is scheduled for removal in the next // minor release. Copy it into your project if you depend on it. // Define MAFIANET_SILENCE_DEPRECATED_INCLUDES to suppress the message. #ifndef MAFIANET_SILENCE_DEPRECATED_INCLUDES -#pragma message("mafianet/DS_OrderedChannelHeap.h is deprecated and will be removed; copy it into your project if you use it") +#pragma message("mafianet/ds_ordered_channel_heap.h is deprecated and will be removed; copy it into your project if you use it") #endif #ifndef __RAKNET_ORDERED_CHANNEL_HEAP_H #define __RAKNET_ORDERED_CHANNEL_HEAP_H -#include "DS_Heap.h" -#include "DS_Map.h" -#include "DS_Queue.h" -#include "Export.h" -#include "Assert.h" -#include "Rand.h" +#include "mafianet/ds_heap.h" +#include "mafianet/ds_map.h" +#include "mafianet/ds_queue.h" +#include "mafianet/export.h" +#include "mafianet/assert.h" +#include "mafianet/rand.h" /// The namespace DataStructures was only added to avoid compiler errors for commonly named data structures /// As these data structures are stand-alone, you can use them outside of RakNet for your own projects if you wish. diff --git a/Source/include/mafianet/DS_OrderedList.h b/Source/include/mafianet/ds_ordered_list.h similarity index 96% rename from Source/include/mafianet/DS_OrderedList.h rename to Source/include/mafianet/ds_ordered_list.h index 7a2faf7b9..729c40c10 100644 --- a/Source/include/mafianet/DS_OrderedList.h +++ b/Source/include/mafianet/ds_ordered_list.h @@ -13,14 +13,14 @@ * license found in the license.txt file in the root directory of this source tree. */ -/// \file DS_OrderedList.h +/// \file ds_ordered_list.h /// \internal /// \brief Quicksort ordered list. /// -#include "DS_List.h" -#include "MemoryOverride.h" -#include "Export.h" +#include "mafianet/ds_list.h" +#include "mafianet/memory_override.h" +#include "mafianet/export.h" #ifndef __ORDERED_LIST_H #define __ORDERED_LIST_H diff --git a/Source/include/mafianet/DS_Queue.h b/Source/include/mafianet/ds_queue.h similarity index 95% rename from Source/include/mafianet/DS_Queue.h rename to Source/include/mafianet/ds_queue.h index 053c78913..215afe91e 100644 --- a/Source/include/mafianet/DS_Queue.h +++ b/Source/include/mafianet/ds_queue.h @@ -13,7 +13,7 @@ * license found in the license.txt file in the root directory of this source tree. */ -/// \file DS_Queue.h +/// \file ds_queue.h /// \internal /// \brief A queue used by RakNet. /// @@ -23,9 +23,9 @@ #define __QUEUE_H // Template classes have to have all the code in the header file -#include "Assert.h" -#include "Export.h" -#include "MemoryOverride.h" +#include "mafianet/assert.h" +#include "mafianet/export.h" +#include "mafianet/memory_override.h" /// The namespace DataStructures was only added to avoid compiler errors for commonly named data structures /// As these data structures are stand-alone, you can use them outside of RakNet for your own projects if you wish. diff --git a/Source/include/mafianet/DS_QueueLinkedList.h b/Source/include/mafianet/ds_queue_linked_list.h similarity index 85% rename from Source/include/mafianet/DS_QueueLinkedList.h rename to Source/include/mafianet/ds_queue_linked_list.h index a822528ea..47cb6888e 100644 --- a/Source/include/mafianet/DS_QueueLinkedList.h +++ b/Source/include/mafianet/ds_queue_linked_list.h @@ -13,25 +13,25 @@ * license found in the license.txt file in the root directory of this source tree. */ -/// \file DS_QueueLinkedList.h +/// \file ds_queue_linked_list.h /// \internal /// \brief A queue implemented as a linked list. /// -// Deprecated: DS_QueueLinkedList.h has only used by the deprecated DS_BinarySearchTree and is scheduled for removal in the next +// Deprecated: ds_queue_linked_list.h has only used by the deprecated DS_BinarySearchTree and is scheduled for removal in the next // minor release. Copy it into your project if you depend on it. // Define MAFIANET_SILENCE_DEPRECATED_INCLUDES to suppress the message. #ifndef MAFIANET_SILENCE_DEPRECATED_INCLUDES -#pragma message("mafianet/DS_QueueLinkedList.h is deprecated and will be removed; copy it into your project if you use it") +#pragma message("mafianet/ds_queue_linked_list.h is deprecated and will be removed; copy it into your project if you use it") #endif #ifndef __QUEUE_LINKED_LIST_H #define __QUEUE_LINKED_LIST_H -#include "DS_LinkedList.h" -#include "Export.h" -#include "MemoryOverride.h" +#include "mafianet/ds_linked_list.h" +#include "mafianet/export.h" +#include "mafianet/memory_override.h" /// The namespace DataStructures was only added to avoid compiler errors for commonly named data structures /// As these data structures are stand-alone, you can use them outside of RakNet for your own projects if you wish. diff --git a/Source/include/mafianet/DS_RangeList.h b/Source/include/mafianet/ds_range_list.h similarity index 94% rename from Source/include/mafianet/DS_RangeList.h rename to Source/include/mafianet/ds_range_list.h index 375a7b5e2..379c6aded 100644 --- a/Source/include/mafianet/DS_RangeList.h +++ b/Source/include/mafianet/ds_range_list.h @@ -13,7 +13,7 @@ * license found in the license.txt file in the root directory of this source tree. */ -/// \file DS_RangeList.h +/// \file ds_range_list.h /// \internal /// \brief A queue implemented as a linked list. /// @@ -22,10 +22,10 @@ #ifndef __RANGE_LIST_H #define __RANGE_LIST_H -#include "DS_OrderedList.h" -#include "BitStream.h" -#include "MemoryOverride.h" -#include "Assert.h" +#include "mafianet/ds_ordered_list.h" +#include "mafianet/bit_stream.h" +#include "mafianet/memory_override.h" +#include "mafianet/assert.h" namespace DataStructures { diff --git a/Source/include/mafianet/DS_Table.h b/Source/include/mafianet/ds_table.h similarity index 96% rename from Source/include/mafianet/DS_Table.h rename to Source/include/mafianet/ds_table.h index 46ab78dae..6c786bc65 100644 --- a/Source/include/mafianet/DS_Table.h +++ b/Source/include/mafianet/ds_table.h @@ -13,18 +13,18 @@ * license found in the license.txt file in the root directory of this source tree. */ -/// \file DS_Table.h +/// \file ds_table.h /// #ifndef __TABLE_H #define __TABLE_H -#include "DS_List.h" -#include "DS_BPlusTree.h" -#include "MemoryOverride.h" -#include "Export.h" -#include "String.h" +#include "mafianet/ds_list.h" +#include "mafianet/ds_bplus_tree.h" +#include "mafianet/memory_override.h" +#include "mafianet/export.h" +#include "mafianet/string.h" #define _TABLE_BPLUS_TREE_ORDER 16 #define _TABLE_MAX_COLUMN_NAME_LENGTH 64 diff --git a/Source/include/mafianet/DS_ThreadsafeAllocatingQueue.h b/Source/include/mafianet/ds_threadsafe_allocating_queue.h similarity index 93% rename from Source/include/mafianet/DS_ThreadsafeAllocatingQueue.h rename to Source/include/mafianet/ds_threadsafe_allocating_queue.h index 7247f43bf..f86b53496 100644 --- a/Source/include/mafianet/DS_ThreadsafeAllocatingQueue.h +++ b/Source/include/mafianet/ds_threadsafe_allocating_queue.h @@ -13,16 +13,16 @@ * license found in the license.txt file in the root directory of this source tree. */ -/// \file DS_ThreadsafeAllocatingQueue.h +/// \file ds_threadsafe_allocating_queue.h /// \internal /// A threadsafe queue, that also uses a memory pool for allocation #ifndef __THREADSAFE_ALLOCATING_QUEUE #define __THREADSAFE_ALLOCATING_QUEUE -#include "DS_Queue.h" -#include "SimpleMutex.h" -#include "DS_MemoryPool.h" +#include "mafianet/ds_queue.h" +#include "mafianet/simple_mutex.h" +#include "mafianet/ds_memory_pool.h" // #if defined(new) // #pragma push_macro("new") diff --git a/Source/include/mafianet/DS_Tree.h b/Source/include/mafianet/ds_tree.h similarity index 90% rename from Source/include/mafianet/DS_Tree.h rename to Source/include/mafianet/ds_tree.h index 4a53a34e8..03f88828a 100644 --- a/Source/include/mafianet/DS_Tree.h +++ b/Source/include/mafianet/ds_tree.h @@ -13,7 +13,7 @@ * license found in the license.txt file in the root directory of this source tree. */ -/// \file DS_Tree.h +/// \file ds_tree.h /// \internal /// \brief Just a regular tree /// @@ -23,10 +23,10 @@ #ifndef __DS_TREE_H #define __DS_TREE_H -#include "Export.h" -#include "DS_List.h" -#include "DS_Queue.h" -#include "MemoryOverride.h" +#include "mafianet/export.h" +#include "mafianet/ds_list.h" +#include "mafianet/ds_queue.h" +#include "mafianet/memory_override.h" /// The namespace DataStructures was only added to avoid compiler errors for commonly named data structures /// As these data structures are stand-alone, you can use them outside of RakNet for your own projects if you wish. diff --git a/Source/include/mafianet/DS_WeightedGraph.h b/Source/include/mafianet/ds_weighted_graph.h similarity index 95% rename from Source/include/mafianet/DS_WeightedGraph.h rename to Source/include/mafianet/ds_weighted_graph.h index 90ee7f7ca..2ead6ff4e 100644 --- a/Source/include/mafianet/DS_WeightedGraph.h +++ b/Source/include/mafianet/ds_weighted_graph.h @@ -13,7 +13,7 @@ * license found in the license.txt file in the root directory of this source tree. */ -/// \file DS_WeightedGraph.h +/// \file ds_weighted_graph.h /// \internal /// \brief Weighted graph. /// \details I'm assuming the indices are complex map types, rather than sequential numbers (which could be implemented much more efficiently). @@ -23,13 +23,13 @@ #ifndef __WEIGHTED_GRAPH_H #define __WEIGHTED_GRAPH_H -#include "DS_OrderedList.h" -#include "DS_Map.h" -#include "DS_Heap.h" -#include "DS_Queue.h" -#include "DS_Tree.h" -#include "Assert.h" -#include "MemoryOverride.h" +#include "mafianet/ds_ordered_list.h" +#include "mafianet/ds_map.h" +#include "mafianet/ds_heap.h" +#include "mafianet/ds_queue.h" +#include "mafianet/ds_tree.h" +#include "mafianet/assert.h" +#include "mafianet/memory_override.h" #ifdef _DEBUG #include #endif diff --git a/Source/include/mafianet/DynDNS.h b/Source/include/mafianet/dyn_dns.h similarity index 94% rename from Source/include/mafianet/DynDNS.h rename to Source/include/mafianet/dyn_dns.h index 34a3c6619..0f1316e2b 100644 --- a/Source/include/mafianet/DynDNS.h +++ b/Source/include/mafianet/dyn_dns.h @@ -13,19 +13,19 @@ * license found in the license.txt file in the root directory of this source tree. */ -/// \file DynDNS.h +/// \file dyn_dns.h /// \brief Helper to class to update DynDNS /// This can be used to determine what permissions are should be allowed to the other system /// -#include "NativeFeatureIncludes.h" +#include "mafianet/native_feature_includes.h" #if _RAKNET_SUPPORT_DynDNS==1 && _RAKNET_SUPPORT_TCPInterface==1 #ifndef __DYN_DNS_H #define __DYN_DNS_H -#include "String.h" +#include "mafianet/string.h" namespace MafiaNet { diff --git a/Source/include/mafianet/EmailSender.h b/Source/include/mafianet/email_sender.h similarity index 89% rename from Source/include/mafianet/EmailSender.h rename to Source/include/mafianet/email_sender.h index 1de8a44f6..28c865db7 100644 --- a/Source/include/mafianet/EmailSender.h +++ b/Source/include/mafianet/email_sender.h @@ -13,21 +13,21 @@ * license found in the license.txt file in the root directory of this source tree. */ -/// \file EmailSender.h +/// \file email_sender.h /// \brief Rudimentary class to send email from code. Don't expect anything fancy. /// -#include "NativeFeatureIncludes.h" +#include "mafianet/native_feature_includes.h" #if _RAKNET_SUPPORT_EmailSender==1 && _RAKNET_SUPPORT_TCPInterface==1 && _RAKNET_SUPPORT_FileOperations==1 #ifndef __EMAIL_SENDER_H #define __EMAIL_SENDER_H -#include "Types.h" -#include "MemoryOverride.h" -#include "Export.h" -#include "Rand.h" -#include "TCPInterface.h" +#include "mafianet/types.h" +#include "mafianet/memory_override.h" +#include "mafianet/export.h" +#include "mafianet/rand.h" +#include "mafianet/tcp_interface.h" namespace MafiaNet { diff --git a/Source/include/mafianet/EmptyHeader.h b/Source/include/mafianet/empty_header.h similarity index 100% rename from Source/include/mafianet/EmptyHeader.h rename to Source/include/mafianet/empty_header.h diff --git a/Source/include/mafianet/EpochTimeToString.h b/Source/include/mafianet/epoch_time_to_string.h similarity index 84% rename from Source/include/mafianet/EpochTimeToString.h rename to Source/include/mafianet/epoch_time_to_string.h index 94043f135..d2a1266cc 100644 --- a/Source/include/mafianet/EpochTimeToString.h +++ b/Source/include/mafianet/epoch_time_to_string.h @@ -9,14 +9,14 @@ */ -/// \file EpochTimeToString.h +/// \file epoch_time_to_string.h /// #ifndef __EPOCH_TIME_TO_STRING_H #define __EPOCH_TIME_TO_STRING_H -#include "Export.h" +#include "mafianet/export.h" RAK_DLL_EXPORT char * EpochTimeToString(long long time); diff --git a/Source/include/mafianet/Export.h b/Source/include/mafianet/export.h similarity index 95% rename from Source/include/mafianet/Export.h rename to Source/include/mafianet/export.h index e94740a1c..f149d6104 100644 --- a/Source/include/mafianet/Export.h +++ b/Source/include/mafianet/export.h @@ -13,7 +13,7 @@ * license found in the license.txt file in the root directory of this source tree. */ -#include "Defines.h" +#include "mafianet/defines.h" #if defined(_WIN32) && !(defined(__GNUC__) || defined(__GCCXML__)) && !defined(_MAFIANET_LIB) && defined(_MAFIANET_DLL) #define RAK_DLL_EXPORT __declspec(dllexport) diff --git a/Source/include/mafianet/FileList.h b/Source/include/mafianet/file_list.h similarity index 95% rename from Source/include/mafianet/FileList.h rename to Source/include/mafianet/file_list.h index 750e96c35..8bbe2bb07 100644 --- a/Source/include/mafianet/FileList.h +++ b/Source/include/mafianet/file_list.h @@ -13,22 +13,22 @@ * license found in the license.txt file in the root directory of this source tree. */ -/// \file FileList.h +/// \file file_list.h /// -#include "NativeFeatureIncludes.h" +#include "mafianet/native_feature_includes.h" #if _RAKNET_SUPPORT_FileOperations==1 #ifndef __FILE_LIST #define __FILE_LIST -#include "Export.h" -#include "DS_List.h" -#include "MemoryOverride.h" -#include "Types.h" -#include "FileListNodeContext.h" -#include "String.h" +#include "mafianet/export.h" +#include "mafianet/ds_list.h" +#include "mafianet/memory_override.h" +#include "mafianet/types.h" +#include "mafianet/file_list_node_context.h" +#include "mafianet/string.h" namespace MafiaNet { diff --git a/Source/include/mafianet/FileListNodeContext.h b/Source/include/mafianet/file_list_node_context.h similarity index 92% rename from Source/include/mafianet/FileListNodeContext.h rename to Source/include/mafianet/file_list_node_context.h index 9061ae0aa..5f53e7a55 100644 --- a/Source/include/mafianet/FileListNodeContext.h +++ b/Source/include/mafianet/file_list_node_context.h @@ -13,14 +13,14 @@ * license found in the license.txt file in the root directory of this source tree. */ -/// \file FileListNodeContext.h +/// \file file_list_node_context.h /// #ifndef __FILE_LIST_NODE_CONTEXT_H #define __FILE_LIST_NODE_CONTEXT_H -#include "BitStream.h" +#include "mafianet/bit_stream.h" struct FileListNodeContext { diff --git a/Source/include/mafianet/FileListTransfer.h b/Source/include/mafianet/file_list_transfer.h similarity index 93% rename from Source/include/mafianet/FileListTransfer.h rename to Source/include/mafianet/file_list_transfer.h index d8fff840f..5bd679450 100644 --- a/Source/include/mafianet/FileListTransfer.h +++ b/Source/include/mafianet/file_list_transfer.h @@ -13,28 +13,28 @@ * license found in the license.txt file in the root directory of this source tree. */ -/// \file FileListTransfer.h +/// \file file_list_transfer.h /// \brief A plugin to provide a simple way to compress and incrementally send the files in the FileList structure. /// -#include "NativeFeatureIncludes.h" +#include "mafianet/native_feature_includes.h" #if _RAKNET_SUPPORT_FileListTransfer==1 && _RAKNET_SUPPORT_FileOperations==1 #ifndef __FILE_LIST_TRANFER_H #define __FILE_LIST_TRANFER_H -#include "Types.h" -#include "Export.h" -#include "PluginInterface2.h" -#include "DS_Map.h" -#include "Types.h" -#include "PacketPriority.h" -#include "MemoryOverride.h" -#include "FileList.h" -#include "DS_Queue.h" -#include "SimpleMutex.h" -#include "ThreadPool.h" +#include "mafianet/types.h" +#include "mafianet/export.h" +#include "mafianet/plugin_interface2.h" +#include "mafianet/ds_map.h" +#include "mafianet/types.h" +#include "mafianet/packet_priority.h" +#include "mafianet/memory_override.h" +#include "mafianet/file_list.h" +#include "mafianet/ds_queue.h" +#include "mafianet/simple_mutex.h" +#include "mafianet/thread_pool.h" namespace MafiaNet { diff --git a/Source/include/mafianet/FileListTransferCBInterface.h b/Source/include/mafianet/file_list_transfer_cb_interface.h similarity index 96% rename from Source/include/mafianet/FileListTransferCBInterface.h rename to Source/include/mafianet/file_list_transfer_cb_interface.h index d46266a74..cbc7db4f7 100644 --- a/Source/include/mafianet/FileListTransferCBInterface.h +++ b/Source/include/mafianet/file_list_transfer_cb_interface.h @@ -13,15 +13,15 @@ * license found in the license.txt file in the root directory of this source tree. */ -/// \file FileListTransferCBInterface.h +/// \file file_list_transfer_cb_interface.h /// #ifndef __FILE_LIST_TRANSFER_CALLBACK_INTERFACE_H #define __FILE_LIST_TRANSFER_CALLBACK_INTERFACE_H -#include "MemoryOverride.h" -#include "FileListNodeContext.h" +#include "mafianet/memory_override.h" +#include "mafianet/file_list_node_context.h" namespace MafiaNet { diff --git a/Source/include/mafianet/FileOperations.h b/Source/include/mafianet/file_operations.h similarity index 86% rename from Source/include/mafianet/FileOperations.h rename to Source/include/mafianet/file_operations.h index 901a73fc4..789370d5a 100644 --- a/Source/include/mafianet/FileOperations.h +++ b/Source/include/mafianet/file_operations.h @@ -8,17 +8,17 @@ * */ -/// \file FileOperations.h +/// \file file_operations.h /// -#include "NativeFeatureIncludes.h" +#include "mafianet/native_feature_includes.h" #if _RAKNET_SUPPORT_FileOperations==1 #ifndef __FILE_OPERATIONS_H #define __FILE_OPERATIONS_H -#include "Export.h" +#include "mafianet/export.h" bool RAK_DLL_EXPORT WriteFileWithDirectories( const char *path, char *data, unsigned dataLength ); bool RAK_DLL_EXPORT IsSlash(unsigned char c); diff --git a/Source/include/mafianet/_FindFirst.h b/Source/include/mafianet/find_first.h similarity index 95% rename from Source/include/mafianet/_FindFirst.h rename to Source/include/mafianet/find_first.h index 663807473..a5ea23b3c 100644 --- a/Source/include/mafianet/_FindFirst.h +++ b/Source/include/mafianet/find_first.h @@ -20,7 +20,7 @@ #include -#include "String.h" +#include "mafianet/string.h" #define _A_NORMAL 0x00 // Normal file #define _A_RDONLY 0x01 // Read-only file diff --git a/Source/include/mafianet/FormatString.h b/Source/include/mafianet/format_string.h similarity index 86% rename from Source/include/mafianet/FormatString.h rename to Source/include/mafianet/format_string.h index 952ecae3c..fd44c3c3e 100644 --- a/Source/include/mafianet/FormatString.h +++ b/Source/include/mafianet/format_string.h @@ -8,14 +8,14 @@ * */ -/// \file FormatString.h +/// \file format_string.h /// #ifndef __FORMAT_STRING_H #define __FORMAT_STRING_H -#include "Export.h" +#include "mafianet/export.h" extern "C" { char * FormatString(const char *format, ...); diff --git a/Source/include/mafianet/FullyConnectedMesh2.h b/Source/include/mafianet/fully_connected_mesh2.h similarity index 96% rename from Source/include/mafianet/FullyConnectedMesh2.h rename to Source/include/mafianet/fully_connected_mesh2.h index e2f676a13..255c681e2 100644 --- a/Source/include/mafianet/FullyConnectedMesh2.h +++ b/Source/include/mafianet/fully_connected_mesh2.h @@ -13,24 +13,24 @@ * license found in the license.txt file in the root directory of this source tree. */ -/// \file FullyConnectedMesh2.h +/// \file fully_connected_mesh2.h /// \brief Fully connected mesh plugin, revision 2. /// \details This will connect RakPeer to all connecting peers, and all peers the connecting peer knows about. /// -#include "NativeFeatureIncludes.h" +#include "mafianet/native_feature_includes.h" #if _RAKNET_SUPPORT_FullyConnectedMesh2==1 #ifndef __FULLY_CONNECTED_MESH_2_H #define __FULLY_CONNECTED_MESH_2_H -#include "PluginInterface2.h" -#include "MemoryOverride.h" -#include "NativeTypes.h" -#include "DS_List.h" -#include "String.h" -#include "BitStream.h" +#include "mafianet/plugin_interface2.h" +#include "mafianet/memory_override.h" +#include "mafianet/native_types.h" +#include "mafianet/ds_list.h" +#include "mafianet/string.h" +#include "mafianet/bit_stream.h" typedef int64_t FCM2Guid; diff --git a/Source/include/mafianet/GetTime.h b/Source/include/mafianet/get_time.h similarity index 92% rename from Source/include/mafianet/GetTime.h rename to Source/include/mafianet/get_time.h index c24de474b..5fd21f39c 100644 --- a/Source/include/mafianet/GetTime.h +++ b/Source/include/mafianet/get_time.h @@ -13,7 +13,7 @@ * license found in the license.txt file in the root directory of this source tree. */ -/// \file GetTime.h +/// \file get_time.h /// \brief Returns the value from QueryPerformanceCounter. This is the function RakNet uses to represent time. This time won't match the time returned by GetTimeCount(). See http://www.jenkinssoftware.com/forum/index.php?topic=2798.0 /// @@ -21,8 +21,8 @@ #ifndef __GET_TIME_H #define __GET_TIME_H -#include "Export.h" -#include "Time.h" // For MafiaNet::TimeMS +#include "mafianet/export.h" +#include "mafianet/time.h" // For MafiaNet::TimeMS namespace MafiaNet { diff --git a/Source/include/mafianet/GetTimeOfDay.h b/Source/include/mafianet/get_time_of_day.h similarity index 100% rename from Source/include/mafianet/GetTimeOfDay.h rename to Source/include/mafianet/get_time_of_day.h diff --git a/Source/include/mafianet/Getche.h b/Source/include/mafianet/getche.h similarity index 100% rename from Source/include/mafianet/Getche.h rename to Source/include/mafianet/getche.h diff --git a/Source/include/mafianet/Gets.h b/Source/include/mafianet/gets.h similarity index 100% rename from Source/include/mafianet/Gets.h rename to Source/include/mafianet/gets.h diff --git a/Source/include/mafianet/GridSectorizer.h b/Source/include/mafianet/grid_sectorizer.h similarity index 93% rename from Source/include/mafianet/GridSectorizer.h rename to Source/include/mafianet/grid_sectorizer.h index c01521eed..e3535cab2 100644 --- a/Source/include/mafianet/GridSectorizer.h +++ b/Source/include/mafianet/grid_sectorizer.h @@ -18,12 +18,12 @@ //#define _USE_ORDERED_LIST -#include "MemoryOverride.h" +#include "mafianet/memory_override.h" #ifdef _USE_ORDERED_LIST -#include "DS_OrderedList.h" +#include "mafianet/ds_ordered_list.h" #else -#include "DS_List.h" +#include "mafianet/ds_list.h" #endif class GridSectorizer diff --git a/Source/include/mafianet/guid_util.h b/Source/include/mafianet/guid_util.h index 2883a7708..9625900ec 100644 --- a/Source/include/mafianet/guid_util.h +++ b/Source/include/mafianet/guid_util.h @@ -1,14 +1,48 @@ /* - * Copyright (c) 2026, MafiaHub - * Licensed under MIT-style license + * Copyright (c) 2024, MafiaHub * - * Deprecated include path. "mafianet/guid_util.h" was renamed to "mafianet/GuidUtil.h" so - * every header follows the PascalCase name of the class it declares. This - * forwarding header is kept for one release cycle and will then be removed. - * Define MAFIANET_SILENCE_DEPRECATED_INCLUDES to suppress the message. + * This source code is licensed under the MIT-style license found in the + * license.txt file in the root directory of this source tree. */ -#pragma once -#ifndef MAFIANET_SILENCE_DEPRECATED_INCLUDES -#pragma message("mafianet/guid_util.h is deprecated; include mafianet/GuidUtil.h instead") -#endif -#include "GuidUtil.h" + +/// \file +/// \brief Modern, additive value-type accessors layered over the legacy +/// RakNet/SLikeNet value types (\a RakNetGUID, \a SystemAddress). +/// +/// These free functions live alongside the legacy struct methods rather than +/// inside them, so they don't touch the wire-transmitted ABI of \a RakNetGUID. +/// They favour ownership over shared static buffers and \a std::optional over +/// sentinel return values, giving callers thread-safe, leak-free primitives to +/// build cleaner APIs on top of. + +#ifndef __MAFIANET_GUID_UTIL_H +#define __MAFIANET_GUID_UTIL_H + +#include +#include + +#include "mafianet/types.h" +#include "mafianet/peer_interface.h" + +namespace MafiaNet { + +/// Return the GUID as an owned \a std::string. +/// +/// Unlike the legacy \a RakNetGUID::ToString() member (which returned a pointer +/// into a rotating, process-wide static buffer and was explicitly NOT thread +/// safe), this allocates a fresh string on every call and shares no state, so +/// it is safe to call concurrently from multiple threads. It is implemented on +/// top of the thread-safe \a RakNetGUID::ToString(char*, size_t) member. +RAK_DLL_EXPORT std::string to_string(const RakNetGUID& g); + +/// Look up the SystemAddress currently connected to \a g. +/// +/// A thin facade over \a RakPeerInterface::GetSystemAddressFromGuid that maps +/// the legacy \a UNASSIGNED_SYSTEM_ADDRESS "none" sentinel to \a std::nullopt, +/// so callers can use ordinary optional handling instead of comparing against a +/// magic value. +RAK_DLL_EXPORT std::optional connected_address(RakPeerInterface& peer, const RakNetGUID& g); + +} // namespace MafiaNet + +#endif // __MAFIANET_GUID_UTIL_H diff --git a/Source/include/mafianet/HTTPConnection.h b/Source/include/mafianet/http_connection.h similarity index 92% rename from Source/include/mafianet/HTTPConnection.h rename to Source/include/mafianet/http_connection.h index de1112435..6889a49c2 100644 --- a/Source/include/mafianet/HTTPConnection.h +++ b/Source/include/mafianet/http_connection.h @@ -13,22 +13,22 @@ * license found in the license.txt file in the root directory of this source tree. */ -/// \file HTTPConnection.h +/// \file http_connection.h /// \brief Contains HTTPConnection, used to communicate with web servers /// -#include "NativeFeatureIncludes.h" +#include "mafianet/native_feature_includes.h" #if _RAKNET_SUPPORT_HTTPConnection==1 && _RAKNET_SUPPORT_TCPInterface==1 #ifndef __HTTP_CONNECTION #define __HTTP_CONNECTION -#include "Export.h" -#include "String.h" -#include "MemoryOverride.h" -#include "Types.h" -#include "DS_Queue.h" +#include "mafianet/export.h" +#include "mafianet/string.h" +#include "mafianet/memory_override.h" +#include "mafianet/types.h" +#include "mafianet/ds_queue.h" namespace MafiaNet { diff --git a/Source/include/mafianet/HTTPConnection2.h b/Source/include/mafianet/http_connection2.h similarity index 91% rename from Source/include/mafianet/HTTPConnection2.h rename to Source/include/mafianet/http_connection2.h index acf2c09d0..a825caeb8 100644 --- a/Source/include/mafianet/HTTPConnection2.h +++ b/Source/include/mafianet/http_connection2.h @@ -13,26 +13,26 @@ * license found in the license.txt file in the root directory of this source tree. */ -/// \file HTTPConnection2.h +/// \file http_connection2.h /// \brief Contains HTTPConnection2, used to communicate with web servers /// #include -#include "NativeFeatureIncludes.h" +#include "mafianet/native_feature_includes.h" #if _RAKNET_SUPPORT_HTTPConnection2==1 && _RAKNET_SUPPORT_TCPInterface==1 #ifndef __HTTP_CONNECTION_2 #define __HTTP_CONNECTION_2 -#include "Export.h" -#include "String.h" -#include "MemoryOverride.h" -#include "Types.h" -#include "DS_List.h" -#include "DS_Queue.h" -#include "PluginInterface2.h" -#include "SimpleMutex.h" +#include "mafianet/export.h" +#include "mafianet/string.h" +#include "mafianet/memory_override.h" +#include "mafianet/types.h" +#include "mafianet/ds_list.h" +#include "mafianet/ds_queue.h" +#include "mafianet/plugin_interface2.h" +#include "mafianet/simple_mutex.h" namespace MafiaNet { diff --git a/Source/include/mafianet/IncrementalReadInterface.h b/Source/include/mafianet/incremental_read_interface.h similarity index 92% rename from Source/include/mafianet/IncrementalReadInterface.h rename to Source/include/mafianet/incremental_read_interface.h index 6df7c7300..2b77a3fe3 100644 --- a/Source/include/mafianet/IncrementalReadInterface.h +++ b/Source/include/mafianet/incremental_read_interface.h @@ -16,8 +16,8 @@ #ifndef __INCREMENTAL_READ_INTERFACE_H #define __INCREMENTAL_READ_INTERFACE_H -#include "FileListNodeContext.h" -#include "Export.h" +#include "mafianet/file_list_node_context.h" +#include "mafianet/export.h" namespace MafiaNet { diff --git a/Source/include/mafianet/InternalPacket.h b/Source/include/mafianet/internal_packet.h similarity index 93% rename from Source/include/mafianet/InternalPacket.h rename to Source/include/mafianet/internal_packet.h index 55f5217cb..81249061a 100644 --- a/Source/include/mafianet/InternalPacket.h +++ b/Source/include/mafianet/internal_packet.h @@ -20,16 +20,16 @@ #ifndef __INTERNAL_PACKET_H #define __INTERNAL_PACKET_H -#include "PacketPriority.h" -#include "Types.h" -#include "MemoryOverride.h" -#include "Defines.h" -#include "NativeTypes.h" -#include "Defines.h" +#include "mafianet/packet_priority.h" +#include "mafianet/types.h" +#include "mafianet/memory_override.h" +#include "mafianet/defines.h" +#include "mafianet/native_types.h" +#include "mafianet/defines.h" #if USE_SLIDING_WINDOW_CONGESTION_CONTROL!=1 -#include "CCRakNetUDT.h" +#include "mafianet/cc_udt.h" #else -#include "CCRakNetSlidingWindow.h" +#include "mafianet/cc_sliding_window.h" #endif namespace MafiaNet { diff --git a/Source/include/mafianet/Itoa.h b/Source/include/mafianet/itoa.h similarity index 100% rename from Source/include/mafianet/Itoa.h rename to Source/include/mafianet/itoa.h diff --git a/Source/include/mafianet/Kbhit.h b/Source/include/mafianet/kbhit.h similarity index 100% rename from Source/include/mafianet/Kbhit.h rename to Source/include/mafianet/kbhit.h diff --git a/Source/include/mafianet/linux_adapter.h b/Source/include/mafianet/linux_adapter.h index dd411f31b..8e3d4fb8f 100644 --- a/Source/include/mafianet/linux_adapter.h +++ b/Source/include/mafianet/linux_adapter.h @@ -1,14 +1,88 @@ /* - * Copyright (c) 2026, MafiaHub - * Licensed under MIT-style license + * Copyright (c) 2016-2019, SLikeSoft UG (haftungsbeschränkt) * - * Deprecated include path. "mafianet/linux_adapter.h" was renamed to "mafianet/LinuxAdapter.h" so - * every header follows the PascalCase name of the class it declares. This - * forwarding header is kept for one release cycle and will then be removed. - * Define MAFIANET_SILENCE_DEPRECATED_INCLUDES to suppress the message. + * This source code is licensed under the MIT-style license found in the + * license.txt file in the root directory of this source tree. + * + * + * This file declares adapters for all MS-specific functions used throughout MafiaNet. */ #pragma once -#ifndef MAFIANET_SILENCE_DEPRECATED_INCLUDES -#pragma message("mafianet/linux_adapter.h is deprecated; include mafianet/LinuxAdapter.h instead") + +#ifdef __linux__ +#define _TRUNCATE ((size_t)-1) +typedef int errno_t; + +#include // for va_start, va_end, va_list +#include // for FILE +#include // for time_t + +// MS specific security enhanced functions +errno_t fopen_s(FILE **pfile, const char *filename, const char *mode); +errno_t localtime_s(struct tm* _tm, const time_t *time); +errno_t mbstowcs_s(size_t *pReturnValue, wchar_t *wcstr, size_t sizeInWords, const char *mbstr, size_t count); +int sprintf_s(char *buffer, size_t sizeOfBuffer, const char *format, ...); +errno_t strcat_s(char *strDestination, size_t numberOfElements, const char *strSource); +errno_t strcpy_s(char* strDestination, size_t numberOfElements, const char *strSource); +errno_t strerror_s(char* buffer, size_t numberOfElements, int errnum); +errno_t strncat_s(char *strDest, size_t numberOfElements, const char *strSource, size_t count); +errno_t strncpy_s(char *strDest, size_t numberOfElements, const char *strSource, size_t count); +int vsnprintf_s(char *buffer, size_t sizeOfBuffer, size_t count, const char *format, va_list argptr); +errno_t wcscat_s(wchar_t *strDestination, size_t numberOfElements, const wchar_t *strSource); +errno_t wcscpy_s(wchar_t* strDestination, size_t numberOfElements, const wchar_t *strSource); + +// corresponding template overloads +template errno_t mbstowcs_s(size_t *pReturnValue, wchar_t(&wcstr)[BufferSize], const char *mbstr, size_t count) +{ + return mbstowcs_s(pReturnValue, wcstr, BufferSize, mbstr, count); +} + +template int sprintf_s(char (&buffer)[BufferSize], const char* format, ...) +{ + va_list arglist; + va_start(arglist, format); + int numCharsWritten = vsnprintf_s(buffer, BufferSize, BufferSize - 1, format, arglist); + va_end(arglist); + + return numCharsWritten; +} + +template errno_t strcat_s(char (&strDestination)[BufferSize], const char* strSource) +{ + return strcat_s(strDestination, BufferSize, strSource); +} + +template errno_t strcpy_s(char (&strDestination)[BufferSize], const char* strSource) +{ + return strcpy_s(strDestination, BufferSize, strSource); +} + +template errno_t strerror_s(char(&buffer)[BufferSize], int errnum) +{ + return strerror_s(buffer, BufferSize, errnum); +} + +template errno_t strncat_s(char(&strDest)[BufferSize], const char *strSource, size_t count) +{ + return strncat_s(strDest, BufferSize, strSource, count); +} + +template errno_t strncpy_s(char(&strDest)[BufferSize], const char *strSource, size_t count) +{ + return strncpy_s(strDest, BufferSize, strSource, count); +} + +template int vsnprintf_s(char (&buffer)[BufferSize], size_t count, const char *format, va_list argptr) +{ + return vsnprintf_s(buffer, BufferSize, count, format, argptr); +} + +// MS gets_s function adapter - wraps MafiaNet's Gets function +// Note: Samples should include this header for gets_s support on Linux +#include "mafianet/gets.h" +template char* gets_s(char (&buffer)[BufferSize]) +{ + return Gets(buffer, static_cast(BufferSize)); +} + #endif -#include "LinuxAdapter.h" diff --git a/Source/include/mafianet/LinuxStrings.h b/Source/include/mafianet/linux_strings.h similarity index 100% rename from Source/include/mafianet/LinuxStrings.h rename to Source/include/mafianet/linux_strings.h diff --git a/Source/include/mafianet/LocklessTypes.h b/Source/include/mafianet/lockless_types.h similarity index 87% rename from Source/include/mafianet/LocklessTypes.h rename to Source/include/mafianet/lockless_types.h index 89249ef73..680cf8496 100644 --- a/Source/include/mafianet/LocklessTypes.h +++ b/Source/include/mafianet/lockless_types.h @@ -16,12 +16,12 @@ #ifndef __LOCKLESS_TYPES_H #define __LOCKLESS_TYPES_H -#include "Export.h" -#include "NativeTypes.h" -#include "WindowsIncludes.h" +#include "mafianet/export.h" +#include "mafianet/native_types.h" +#include "mafianet/windows_includes.h" #if defined(ANDROID) || defined(__S3E__) || defined(__APPLE__) // __sync_fetch_and_add not supported apparently -#include "SimpleMutex.h" +#include "mafianet/simple_mutex.h" #endif namespace MafiaNet diff --git a/Source/include/mafianet/LogCommandParser.h b/Source/include/mafianet/log_command_parser.h similarity index 95% rename from Source/include/mafianet/LogCommandParser.h rename to Source/include/mafianet/log_command_parser.h index 422772d23..ba42465ed 100644 --- a/Source/include/mafianet/LogCommandParser.h +++ b/Source/include/mafianet/log_command_parser.h @@ -17,14 +17,14 @@ /// \brief Contains LogCommandParser , Used to send logs to connected consoles /// -#include "NativeFeatureIncludes.h" +#include "mafianet/native_feature_includes.h" #if _RAKNET_SUPPORT_LogCommandParser==1 #ifndef __LOG_COMMAND_PARSER #define __LOG_COMMAND_PARSER -#include "CommandParserInterface.h" -#include "Export.h" +#include "mafianet/command_parser_interface.h" +#include "mafianet/export.h" namespace MafiaNet { diff --git a/Source/include/mafianet/mafianet.h b/Source/include/mafianet/mafianet.h index 853df874f..90c7388be 100644 --- a/Source/include/mafianet/mafianet.h +++ b/Source/include/mafianet/mafianet.h @@ -22,15 +22,15 @@ #pragma once -#include "mafianet/PeerInterface.h" // RakPeerInterface — main entry point -#include "mafianet/Types.h" // Packet, SystemAddress, RakNetGUID, enums -#include "mafianet/MessageIdentifiers.h" // ID_* message IDs + ID_USER_PACKET_ENUM -#include "mafianet/PacketPriority.h" // MafiaNet::Priority / MafiaNet::Reliability -#include "mafianet/Statistics.h" // RakNetStatistics — return type of GetStatistics() -#include "mafianet/BitStream.h" // binary serialization -#include "mafianet/Archive.h" // serialize() convention over BitStream -#include "mafianet/GetTime.h" // MafiaNet::GetTime / TimeMS -#include "mafianet/GuidUtil.h" // MafiaNet::to_string / connected_address -#include "mafianet/Aliases.h" // canonical aliases: PeerInterface, Guid, Statistics -#include "mafianet/PeerHandle.h" // RAII handles: Peer, PacketPtr -#include "mafianet/Dispatcher.h" // typed message dispatcher: Dispatcher, Sender +#include "mafianet/peer_interface.h" // RakPeerInterface — main entry point +#include "mafianet/types.h" // Packet, SystemAddress, RakNetGUID, enums +#include "mafianet/message_identifiers.h" // ID_* message IDs + ID_USER_PACKET_ENUM +#include "mafianet/packet_priority.h" // MafiaNet::Priority / MafiaNet::Reliability +#include "mafianet/statistics.h" // RakNetStatistics — return type of GetStatistics() +#include "mafianet/bit_stream.h" // binary serialization +#include "mafianet/archive.h" // serialize() convention over BitStream +#include "mafianet/get_time.h" // MafiaNet::GetTime / TimeMS +#include "mafianet/guid_util.h" // MafiaNet::to_string / connected_address +#include "mafianet/aliases.h" // canonical aliases: PeerInterface, Guid, Statistics +#include "mafianet/peer_handle.h" // RAII handles: Peer, PacketPtr +#include "mafianet/dispatcher.h" // typed message dispatcher: Dispatcher, Sender diff --git a/Source/include/mafianet/MemoryOverride.h b/Source/include/mafianet/memory_override.h similarity index 95% rename from Source/include/mafianet/MemoryOverride.h rename to Source/include/mafianet/memory_override.h index bf1aa2ab6..387e8491f 100644 --- a/Source/include/mafianet/MemoryOverride.h +++ b/Source/include/mafianet/memory_override.h @@ -22,8 +22,8 @@ #ifndef __RAK_MEMORY_H #define __RAK_MEMORY_H -#include "Export.h" -#include "Defines.h" +#include "mafianet/export.h" +#include "mafianet/defines.h" #include @@ -32,7 +32,7 @@ -#include "Alloca.h" +#include "mafianet/alloca.h" // #if _USE_RAK_MEMORY_OVERRIDE==1 // #if defined(new) @@ -43,7 +43,7 @@ // #endif -// These pointers are statically and globally defined in RakMemoryOverride.cpp +// These pointers are statically and globally defined in memory_override.cpp // Change them to point to your own allocators if you want. // Use the functions for a DLL, or just reassign the variable if using source extern RAK_DLL_EXPORT void * (*rakMalloc) (size_t size); diff --git a/Source/include/mafianet/MessageFilter.h b/Source/include/mafianet/message_filter.h similarity index 96% rename from Source/include/mafianet/MessageFilter.h rename to Source/include/mafianet/message_filter.h index d9ec075db..e43501c8d 100644 --- a/Source/include/mafianet/MessageFilter.h +++ b/Source/include/mafianet/message_filter.h @@ -17,17 +17,17 @@ /// \brief Message filter plugin. Assigns systems to FilterSets. Each FilterSet limits what messages are allowed. This is a security related plugin. /// -#include "NativeFeatureIncludes.h" +#include "mafianet/native_feature_includes.h" #if _RAKNET_SUPPORT_MessageFilter==1 #ifndef __MESSAGE_FILTER_PLUGIN_H #define __MESSAGE_FILTER_PLUGIN_H -#include "Types.h" -#include "PluginInterface2.h" -#include "DS_OrderedList.h" -#include "DS_Hash.h" -#include "Export.h" +#include "mafianet/types.h" +#include "mafianet/plugin_interface2.h" +#include "mafianet/ds_ordered_list.h" +#include "mafianet/ds_hash.h" +#include "mafianet/export.h" /// MessageIdentifier (ID_*) values shoudln't go higher than this. Change it if you do. #define MESSAGE_FILTER_MAX_MESSAGE_ID 256 diff --git a/Source/include/mafianet/MessageIdentifiers.h b/Source/include/mafianet/message_identifiers.h similarity index 97% rename from Source/include/mafianet/MessageIdentifiers.h rename to Source/include/mafianet/message_identifiers.h index a2077b5ab..51a8ca400 100644 --- a/Source/include/mafianet/MessageIdentifiers.h +++ b/Source/include/mafianet/message_identifiers.h @@ -43,7 +43,7 @@ enum OutOfBandIdentifiers ID_NAT_PONG, }; -/// You should not edit the file MessageIdentifiers.h as it is a part of RakNet static library +/// You should not edit the file message_identifiers.h as it is a part of RakNet static library /// To define your own message id, define an enum following the code example that follows. /// /// \code @@ -154,7 +154,7 @@ enum DefaultMessageIDTypes // RakPeer - Downloading a large message. Format is ID_DOWNLOAD_PROGRESS (MessageID), partCount (unsigned int), /// partTotal (unsigned int), /// partLength (unsigned int), first part data (length <= MAX_MTU_SIZE). See the three parameters partCount, partTotal - /// and partLength in OnFileProgress in FileListTransferCBInterface.h + /// and partLength in OnFileProgress in file_list_transfer_cb_interface.h ID_DOWNLOAD_PROGRESS, /// ConnectionGraph2 plugin - In a client/server environment, a client other than ourselves has disconnected gracefully. diff --git a/Source/include/mafianet/MmsgBatch.h b/Source/include/mafianet/mmsg_batch.h similarity index 98% rename from Source/include/mafianet/MmsgBatch.h rename to Source/include/mafianet/mmsg_batch.h index f93e9a79f..0c04a714d 100644 --- a/Source/include/mafianet/MmsgBatch.h +++ b/Source/include/mafianet/mmsg_batch.h @@ -5,12 +5,12 @@ * license.txt file in the root directory of this source tree. */ -/// \file MmsgBatch.h +/// \file mmsg_batch.h /// \brief Portable helpers for batched datagram I/O (recvmmsg / sendmmsg). /// /// Batching is always on where the syscalls exist; there is no build option to /// turn it on or off. The Linux-only -/// syscall glue lives in RakNetSocket2_Berkley.cpp and RakNetSocket2.cpp behind +/// syscall glue lives in socket2_berkley.cpp and socket2.cpp behind /// that single guard. /// /// Everything in this header is portable and compiled unconditionally -- @@ -22,9 +22,9 @@ #ifndef __MAFIANET_MMSG_BATCH_H #define __MAFIANET_MMSG_BATCH_H -#include "mafianet/Socket2.h" -#include "mafianet/Assert.h" -#include "mafianet/MemoryOverride.h" +#include "mafianet/socket2.h" +#include "mafianet/assert.h" +#include "mafianet/memory_override.h" #include // memcpy #include // RAKNET_DEBUG_PRINTF defaults to printf @@ -320,7 +320,7 @@ class RNS2SendBatch // threads that never send a batch: it is allocated on this thread's first // Add() and released when the thread exits. // - // Defined in MmsgBatch.cpp, deliberately NOT inline here. Both hold + // Defined in mmsg_batch.cpp, deliberately NOT inline here. Both hold // thread_local state, and this is a public header, so a consumer could // instantiate RNS2SendBatch in its own translation unit. Inline definitions // would then give that consumer its own copy of the buffer block and of the diff --git a/Source/include/mafianet/MtuBlackHole.h b/Source/include/mafianet/mtu_black_hole.h similarity index 95% rename from Source/include/mafianet/MtuBlackHole.h rename to Source/include/mafianet/mtu_black_hole.h index f4207fece..7490429bd 100644 --- a/Source/include/mafianet/MtuBlackHole.h +++ b/Source/include/mafianet/mtu_black_hole.h @@ -9,7 +9,7 @@ /// \brief In-session MTU black-hole detection. /// /// The connection handshake probes the path MTU in one direction only -/// (RakPeer.cpp pads ID_OPEN_CONNECTION_REQUEST_1 down the ladder) and the +/// (peer.cpp pads ID_OPEN_CONNECTION_REQUEST_1 down the ladder) and the /// negotiated size is then applied to both directions for the life of the /// connection. A tunnel whose return path carries less than the probed /// direction -- OpenVPN and friends drop, rather than fragment, datagrams over @@ -27,12 +27,12 @@ #include -#include "mafianet/Export.h" +#include "mafianet/export.h" namespace MafiaNet { /// The MTU rung ladder, in bytes including UDP/IP headers, highest first. -/// The same rungs the connection handshake probes (mtuSizes in RakPeer.cpp); +/// The same rungs the connection handshake probes (mtuSizes in peer.cpp); /// MTU_LADDER[0] must equal MAXIMUM_MTU_SIZE so a step-down never lands on a /// rung the handshake could not have negotiated. const int MTU_LADDER_SIZE = 4; diff --git a/Source/include/mafianet/MTUSize.h b/Source/include/mafianet/mtu_size.h similarity index 94% rename from Source/include/mafianet/MTUSize.h rename to Source/include/mafianet/mtu_size.h index 7c55b6730..98772ec9e 100644 --- a/Source/include/mafianet/MTUSize.h +++ b/Source/include/mafianet/mtu_size.h @@ -34,12 +34,12 @@ /// /// This was 1492 (PPPoE) until it was found to black-hole tunnelled clients. /// The handshake probes the path in one direction only -- the connecting peer -/// pads ID_OPEN_CONNECTION_REQUEST_1 down the mtuSizes ladder in RakPeer.cpp and +/// pads ID_OPEN_CONNECTION_REQUEST_1 down the mtuSizes ladder in peer.cpp and /// the accepting peer echoes back whatever size arrived -- and the result is /// then applied to BOTH directions. A black hole the handshake missed (a tunnel /// dropping large datagrams on the return path only, or a path that shrinks /// mid-session) is caught later by the in-session step-down in -/// ReliabilityLayer/MtuBlackHole.h, which walks the same ladder downward and +/// ReliabilityLayer/mtu_black_hole.h, which walks the same ladder downward and /// re-splits queued messages -- but that detection costs several /// retransmission timeouts, so the top rung still has to be a size most /// tunnelled peers survive without discovering anything. 1400 clears WireGuard diff --git a/Source/include/mafianet/NatPunchthroughClient.h b/Source/include/mafianet/nat_punchthrough_client.h similarity index 95% rename from Source/include/mafianet/NatPunchthroughClient.h rename to Source/include/mafianet/nat_punchthrough_client.h index 2004b8279..220f6ed55 100644 --- a/Source/include/mafianet/NatPunchthroughClient.h +++ b/Source/include/mafianet/nat_punchthrough_client.h @@ -17,20 +17,20 @@ /// \brief Contains the NAT-punchthrough plugin for the client. /// -#include "NativeFeatureIncludes.h" +#include "mafianet/native_feature_includes.h" #if _RAKNET_SUPPORT_NatPunchthroughClient==1 #ifndef __NAT_PUNCHTHROUGH_CLIENT_H #define __NAT_PUNCHTHROUGH_CLIENT_H -#include "Types.h" -#include "Export.h" -#include "PluginInterface2.h" -#include "PacketPriority.h" -#include "SocketIncludes.h" -#include "DS_List.h" -#include "String.h" -#include "DS_Queue.h" +#include "mafianet/types.h" +#include "mafianet/export.h" +#include "mafianet/plugin_interface2.h" +#include "mafianet/packet_priority.h" +#include "mafianet/socket_includes.h" +#include "mafianet/ds_list.h" +#include "mafianet/string.h" +#include "mafianet/ds_queue.h" // Trendnet TEW-632BRP sometimes starts at port 1024 and increments sequentially. // Zonnet zsr1134we. Replies go out on the net, but are always absorbed by the remote router?? diff --git a/Source/include/mafianet/NatPunchthroughServer.h b/Source/include/mafianet/nat_punchthrough_server.h similarity index 91% rename from Source/include/mafianet/NatPunchthroughServer.h rename to Source/include/mafianet/nat_punchthrough_server.h index 1ae72f8f7..d4930688b 100644 --- a/Source/include/mafianet/NatPunchthroughServer.h +++ b/Source/include/mafianet/nat_punchthrough_server.h @@ -18,19 +18,19 @@ /// -#include "NativeFeatureIncludes.h" +#include "mafianet/native_feature_includes.h" #if _RAKNET_SUPPORT_NatPunchthroughServer==1 #ifndef __NAT_PUNCHTHROUGH_SERVER_H #define __NAT_PUNCHTHROUGH_SERVER_H -#include "Types.h" -#include "Export.h" -#include "PluginInterface2.h" -#include "PacketPriority.h" -#include "SocketIncludes.h" -#include "DS_OrderedList.h" -#include "String.h" +#include "mafianet/types.h" +#include "mafianet/export.h" +#include "mafianet/plugin_interface2.h" +#include "mafianet/packet_priority.h" +#include "mafianet/socket_includes.h" +#include "mafianet/ds_ordered_list.h" +#include "mafianet/string.h" namespace MafiaNet { diff --git a/Source/include/mafianet/NatTypeDetectionClient.h b/Source/include/mafianet/nat_type_detection_client.h similarity index 85% rename from Source/include/mafianet/NatTypeDetectionClient.h rename to Source/include/mafianet/nat_type_detection_client.h index a71a5c39f..a02d90ca9 100644 --- a/Source/include/mafianet/NatTypeDetectionClient.h +++ b/Source/include/mafianet/nat_type_detection_client.h @@ -18,20 +18,20 @@ /// -#include "NativeFeatureIncludes.h" +#include "mafianet/native_feature_includes.h" #if _RAKNET_SUPPORT_NatTypeDetectionClient==1 #ifndef __NAT_TYPE_DETECTION_CLIENT_H #define __NAT_TYPE_DETECTION_CLIENT_H -#include "Types.h" -#include "Export.h" -#include "PluginInterface2.h" -#include "PacketPriority.h" -#include "SocketIncludes.h" -#include "DS_OrderedList.h" -#include "String.h" -#include "NatTypeDetectionCommon.h" +#include "mafianet/types.h" +#include "mafianet/export.h" +#include "mafianet/plugin_interface2.h" +#include "mafianet/packet_priority.h" +#include "mafianet/socket_includes.h" +#include "mafianet/ds_ordered_list.h" +#include "mafianet/string.h" +#include "mafianet/nat_type_detection_common.h" namespace MafiaNet { @@ -40,7 +40,7 @@ class RakPeerInterface; struct Packet; /// \brief Client code for NatTypeDetection - /// \details See NatTypeDetectionServer.h for algorithm + /// \details See nat_type_detection_server.h for algorithm /// To use, just connect to the server, and call DetectNAT /// You will get back ID_NAT_TYPE_DETECTION_RESULT with one of the enumerated values of NATTypeDetectionResult found in NATTypeDetectionCommon.h /// See also http://www.jenkinssoftware.com/raknet/manual/natpunchthrough.html diff --git a/Source/include/mafianet/NatTypeDetectionCommon.h b/Source/include/mafianet/nat_type_detection_common.h similarity index 94% rename from Source/include/mafianet/NatTypeDetectionCommon.h rename to Source/include/mafianet/nat_type_detection_common.h index 44626b9e5..becb97426 100644 --- a/Source/include/mafianet/NatTypeDetectionCommon.h +++ b/Source/include/mafianet/nat_type_detection_common.h @@ -21,13 +21,13 @@ #ifndef __NAT_TYPE_DETECTION_COMMON_H #define __NAT_TYPE_DETECTION_COMMON_H -#include "NativeFeatureIncludes.h" +#include "mafianet/native_feature_includes.h" #if _RAKNET_SUPPORT_NatTypeDetectionServer==1 || _RAKNET_SUPPORT_NatTypeDetectionClient==1 -#include "SocketIncludes.h" -#include "Types.h" -#include "Socket2.h" +#include "mafianet/socket_includes.h" +#include "mafianet/types.h" +#include "mafianet/socket2.h" namespace MafiaNet { diff --git a/Source/include/mafianet/NatTypeDetectionServer.h b/Source/include/mafianet/nat_type_detection_server.h similarity index 90% rename from Source/include/mafianet/NatTypeDetectionServer.h rename to Source/include/mafianet/nat_type_detection_server.h index ebfa5dee8..46aa52032 100644 --- a/Source/include/mafianet/NatTypeDetectionServer.h +++ b/Source/include/mafianet/nat_type_detection_server.h @@ -17,20 +17,20 @@ /// \brief Contains the NAT-type detection code for the server /// -#include "NativeFeatureIncludes.h" +#include "mafianet/native_feature_includes.h" #if _RAKNET_SUPPORT_NatTypeDetectionServer==1 #ifndef __NAT_TYPE_DETECTION_SERVER_H #define __NAT_TYPE_DETECTION_SERVER_H -#include "Types.h" -#include "Export.h" -#include "PluginInterface2.h" -#include "PacketPriority.h" -#include "SocketIncludes.h" -#include "DS_OrderedList.h" -#include "String.h" -#include "NatTypeDetectionCommon.h" +#include "mafianet/types.h" +#include "mafianet/export.h" +#include "mafianet/plugin_interface2.h" +#include "mafianet/packet_priority.h" +#include "mafianet/socket_includes.h" +#include "mafianet/ds_ordered_list.h" +#include "mafianet/string.h" +#include "mafianet/nat_type_detection_common.h" namespace MafiaNet diff --git a/Source/include/mafianet/NativeFeatureIncludes.h b/Source/include/mafianet/native_feature_includes.h similarity index 93% rename from Source/include/mafianet/NativeFeatureIncludes.h rename to Source/include/mafianet/native_feature_includes.h index ed965bd51..e417486df 100644 --- a/Source/include/mafianet/NativeFeatureIncludes.h +++ b/Source/include/mafianet/native_feature_includes.h @@ -10,12 +10,12 @@ // If you want to change these defines, put them in NativeFeatureIncludesOverrides so your changes are not lost when updating RakNet // The user should not edit this file -#include "NativeFeatureIncludesOverrides.h" +#include "mafianet/native_feature_includes_overrides.h" #ifndef __NATIVE_FEATURE_INCLDUES_H #define __NATIVE_FEATURE_INCLDUES_H -// Uncomment below defines, and paste to NativeFeatureIncludesOverrides.h, to exclude plugins that you do not want to build into the static library, or DLL +// Uncomment below defines, and paste to native_feature_includes_overrides.h, to exclude plugins that you do not want to build into the static library, or DLL // These are not all the plugins, only those that are in the core library // Other plugins are located in DependentExtensions // #define _RAKNET_SUPPORT_ConnectionGraph2 0 diff --git a/Source/include/mafianet/NativeFeatureIncludesOverrides.h b/Source/include/mafianet/native_feature_includes_overrides.h similarity index 90% rename from Source/include/mafianet/NativeFeatureIncludesOverrides.h rename to Source/include/mafianet/native_feature_includes_overrides.h index d0860857b..dae46bfc5 100644 --- a/Source/include/mafianet/NativeFeatureIncludesOverrides.h +++ b/Source/include/mafianet/native_feature_includes_overrides.h @@ -9,7 +9,7 @@ */ // USER EDITABLE FILE -// See NativeFeatureIncludes.h +// See native_feature_includes.h #ifndef __NATIVE_FEATURE_INCLDUES_OVERRIDES_H #define __NATIVE_FEATURE_INCLDUES_OVERRIDES_H diff --git a/Source/include/mafianet/NativeTypes.h b/Source/include/mafianet/native_types.h similarity index 100% rename from Source/include/mafianet/NativeTypes.h rename to Source/include/mafianet/native_types.h diff --git a/Source/include/mafianet/NetworkIDManager.h b/Source/include/mafianet/network_id_manager.h similarity index 90% rename from Source/include/mafianet/NetworkIDManager.h rename to Source/include/mafianet/network_id_manager.h index 5c593d20f..e13ddbded 100644 --- a/Source/include/mafianet/NetworkIDManager.h +++ b/Source/include/mafianet/network_id_manager.h @@ -20,11 +20,11 @@ #ifndef __NETWORK_ID_MANAGER_H #define __NETWORK_ID_MANAGER_H -#include "Types.h" -#include "Export.h" -#include "MemoryOverride.h" -#include "NetworkIDObject.h" -#include "Rand.h" +#include "mafianet/types.h" +#include "mafianet/export.h" +#include "mafianet/memory_override.h" +#include "mafianet/network_id_object.h" +#include "mafianet/rand.h" namespace MafiaNet { diff --git a/Source/include/mafianet/NetworkIDObject.h b/Source/include/mafianet/network_id_object.h similarity index 95% rename from Source/include/mafianet/NetworkIDObject.h rename to Source/include/mafianet/network_id_object.h index 5edba1679..d4e2583fa 100644 --- a/Source/include/mafianet/NetworkIDObject.h +++ b/Source/include/mafianet/network_id_object.h @@ -21,9 +21,9 @@ #if !defined(__NETWORK_ID_GENERATOR) #define __NETWORK_ID_GENERATOR -#include "Types.h" -#include "MemoryOverride.h" -#include "Export.h" +#include "mafianet/types.h" +#include "mafianet/memory_override.h" +#include "mafianet/export.h" namespace MafiaNet { diff --git a/Source/include/mafianet/osx_adapter.h b/Source/include/mafianet/osx_adapter.h index fabe372e3..623323a21 100644 --- a/Source/include/mafianet/osx_adapter.h +++ b/Source/include/mafianet/osx_adapter.h @@ -1,14 +1,91 @@ /* - * Copyright (c) 2026, MafiaHub - * Licensed under MIT-style license + * Copyright (c) 2016-2019, SLikeSoft UG (haftungsbeschränkt) * - * Deprecated include path. "mafianet/osx_adapter.h" was renamed to "mafianet/OsxAdapter.h" so - * every header follows the PascalCase name of the class it declares. This - * forwarding header is kept for one release cycle and will then be removed. - * Define MAFIANET_SILENCE_DEPRECATED_INCLUDES to suppress the message. + * This source code is licensed under the MIT-style license found in the + * license.txt file in the root directory of this source tree. + * + * + * This file declares adapters for all MS-specific functions used throughout MafiaNet. */ #pragma once -#ifndef MAFIANET_SILENCE_DEPRECATED_INCLUDES -#pragma message("mafianet/osx_adapter.h is deprecated; include mafianet/OsxAdapter.h instead") + +#ifdef __APPLE__ +#define _TRUNCATE ((size_t)-1) +typedef int errno_t; + +#include // for va_start, va_end, va_list +#include // for FILE +#include // for time_t + +// MS specific string functions +char *_strlwr(char *str); + +// MS specific security enhanced functions +errno_t fopen_s(FILE **pfile, const char *filename, const char *mode); +errno_t localtime_s(struct tm* _tm, const time_t *time); +errno_t mbstowcs_s(size_t *pReturnValue, wchar_t *wcstr, size_t sizeInWords, const char *mbstr, size_t count); +int sprintf_s(char *buffer, size_t sizeOfBuffer, const char *format, ...); +errno_t strcat_s(char *strDestination, size_t numberOfElements, const char *strSource); +errno_t strcpy_s(char* strDestination, size_t numberOfElements, const char *strSource); +errno_t strerror_s(char* buffer, size_t numberOfElements, int errnum); +errno_t strncat_s(char *strDest, size_t numberOfElements, const char *strSource, size_t count); +errno_t strncpy_s(char *strDest, size_t numberOfElements, const char *strSource, size_t count); +int vsnprintf_s(char *buffer, size_t sizeOfBuffer, size_t count, const char *format, va_list argptr); +errno_t wcscat_s(wchar_t *strDestination, size_t numberOfElements, const wchar_t *strSource); +errno_t wcscpy_s(wchar_t* strDestination, size_t numberOfElements, const wchar_t *strSource); + +// corresponding template overloads +template errno_t mbstowcs_s(size_t *pReturnValue, wchar_t(&wcstr)[BufferSize], const char *mbstr, size_t count) +{ + return mbstowcs_s(pReturnValue, wcstr, BufferSize, mbstr, count); +} + +template int sprintf_s(char (&buffer)[BufferSize], const char* format, ...) +{ + va_list arglist; + va_start(arglist, format); + int numCharsWritten = vsnprintf_s(buffer, BufferSize, BufferSize - 1, format, arglist); + va_end(arglist); + + return numCharsWritten; +} + +template errno_t strcat_s(char (&strDestination)[BufferSize], const char* strSource) +{ + return strcat_s(strDestination, BufferSize, strSource); +} + +template errno_t strcpy_s(char (&strDestination)[BufferSize], const char* strSource) +{ + return strcpy_s(strDestination, BufferSize, strSource); +} + +template errno_t strerror_s(char(&buffer)[BufferSize], int errnum) +{ + return strerror_s(buffer, BufferSize, errnum); +} + +template errno_t strncat_s(char (&strDest)[BufferSize], const char *strSource, size_t count) +{ + return strncat_s(strDest, BufferSize, strSource, count); +} + +template errno_t strncpy_s(char (&strDest)[BufferSize], const char *strSource, size_t count) +{ + return strncpy_s(strDest, BufferSize, strSource, count); +} + +template int vsnprintf_s(char (&buffer)[BufferSize], size_t count, const char *format, va_list argptr) +{ + return vsnprintf_s(buffer, BufferSize, count, format, argptr); +} + +// MS gets_s function adapter - wraps MafiaNet's Gets function +// Note: Samples should include this header for gets_s support on macOS +#include "mafianet/gets.h" +template char* gets_s(char (&buffer)[BufferSize]) +{ + return Gets(buffer, static_cast(BufferSize)); +} + #endif -#include "OsxAdapter.h" diff --git a/Source/include/mafianet/PacketConsoleLogger.h b/Source/include/mafianet/packet_console_logger.h similarity index 90% rename from Source/include/mafianet/PacketConsoleLogger.h rename to Source/include/mafianet/packet_console_logger.h index 11048e4a6..5a166c83e 100644 --- a/Source/include/mafianet/PacketConsoleLogger.h +++ b/Source/include/mafianet/packet_console_logger.h @@ -17,13 +17,13 @@ /// \brief This will write all incoming and outgoing network messages to the log command parser, which can be accessed through Telnet /// -#include "NativeFeatureIncludes.h" +#include "mafianet/native_feature_includes.h" #if _RAKNET_SUPPORT_LogCommandParser==1 && _RAKNET_SUPPORT_PacketLogger==1 #ifndef __PACKET_CONSOLE_LOGGER_H_ #define __PACKET_CONSOLE_LOGGER_H_ -#include "PacketLogger.h" +#include "mafianet/packet_logger.h" namespace MafiaNet { @@ -36,7 +36,7 @@ class RAK_DLL_EXPORT PacketConsoleLogger : public PacketLogger { public: PacketConsoleLogger(); - // Writes to the command parser used for logging, which is accessed through a secondary communication layer (such as Telnet or RakNet) - See ConsoleServer.h + // Writes to the command parser used for logging, which is accessed through a secondary communication layer (such as Telnet or RakNet) - See console_server.h virtual void SetLogCommandParser(LogCommandParser *lcp); virtual void WriteLog(const char *str); protected: diff --git a/Source/include/mafianet/PacketFileLogger.h b/Source/include/mafianet/packet_file_logger.h similarity index 90% rename from Source/include/mafianet/PacketFileLogger.h rename to Source/include/mafianet/packet_file_logger.h index a7b0e820c..ae1c90ad8 100644 --- a/Source/include/mafianet/PacketFileLogger.h +++ b/Source/include/mafianet/packet_file_logger.h @@ -18,13 +18,13 @@ /// -#include "NativeFeatureIncludes.h" +#include "mafianet/native_feature_includes.h" #if _RAKNET_SUPPORT_PacketLogger==1 #ifndef __PACKET_FILE_LOGGER_H_ #define __PACKET_FILE_LOGGER_H_ -#include "PacketLogger.h" +#include "mafianet/packet_logger.h" #include namespace MafiaNet diff --git a/Source/include/mafianet/PacketLogger.h b/Source/include/mafianet/packet_logger.h similarity index 95% rename from Source/include/mafianet/PacketLogger.h rename to Source/include/mafianet/packet_logger.h index 6948f5fef..c05a6eedb 100644 --- a/Source/include/mafianet/PacketLogger.h +++ b/Source/include/mafianet/packet_logger.h @@ -18,15 +18,15 @@ /// -#include "NativeFeatureIncludes.h" +#include "mafianet/native_feature_includes.h" #if _RAKNET_SUPPORT_PacketLogger==1 #ifndef __PACKET_LOGGER_H #define __PACKET_LOGGER_H -#include "Types.h" -#include "PluginInterface2.h" -#include "Export.h" +#include "mafianet/types.h" +#include "mafianet/plugin_interface2.h" +#include "mafianet/export.h" namespace MafiaNet { diff --git a/Source/include/mafianet/PacketOutputWindowLogger.h b/Source/include/mafianet/packet_output_window_logger.h similarity index 90% rename from Source/include/mafianet/PacketOutputWindowLogger.h rename to Source/include/mafianet/packet_output_window_logger.h index f36082090..c1b6b02a9 100644 --- a/Source/include/mafianet/PacketOutputWindowLogger.h +++ b/Source/include/mafianet/packet_output_window_logger.h @@ -18,13 +18,13 @@ /// -#include "NativeFeatureIncludes.h" +#include "mafianet/native_feature_includes.h" #if _RAKNET_SUPPORT_PacketLogger==1 #ifndef __PACKET_OUTPUT_WINDOW_LOGGER_H_ #define __PACKET_OUTPUT_WINDOW_LOGGER_H_ -#include "PacketLogger.h" +#include "mafianet/packet_logger.h" namespace MafiaNet { diff --git a/Source/include/mafianet/PacketPool.h b/Source/include/mafianet/packet_pool.h similarity index 100% rename from Source/include/mafianet/PacketPool.h rename to Source/include/mafianet/packet_pool.h diff --git a/Source/include/mafianet/PacketPriority.h b/Source/include/mafianet/packet_priority.h similarity index 100% rename from Source/include/mafianet/PacketPriority.h rename to Source/include/mafianet/packet_priority.h diff --git a/Source/include/mafianet/PacketizedTCP.h b/Source/include/mafianet/packetized_tcp.h similarity index 92% rename from Source/include/mafianet/PacketizedTCP.h rename to Source/include/mafianet/packetized_tcp.h index f069a84f6..a67996dc4 100644 --- a/Source/include/mafianet/PacketizedTCP.h +++ b/Source/include/mafianet/packetized_tcp.h @@ -18,15 +18,15 @@ /// -#include "NativeFeatureIncludes.h" +#include "mafianet/native_feature_includes.h" #if _RAKNET_SUPPORT_PacketizedTCP==1 && _RAKNET_SUPPORT_TCPInterface==1 #ifndef __PACKETIZED_TCP #define __PACKETIZED_TCP -#include "TCPInterface.h" -#include "DS_ByteQueue.h" -#include "DS_Map.h" +#include "mafianet/tcp_interface.h" +#include "mafianet/ds_byte_queue.h" +#include "mafianet/ds_map.h" namespace MafiaNet { diff --git a/Source/include/mafianet/Peer.h b/Source/include/mafianet/peer.h similarity index 97% rename from Source/include/mafianet/Peer.h rename to Source/include/mafianet/peer.h index 185276425..fe31cb18f 100644 --- a/Source/include/mafianet/Peer.h +++ b/Source/include/mafianet/peer.h @@ -24,23 +24,23 @@ #ifndef __RAK_PEER_H #define __RAK_PEER_H -#include "ReliabilityLayer.h" -#include "PeerInterface.h" -#include "BitStream.h" -#include "SingleProducerConsumer.h" -#include "SimpleMutex.h" -#include "DS_OrderedList.h" -#include "Export.h" -#include "String.h" -#include "Thread.h" +#include "mafianet/reliability_layer.h" +#include "mafianet/peer_interface.h" +#include "mafianet/bit_stream.h" +#include "mafianet/single_producer_consumer.h" +#include "mafianet/simple_mutex.h" +#include "mafianet/ds_ordered_list.h" +#include "mafianet/export.h" +#include "mafianet/string.h" +#include "mafianet/thread.h" //#include "socket.h" -#include "SmartPtr.h" -#include "DS_ThreadsafeAllocatingQueue.h" -#include "SignaledEvent.h" -#include "NativeFeatureIncludes.h" -#include "SecureHandshake.h" -#include "LocklessTypes.h" -#include "DS_Queue.h" +#include "mafianet/smart_ptr.h" +#include "mafianet/ds_threadsafe_allocating_queue.h" +#include "mafianet/signaled_event.h" +#include "mafianet/native_feature_includes.h" +#include "mafianet/secure_handshake.h" +#include "mafianet/lockless_types.h" +#include "mafianet/ds_queue.h" namespace MafiaNet { /// Forward declarations @@ -87,7 +87,7 @@ class RAK_DLL_EXPORT RakPeer : public RakPeerInterface, public RNS2EventHandler /// x64 builds require under 25% of the CPU time of other builds /// See the Encryption sample for example usage /// \pre Must be called while offline - /// \pre LIBCAT_SECURITY must be defined to 1 in NativeFeatureIncludes.h for this function to have any effect + /// \pre LIBCAT_SECURITY must be defined to 1 in native_feature_includes.h for this function to have any effect /// \param[in] publicKey A pointer to the public key for accepting new connections /// \param[in] privateKey A pointer to the private key for accepting new connections /// \param[in] bRequireClientKey: Should be set to false for most servers. Allows the server to accept a public key from connecting clients as a proof of identity but eats twice as much CPU time as a normal connection @@ -216,8 +216,8 @@ class RAK_DLL_EXPORT RakPeer : public RakPeerInterface, public RNS2EventHandler /// \note The first byte should be a message identifier starting at ID_USER_PACKET_ENUM. /// \param[in] data Block of data to send. /// \param[in] length Size in bytes of the data to send. - /// \param[in] priority Priority level to send on. See PacketPriority.h - /// \param[in] reliability How reliably to send this data. See PacketPriority.h + /// \param[in] priority Priority level to send on. See packet_priority.h + /// \param[in] reliability How reliably to send this data. See packet_priority.h /// \param[in] orderingChannel When using ordered or sequenced messages, the channel to order these on. Messages are only ordered relative to other messages on the same stream. /// \param[in] systemIdentifier Who to send this packet to, or in the case of broadcasting who not to send it to. Pass either a SystemAddress structure or a RakNetGUID structure. Use UNASSIGNED_SYSTEM_ADDRESS or to specify none /// \param[in] broadcast True to send this packet to all connected systems. If true, then systemAddress specifies who not to send the packet to. @@ -237,8 +237,8 @@ class RAK_DLL_EXPORT RakPeer : public RakPeerInterface, public RNS2EventHandler /// /// Same as the above version, but takes a BitStream as input. /// \param[in] bitStream Bitstream to send - /// \param[in] priority Priority level to send on. See PacketPriority.h - /// \param[in] reliability How reliably to send this data. See PacketPriority.h + /// \param[in] priority Priority level to send on. See packet_priority.h + /// \param[in] reliability How reliably to send this data. See packet_priority.h /// \param[in] orderingChannel Channel to order the messages on, when using ordered or sequenced messages. Messages are only ordered relative to other messages on the same stream. /// \param[in] systemIdentifier System Address or RakNetGUID to send this packet to, or in the case of broadcasting, the address not to send it to. Use UNASSIGNED_SYSTEM_ADDRESS to specify none. /// \param[in] broadcast True to send this packet to all connected systems. If true, then systemAddress specifies who not to send the packet to. @@ -260,8 +260,8 @@ class RAK_DLL_EXPORT RakPeer : public RakPeerInterface, public RNS2EventHandler /// \param[in] data An array of pointers to blocks of data /// \param[in] lengths An array of integers indicating the length of each block of data /// \param[in] numParameters Length of the arrays data and lengths - /// \param[in] priority Priority level to send on. See PacketPriority.h - /// \param[in] reliability How reliably to send this data. See PacketPriority.h + /// \param[in] priority Priority level to send on. See packet_priority.h + /// \param[in] reliability How reliably to send this data. See packet_priority.h /// \param[in] orderingChannel Channel to order the messages on, when using ordered or sequenced messages. Messages are only ordered relative to other messages on the same stream. /// \param[in] systemIdentifier System Address or RakNetGUID to send this packet to, or in the case of broadcasting, the address not to send it to. Use UNASSIGNED_SYSTEM_ADDRESS to specify none. /// \param[in] broadcast True to send this packet to all connected systems. If true, then systemAddress specifies who not to send the packet to. diff --git a/Source/include/mafianet/PeerHandle.h b/Source/include/mafianet/peer_handle.h similarity index 96% rename from Source/include/mafianet/PeerHandle.h rename to Source/include/mafianet/peer_handle.h index 4357e3043..9667526f0 100644 --- a/Source/include/mafianet/PeerHandle.h +++ b/Source/include/mafianet/peer_handle.h @@ -5,7 +5,7 @@ * license.txt file in the root directory of this source tree. */ -/// \file PeerHandle.h +/// \file peer_handle.h /// \brief RAII handles for the two core MafiaNet resources. /// /// \ref MafiaNet::Peer owns a RakPeerInterface instance (GetInstance/DestroyInstance); @@ -19,11 +19,11 @@ #include // std::string (owned password / bind-address in the builders) #include // std::move -#include "mafianet/PeerInterface.h" // RakPeerInterface, Send, Receive, DeallocatePacket, GetInstance, DestroyInstance -#include "mafianet/Types.h" // Packet, StartupResult, ConnectionAttemptResult, SocketDescriptor, PublicKey, AddressOrGUID -#include "mafianet/PacketPriority.h"// Priority, Reliability (scoped enums with the send defaults) -#include "mafianet/BitStream.h" // BitStream (the encode() scratch buffer for send/broadcast) -#include "mafianet/Export.h" // RAK_DLL_EXPORT +#include "mafianet/peer_interface.h" // RakPeerInterface, Send, Receive, DeallocatePacket, GetInstance, DestroyInstance +#include "mafianet/types.h" // Packet, StartupResult, ConnectionAttemptResult, SocketDescriptor, PublicKey, AddressOrGUID +#include "mafianet/packet_priority.h"// Priority, Reliability (scoped enums with the send defaults) +#include "mafianet/bit_stream.h" // BitStream (the encode() scratch buffer for send/broadcast) +#include "mafianet/export.h" // RAK_DLL_EXPORT namespace MafiaNet { @@ -179,14 +179,14 @@ class RAK_DLL_EXPORT Peer { /// peer.send(dispatcher, ChatMessage{"hi", 0}, to, Reliability::Unreliable); /// \endcode /// \param[in] dispatcher A Dispatcher (or any type exposing encode(BitStream&, const T&)) T is registered with. - /// \param[in] message The value to serialize; T needs a serialize(Ar&) (see Archive.h). + /// \param[in] message The value to serialize; T needs a serialize(Ar&) (see archive.h). /// \param[in] to Destination — an AddressOrGUID, implicitly built from a SystemAddress or RakNetGUID. /// \param[in] reliability Delivery guarantee. Defaults to ReliableOrdered. /// \param[in] priority Send priority. Defaults to High. /// \param[in] orderingChannel Ordering channel for ordered/sequenced sends. Defaults to 0. /// \return The Send() receipt (0 on bad input; see RakPeerInterface::Send). - /// \note Templated on the dispatcher type so PeerHandle.h need not include - /// (and cyclically depend on) Dispatcher.h. + /// \note Templated on the dispatcher type so peer_handle.h need not include + /// (and cyclically depend on) dispatcher.h. template uint32_t send(const DispatcherT& dispatcher, const T& message, AddressOrGUID to, Reliability reliability = Reliability::ReliableOrdered, @@ -206,7 +206,7 @@ class RAK_DLL_EXPORT Peer { /// peer.broadcast(dispatcher, ChatMessage{"hi", 0}); /// \endcode /// \param[in] dispatcher A Dispatcher (or any type exposing encode(BitStream&, const T&)) T is registered with. - /// \param[in] message The value to serialize; T needs a serialize(Ar&) (see Archive.h). + /// \param[in] message The value to serialize; T needs a serialize(Ar&) (see archive.h). /// \param[in] reliability Delivery guarantee. Defaults to ReliableOrdered. /// \param[in] priority Send priority. Defaults to High. /// \param[in] orderingChannel Ordering channel for ordered/sequenced sends. Defaults to 0. diff --git a/Source/include/mafianet/PeerInterface.h b/Source/include/mafianet/peer_interface.h similarity index 97% rename from Source/include/mafianet/PeerInterface.h rename to Source/include/mafianet/peer_interface.h index 0e24850b1..284902da5 100644 --- a/Source/include/mafianet/PeerInterface.h +++ b/Source/include/mafianet/peer_interface.h @@ -22,13 +22,13 @@ #ifndef __RAK_PEER_INTERFACE_H #define __RAK_PEER_INTERFACE_H -#include "PacketPriority.h" -#include "Types.h" -#include "MemoryOverride.h" -#include "Export.h" -#include "DS_List.h" -#include "SmartPtr.h" -#include "Socket2.h" +#include "mafianet/packet_priority.h" +#include "mafianet/types.h" +#include "mafianet/memory_override.h" +#include "mafianet/export.h" +#include "mafianet/ds_list.h" +#include "mafianet/smart_ptr.h" +#include "mafianet/socket2.h" namespace MafiaNet { @@ -73,7 +73,7 @@ class RAK_DLL_EXPORT RakPeerInterface /// x64 builds require under 25% of the CPU time of other builds /// See the Encryption sample for example usage /// \pre Must be called while offline - /// \pre LIBCAT_SECURITY must be defined to 1 in NativeFeatureIncludes.h for this function to have any effect + /// \pre LIBCAT_SECURITY must be defined to 1 in native_feature_includes.h for this function to have any effect /// \param[in] publicKey A pointer to the public key for accepting new connections /// \param[in] privateKey A pointer to the private key for accepting new connections /// \param[in] bRequireClientKey: Should be set to false for most servers. Allows the server to accept a public key from connecting clients as a proof of identity but eats twice as much CPU time as a normal connection @@ -192,8 +192,8 @@ class RAK_DLL_EXPORT RakPeerInterface /// The first byte should be a message identifier starting at ID_USER_PACKET_ENUM /// \param[in] data The block of data to send /// \param[in] length The size in bytes of the data to send - /// \param[in] priority What priority level to send on. See PacketPriority.h - /// \param[in] reliability How reliability to send this data. See PacketPriority.h + /// \param[in] priority What priority level to send on. See packet_priority.h + /// \param[in] reliability How reliability to send this data. See packet_priority.h /// \param[in] orderingChannel When using ordered or sequenced messages, what channel to order these on. Messages are only ordered relative to other messages on the same stream /// \param[in] systemIdentifier Who to send this packet to, or in the case of broadcasting who not to send it to. Pass either a SystemAddress structure or a RakNetGUID structure. Use UNASSIGNED_SYSTEM_ADDRESS or to specify none /// \param[in] broadcast True to send this packet to all connected systems. If true, then systemAddress specifies who not to send the packet to. @@ -210,8 +210,8 @@ class RAK_DLL_EXPORT RakPeerInterface /// Sends a block of data to the specified system that you are connected to. Same as the above version, but takes a BitStream as input. /// \param[in] bitStream The bitstream to send - /// \param[in] priority What priority level to send on. See PacketPriority.h - /// \param[in] reliability How reliability to send this data. See PacketPriority.h + /// \param[in] priority What priority level to send on. See packet_priority.h + /// \param[in] reliability How reliability to send this data. See packet_priority.h /// \param[in] orderingChannel When using ordered or sequenced messages, what channel to order these on. Messages are only ordered relative to other messages on the same stream /// \param[in] systemIdentifier Who to send this packet to, or in the case of broadcasting who not to send it to. Pass either a SystemAddress structure or a RakNetGUID structure. Use UNASSIGNED_SYSTEM_ADDRESS or to specify none /// \param[in] broadcast True to send this packet to all connected systems. If true, then systemAddress specifies who not to send the packet to. @@ -233,8 +233,8 @@ class RAK_DLL_EXPORT RakPeerInterface /// \param[in] data An array of pointers to blocks of data /// \param[in] lengths An array of integers indicating the length of each block of data /// \param[in] numParameters Length of the arrays data and lengths - /// \param[in] priority What priority level to send on. See PacketPriority.h - /// \param[in] reliability How reliability to send this data. See PacketPriority.h + /// \param[in] priority What priority level to send on. See packet_priority.h + /// \param[in] reliability How reliability to send this data. See packet_priority.h /// \param[in] orderingChannel When using ordered or sequenced messages, what channel to order these on. Messages are only ordered relative to other messages on the same stream /// \param[in] systemIdentifier Who to send this packet to, or in the case of broadcasting who not to send it to. Pass either a SystemAddress structure or a RakNetGUID structure. Use UNASSIGNED_SYSTEM_ADDRESS or to specify none /// \param[in] broadcast True to send this packet to all connected systems. If true, then systemAddress specifies who not to send the packet to. diff --git a/Source/include/mafianet/PluginInterface2.h b/Source/include/mafianet/plugin_interface2.h similarity index 96% rename from Source/include/mafianet/PluginInterface2.h rename to Source/include/mafianet/plugin_interface2.h index a7e59b458..6a14a5854 100644 --- a/Source/include/mafianet/PluginInterface2.h +++ b/Source/include/mafianet/plugin_interface2.h @@ -21,10 +21,10 @@ #ifndef __PLUGIN_INTERFACE_2_H #define __PLUGIN_INTERFACE_2_H -#include "NativeFeatureIncludes.h" -#include "Types.h" -#include "Export.h" -#include "PacketPriority.h" +#include "mafianet/native_feature_includes.h" +#include "mafianet/types.h" +#include "mafianet/export.h" +#include "mafianet/packet_priority.h" namespace MafiaNet { diff --git a/Source/include/mafianet/PointGridSectorizer.h b/Source/include/mafianet/point_grid_sectorizer.h similarity index 98% rename from Source/include/mafianet/PointGridSectorizer.h rename to Source/include/mafianet/point_grid_sectorizer.h index 66829138d..b9ee973ef 100644 --- a/Source/include/mafianet/PointGridSectorizer.h +++ b/Source/include/mafianet/point_grid_sectorizer.h @@ -21,9 +21,9 @@ #ifndef MAFIANET_POINT_GRID_SECTORIZER_H #define MAFIANET_POINT_GRID_SECTORIZER_H -#include "Export.h" -#include "MemoryOverride.h" -#include "DS_List.h" +#include "mafianet/export.h" +#include "mafianet/memory_override.h" +#include "mafianet/ds_list.h" namespace MafiaNet { diff --git a/Source/include/mafianet/Rackspace.h b/Source/include/mafianet/rackspace.h similarity index 97% rename from Source/include/mafianet/Rackspace.h rename to Source/include/mafianet/rackspace.h index f52d9d1f2..c5783eeda 100644 --- a/Source/include/mafianet/Rackspace.h +++ b/Source/include/mafianet/rackspace.h @@ -13,20 +13,20 @@ * license found in the license.txt file in the root directory of this source tree. */ -/// \file Rackspace.h +/// \file rackspace.h /// \brief Helper to class to manage Rackspace servers /// -#include "NativeFeatureIncludes.h" +#include "mafianet/native_feature_includes.h" #if _RAKNET_SUPPORT_Rackspace==1 && _RAKNET_SUPPORT_TCPInterface==1 -#include "Export.h" -#include "DS_List.h" -#include "Types.h" -#include "DS_Queue.h" -#include "String.h" +#include "mafianet/export.h" +#include "mafianet/ds_list.h" +#include "mafianet/types.h" +#include "mafianet/ds_queue.h" +#include "mafianet/string.h" #ifndef __RACKSPACE_H #define __RACKSPACE_H @@ -362,7 +362,7 @@ namespace MafiaNet static const char * EventTypeToString(RackspaceEventType eventType); /// \brief Mostly for internal use, but you can use it to execute an operation with more complex xml if desired - /// See the Rackspace.cpp on how to use it + /// See the rackspace.cpp on how to use it void AddOperation(RackspaceOperationType type, MafiaNet::RakString httpCommand, MafiaNet::RakString operation, MafiaNet::RakString xml); protected: diff --git a/Source/include/mafianet/Rand.h b/Source/include/mafianet/rand.h similarity index 95% rename from Source/include/mafianet/Rand.h rename to Source/include/mafianet/rand.h index 4118b8219..436ba1222 100644 --- a/Source/include/mafianet/Rand.h +++ b/Source/include/mafianet/rand.h @@ -22,7 +22,7 @@ #ifndef __RAND_H #define __RAND_H -#include "Export.h" +#include "mafianet/export.h" /// Initialise seed for Random Generator /// \note not threadSafe, use an instance of RakNetRandom if necessary per thread diff --git a/Source/include/mafianet/RandSync.h b/Source/include/mafianet/rand_sync.h similarity index 89% rename from Source/include/mafianet/RandSync.h rename to Source/include/mafianet/rand_sync.h index 02891e63c..61a5bf11a 100644 --- a/Source/include/mafianet/RandSync.h +++ b/Source/include/mafianet/rand_sync.h @@ -22,10 +22,10 @@ #ifndef __RAND_SYNC_H #define __RAND_SYNC_H -#include "Export.h" -#include "Rand.h" -#include "DS_Queue.h" -#include "NativeTypes.h" +#include "mafianet/export.h" +#include "mafianet/rand.h" +#include "mafianet/ds_queue.h" +#include "mafianet/native_types.h" namespace MafiaNet { diff --git a/Source/include/mafianet/ReadyEvent.h b/Source/include/mafianet/ready_event.h similarity index 97% rename from Source/include/mafianet/ReadyEvent.h rename to Source/include/mafianet/ready_event.h index 66f340a7c..706a2a6cc 100644 --- a/Source/include/mafianet/ReadyEvent.h +++ b/Source/include/mafianet/ready_event.h @@ -18,14 +18,14 @@ /// -#include "NativeFeatureIncludes.h" +#include "mafianet/native_feature_includes.h" #if _RAKNET_SUPPORT_ReadyEvent==1 #ifndef __READY_EVENT_H #define __READY_EVENT_H -#include "PluginInterface2.h" -#include "DS_OrderedList.h" +#include "mafianet/plugin_interface2.h" +#include "mafianet/ds_ordered_list.h" namespace MafiaNet { diff --git a/Source/include/mafianet/RefCountedObj.h b/Source/include/mafianet/ref_counted_obj.h similarity index 93% rename from Source/include/mafianet/RefCountedObj.h rename to Source/include/mafianet/ref_counted_obj.h index 70d1b7acf..26bd444ae 100644 --- a/Source/include/mafianet/RefCountedObj.h +++ b/Source/include/mafianet/ref_counted_obj.h @@ -22,7 +22,7 @@ #ifndef __REF_COUNTED_OBJ_H #define __REF_COUNTED_OBJ_H -#include "MemoryOverride.h" +#include "mafianet/memory_override.h" /// World's simplest class :) class RefCountedObj diff --git a/Source/include/mafianet/RelayPlugin.h b/Source/include/mafianet/relay_plugin.h similarity index 95% rename from Source/include/mafianet/RelayPlugin.h rename to Source/include/mafianet/relay_plugin.h index 251cfe22d..53988440d 100644 --- a/Source/include/mafianet/RelayPlugin.h +++ b/Source/include/mafianet/relay_plugin.h @@ -18,15 +18,15 @@ /// -#include "NativeFeatureIncludes.h" +#include "mafianet/native_feature_includes.h" #if _RAKNET_SUPPORT_RelayPlugin==1 #ifndef __RELAY_PLUGIN_H #define __RELAY_PLUGIN_H -#include "PluginInterface2.h" -#include "String.h" -#include "DS_Hash.h" +#include "mafianet/plugin_interface2.h" +#include "mafianet/string.h" +#include "mafianet/ds_hash.h" /// \defgroup RELAY_PLUGIN_GROUP RelayPlugin /// \brief A simple class to relay messages from one system to another through an intermediary diff --git a/Source/include/mafianet/ReliabilityLayer.h b/Source/include/mafianet/reliability_layer.h similarity index 94% rename from Source/include/mafianet/ReliabilityLayer.h rename to Source/include/mafianet/reliability_layer.h index da79d71c9..6ba63f15c 100644 --- a/Source/include/mafianet/ReliabilityLayer.h +++ b/Source/include/mafianet/reliability_layer.h @@ -21,35 +21,35 @@ #ifndef __RELIABILITY_LAYER_H #define __RELIABILITY_LAYER_H -#include "MemoryOverride.h" -#include "MTUSize.h" -#include "DS_LinkedList.h" -#include "DS_List.h" -#include "SocketLayer.h" -#include "PacketPriority.h" -#include "DS_Queue.h" -#include "BitStream.h" -#include "InternalPacket.h" -#include "Statistics.h" -#include "DR_SHA1.h" -#include "DS_OrderedList.h" -#include "DS_RangeList.h" -#include "DS_BPlusTree.h" -#include "DS_MemoryPool.h" -#include "Defines.h" -#include "DS_Heap.h" -#include "BitStream.h" -#include "NativeFeatureIncludes.h" -#include "SecureHandshake.h" -#include "PluginInterface2.h" -#include "Rand.h" -#include "Socket2.h" +#include "mafianet/memory_override.h" +#include "mafianet/mtu_size.h" +#include "mafianet/ds_linked_list.h" +#include "mafianet/ds_list.h" +#include "mafianet/socket_layer.h" +#include "mafianet/packet_priority.h" +#include "mafianet/ds_queue.h" +#include "mafianet/bit_stream.h" +#include "mafianet/internal_packet.h" +#include "mafianet/statistics.h" +#include "mafianet/dr_sha1.h" +#include "mafianet/ds_ordered_list.h" +#include "mafianet/ds_range_list.h" +#include "mafianet/ds_bplus_tree.h" +#include "mafianet/ds_memory_pool.h" +#include "mafianet/defines.h" +#include "mafianet/ds_heap.h" +#include "mafianet/bit_stream.h" +#include "mafianet/native_feature_includes.h" +#include "mafianet/secure_handshake.h" +#include "mafianet/plugin_interface2.h" +#include "mafianet/rand.h" +#include "mafianet/socket2.h" #if USE_SLIDING_WINDOW_CONGESTION_CONTROL!=1 -#include "CCRakNetUDT.h" +#include "mafianet/cc_udt.h" #define INCLUDE_TIMESTAMP_WITH_DATAGRAMS 1 #else -#include "CCRakNetSlidingWindow.h" +#include "mafianet/cc_sliding_window.h" #define INCLUDE_TIMESTAMP_WITH_DATAGRAMS 0 #endif @@ -63,7 +63,7 @@ namespace MafiaNet { /// Forward declarations class PluginInterface2; class RakNetRandom; -class RNS2SendBatch; // MmsgBatch.h +class RNS2SendBatch; // mmsg_batch.h typedef uint64_t reliabilityHeapWeightType; // #med - consider a more suitable name for the class / maybe even make an internal class to SplitPacketChannel? @@ -179,7 +179,7 @@ class ReliabilityLayer// /// The connection's current MTU in bytes, including UDP/IP headers. Starts /// at the handshake-negotiated size passed to Reset() and steps down the - /// ladder in MtuBlackHole.h when an in-session path-MTU black hole is + /// ladder in mtu_black_hole.h when an in-session path-MTU black hole is /// detected. Never rises again for the life of the connection. int GetCurrentMtuBytes(void) const; @@ -331,7 +331,7 @@ class ReliabilityLayer// void SplitPacket( InternalPacket *internalPacket ); /// In-session path-MTU black-hole recovery: drop currentMtuBytes one rung - /// down the ladder in MtuBlackHole.h, shrink the congestion manager's + /// down the ladder in mtu_black_hole.h, shrink the congestion manager's /// datagram ceiling to match, and re-split every queued message that no /// longer fits. Called from Update() when a too-large reliable packet has /// burnt its resend budget without an ack (ShouldStepDownMtu). diff --git a/Source/include/mafianet/ReplicaEnums.h b/Source/include/mafianet/replica_enums.h similarity index 100% rename from Source/include/mafianet/ReplicaEnums.h rename to Source/include/mafianet/replica_enums.h diff --git a/Source/include/mafianet/ReplicaManager3.h b/Source/include/mafianet/replica_manager3.h similarity index 97% rename from Source/include/mafianet/ReplicaManager3.h rename to Source/include/mafianet/replica_manager3.h index 7387ea6ca..3254f4e4f 100644 --- a/Source/include/mafianet/ReplicaManager3.h +++ b/Source/include/mafianet/replica_manager3.h @@ -18,22 +18,22 @@ /// -#include "NativeFeatureIncludes.h" +#include "mafianet/native_feature_includes.h" #if _RAKNET_SUPPORT_ReplicaManager3==1 #ifndef __REPLICA_MANAGER_3 #define __REPLICA_MANAGER_3 -#include "Types.h" -#include "Time.h" -#include "BitStream.h" -#include "PacketPriority.h" -#include "PluginInterface2.h" -#include "NetworkIDObject.h" -#include "DS_OrderedList.h" -#include "DS_Queue.h" -#include "SimpleMutex.h" -#include "VirtualWorld.h" +#include "mafianet/types.h" +#include "mafianet/time.h" +#include "mafianet/bit_stream.h" +#include "mafianet/packet_priority.h" +#include "mafianet/plugin_interface2.h" +#include "mafianet/network_id_object.h" +#include "mafianet/ds_ordered_list.h" +#include "mafianet/ds_queue.h" +#include "mafianet/simple_mutex.h" +#include "mafianet/virtual_world.h" /// \defgroup REPLICA_MANAGER_GROUP3 ReplicaManager3 /// \brief Third implementation of object replication @@ -229,7 +229,7 @@ class RAK_DLL_EXPORT ReplicaManager3 : public PluginInterface2 /// \brief Return the connections (observers) currently in a given virtual world. /// \details Recipient-filter helper for scoping non-replica traffic (chat, RPC4, - /// raw Send) by virtual world. See VirtualWorld.h for the dimension model. + /// raw Send) by virtual world. See virtual_world.h for the dimension model. /// \param[in] virtualWorld The virtual world to match. See SetPlayerVirtualWorld() and Connection_RM3::SetVirtualWorld() /// \param[out] connectionsOut Populated with the matching connections (cleared first) /// \param[in] includeGlobal If true, also include observers in VIRTUAL_WORLD_GLOBAL @@ -526,7 +526,7 @@ class RAK_DLL_EXPORT Connection_RM3 /// \brief Set the virtual world (dimension) this observer perceives. /// \details Entities (VirtualWorldReplica3) are only constructed/serialized to this /// connection when they share this virtual world (or either side is VIRTUAL_WORLD_GLOBAL). - /// See VirtualWorld.h and ReplicaManager3::SetPlayerVirtualWorld(). + /// See virtual_world.h and ReplicaManager3::SetPlayerVirtualWorld(). void SetVirtualWorld(VirtualWorldId vw) {virtualWorld=vw;} /// \return The virtual world this observer perceives. Defaults to VIRTUAL_WORLD_DEFAULT. @@ -551,7 +551,7 @@ class RAK_DLL_EXPORT Connection_RM3 /// Do not call Replica3::QueryConstruction() or Replica3::QueryDestruction() /// Call Connection_RM3::QueryReplicaList() to determine which objects exist on remote systems /// This can be faster than QUERY_REPLICA_FOR_CONSTRUCTION and QUERY_REPLICA_FOR_CONSTRUCTION_AND_DESTRUCTION for large worlds - /// See GridSectorizer.h under /Source for code that can help with this + /// See grid_sectorizer.h under /Source for code that can help with this QUERY_CONNECTION_FOR_REPLICA_LIST }; @@ -651,7 +651,7 @@ class RAK_DLL_EXPORT Connection_RM3 SystemAddress systemAddress; RakNetGUID guid; - // The virtual world (dimension) this observer perceives. See VirtualWorld.h. + // The virtual world (dimension) this observer perceives. See virtual_world.h. VirtualWorldId virtualWorld; /* diff --git a/Source/include/mafianet/Router2.h b/Source/include/mafianet/router2.h similarity index 93% rename from Source/include/mafianet/Router2.h rename to Source/include/mafianet/router2.h index 5a1623308..f2d5a21b9 100644 --- a/Source/include/mafianet/Router2.h +++ b/Source/include/mafianet/router2.h @@ -18,20 +18,20 @@ /// -#include "NativeFeatureIncludes.h" +#include "mafianet/native_feature_includes.h" #if _RAKNET_SUPPORT_Router2==1 && _RAKNET_SUPPORT_UDPForwarder==1 #ifndef __ROUTER_2_PLUGIN_H #define __ROUTER_2_PLUGIN_H -#include "Types.h" -#include "PluginInterface2.h" -#include "PacketPriority.h" -#include "Export.h" -#include "UDPForwarder.h" -#include "MessageIdentifiers.h" -#include "DS_List.h" -#include "SimpleMutex.h" +#include "mafianet/types.h" +#include "mafianet/plugin_interface2.h" +#include "mafianet/packet_priority.h" +#include "mafianet/export.h" +#include "mafianet/udp_forwarder.h" +#include "mafianet/message_identifiers.h" +#include "mafianet/ds_list.h" +#include "mafianet/simple_mutex.h" namespace MafiaNet { diff --git a/Source/include/mafianet/RPC4Plugin.h b/Source/include/mafianet/rpc4_plugin.h similarity index 96% rename from Source/include/mafianet/RPC4Plugin.h rename to Source/include/mafianet/rpc4_plugin.h index 681ee076d..33c4c01f6 100644 --- a/Source/include/mafianet/RPC4Plugin.h +++ b/Source/include/mafianet/rpc4_plugin.h @@ -18,20 +18,20 @@ /// -#include "NativeFeatureIncludes.h" +#include "mafianet/native_feature_includes.h" #if _RAKNET_SUPPORT_RPC4Plugin==1 #ifndef __RPC_4_PLUGIN_H #define __RPC_4_PLUGIN_H -#include "PluginInterface2.h" -#include "PacketPriority.h" -#include "Types.h" -#include "BitStream.h" -#include "String.h" -#include "NetworkIDObject.h" -#include "DS_Hash.h" -#include "DS_OrderedList.h" +#include "mafianet/plugin_interface2.h" +#include "mafianet/packet_priority.h" +#include "mafianet/types.h" +#include "mafianet/bit_stream.h" +#include "mafianet/string.h" +#include "mafianet/network_id_object.h" +#include "mafianet/ds_hash.h" +#include "mafianet/ds_ordered_list.h" /// \defgroup RPC_PLUGIN_GROUP RPC /// \brief Remote procedure calls, without external dependencies. diff --git a/Source/include/mafianet/SecureHandshake.h b/Source/include/mafianet/secure_handshake.h similarity index 91% rename from Source/include/mafianet/SecureHandshake.h rename to Source/include/mafianet/secure_handshake.h index 391b13f81..00a831b00 100644 --- a/Source/include/mafianet/SecureHandshake.h +++ b/Source/include/mafianet/secure_handshake.h @@ -15,7 +15,7 @@ #ifndef SECURE_HANDSHAKE_H #define SECURE_HANDSHAKE_H -#include "NativeFeatureIncludes.h" +#include "mafianet/native_feature_includes.h" #if LIBCAT_SECURITY==1 diff --git a/Source/include/mafianet/SendToThread.h b/Source/include/mafianet/send_to_thread.h similarity index 84% rename from Source/include/mafianet/SendToThread.h rename to Source/include/mafianet/send_to_thread.h index e0d474ee8..5f3642227 100644 --- a/Source/include/mafianet/SendToThread.h +++ b/Source/include/mafianet/send_to_thread.h @@ -16,14 +16,14 @@ #ifndef __SENDTO_THREAD #define __SENDTO_THREAD -#include "Defines.h" +#include "mafianet/defines.h" #ifdef USE_THREADED_SEND -#include "InternalPacket.h" -#include "SocketLayer.h" -#include "DS_ThreadsafeAllocatingQueue.h" -#include "ThreadPool.h" +#include "mafianet/internal_packet.h" +#include "mafianet/socket_layer.h" +#include "mafianet/ds_threadsafe_allocating_queue.h" +#include "mafianet/thread_pool.h" namespace MafiaNet { diff --git a/Source/include/mafianet/SessionAdmission.h b/Source/include/mafianet/session_admission.h similarity index 98% rename from Source/include/mafianet/SessionAdmission.h rename to Source/include/mafianet/session_admission.h index 802eabb31..bbee6a315 100644 --- a/Source/include/mafianet/SessionAdmission.h +++ b/Source/include/mafianet/session_admission.h @@ -5,7 +5,7 @@ * license.txt file in the root directory of this source tree. */ -/// \file SessionAdmission.h +/// \file session_admission.h /// \brief The slot accounting RakPeer applies to remote-initiated peers, as pure functions. /// /// Kept out of RakPeer so the rules are unit tested directly rather than only through loopback traffic. diff --git a/Source/include/mafianet/SignaledEvent.h b/Source/include/mafianet/signaled_event.h similarity index 87% rename from Source/include/mafianet/SignaledEvent.h rename to Source/include/mafianet/signaled_event.h index 75d88b0d3..bd0d8efa6 100644 --- a/Source/include/mafianet/SignaledEvent.h +++ b/Source/include/mafianet/signaled_event.h @@ -19,21 +19,21 @@ #if defined(_WIN32) -#include "WindowsIncludes.h" +#include "mafianet/windows_includes.h" #else #include #include - #include "SimpleMutex.h" + #include "mafianet/simple_mutex.h" #endif -#include "Export.h" +#include "mafianet/export.h" namespace MafiaNet { diff --git a/Source/include/mafianet/SimpleMutex.h b/Source/include/mafianet/simple_mutex.h similarity index 90% rename from Source/include/mafianet/SimpleMutex.h rename to Source/include/mafianet/simple_mutex.h index 904ff2a8d..2f77f8337 100644 --- a/Source/include/mafianet/SimpleMutex.h +++ b/Source/include/mafianet/simple_mutex.h @@ -22,18 +22,18 @@ #ifndef __SIMPLE_MUTEX_H #define __SIMPLE_MUTEX_H -#include "MemoryOverride.h" +#include "mafianet/memory_override.h" #if defined(_WIN32) -#include "WindowsIncludes.h" +#include "mafianet/windows_includes.h" #else #include #include #endif -#include "Export.h" +#include "mafianet/export.h" namespace MafiaNet { diff --git a/Source/include/mafianet/SimpleTCPServer.h b/Source/include/mafianet/simple_tcp_server.h similarity index 100% rename from Source/include/mafianet/SimpleTCPServer.h rename to Source/include/mafianet/simple_tcp_server.h diff --git a/Source/include/mafianet/SingleProducerConsumer.h b/Source/include/mafianet/single_producer_consumer.h similarity index 96% rename from Source/include/mafianet/SingleProducerConsumer.h rename to Source/include/mafianet/single_producer_consumer.h index bb58e9582..69ee0e726 100644 --- a/Source/include/mafianet/SingleProducerConsumer.h +++ b/Source/include/mafianet/single_producer_consumer.h @@ -22,12 +22,12 @@ #ifndef __SINGLE_PRODUCER_CONSUMER_H #define __SINGLE_PRODUCER_CONSUMER_H -#include "Assert.h" +#include "mafianet/assert.h" static const int MINIMUM_LIST_SIZE=8; -#include "MemoryOverride.h" -#include "Export.h" +#include "mafianet/memory_override.h" +#include "mafianet/export.h" /// The namespace DataStructures was only added to avoid compiler errors for commonly named data structures /// As these data structures are stand-alone, you can use them outside of RakNet for your own projects if you wish. diff --git a/Source/include/mafianet/Sleep.h b/Source/include/mafianet/sleep.h similarity index 90% rename from Source/include/mafianet/Sleep.h rename to Source/include/mafianet/sleep.h index 83f825787..7bb5348a4 100644 --- a/Source/include/mafianet/Sleep.h +++ b/Source/include/mafianet/sleep.h @@ -11,7 +11,7 @@ #ifndef __RAK_SLEEP_H #define __RAK_SLEEP_H -#include "Export.h" +#include "mafianet/export.h" void RAK_DLL_EXPORT RakSleep(unsigned int ms); diff --git a/Source/include/mafianet/SmartPtr.h b/Source/include/mafianet/smart_ptr.h similarity index 94% rename from Source/include/mafianet/SmartPtr.h rename to Source/include/mafianet/smart_ptr.h index 091448ee4..67c28b2a8 100644 --- a/Source/include/mafianet/SmartPtr.h +++ b/Source/include/mafianet/smart_ptr.h @@ -19,8 +19,8 @@ // From http://www.codeproject.com/KB/cpp/SmartPointers.aspx // with bugs fixed -#include "MemoryOverride.h" -#include "Export.h" +#include "mafianet/memory_override.h" +#include "mafianet/export.h" //static int allocCount=0; //static int deallocCount=0; diff --git a/Source/include/mafianet/Socket2.h b/Source/include/mafianet/socket2.h similarity index 95% rename from Source/include/mafianet/Socket2.h rename to Source/include/mafianet/socket2.h index 3cfbf9815..f7cecf248 100644 --- a/Source/include/mafianet/Socket2.h +++ b/Source/include/mafianet/socket2.h @@ -16,12 +16,12 @@ #ifndef __RAKNET_SOCKET_2_H #define __RAKNET_SOCKET_2_H -#include "Types.h" -#include "MTUSize.h" -#include "LocklessTypes.h" -#include "Thread.h" -#include "DS_ThreadsafeAllocatingQueue.h" -#include "Export.h" +#include "mafianet/types.h" +#include "mafianet/mtu_size.h" +#include "mafianet/lockless_types.h" +#include "mafianet/thread.h" +#include "mafianet/ds_threadsafe_allocating_queue.h" +#include "mafianet/export.h" // Batched datagram I/O (recvmmsg / sendmmsg) is guarded by a plain // `#if defined(__linux__)` wherever it appears. There is no macro and no build diff --git a/Source/include/mafianet/SocketDefines.h b/Source/include/mafianet/socket_defines.h similarity index 100% rename from Source/include/mafianet/SocketDefines.h rename to Source/include/mafianet/socket_defines.h diff --git a/Source/include/mafianet/SocketIncludes.h b/Source/include/mafianet/socket_includes.h similarity index 94% rename from Source/include/mafianet/SocketIncludes.h rename to Source/include/mafianet/socket_includes.h index 6a03b6065..c346d439a 100644 --- a/Source/include/mafianet/SocketIncludes.h +++ b/Source/include/mafianet/socket_includes.h @@ -32,7 +32,7 @@ #include #include - //#include "MemoryOverride.h" + //#include "mafianet/memory_override.h" /// Unix/Linux uses ints for sockets typedef int __UDPSOCKET__; typedef int __TCPSOCKET__; diff --git a/Source/include/mafianet/SocketLayer.h b/Source/include/mafianet/socket_layer.h similarity index 94% rename from Source/include/mafianet/SocketLayer.h rename to Source/include/mafianet/socket_layer.h index 935ffc50e..cf4df76b8 100644 --- a/Source/include/mafianet/SocketLayer.h +++ b/Source/include/mafianet/socket_layer.h @@ -23,13 +23,13 @@ #ifndef __SOCKET_LAYER_H #define __SOCKET_LAYER_H -#include "MemoryOverride.h" -#include "Types.h" -#include "SmartPtr.h" +#include "mafianet/memory_override.h" +#include "mafianet/types.h" +#include "mafianet/smart_ptr.h" //#include "socket.h" -#include "Export.h" -#include "MTUSize.h" -#include "String.h" +#include "mafianet/export.h" +#include "mafianet/mtu_size.h" +#include "mafianet/string.h" //#include "ClientContextStruct.h" diff --git a/Source/include/mafianet/Statistics.h b/Source/include/mafianet/statistics.h similarity index 95% rename from Source/include/mafianet/Statistics.h rename to Source/include/mafianet/statistics.h index 3b5ba666e..917f95773 100644 --- a/Source/include/mafianet/Statistics.h +++ b/Source/include/mafianet/statistics.h @@ -22,9 +22,9 @@ #ifndef __RAK_NET_STATISTICS_H #define __RAK_NET_STATISTICS_H -#include "PacketPriority.h" -#include "Export.h" -#include "Types.h" +#include "mafianet/packet_priority.h" +#include "mafianet/export.h" +#include "mafianet/types.h" namespace MafiaNet { diff --git a/Source/include/mafianet/StatisticsHistory.h b/Source/include/mafianet/statistics_history.h similarity index 93% rename from Source/include/mafianet/StatisticsHistory.h rename to Source/include/mafianet/statistics_history.h index 500a13c41..6fe964275 100644 --- a/Source/include/mafianet/StatisticsHistory.h +++ b/Source/include/mafianet/statistics_history.h @@ -13,25 +13,25 @@ * license found in the license.txt file in the root directory of this source tree. */ -/// \file StatisticsHistory.h +/// \file statistics_history.h /// \brief Input numerical values over time. Get sum, average, highest, lowest, standard deviation on recent or all-time values -#include "NativeFeatureIncludes.h" +#include "mafianet/native_feature_includes.h" #if _RAKNET_SUPPORT_StatisticsHistory==1 #ifndef __STATISTICS_HISTORY_H #define __STATISTICS_HISTORY_H -#include "PluginInterface2.h" -#include "MemoryOverride.h" -#include "NativeTypes.h" -#include "DS_List.h" -#include "Types.h" -#include "DS_OrderedList.h" -#include "String.h" -#include "DS_Queue.h" -#include "DS_Hash.h" +#include "mafianet/plugin_interface2.h" +#include "mafianet/memory_override.h" +#include "mafianet/native_types.h" +#include "mafianet/ds_list.h" +#include "mafianet/types.h" +#include "mafianet/ds_ordered_list.h" +#include "mafianet/string.h" +#include "mafianet/ds_queue.h" +#include "mafianet/ds_hash.h" #include namespace MafiaNet diff --git a/Source/include/mafianet/String.h b/Source/include/mafianet/string.h similarity index 96% rename from Source/include/mafianet/String.h rename to Source/include/mafianet/string.h index 3bebae0d6..47ad7e118 100644 --- a/Source/include/mafianet/String.h +++ b/Source/include/mafianet/string.h @@ -16,14 +16,14 @@ #ifndef __RAK_STRING_H #define __RAK_STRING_H -#include "Export.h" -#include "DS_List.h" -#include "Types.h" // int64_t +#include "mafianet/export.h" +#include "mafianet/ds_list.h" +#include "mafianet/types.h" // int64_t #include -#include "stdarg.h" +#include #ifdef _WIN32 -#include "WindowsIncludes.h" +#include "mafianet/windows_includes.h" #endif namespace MafiaNet diff --git a/Source/include/mafianet/StringCompressor.h b/Source/include/mafianet/string_compressor.h similarity index 94% rename from Source/include/mafianet/StringCompressor.h rename to Source/include/mafianet/string_compressor.h index 71b580ae7..e42aed18c 100644 --- a/Source/include/mafianet/StringCompressor.h +++ b/Source/include/mafianet/string_compressor.h @@ -22,10 +22,10 @@ #ifndef __STRING_COMPRESSOR_H #define __STRING_COMPRESSOR_H -#include "Export.h" -#include "DS_Map.h" -#include "MemoryOverride.h" -#include "NativeTypes.h" +#include "mafianet/export.h" +#include "mafianet/ds_map.h" +#include "mafianet/memory_override.h" +#include "mafianet/native_types.h" #ifdef _STD_STRING_COMPRESSOR #include diff --git a/Source/include/mafianet/StringTable.h b/Source/include/mafianet/string_table.h similarity index 95% rename from Source/include/mafianet/StringTable.h rename to Source/include/mafianet/string_table.h index 915fd4a56..84fcfcd3b 100644 --- a/Source/include/mafianet/StringTable.h +++ b/Source/include/mafianet/string_table.h @@ -22,9 +22,9 @@ #ifndef __STRING_TABLE_H #define __STRING_TABLE_H -#include "DS_OrderedList.h" -#include "Export.h" -#include "MemoryOverride.h" +#include "mafianet/ds_ordered_list.h" +#include "mafianet/export.h" +#include "mafianet/memory_override.h" /// Forward declaration namespace MafiaNet diff --git a/Source/include/mafianet/SuperFastHash.h b/Source/include/mafianet/super_fast_hash.h similarity index 93% rename from Source/include/mafianet/SuperFastHash.h rename to Source/include/mafianet/super_fast_hash.h index 2b9690fed..de610a7c4 100644 --- a/Source/include/mafianet/SuperFastHash.h +++ b/Source/include/mafianet/super_fast_hash.h @@ -12,7 +12,7 @@ #define __SUPER_FAST_HASH_H #include -#include "NativeTypes.h" +#include "mafianet/native_types.h" // From http://www.azillionmonkeys.com/qed/hash.html // Author of main code is Paul Hsieh diff --git a/Source/include/mafianet/TableSerializer.h b/Source/include/mafianet/table_serializer.h similarity index 94% rename from Source/include/mafianet/TableSerializer.h rename to Source/include/mafianet/table_serializer.h index 2c3932985..589823be2 100644 --- a/Source/include/mafianet/TableSerializer.h +++ b/Source/include/mafianet/table_serializer.h @@ -16,9 +16,9 @@ #ifndef __TABLE_SERIALIZER_H #define __TABLE_SERIALIZER_H -#include "MemoryOverride.h" -#include "DS_Table.h" -#include "Export.h" +#include "mafianet/memory_override.h" +#include "mafianet/ds_table.h" +#include "mafianet/export.h" namespace MafiaNet { @@ -59,10 +59,10 @@ class RAK_DLL_EXPORT TableSerializer /* #include "LightweightDatabaseServer.h" #include "LightweightDatabaseClient.h" -#include "TableSerializer.h" -#include "BitStream.h" -#include "StringCompressor.h" -#include "DS_Table.h" +#include "mafianet/table_serializer.h" +#include "mafianet/bit_stream.h" +#include "mafianet/string_compressor.h" +#include "mafianet/ds_table.h" void main(void) { DataStructures::Table table; diff --git a/Source/include/mafianet/TCPInterface.h b/Source/include/mafianet/tcp_interface.h similarity index 91% rename from Source/include/mafianet/TCPInterface.h rename to Source/include/mafianet/tcp_interface.h index d8ee8eae4..34bda39e2 100644 --- a/Source/include/mafianet/TCPInterface.h +++ b/Source/include/mafianet/tcp_interface.h @@ -18,25 +18,25 @@ /// -#include "NativeFeatureIncludes.h" +#include "mafianet/native_feature_includes.h" #if _RAKNET_SUPPORT_TCPInterface==1 #ifndef __SIMPLE_TCP_SERVER #define __SIMPLE_TCP_SERVER -#include "MemoryOverride.h" -#include "DS_List.h" -#include "Types.h" -#include "Export.h" -#include "Thread.h" -#include "DS_Queue.h" -#include "SimpleMutex.h" -#include "Defines.h" -#include "SocketIncludes.h" -#include "DS_ByteQueue.h" -#include "DS_ThreadsafeAllocatingQueue.h" -#include "LocklessTypes.h" -#include "PluginInterface2.h" +#include "mafianet/memory_override.h" +#include "mafianet/ds_list.h" +#include "mafianet/types.h" +#include "mafianet/export.h" +#include "mafianet/thread.h" +#include "mafianet/ds_queue.h" +#include "mafianet/simple_mutex.h" +#include "mafianet/defines.h" +#include "mafianet/socket_includes.h" +#include "mafianet/ds_byte_queue.h" +#include "mafianet/ds_threadsafe_allocating_queue.h" +#include "mafianet/lockless_types.h" +#include "mafianet/plugin_interface2.h" #if OPEN_SSL_CLIENT_SUPPORT==1 #include diff --git a/Source/include/mafianet/TeamBalancer.h b/Source/include/mafianet/team_balancer.h similarity index 96% rename from Source/include/mafianet/TeamBalancer.h rename to Source/include/mafianet/team_balancer.h index d34786279..44c2969b3 100644 --- a/Source/include/mafianet/TeamBalancer.h +++ b/Source/include/mafianet/team_balancer.h @@ -13,24 +13,24 @@ * license found in the license.txt file in the root directory of this source tree. */ -/// \file TeamBalancer.h +/// \file team_balancer.h /// \brief Set and network team selection (supports peer to peer or client/server) /// \details Automatically handles transmission and resolution of team selection, including team switching and balancing /// \deprecated Use TeamManager intead /// -#include "NativeFeatureIncludes.h" +#include "mafianet/native_feature_includes.h" #if _RAKNET_SUPPORT_TeamBalancer==1 #ifndef __TEAM_BALANCER_H #define __TEAM_BALANCER_H -#include "PluginInterface2.h" -#include "MemoryOverride.h" -#include "NativeTypes.h" -#include "DS_List.h" -#include "String.h" +#include "mafianet/plugin_interface2.h" +#include "mafianet/memory_override.h" +#include "mafianet/native_types.h" +#include "mafianet/ds_list.h" +#include "mafianet/string.h" namespace MafiaNet { diff --git a/Source/include/mafianet/TeamManager.h b/Source/include/mafianet/team_manager.h similarity index 97% rename from Source/include/mafianet/TeamManager.h rename to Source/include/mafianet/team_manager.h index 8ef36d971..e86437fe0 100644 --- a/Source/include/mafianet/TeamManager.h +++ b/Source/include/mafianet/team_manager.h @@ -15,7 +15,7 @@ // TODO: optimize the list of teams and team members to be O(1). Store in hashes, use linked lists to get ordered traversal -/// \file TeamManager.h +/// \file team_manager.h /// \brief Automates networking and list management for teams /// \details TeamManager provides support for teams. A team is a list of team members. /// Teams contain properties including the number of team members per team, whether or not tagged teams must have equal numbers of members, and if a team is locked or not to certain entry conditions @@ -24,19 +24,19 @@ /// -#include "NativeFeatureIncludes.h" +#include "mafianet/native_feature_includes.h" #if _RAKNET_SUPPORT_TeamManager==1 #ifndef __TEAM_MANAGER_H #define __TEAM_MANAGER_H -#include "PluginInterface2.h" -#include "MemoryOverride.h" -#include "NativeTypes.h" -#include "DS_List.h" -#include "Types.h" -#include "DS_Hash.h" -#include "DS_OrderedList.h" +#include "mafianet/plugin_interface2.h" +#include "mafianet/memory_override.h" +#include "mafianet/native_types.h" +#include "mafianet/ds_list.h" +#include "mafianet/types.h" +#include "mafianet/ds_hash.h" +#include "mafianet/ds_ordered_list.h" namespace MafiaNet { diff --git a/Source/include/mafianet/TelnetTransport.h b/Source/include/mafianet/telnet_transport.h similarity index 91% rename from Source/include/mafianet/TelnetTransport.h rename to Source/include/mafianet/telnet_transport.h index 24510fed4..7de0d70d1 100644 --- a/Source/include/mafianet/TelnetTransport.h +++ b/Source/include/mafianet/telnet_transport.h @@ -18,15 +18,15 @@ /// -#include "NativeFeatureIncludes.h" +#include "mafianet/native_feature_includes.h" #if _RAKNET_SUPPORT_TelnetTransport==1 && _RAKNET_SUPPORT_TCPInterface==1 #ifndef __TELNET_TRANSPORT #define __TELNET_TRANSPORT -#include "TransportInterface.h" -#include "DS_List.h" -#include "Export.h" +#include "mafianet/transport_interface.h" +#include "mafianet/ds_list.h" +#include "mafianet/export.h" namespace MafiaNet { diff --git a/Source/include/mafianet/Thread.h b/Source/include/mafianet/thread.h similarity index 95% rename from Source/include/mafianet/Thread.h rename to Source/include/mafianet/thread.h index af0a3423f..92957b52e 100644 --- a/Source/include/mafianet/Thread.h +++ b/Source/include/mafianet/thread.h @@ -16,7 +16,7 @@ #ifndef __RAK_THREAD_H #define __RAK_THREAD_H -#include "Export.h" +#include "mafianet/export.h" namespace MafiaNet { diff --git a/Source/include/mafianet/ThreadPool.h b/Source/include/mafianet/thread_pool.h similarity index 95% rename from Source/include/mafianet/ThreadPool.h rename to Source/include/mafianet/thread_pool.h index cc18e9a22..448b82bba 100644 --- a/Source/include/mafianet/ThreadPool.h +++ b/Source/include/mafianet/thread_pool.h @@ -16,12 +16,12 @@ #ifndef __THREAD_POOL_H #define __THREAD_POOL_H -#include "MemoryOverride.h" -#include "DS_Queue.h" -#include "SimpleMutex.h" -#include "Export.h" -#include "Thread.h" -#include "SignaledEvent.h" +#include "mafianet/memory_override.h" +#include "mafianet/ds_queue.h" +#include "mafianet/simple_mutex.h" +#include "mafianet/export.h" +#include "mafianet/thread.h" +#include "mafianet/signaled_event.h" class ThreadDataInterface { @@ -190,8 +190,8 @@ struct RAK_DLL_EXPORT ThreadPool }; -#include "ThreadPool.h" -#include "Sleep.h" +#include "mafianet/thread_pool.h" +#include "mafianet/sleep.h" #ifdef _WIN32 #else diff --git a/Source/include/mafianet/ThreadsafePacketLogger.h b/Source/include/mafianet/threadsafe_packet_logger.h similarity index 87% rename from Source/include/mafianet/ThreadsafePacketLogger.h rename to Source/include/mafianet/threadsafe_packet_logger.h index a191579dd..dd0aea89b 100644 --- a/Source/include/mafianet/ThreadsafePacketLogger.h +++ b/Source/include/mafianet/threadsafe_packet_logger.h @@ -18,14 +18,14 @@ /// -#include "NativeFeatureIncludes.h" +#include "mafianet/native_feature_includes.h" #if _RAKNET_SUPPORT_PacketLogger==1 #ifndef __THREADSAFE_PACKET_LOGGER_H #define __THREADSAFE_PACKET_LOGGER_H -#include "PacketLogger.h" -#include "SingleProducerConsumer.h" +#include "mafianet/packet_logger.h" +#include "mafianet/single_producer_consumer.h" namespace MafiaNet { diff --git a/Source/include/mafianet/Time.h b/Source/include/mafianet/time.h similarity index 92% rename from Source/include/mafianet/Time.h rename to Source/include/mafianet/time.h index 0dee57214..42f5b8b3d 100644 --- a/Source/include/mafianet/Time.h +++ b/Source/include/mafianet/time.h @@ -16,8 +16,8 @@ #ifndef __RAKNET_TIME_H #define __RAKNET_TIME_H -#include "NativeTypes.h" -#include "Defines.h" +#include "mafianet/native_types.h" +#include "mafianet/defines.h" namespace MafiaNet { diff --git a/Source/include/mafianet/Transport2.h b/Source/include/mafianet/transport2.h similarity index 92% rename from Source/include/mafianet/Transport2.h rename to Source/include/mafianet/transport2.h index ea88bba9a..8d4f534df 100644 --- a/Source/include/mafianet/Transport2.h +++ b/Source/include/mafianet/transport2.h @@ -18,17 +18,17 @@ /// -#include "NativeFeatureIncludes.h" +#include "mafianet/native_feature_includes.h" #if _RAKNET_SUPPORT_TelnetTransport==1 #ifndef __RAKNET_TRANSPORT_2 #define __RAKNET_TRANSPORT_2 -#include "TransportInterface.h" -#include "DS_Queue.h" -#include "CommandParserInterface.h" -#include "PluginInterface2.h" -#include "Export.h" +#include "mafianet/transport_interface.h" +#include "mafianet/ds_queue.h" +#include "mafianet/command_parser_interface.h" +#include "mafianet/plugin_interface2.h" +#include "mafianet/export.h" namespace MafiaNet { diff --git a/Source/include/mafianet/TransportInterface.h b/Source/include/mafianet/transport_interface.h similarity index 95% rename from Source/include/mafianet/TransportInterface.h rename to Source/include/mafianet/transport_interface.h index bb4538c53..7e2b624af 100644 --- a/Source/include/mafianet/TransportInterface.h +++ b/Source/include/mafianet/transport_interface.h @@ -22,9 +22,9 @@ #ifndef __TRANSPORT_INTERFACE_H #define __TRANSPORT_INTERFACE_H -#include "Types.h" -#include "Export.h" -#include "MemoryOverride.h" +#include "mafianet/types.h" +#include "mafianet/export.h" +#include "mafianet/memory_override.h" #define REMOTE_MAX_TEXT_INPUT 2048 diff --git a/Source/include/mafianet/TwoWayAuthentication.h b/Source/include/mafianet/two_way_authentication.h similarity index 93% rename from Source/include/mafianet/TwoWayAuthentication.h rename to Source/include/mafianet/two_way_authentication.h index 138bb7353..86fb9df5d 100644 --- a/Source/include/mafianet/TwoWayAuthentication.h +++ b/Source/include/mafianet/two_way_authentication.h @@ -13,14 +13,14 @@ * license found in the license.txt file in the root directory of this source tree. */ -/// \file TwoWayAuthentication.h +/// \file two_way_authentication.h /// \brief Implements two way authentication /// \details Given two systems, each of whom known a common password, verify the password without transmitting it /// This can be used to determine what permissions are should be allowed to the other system /// -#include "NativeFeatureIncludes.h" +#include "mafianet/native_feature_includes.h" #if _RAKNET_SUPPORT_TwoWayAuthentication==1 #ifndef __TWO_WAY_AUTHENTICATION_H @@ -41,17 +41,17 @@ #define TWO_WAY_AUTHENTICATION_NONCE_LENGTH 32 #define HASHED_NONCE_AND_PW_LENGTH 32 #else -#include "DR_SHA1.h" +#include "mafianet/dr_sha1.h" #define TWO_WAY_AUTHENTICATION_NONCE_LENGTH 20 #define HASHED_NONCE_AND_PW_LENGTH SHA1_LENGTH #endif -#include "PluginInterface2.h" -#include "MemoryOverride.h" -#include "NativeTypes.h" -#include "String.h" -#include "DS_Hash.h" -#include "DS_Queue.h" +#include "mafianet/plugin_interface2.h" +#include "mafianet/memory_override.h" +#include "mafianet/native_types.h" +#include "mafianet/string.h" +#include "mafianet/ds_hash.h" +#include "mafianet/ds_queue.h" typedef int64_t FCM2Guid; diff --git a/Source/include/mafianet/Types.h b/Source/include/mafianet/types.h similarity index 96% rename from Source/include/mafianet/Types.h rename to Source/include/mafianet/types.h index 77faf29ca..e7ca13314 100644 --- a/Source/include/mafianet/Types.h +++ b/Source/include/mafianet/types.h @@ -19,12 +19,12 @@ #ifndef __NETWORK_TYPES_H #define __NETWORK_TYPES_H -#include "Defines.h" -#include "NativeTypes.h" -#include "Time.h" -#include "Export.h" -#include "WindowsIncludes.h" -#include "SocketIncludes.h" +#include "mafianet/defines.h" +#include "mafianet/native_types.h" +#include "mafianet/time.h" +#include "mafianet/export.h" +#include "mafianet/windows_includes.h" +#include "mafianet/socket_includes.h" namespace MafiaNet { /// Forward declarations @@ -82,7 +82,7 @@ enum ConnectionState #define BITS_TO_BYTES(x) (((x)+7)>>3) #define BYTES_TO_BITS(x) ((x)<<3) -/// \sa NetworkIDObject.h +/// \sa network_id_object.h typedef unsigned char UniqueIDType; typedef unsigned short SystemIndex; typedef unsigned char RPCIndex; @@ -296,7 +296,7 @@ struct RAK_DLL_EXPORT RakNetGUID // Return the GUID as a string. // For an owning, thread-safe std::string use MafiaNet::to_string(guid) - // from "mafianet/GuidUtil.h". + // from "mafianet/guid_util.h". // dest must be large enough to hold the output // THREADSAFE void ToString(char *dest) const; diff --git a/Source/include/mafianet/UDPForwarder.h b/Source/include/mafianet/udp_forwarder.h similarity index 89% rename from Source/include/mafianet/UDPForwarder.h rename to Source/include/mafianet/udp_forwarder.h index 23b0c50b5..dd10d556f 100644 --- a/Source/include/mafianet/UDPForwarder.h +++ b/Source/include/mafianet/udp_forwarder.h @@ -19,23 +19,23 @@ -#include "NativeFeatureIncludes.h" +#include "mafianet/native_feature_includes.h" #if _RAKNET_SUPPORT_UDPForwarder==1 #ifndef __UDP_FORWARDER_H #define __UDP_FORWARDER_H -#include "Export.h" -#include "Types.h" -#include "SocketIncludes.h" -#include "UDPProxyCommon.h" -#include "SimpleMutex.h" -#include "String.h" -#include "Thread.h" -#include "DS_Queue.h" -#include "DS_OrderedList.h" -#include "LocklessTypes.h" -#include "DS_ThreadsafeAllocatingQueue.h" +#include "mafianet/export.h" +#include "mafianet/types.h" +#include "mafianet/socket_includes.h" +#include "mafianet/udp_proxy_common.h" +#include "mafianet/simple_mutex.h" +#include "mafianet/string.h" +#include "mafianet/thread.h" +#include "mafianet/ds_queue.h" +#include "mafianet/ds_ordered_list.h" +#include "mafianet/lockless_types.h" +#include "mafianet/ds_threadsafe_allocating_queue.h" namespace MafiaNet { diff --git a/Source/include/mafianet/UDPProxyClient.h b/Source/include/mafianet/udp_proxy_client.h similarity index 97% rename from Source/include/mafianet/UDPProxyClient.h rename to Source/include/mafianet/udp_proxy_client.h index cdd203bdf..91610e26c 100644 --- a/Source/include/mafianet/UDPProxyClient.h +++ b/Source/include/mafianet/udp_proxy_client.h @@ -17,16 +17,16 @@ /// \brief A RakNet plugin performing networking to communicate with UDPProxyCoordinator. Ultimately used to tell UDPProxyServer to forward UDP packets. -#include "NativeFeatureIncludes.h" +#include "mafianet/native_feature_includes.h" #if _RAKNET_SUPPORT_UDPProxyClient==1 #ifndef __UDP_PROXY_CLIENT_H #define __UDP_PROXY_CLIENT_H -#include "Export.h" -#include "Types.h" -#include "PluginInterface2.h" -#include "DS_List.h" +#include "mafianet/export.h" +#include "mafianet/types.h" +#include "mafianet/plugin_interface2.h" +#include "mafianet/ds_list.h" /// \defgroup UDP_PROXY_GROUP UDPProxy /// \brief Forwards UDP datagrams from one system to another. Protocol independent diff --git a/Source/include/mafianet/UDPProxyCommon.h b/Source/include/mafianet/udp_proxy_common.h similarity index 93% rename from Source/include/mafianet/UDPProxyCommon.h rename to Source/include/mafianet/udp_proxy_common.h index d1f7f1016..2266191fd 100644 --- a/Source/include/mafianet/UDPProxyCommon.h +++ b/Source/include/mafianet/udp_proxy_common.h @@ -40,7 +40,7 @@ UDPProxyClient */ // Stored in the second byte after ID_UDP_PROXY_GENERAL -// Otherwise MessageIdentifiers.h is too cluttered and will hit the limit on enumerations in a single byte +// Otherwise message_identifiers.h is too cluttered and will hit the limit on enumerations in a single byte enum UDPProxyMessages { ID_UDP_PROXY_FORWARDING_SUCCEEDED, diff --git a/Source/include/mafianet/UDPProxyCoordinator.h b/Source/include/mafianet/udp_proxy_coordinator.h similarity index 92% rename from Source/include/mafianet/UDPProxyCoordinator.h rename to Source/include/mafianet/udp_proxy_coordinator.h index 323171064..b7b3130fc 100644 --- a/Source/include/mafianet/UDPProxyCoordinator.h +++ b/Source/include/mafianet/udp_proxy_coordinator.h @@ -18,19 +18,19 @@ /// -#include "NativeFeatureIncludes.h" +#include "mafianet/native_feature_includes.h" #if _RAKNET_SUPPORT_UDPProxyCoordinator==1 && _RAKNET_SUPPORT_UDPForwarder==1 #ifndef __UDP_PROXY_COORDINATOR_H #define __UDP_PROXY_COORDINATOR_H -#include "Export.h" -#include "Types.h" -#include "PluginInterface2.h" -#include "String.h" -#include "BitStream.h" -#include "DS_Queue.h" -#include "DS_OrderedList.h" +#include "mafianet/export.h" +#include "mafianet/types.h" +#include "mafianet/plugin_interface2.h" +#include "mafianet/string.h" +#include "mafianet/bit_stream.h" +#include "mafianet/ds_queue.h" +#include "mafianet/ds_ordered_list.h" namespace MafiaNet { diff --git a/Source/include/mafianet/UDPProxyServer.h b/Source/include/mafianet/udp_proxy_server.h similarity index 94% rename from Source/include/mafianet/UDPProxyServer.h rename to Source/include/mafianet/udp_proxy_server.h index b8dec6f91..5810ece50 100644 --- a/Source/include/mafianet/UDPProxyServer.h +++ b/Source/include/mafianet/udp_proxy_server.h @@ -18,17 +18,17 @@ /// -#include "NativeFeatureIncludes.h" +#include "mafianet/native_feature_includes.h" #if _RAKNET_SUPPORT_UDPProxyServer==1 && _RAKNET_SUPPORT_UDPForwarder==1 #ifndef __UDP_PROXY_SERVER_H #define __UDP_PROXY_SERVER_H -#include "Export.h" -#include "Types.h" -#include "PluginInterface2.h" -#include "UDPForwarder.h" -#include "String.h" +#include "mafianet/export.h" +#include "mafianet/types.h" +#include "mafianet/plugin_interface2.h" +#include "mafianet/udp_forwarder.h" +#include "mafianet/string.h" namespace MafiaNet { diff --git a/Source/include/mafianet/VariableDeltaSerializer.h b/Source/include/mafianet/variable_delta_serializer.h similarity index 96% rename from Source/include/mafianet/VariableDeltaSerializer.h rename to Source/include/mafianet/variable_delta_serializer.h index d1823783d..64542bba5 100644 --- a/Source/include/mafianet/VariableDeltaSerializer.h +++ b/Source/include/mafianet/variable_delta_serializer.h @@ -16,12 +16,12 @@ #ifndef __VARIABLE_DELTA_SERIALIZER_H #define __VARIABLE_DELTA_SERIALIZER_H -#include "VariableListDeltaTracker.h" -#include "DS_MemoryPool.h" -#include "NativeTypes.h" -#include "BitStream.h" -#include "PacketPriority.h" -#include "DS_OrderedList.h" +#include "mafianet/variable_list_delta_tracker.h" +#include "mafianet/ds_memory_pool.h" +#include "mafianet/native_types.h" +#include "mafianet/bit_stream.h" +#include "mafianet/packet_priority.h" +#include "mafianet/ds_ordered_list.h" namespace MafiaNet { diff --git a/Source/include/mafianet/VariableListDeltaTracker.h b/Source/include/mafianet/variable_list_delta_tracker.h similarity index 94% rename from Source/include/mafianet/VariableListDeltaTracker.h rename to Source/include/mafianet/variable_list_delta_tracker.h index a60cefaf1..cc17d8f9c 100644 --- a/Source/include/mafianet/VariableListDeltaTracker.h +++ b/Source/include/mafianet/variable_list_delta_tracker.h @@ -13,10 +13,10 @@ * license found in the license.txt file in the root directory of this source tree. */ -#include "NativeTypes.h" -#include "DS_List.h" -#include "MemoryOverride.h" -#include "BitStream.h" +#include "mafianet/native_types.h" +#include "mafianet/ds_list.h" +#include "mafianet/memory_override.h" +#include "mafianet/bit_stream.h" #ifndef __VARIABLE_LIST_DELTA_TRACKER #define __VARIABLE_LIST_DELTA_TRACKER diff --git a/Source/include/mafianet/VariadicSQLParser.h b/Source/include/mafianet/variadic_sql_parser.h similarity index 94% rename from Source/include/mafianet/VariadicSQLParser.h rename to Source/include/mafianet/variadic_sql_parser.h index 9118af5d6..3fe65d2f1 100644 --- a/Source/include/mafianet/VariadicSQLParser.h +++ b/Source/include/mafianet/variadic_sql_parser.h @@ -11,7 +11,7 @@ #ifndef __VARIADIC_SQL_PARSER_H #define __VARIADIC_SQL_PARSER_H -#include "DS_List.h" +#include "mafianet/ds_list.h" #include diff --git a/Source/include/mafianet/Version.h b/Source/include/mafianet/version.h similarity index 100% rename from Source/include/mafianet/Version.h rename to Source/include/mafianet/version.h diff --git a/Source/include/mafianet/VirtualWorld.h b/Source/include/mafianet/virtual_world.h similarity index 100% rename from Source/include/mafianet/VirtualWorld.h rename to Source/include/mafianet/virtual_world.h diff --git a/Source/include/mafianet/VirtualWorldReplica3.h b/Source/include/mafianet/virtual_world_replica3.h similarity index 98% rename from Source/include/mafianet/VirtualWorldReplica3.h rename to Source/include/mafianet/virtual_world_replica3.h index 5b3431d1c..56d0656e7 100644 --- a/Source/include/mafianet/VirtualWorldReplica3.h +++ b/Source/include/mafianet/virtual_world_replica3.h @@ -8,14 +8,14 @@ /// \file /// \brief Replica3 base class that scopes visibility by virtual world. -#include "NativeFeatureIncludes.h" +#include "mafianet/native_feature_includes.h" #if _RAKNET_SUPPORT_ReplicaManager3==1 #ifndef __VIRTUAL_WORLD_REPLICA_3_H #define __VIRTUAL_WORLD_REPLICA_3_H -#include "ReplicaManager3.h" -#include "VirtualWorld.h" +#include "mafianet/replica_manager3.h" +#include "mafianet/virtual_world.h" namespace MafiaNet { diff --git a/Source/include/mafianet/RakVoice.h b/Source/include/mafianet/voice.h similarity index 96% rename from Source/include/mafianet/RakVoice.h rename to Source/include/mafianet/voice.h index d1c498774..f8e909319 100644 --- a/Source/include/mafianet/RakVoice.h +++ b/Source/include/mafianet/voice.h @@ -20,10 +20,10 @@ #ifndef __RAK_VOICE_H #define __RAK_VOICE_H -#include "mafianet/Types.h" -#include "mafianet/PluginInterface2.h" -#include "mafianet/DS_OrderedList.h" -#include "mafianet/NativeTypes.h" +#include "mafianet/types.h" +#include "mafianet/plugin_interface2.h" +#include "mafianet/ds_ordered_list.h" +#include "mafianet/native_types.h" // Forward declarations for Opus and RNNoise struct OpusEncoder; @@ -39,7 +39,7 @@ class RakPeerInterface; #define FRAME_INCOMING_BUFFER_COUNT 100 // Largest Opus packet we will ever produce or accept for a single frame. -// Exposed here (rather than only in RakVoice.cpp) so a relay host can bound an +// Exposed here (rather than only in voice.cpp) so a relay host can bound an // inbound frame without duplicating the literal. constexpr unsigned RAKVOICE_MAX_OPUS_PACKET_SIZE = 4000; diff --git a/Source/include/mafianet/WindowsIncludes.h b/Source/include/mafianet/windows_includes.h similarity index 100% rename from Source/include/mafianet/WindowsIncludes.h rename to Source/include/mafianet/windows_includes.h diff --git a/Source/include/mafianet/WSAStartupSingleton.h b/Source/include/mafianet/wsa_startup_singleton.h similarity index 100% rename from Source/include/mafianet/WSAStartupSingleton.h rename to Source/include/mafianet/wsa_startup_singleton.h diff --git a/Source/include/mafianet/WString.h b/Source/include/mafianet/wstring.h similarity index 93% rename from Source/include/mafianet/WString.h rename to Source/include/mafianet/wstring.h index 2baad8015..08f94aba5 100644 --- a/Source/include/mafianet/WString.h +++ b/Source/include/mafianet/wstring.h @@ -16,12 +16,12 @@ #ifndef __RAK_W_STRING_H #define __RAK_W_STRING_H -#include "Export.h" -#include "Types.h" // int64_t -#include "String.h" +#include "mafianet/export.h" +#include "mafianet/types.h" // int64_t +#include "mafianet/string.h" #ifdef _WIN32 -#include "WindowsIncludes.h" +#include "mafianet/windows_includes.h" #endif namespace MafiaNet diff --git a/Source/src/Base64Encoder.cpp b/Source/src/base64_encoder.cpp similarity index 96% rename from Source/src/Base64Encoder.cpp rename to Source/src/base64_encoder.cpp index ec4085321..344e03ed6 100644 --- a/Source/src/Base64Encoder.cpp +++ b/Source/src/base64_encoder.cpp @@ -13,8 +13,8 @@ * license found in the license.txt file in the root directory of this source tree. */ -#include "mafianet/Base64Encoder.h" -#include "mafianet/MemoryOverride.h" +#include "mafianet/base64_encoder.h" +#include "mafianet/memory_override.h" const char *Base64Map(void) {return "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";} const char *base64Map = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; diff --git a/Source/src/BitStream.cpp b/Source/src/bit_stream.cpp similarity index 95% rename from Source/src/BitStream.cpp rename to Source/src/bit_stream.cpp index 8fd6a477b..62e3855ae 100644 --- a/Source/src/BitStream.cpp +++ b/Source/src/bit_stream.cpp @@ -15,7 +15,7 @@ /// \file /// -#include "mafianet/BitStream.h" +#include "mafianet/bit_stream.h" #include #include @@ -23,11 +23,11 @@ #include #include -#include "mafianet/SocketIncludes.h" -#include "mafianet/Defines.h" +#include "mafianet/socket_includes.h" +#include "mafianet/defines.h" #if defined(_WIN32) -#include "mafianet/WindowsIncludes.h" +#include "mafianet/windows_includes.h" #include #else #include @@ -37,8 +37,8 @@ #include #endif #endif -#include "mafianet/LinuxAdapter.h" -#include "mafianet/OsxAdapter.h" +#include "mafianet/linux_adapter.h" +#include "mafianet/osx_adapter.h" // MSWin uses _copysign, others use copysign... #ifndef _WIN32 diff --git a/Source/src/CCRakNetSlidingWindow.cpp b/Source/src/cc_sliding_window.cpp similarity index 96% rename from Source/src/CCRakNetSlidingWindow.cpp rename to Source/src/cc_sliding_window.cpp index a92445afc..c68aea059 100644 --- a/Source/src/CCRakNetSlidingWindow.cpp +++ b/Source/src/cc_sliding_window.cpp @@ -13,7 +13,7 @@ * license found in the license.txt file in the root directory of this source tree. */ -#include "mafianet/CCRakNetSlidingWindow.h" +#include "mafianet/cc_sliding_window.h" #if USE_SLIDING_WINDOW_CONGESTION_CONTROL==1 @@ -25,12 +25,12 @@ static const CCTimeType SYN=10; static const CCTimeType SYN=10000; #endif -#include "mafianet/MTUSize.h" +#include "mafianet/mtu_size.h" #include #include #include -#include "mafianet/Assert.h" -#include "mafianet/Alloca.h" +#include "mafianet/assert.h" +#include "mafianet/alloca.h" using namespace MafiaNet; diff --git a/Source/src/CCRakNetUDT.cpp b/Source/src/cc_udt.cpp similarity index 96% rename from Source/src/CCRakNetUDT.cpp rename to Source/src/cc_udt.cpp index 3931e534c..24fc0ba21 100644 --- a/Source/src/CCRakNetUDT.cpp +++ b/Source/src/cc_udt.cpp @@ -13,18 +13,18 @@ * license found in the license.txt file in the root directory of this source tree. */ -#include "mafianet/CCRakNetUDT.h" +#include "mafianet/cc_udt.h" #if USE_SLIDING_WINDOW_CONGESTION_CONTROL!=1 -#include "mafianet/Rand.h" -#include "mafianet/MTUSize.h" +#include "mafianet/rand.h" +#include "mafianet/mtu_size.h" #include #include #include //#include -#include "mafianet/Assert.h" -#include "mafianet/Alloca.h" +#include "mafianet/assert.h" +#include "mafianet/alloca.h" using namespace MafiaNet; diff --git a/Source/src/CheckSum.cpp b/Source/src/check_sum.cpp similarity index 95% rename from Source/src/CheckSum.cpp rename to Source/src/check_sum.cpp index 0a96355f9..52f431637 100644 --- a/Source/src/CheckSum.cpp +++ b/Source/src/check_sum.cpp @@ -18,7 +18,7 @@ * @brief CheckSum implementation from http://www.flounder.com/checksum.htm * */ -#include "mafianet/CheckSum.h" +#include "mafianet/check_sum.h" /**************************************************************************** * CheckSum::add diff --git a/Source/src/CloudClient.cpp b/Source/src/cloud_client.cpp similarity index 94% rename from Source/src/CloudClient.cpp rename to Source/src/cloud_client.cpp index b0f57aa07..1e8d2220e 100644 --- a/Source/src/CloudClient.cpp +++ b/Source/src/cloud_client.cpp @@ -13,14 +13,14 @@ * license found in the license.txt file in the root directory of this source tree. */ -#include "mafianet/NativeFeatureIncludes.h" +#include "mafianet/native_feature_includes.h" #if _RAKNET_SUPPORT_CloudClient==1 -#include "mafianet/CloudClient.h" -#include "mafianet/GetTime.h" -#include "mafianet/MessageIdentifiers.h" -#include "mafianet/BitStream.h" -#include "mafianet/PeerInterface.h" +#include "mafianet/cloud_client.h" +#include "mafianet/get_time.h" +#include "mafianet/message_identifiers.h" +#include "mafianet/bit_stream.h" +#include "mafianet/peer_interface.h" using namespace MafiaNet; diff --git a/Source/src/CloudCommon.cpp b/Source/src/cloud_common.cpp similarity index 94% rename from Source/src/CloudCommon.cpp rename to Source/src/cloud_common.cpp index a7935c879..186c331ce 100644 --- a/Source/src/CloudCommon.cpp +++ b/Source/src/cloud_common.cpp @@ -13,11 +13,11 @@ * license found in the license.txt file in the root directory of this source tree. */ -#include "mafianet/NativeFeatureIncludes.h" +#include "mafianet/native_feature_includes.h" #if _RAKNET_SUPPORT_CloudClient==1 || _RAKNET_SUPPORT_CloudServer==1 -#include "mafianet/CloudCommon.h" -#include "mafianet/BitStream.h" +#include "mafianet/cloud_common.h" +#include "mafianet/bit_stream.h" using namespace MafiaNet; diff --git a/Source/src/CloudServer.cpp b/Source/src/cloud_server.cpp similarity index 96% rename from Source/src/CloudServer.cpp rename to Source/src/cloud_server.cpp index 0f5724c7b..2f8794e5e 100644 --- a/Source/src/CloudServer.cpp +++ b/Source/src/cloud_server.cpp @@ -13,14 +13,14 @@ * license found in the license.txt file in the root directory of this source tree. */ -#include "mafianet/NativeFeatureIncludes.h" +#include "mafianet/native_feature_includes.h" #if _RAKNET_SUPPORT_CloudServer==1 -#include "mafianet/CloudServer.h" -#include "mafianet/GetTime.h" -#include "mafianet/MessageIdentifiers.h" -#include "mafianet/BitStream.h" -#include "mafianet/PeerInterface.h" +#include "mafianet/cloud_server.h" +#include "mafianet/get_time.h" +#include "mafianet/message_identifiers.h" +#include "mafianet/bit_stream.h" +#include "mafianet/peer_interface.h" enum ServerToServerCommands { diff --git a/Source/src/RakNetCommandParser.cpp b/Source/src/command_parser.cpp similarity index 95% rename from Source/src/RakNetCommandParser.cpp rename to Source/src/command_parser.cpp index 154d27122..cbd2515c5 100644 --- a/Source/src/RakNetCommandParser.cpp +++ b/Source/src/command_parser.cpp @@ -13,14 +13,14 @@ * license found in the license.txt file in the root directory of this source tree. */ -#include "mafianet/NativeFeatureIncludes.h" +#include "mafianet/native_feature_includes.h" #if _RAKNET_SUPPORT_RakNetCommandParser==1 -#include "mafianet/CommandParser.h" -#include "mafianet/TransportInterface.h" -#include "mafianet/PeerInterface.h" -#include "mafianet/BitStream.h" -#include "mafianet/Assert.h" +#include "mafianet/command_parser.h" +#include "mafianet/transport_interface.h" +#include "mafianet/peer_interface.h" +#include "mafianet/bit_stream.h" +#include "mafianet/assert.h" #include #include #include diff --git a/Source/src/CommandParserInterface.cpp b/Source/src/command_parser_interface.cpp similarity index 94% rename from Source/src/CommandParserInterface.cpp rename to Source/src/command_parser_interface.cpp index bc443e177..f1bbacba4 100644 --- a/Source/src/CommandParserInterface.cpp +++ b/Source/src/command_parser_interface.cpp @@ -13,10 +13,10 @@ * license found in the license.txt file in the root directory of this source tree. */ -#include "mafianet/CommandParserInterface.h" -#include "mafianet/TransportInterface.h" +#include "mafianet/command_parser_interface.h" +#include "mafianet/transport_interface.h" #include -#include "mafianet/Assert.h" +#include "mafianet/assert.h" #include @@ -31,7 +31,7 @@ #include #endif -#include "mafianet/LinuxStrings.h" +#include "mafianet/linux_strings.h" using namespace MafiaNet; diff --git a/Source/src/ConnectionGraph2.cpp b/Source/src/connection_graph2.cpp similarity index 94% rename from Source/src/ConnectionGraph2.cpp rename to Source/src/connection_graph2.cpp index 24d908655..ca13b8821 100644 --- a/Source/src/ConnectionGraph2.cpp +++ b/Source/src/connection_graph2.cpp @@ -13,13 +13,13 @@ * license found in the license.txt file in the root directory of this source tree. */ -#include "mafianet/NativeFeatureIncludes.h" +#include "mafianet/native_feature_includes.h" #if _RAKNET_SUPPORT_ConnectionGraph2==1 -#include "mafianet/ConnectionGraph2.h" -#include "mafianet/PeerInterface.h" -#include "mafianet/MessageIdentifiers.h" -#include "mafianet/BitStream.h" +#include "mafianet/connection_graph2.h" +#include "mafianet/peer_interface.h" +#include "mafianet/message_identifiers.h" +#include "mafianet/bit_stream.h" using namespace MafiaNet; diff --git a/Source/src/ConsoleServer.cpp b/Source/src/console_server.cpp similarity index 94% rename from Source/src/ConsoleServer.cpp rename to Source/src/console_server.cpp index 207e84372..2e0a0b27d 100644 --- a/Source/src/ConsoleServer.cpp +++ b/Source/src/console_server.cpp @@ -13,21 +13,21 @@ * license found in the license.txt file in the root directory of this source tree. */ -#include "mafianet/NativeFeatureIncludes.h" +#include "mafianet/native_feature_includes.h" #if _RAKNET_SUPPORT_ConsoleServer==1 -#include "mafianet/ConsoleServer.h" -#include "mafianet/TransportInterface.h" -#include "mafianet/CommandParserInterface.h" +#include "mafianet/console_server.h" +#include "mafianet/transport_interface.h" +#include "mafianet/command_parser_interface.h" #include #include #define COMMAND_DELINATOR ' ' #define COMMAND_DELINATOR_TOGGLE '"' -#include "mafianet/LinuxStrings.h" -#include "mafianet/LinuxAdapter.h" -#include "mafianet/OsxAdapter.h" +#include "mafianet/linux_strings.h" +#include "mafianet/linux_adapter.h" +#include "mafianet/osx_adapter.h" using namespace MafiaNet; diff --git a/Source/src/crypto/cryptomanager.cpp b/Source/src/crypto/cryptomanager.cpp index 3c17fb7fb..76acb1fa2 100644 --- a/Source/src/crypto/cryptomanager.cpp +++ b/Source/src/crypto/cryptomanager.cpp @@ -6,7 +6,7 @@ */ #include "mafianet/crypto/cryptomanager.h" -#include "mafianet/Assert.h" // used for RakAssert +#include "mafianet/assert.h" // used for RakAssert #include // used for std::numeric_limits<> // prevent max/min macros getting defined (breaking numeric_limits<>::max() / ::min() usage) through the indirect windows.h include in the OpenSSL includes diff --git a/Source/src/crypto/fileencrypter.cpp b/Source/src/crypto/fileencrypter.cpp index 50f4384c3..a7272907f 100644 --- a/Source/src/crypto/fileencrypter.cpp +++ b/Source/src/crypto/fileencrypter.cpp @@ -14,10 +14,10 @@ #include // used for RSA_xxxx #include "mafianet/crypto/cryptomanager.h" // used for MafiaNet::Experimental::Crypto::CCryptoManager -#include "mafianet/Assert.h" // used for RakAssert +#include "mafianet/assert.h" // used for RakAssert -#include "mafianet/LinuxAdapter.h" // used for strcpy_s -#include "mafianet/OsxAdapter.h" // used for strcpy_s +#include "mafianet/linux_adapter.h" // used for strcpy_s +#include "mafianet/osx_adapter.h" // used for strcpy_s namespace MafiaNet { diff --git a/Source/src/crypto/securestring.cpp b/Source/src/crypto/securestring.cpp index 4fb02faf6..9646c6375 100644 --- a/Source/src/crypto/securestring.cpp +++ b/Source/src/crypto/securestring.cpp @@ -8,8 +8,8 @@ // #med - review the include order - defines.h defines SLNET_VERIFY but doesn't enforce including assert.h which it honestly should #include "mafianet/crypto/cryptomanager.h" // used for CCryptoManager -#include "mafianet/Assert.h" // used for assert() (via SLNET_VERIFY) -#include "mafianet/MemoryOverride.h" // used for OP_NEW_ARRAY +#include "mafianet/assert.h" // used for assert() (via SLNET_VERIFY) +#include "mafianet/memory_override.h" // used for OP_NEW_ARRAY #include // used for std::memcpy #include // used for std::numeric_limits diff --git a/Source/src/DataCompressor.cpp b/Source/src/data_compressor.cpp similarity index 93% rename from Source/src/DataCompressor.cpp rename to Source/src/data_compressor.cpp index b4c4f5929..fa8a90555 100644 --- a/Source/src/DataCompressor.cpp +++ b/Source/src/data_compressor.cpp @@ -13,9 +13,9 @@ * license found in the license.txt file in the root directory of this source tree. */ -#include "mafianet/DataCompressor.h" -#include "mafianet/DS_HuffmanEncodingTree.h" -#include "mafianet/Assert.h" +#include "mafianet/data_compressor.h" +#include "mafianet/ds_huffman_encoding_tree.h" +#include "mafianet/assert.h" #include // Use string.h rather than memory.h for a console using namespace MafiaNet; diff --git a/Source/src/DirectoryDeltaTransfer.cpp b/Source/src/directory_delta_transfer.cpp similarity index 92% rename from Source/src/DirectoryDeltaTransfer.cpp rename to Source/src/directory_delta_transfer.cpp index 75f9aacb3..2ba49f34e 100644 --- a/Source/src/DirectoryDeltaTransfer.cpp +++ b/Source/src/directory_delta_transfer.cpp @@ -13,23 +13,23 @@ * license found in the license.txt file in the root directory of this source tree. */ -#include "mafianet/NativeFeatureIncludes.h" +#include "mafianet/native_feature_includes.h" #if _RAKNET_SUPPORT_DirectoryDeltaTransfer==1 && _RAKNET_SUPPORT_FileOperations==1 -#include "mafianet/DirectoryDeltaTransfer.h" -#include "mafianet/FileList.h" -#include "mafianet/StringCompressor.h" -#include "mafianet/PeerInterface.h" -#include "mafianet/FileListTransfer.h" -#include "mafianet/FileListTransferCBInterface.h" -#include "mafianet/BitStream.h" -#include "mafianet/MessageIdentifiers.h" -#include "mafianet/FileOperations.h" -#include "mafianet/DS_List.h" -#include "mafianet/SuperFastHash.h" -#include "mafianet/IncrementalReadInterface.h" -#include "mafianet/LinuxAdapter.h" -#include "mafianet/OsxAdapter.h" +#include "mafianet/directory_delta_transfer.h" +#include "mafianet/file_list.h" +#include "mafianet/string_compressor.h" +#include "mafianet/peer_interface.h" +#include "mafianet/file_list_transfer.h" +#include "mafianet/file_list_transfer_cb_interface.h" +#include "mafianet/bit_stream.h" +#include "mafianet/message_identifiers.h" +#include "mafianet/file_operations.h" +#include "mafianet/ds_list.h" +#include "mafianet/super_fast_hash.h" +#include "mafianet/incremental_read_interface.h" +#include "mafianet/linux_adapter.h" +#include "mafianet/osx_adapter.h" using namespace MafiaNet; diff --git a/Source/src/DR_SHA1.cpp b/Source/src/dr_sha1.cpp similarity index 96% rename from Source/src/DR_SHA1.cpp rename to Source/src/dr_sha1.cpp index 9454a9c5c..6dfc2fe37 100644 --- a/Source/src/DR_SHA1.cpp +++ b/Source/src/dr_sha1.cpp @@ -17,7 +17,7 @@ // If compiling with MFC, you might want to add #include "StdAfx.h" #define _CRT_SECURE_NO_WARNINGS -#include "mafianet/DR_SHA1.h" +#include "mafianet/dr_sha1.h" #include #define SHA1_MAX_FILE_BUFFER (32 * 20 * 820) diff --git a/Source/src/DS_BytePool.cpp b/Source/src/ds_byte_pool.cpp similarity index 94% rename from Source/src/DS_BytePool.cpp rename to Source/src/ds_byte_pool.cpp index 5cfe5903b..5529f8218 100644 --- a/Source/src/DS_BytePool.cpp +++ b/Source/src/ds_byte_pool.cpp @@ -15,8 +15,8 @@ // The header is deprecated; this is its own implementation file. #define MAFIANET_SILENCE_DEPRECATED_INCLUDES -#include "mafianet/DS_BytePool.h" -#include "mafianet/Assert.h" +#include "mafianet/ds_byte_pool.h" +#include "mafianet/assert.h" #ifndef __APPLE__ // Use stdlib and not malloc for compatibility #include diff --git a/Source/src/DS_ByteQueue.cpp b/Source/src/ds_byte_queue.cpp similarity index 95% rename from Source/src/DS_ByteQueue.cpp rename to Source/src/ds_byte_queue.cpp index 656803b61..5ec7bb4b8 100644 --- a/Source/src/DS_ByteQueue.cpp +++ b/Source/src/ds_byte_queue.cpp @@ -13,7 +13,7 @@ * license found in the license.txt file in the root directory of this source tree. */ -#include "mafianet/DS_ByteQueue.h" +#include "mafianet/ds_byte_queue.h" #include // Memmove #include // realloc #include diff --git a/Source/src/DS_HuffmanEncodingTree.cpp b/Source/src/ds_huffman_encoding_tree.cpp similarity index 95% rename from Source/src/DS_HuffmanEncodingTree.cpp rename to Source/src/ds_huffman_encoding_tree.cpp index 6243e17c1..78528fe86 100644 --- a/Source/src/DS_HuffmanEncodingTree.cpp +++ b/Source/src/ds_huffman_encoding_tree.cpp @@ -13,10 +13,10 @@ * license found in the license.txt file in the root directory of this source tree. */ -#include "mafianet/DS_HuffmanEncodingTree.h" -#include "mafianet/DS_Queue.h" -#include "mafianet/BitStream.h" -#include "mafianet/Assert.h" +#include "mafianet/ds_huffman_encoding_tree.h" +#include "mafianet/ds_queue.h" +#include "mafianet/bit_stream.h" +#include "mafianet/assert.h" using namespace MafiaNet; diff --git a/Source/src/DS_Table.cpp b/Source/src/ds_table.cpp similarity index 95% rename from Source/src/DS_Table.cpp rename to Source/src/ds_table.cpp index 164df4f59..e3c489d08 100644 --- a/Source/src/DS_Table.cpp +++ b/Source/src/ds_table.cpp @@ -13,14 +13,14 @@ * license found in the license.txt file in the root directory of this source tree. */ -#include "mafianet/DS_Table.h" -#include "mafianet/DS_OrderedList.h" +#include "mafianet/ds_table.h" +#include "mafianet/ds_ordered_list.h" #include -#include "mafianet/Assert.h" -#include "mafianet/Assert.h" -#include "mafianet/Itoa.h" -#include "mafianet/LinuxAdapter.h" -#include "mafianet/OsxAdapter.h" +#include "mafianet/assert.h" +#include "mafianet/assert.h" +#include "mafianet/itoa.h" +#include "mafianet/linux_adapter.h" +#include "mafianet/osx_adapter.h" using namespace DataStructures; diff --git a/Source/src/DynDNS.cpp b/Source/src/dyn_dns.cpp similarity index 93% rename from Source/src/DynDNS.cpp rename to Source/src/dyn_dns.cpp index a8c68220b..9ce18682f 100644 --- a/Source/src/DynDNS.cpp +++ b/Source/src/dyn_dns.cpp @@ -13,14 +13,14 @@ * license found in the license.txt file in the root directory of this source tree. */ -#include "mafianet/NativeFeatureIncludes.h" +#include "mafianet/native_feature_includes.h" #if _RAKNET_SUPPORT_DynDNS==1 && _RAKNET_SUPPORT_TCPInterface==1 -#include "mafianet/TCPInterface.h" -#include "mafianet/Socket2.h" -#include "mafianet/DynDNS.h" -#include "mafianet/GetTime.h" -#include "mafianet/Base64Encoder.h" +#include "mafianet/tcp_interface.h" +#include "mafianet/socket2.h" +#include "mafianet/dyn_dns.h" +#include "mafianet/get_time.h" +#include "mafianet/base64_encoder.h" using namespace MafiaNet; diff --git a/Source/src/EmailSender.cpp b/Source/src/email_sender.cpp similarity index 93% rename from Source/src/EmailSender.cpp rename to Source/src/email_sender.cpp index 6abf7c1a0..e14308ad7 100644 --- a/Source/src/EmailSender.cpp +++ b/Source/src/email_sender.cpp @@ -13,29 +13,29 @@ * license found in the license.txt file in the root directory of this source tree. */ -#include "mafianet/NativeFeatureIncludes.h" +#include "mafianet/native_feature_includes.h" #if _RAKNET_SUPPORT_EmailSender==1 && _RAKNET_SUPPORT_TCPInterface==1 && _RAKNET_SUPPORT_FileOperations==1 // Useful sites // http://www.faqs.org\rfcs\rfc2821.html // http://www2.rad.com\networks/1995/mime/examples.htm -#include "mafianet/EmailSender.h" -#include "mafianet/TCPInterface.h" -#include "mafianet/GetTime.h" -#include "mafianet/Rand.h" -#include "mafianet/FileList.h" -#include "mafianet/BitStream.h" -#include "mafianet/Base64Encoder.h" +#include "mafianet/email_sender.h" +#include "mafianet/tcp_interface.h" +#include "mafianet/get_time.h" +#include "mafianet/rand.h" +#include "mafianet/file_list.h" +#include "mafianet/bit_stream.h" +#include "mafianet/base64_encoder.h" #include -#include "mafianet/LinuxAdapter.h" -#include "mafianet/OsxAdapter.h" +#include "mafianet/linux_adapter.h" +#include "mafianet/osx_adapter.h" -#include "mafianet/Sleep.h" +#include "mafianet/sleep.h" using namespace MafiaNet; diff --git a/Source/src/EpochTimeToString.cpp b/Source/src/epoch_time_to_string.cpp similarity index 84% rename from Source/src/EpochTimeToString.cpp rename to Source/src/epoch_time_to_string.cpp index f94d4c86f..3da17d4ee 100644 --- a/Source/src/EpochTimeToString.cpp +++ b/Source/src/epoch_time_to_string.cpp @@ -13,16 +13,16 @@ * license found in the license.txt file in the root directory of this source tree. */ -#include "mafianet/FormatString.h" -#include "mafianet/EpochTimeToString.h" +#include "mafianet/format_string.h" +#include "mafianet/epoch_time_to_string.h" #include #include #include // localtime #include -#include "mafianet/LinuxStrings.h" -#include "mafianet/LinuxAdapter.h" -#include "mafianet/OsxAdapter.h" +#include "mafianet/linux_strings.h" +#include "mafianet/linux_adapter.h" +#include "mafianet/osx_adapter.h" char * EpochTimeToString(long long time) { diff --git a/Source/src/FileList.cpp b/Source/src/file_list.cpp similarity index 94% rename from Source/src/FileList.cpp rename to Source/src/file_list.cpp index 06f2c0c84..9a6a6098c 100644 --- a/Source/src/FileList.cpp +++ b/Source/src/file_list.cpp @@ -13,12 +13,12 @@ * license found in the license.txt file in the root directory of this source tree. */ -#include "mafianet/FileList.h" +#include "mafianet/file_list.h" #if _RAKNET_SUPPORT_FileOperations==1 #include // RAKNET_DEBUG_PRINTF -#include "mafianet/Assert.h" +#include "mafianet/assert.h" #if defined(ANDROID) #include #elif defined(_WIN32) || defined(__CYGWIN__) @@ -41,16 +41,16 @@ #include #endif -//#include "mafianet/DR_SHA1.h" -#include "mafianet/DS_Queue.h" -#include "mafianet/StringCompressor.h" -#include "mafianet/BitStream.h" -#include "mafianet/FileOperations.h" -#include "mafianet/SuperFastHash.h" -#include "mafianet/Assert.h" -#include "mafianet/LinuxStrings.h" -#include "mafianet/LinuxAdapter.h" -#include "mafianet/OsxAdapter.h" +//#include "mafianet/dr_sha1.h" +#include "mafianet/ds_queue.h" +#include "mafianet/string_compressor.h" +#include "mafianet/bit_stream.h" +#include "mafianet/file_operations.h" +#include "mafianet/super_fast_hash.h" +#include "mafianet/assert.h" +#include "mafianet/linux_strings.h" +#include "mafianet/linux_adapter.h" +#include "mafianet/osx_adapter.h" #define MAX_FILENAME_LENGTH 512 static const unsigned HASH_LENGTH=4; @@ -70,11 +70,11 @@ using namespace MafiaNet; #include #include #include -#include "mafianet/_FindFirst.h" +#include "mafianet/find_first.h" #include //defines intptr_t #endif -#include "mafianet/Alloca.h" +#include "mafianet/alloca.h" //int RAK_DLL_EXPORT FileListNodeComp( char * const &key, const FileListNode &data ) //{ diff --git a/Source/src/FileListTransfer.cpp b/Source/src/file_list_transfer.cpp similarity index 95% rename from Source/src/FileListTransfer.cpp rename to Source/src/file_list_transfer.cpp index dae7130d4..b6fb94bcb 100644 --- a/Source/src/FileListTransfer.cpp +++ b/Source/src/file_list_transfer.cpp @@ -13,22 +13,22 @@ * license found in the license.txt file in the root directory of this source tree. */ -#include "mafianet/NativeFeatureIncludes.h" +#include "mafianet/native_feature_includes.h" #if _RAKNET_SUPPORT_FileListTransfer==1 && _RAKNET_SUPPORT_FileOperations==1 -#include "mafianet/FileListTransfer.h" -#include "mafianet/DS_HuffmanEncodingTree.h" -#include "mafianet/FileListTransferCBInterface.h" -#include "mafianet/StringCompressor.h" -#include "mafianet/FileList.h" -#include "mafianet/DS_Queue.h" -#include "mafianet/MessageIdentifiers.h" -#include "mafianet/Types.h" -#include "mafianet/PeerInterface.h" -#include "mafianet/Statistics.h" -#include "mafianet/IncrementalReadInterface.h" -#include "mafianet/Assert.h" -#include "mafianet/Alloca.h" +#include "mafianet/file_list_transfer.h" +#include "mafianet/ds_huffman_encoding_tree.h" +#include "mafianet/file_list_transfer_cb_interface.h" +#include "mafianet/string_compressor.h" +#include "mafianet/file_list.h" +#include "mafianet/ds_queue.h" +#include "mafianet/message_identifiers.h" +#include "mafianet/types.h" +#include "mafianet/peer_interface.h" +#include "mafianet/statistics.h" +#include "mafianet/incremental_read_interface.h" +#include "mafianet/assert.h" +#include "mafianet/alloca.h" namespace MafiaNet { @@ -372,7 +372,7 @@ bool FileListTransfer::DecodeFile(Packet *packet, bool isTheFullFile) onFileStruct.fileData=0; if (isTheFullFile==false) { - // Disable endian swapping on reading this, as it's generated locally in ReliabilityLayer.cpp + // Disable endian swapping on reading this, as it's generated locally in reliability_layer.cpp inBitStream.ReadBits( (unsigned char* ) &partCount, BYTES_TO_BITS(sizeof(partCount)), true ); inBitStream.ReadBits( (unsigned char* ) &partTotal, BYTES_TO_BITS(sizeof(partTotal)), true ); inBitStream.ReadBits( (unsigned char* ) &partLength, BYTES_TO_BITS(sizeof(partLength)), true ); @@ -710,7 +710,7 @@ void FileListTransfer::OnReferencePush(Packet *packet, bool isTheFullFile) onFileStruct.fileData=0; if (isTheFullFile==false) { - // Disable endian swapping on reading this, as it's generated locally in ReliabilityLayer.cpp + // Disable endian swapping on reading this, as it's generated locally in reliability_layer.cpp inBitStream.ReadBits( (unsigned char* ) &partCount, BYTES_TO_BITS(sizeof(partCount)), true ); inBitStream.ReadBits( (unsigned char* ) &partTotal, BYTES_TO_BITS(sizeof(partTotal)), true ); inBitStream.ReadBits( (unsigned char* ) &partLength, BYTES_TO_BITS(sizeof(partLength)), true ); diff --git a/Source/src/FileOperations.cpp b/Source/src/file_operations.cpp similarity index 88% rename from Source/src/FileOperations.cpp rename to Source/src/file_operations.cpp index ad6848f08..935f73038 100644 --- a/Source/src/FileOperations.cpp +++ b/Source/src/file_operations.cpp @@ -13,10 +13,10 @@ * license found in the license.txt file in the root directory of this source tree. */ -#include "mafianet/FileOperations.h" +#include "mafianet/file_operations.h" #if _RAKNET_SUPPORT_FileOperations==1 -#include "mafianet/MemoryOverride.h" -#include "mafianet/_FindFirst.h" // For linux +#include "mafianet/memory_override.h" +#include "mafianet/find_first.h" // For linux #include #include #ifdef _WIN32 @@ -26,11 +26,11 @@ #else #include #include -#include "mafianet/_FindFirst.h" +#include "mafianet/find_first.h" #endif #include "errno.h" -#include "mafianet/LinuxAdapter.h" -#include "mafianet/OsxAdapter.h" +#include "mafianet/linux_adapter.h" +#include "mafianet/osx_adapter.h" #ifndef MAX_PATH #define MAX_PATH 260 diff --git a/Source/src/_FindFirst.cpp b/Source/src/find_first.cpp similarity index 91% rename from Source/src/_FindFirst.cpp rename to Source/src/find_first.cpp index 068988926..285de4770 100644 --- a/Source/src/_FindFirst.cpp +++ b/Source/src/find_first.cpp @@ -13,20 +13,20 @@ * Should emulate windows finddata structure */ #if (defined(__GNUC__) || defined(__GCCXML__)) && !defined(_WIN32) -#include "mafianet/_FindFirst.h" -#include "mafianet/DS_List.h" +#include "mafianet/find_first.h" +#include "mafianet/ds_list.h" #include #include -#include "mafianet/LinuxAdapter.h" -#include "mafianet/OsxAdapter.h" +#include "mafianet/linux_adapter.h" +#include "mafianet/osx_adapter.h" static DataStructures::List< _findinfo_t* > fileInfo; -#include "mafianet/MemoryOverride.h" -#include "mafianet/Assert.h" +#include "mafianet/memory_override.h" +#include "mafianet/assert.h" /** * _findfirst - equivalent diff --git a/Source/src/FormatString.cpp b/Source/src/format_string.cpp similarity index 85% rename from Source/src/FormatString.cpp rename to Source/src/format_string.cpp index 011d4c45f..589fde036 100644 --- a/Source/src/FormatString.cpp +++ b/Source/src/format_string.cpp @@ -13,13 +13,13 @@ * license found in the license.txt file in the root directory of this source tree. */ -#include "mafianet/FormatString.h" +#include "mafianet/format_string.h" #include #include #include -#include "mafianet/LinuxStrings.h" -#include "mafianet/LinuxAdapter.h" -#include "mafianet/OsxAdapter.h" +#include "mafianet/linux_strings.h" +#include "mafianet/linux_adapter.h" +#include "mafianet/osx_adapter.h" char * FormatString(const char *format, ...) { diff --git a/Source/src/FullyConnectedMesh2.cpp b/Source/src/fully_connected_mesh2.cpp similarity index 96% rename from Source/src/FullyConnectedMesh2.cpp rename to Source/src/fully_connected_mesh2.cpp index 05b92fc5c..0f923480c 100644 --- a/Source/src/FullyConnectedMesh2.cpp +++ b/Source/src/fully_connected_mesh2.cpp @@ -17,17 +17,17 @@ /// -#include "mafianet/NativeFeatureIncludes.h" +#include "mafianet/native_feature_includes.h" #if _RAKNET_SUPPORT_FullyConnectedMesh2==1 -#include "mafianet/FullyConnectedMesh2.h" -#include "mafianet/PeerInterface.h" -#include "mafianet/GuidUtil.h" -#include "mafianet/MessageIdentifiers.h" -#include "mafianet/Assert.h" -#include "mafianet/GetTime.h" -#include "mafianet/Rand.h" -#include "mafianet/DS_OrderedList.h" +#include "mafianet/fully_connected_mesh2.h" +#include "mafianet/peer_interface.h" +#include "mafianet/guid_util.h" +#include "mafianet/message_identifiers.h" +#include "mafianet/assert.h" +#include "mafianet/get_time.h" +#include "mafianet/rand.h" +#include "mafianet/ds_ordered_list.h" using namespace MafiaNet; diff --git a/Source/src/GetTime.cpp b/Source/src/get_time.cpp similarity index 93% rename from Source/src/GetTime.cpp rename to Source/src/get_time.cpp index 772a733c6..810254599 100644 --- a/Source/src/GetTime.cpp +++ b/Source/src/get_time.cpp @@ -18,14 +18,14 @@ #if defined(_WIN32) -#include "mafianet/WindowsIncludes.h" +#include "mafianet/windows_includes.h" // To call timeGetTime // on Code::Blocks, this needs to be libwinmm.a instead #pragma comment(lib, "Winmm.lib") #endif -#include "mafianet/GetTime.h" +#include "mafianet/get_time.h" @@ -52,7 +52,7 @@ MafiaNet::TimeUS initialTime; static bool initialized=false; #if defined(GET_TIME_SPIKE_LIMIT) && GET_TIME_SPIKE_LIMIT>0 -#include "mafianet/SimpleMutex.h" +#include "mafianet/simple_mutex.h" MafiaNet::TimeUS lastNormalizedReturnedValue=0; MafiaNet::TimeUS lastNormalizedInputValue=0; /// This constraints timer forward jumps to 1 second, and does not let it jump backwards diff --git a/Source/src/GetTimeOfDay.cpp b/Source/src/get_time_of_day.cpp similarity index 92% rename from Source/src/GetTimeOfDay.cpp rename to Source/src/get_time_of_day.cpp index 6da0b8612..1e06b53a0 100644 --- a/Source/src/GetTimeOfDay.cpp +++ b/Source/src/get_time_of_day.cpp @@ -15,11 +15,11 @@ #if defined(_WIN32) && !defined(__GNUC__) &&!defined(__GCCXML__) -#include "mafianet/GetTimeOfDay.h" +#include "mafianet/get_time_of_day.h" // From http://www.openasthra.com/c-tidbits/gettimeofday-function-for-windows/ -#include "mafianet/WindowsIncludes.h" +#include "mafianet/windows_includes.h" #if defined(_MSC_VER) || defined(_MSC_EXTENSIONS) #define DELTA_EPOCH_IN_MICROSECS 11644473600000000Ui64 diff --git a/Source/src/Getche.cpp b/Source/src/getche.cpp similarity index 93% rename from Source/src/Getche.cpp rename to Source/src/getche.cpp index d53b165e2..803e79a4f 100644 --- a/Source/src/Getche.cpp +++ b/Source/src/getche.cpp @@ -19,7 +19,7 @@ #else -#include "mafianet/Getche.h" +#include "mafianet/getche.h" char _getche() { diff --git a/Source/src/Gets.cpp b/Source/src/gets.cpp similarity index 100% rename from Source/src/Gets.cpp rename to Source/src/gets.cpp diff --git a/Source/src/GridSectorizer.cpp b/Source/src/grid_sectorizer.cpp similarity index 96% rename from Source/src/GridSectorizer.cpp rename to Source/src/grid_sectorizer.cpp index 747c1b95d..f34d0a92a 100644 --- a/Source/src/GridSectorizer.cpp +++ b/Source/src/grid_sectorizer.cpp @@ -13,8 +13,8 @@ * license found in the license.txt file in the root directory of this source tree. */ -#include "mafianet/Assert.h" -#include "mafianet/GridSectorizer.h" +#include "mafianet/assert.h" +#include "mafianet/grid_sectorizer.h" //#include #include diff --git a/Source/src/GuidUtil.cpp b/Source/src/guid_util.cpp similarity index 96% rename from Source/src/GuidUtil.cpp rename to Source/src/guid_util.cpp index a07c41037..62ac484c1 100644 --- a/Source/src/GuidUtil.cpp +++ b/Source/src/guid_util.cpp @@ -5,7 +5,7 @@ * license.txt file in the root directory of this source tree. */ -#include "mafianet/GuidUtil.h" +#include "mafianet/guid_util.h" namespace MafiaNet { diff --git a/Source/src/HTTPConnection.cpp b/Source/src/http_connection.cpp similarity index 93% rename from Source/src/HTTPConnection.cpp rename to Source/src/http_connection.cpp index df3652180..bff0dd416 100644 --- a/Source/src/HTTPConnection.cpp +++ b/Source/src/http_connection.cpp @@ -17,14 +17,14 @@ /// \brief Contains HTTPConnection, used to communicate with web servers /// -#include "mafianet/NativeFeatureIncludes.h" +#include "mafianet/native_feature_includes.h" #if _RAKNET_SUPPORT_HTTPConnection==1 && _RAKNET_SUPPORT_TCPInterface==1 -#include "mafianet/TCPInterface.h" -#include "mafianet/HTTPConnection.h" -#include "mafianet/Sleep.h" -#include "mafianet/String.h" -#include "mafianet/Assert.h" +#include "mafianet/tcp_interface.h" +#include "mafianet/http_connection.h" +#include "mafianet/sleep.h" +#include "mafianet/string.h" +#include "mafianet/assert.h" #include #include #include diff --git a/Source/src/HTTPConnection2.cpp b/Source/src/http_connection2.cpp similarity index 95% rename from Source/src/HTTPConnection2.cpp rename to Source/src/http_connection2.cpp index 5ac111a36..ec5d851ba 100644 --- a/Source/src/HTTPConnection2.cpp +++ b/Source/src/http_connection2.cpp @@ -13,11 +13,11 @@ * license found in the license.txt file in the root directory of this source tree. */ -#include "mafianet/NativeFeatureIncludes.h" +#include "mafianet/native_feature_includes.h" #if _RAKNET_SUPPORT_HTTPConnection2==1 && _RAKNET_SUPPORT_TCPInterface==1 -#include "mafianet/HTTPConnection2.h" -#include "mafianet/TCPInterface.h" +#include "mafianet/http_connection2.h" +#include "mafianet/tcp_interface.h" using namespace MafiaNet; diff --git a/Source/src/IncrementalReadInterface.cpp b/Source/src/incremental_read_interface.cpp similarity index 87% rename from Source/src/IncrementalReadInterface.cpp rename to Source/src/incremental_read_interface.cpp index b21f9a7ac..6734dd76f 100644 --- a/Source/src/IncrementalReadInterface.cpp +++ b/Source/src/incremental_read_interface.cpp @@ -13,10 +13,10 @@ * license found in the license.txt file in the root directory of this source tree. */ -#include "mafianet/IncrementalReadInterface.h" +#include "mafianet/incremental_read_interface.h" #include -#include "mafianet/LinuxAdapter.h" -#include "mafianet/OsxAdapter.h" +#include "mafianet/linux_adapter.h" +#include "mafianet/osx_adapter.h" using namespace MafiaNet; diff --git a/Source/src/Itoa.cpp b/Source/src/itoa.cpp similarity index 94% rename from Source/src/Itoa.cpp rename to Source/src/itoa.cpp index d4ac0916f..7a18ecba9 100644 --- a/Source/src/Itoa.cpp +++ b/Source/src/itoa.cpp @@ -13,7 +13,7 @@ * license found in the license.txt file in the root directory of this source tree. */ -#include "mafianet/EmptyHeader.h" +#include "mafianet/empty_header.h" #ifdef __cplusplus extern "C" { diff --git a/Source/src/LinuxAdapter.cpp b/Source/src/linux_adapter.cpp similarity index 99% rename from Source/src/LinuxAdapter.cpp rename to Source/src/linux_adapter.cpp index 7b58903b5..cdb054815 100644 --- a/Source/src/LinuxAdapter.cpp +++ b/Source/src/linux_adapter.cpp @@ -9,7 +9,7 @@ */ #ifdef __linux__ -#include "mafianet/LinuxAdapter.h" +#include "mafianet/linux_adapter.h" #include // for std::max, std::min #include // for errno diff --git a/Source/src/LinuxStrings.cpp b/Source/src/linux_strings.cpp similarity index 100% rename from Source/src/LinuxStrings.cpp rename to Source/src/linux_strings.cpp diff --git a/Source/src/LocklessTypes.cpp b/Source/src/lockless_types.cpp similarity index 93% rename from Source/src/LocklessTypes.cpp rename to Source/src/lockless_types.cpp index 90db56dc2..0f109ff12 100644 --- a/Source/src/LocklessTypes.cpp +++ b/Source/src/lockless_types.cpp @@ -13,7 +13,7 @@ * license found in the license.txt file in the root directory of this source tree. */ -#include "mafianet/LocklessTypes.h" +#include "mafianet/lockless_types.h" using namespace MafiaNet; diff --git a/Source/src/LogCommandParser.cpp b/Source/src/log_command_parser.cpp similarity index 93% rename from Source/src/LogCommandParser.cpp rename to Source/src/log_command_parser.cpp index cc7194b93..b2bea50f6 100644 --- a/Source/src/LogCommandParser.cpp +++ b/Source/src/log_command_parser.cpp @@ -13,11 +13,11 @@ * license found in the license.txt file in the root directory of this source tree. */ -#include "mafianet/NativeFeatureIncludes.h" +#include "mafianet/native_feature_includes.h" #if _RAKNET_SUPPORT_LogCommandParser==1 -#include "mafianet/LogCommandParser.h" -#include "mafianet/TransportInterface.h" +#include "mafianet/log_command_parser.h" +#include "mafianet/transport_interface.h" #include @@ -25,9 +25,9 @@ #include #include -#include "mafianet/LinuxStrings.h" -#include "mafianet/LinuxAdapter.h" -#include "mafianet/OsxAdapter.h" +#include "mafianet/linux_strings.h" +#include "mafianet/linux_adapter.h" +#include "mafianet/osx_adapter.h" using namespace MafiaNet; diff --git a/Source/src/RakMemoryOverride.cpp b/Source/src/memory_override.cpp similarity index 95% rename from Source/src/RakMemoryOverride.cpp rename to Source/src/memory_override.cpp index 2c199dcfe..c183c78b6 100644 --- a/Source/src/RakMemoryOverride.cpp +++ b/Source/src/memory_override.cpp @@ -13,8 +13,8 @@ * license found in the license.txt file in the root directory of this source tree. */ -#include "mafianet/MemoryOverride.h" -#include "mafianet/Assert.h" +#include "mafianet/memory_override.h" +#include "mafianet/assert.h" #include #ifdef _RAKNET_SUPPORT_DL_MALLOC diff --git a/Source/src/MessageFilter.cpp b/Source/src/message_filter.cpp similarity index 94% rename from Source/src/MessageFilter.cpp rename to Source/src/message_filter.cpp index eba9a7708..38dcec14a 100644 --- a/Source/src/MessageFilter.cpp +++ b/Source/src/message_filter.cpp @@ -13,17 +13,17 @@ * license found in the license.txt file in the root directory of this source tree. */ -#include "mafianet/NativeFeatureIncludes.h" +#include "mafianet/native_feature_includes.h" #if _RAKNET_SUPPORT_MessageFilter==1 -#include "mafianet/MessageFilter.h" -#include "mafianet/Assert.h" -#include "mafianet/GetTime.h" -#include "mafianet/MessageIdentifiers.h" -#include "mafianet/Assert.h" -#include "mafianet/PeerInterface.h" -#include "mafianet/PacketizedTCP.h" -#include "mafianet/BitStream.h" +#include "mafianet/message_filter.h" +#include "mafianet/assert.h" +#include "mafianet/get_time.h" +#include "mafianet/message_identifiers.h" +#include "mafianet/assert.h" +#include "mafianet/peer_interface.h" +#include "mafianet/packetized_tcp.h" +#include "mafianet/bit_stream.h" using namespace MafiaNet; diff --git a/Source/src/MmsgBatch.cpp b/Source/src/mmsg_batch.cpp similarity index 97% rename from Source/src/MmsgBatch.cpp rename to Source/src/mmsg_batch.cpp index 4201f3599..da9f84be5 100644 --- a/Source/src/MmsgBatch.cpp +++ b/Source/src/mmsg_batch.cpp @@ -5,7 +5,7 @@ * license.txt file in the root directory of this source tree. */ -#include "mafianet/MmsgBatch.h" +#include "mafianet/mmsg_batch.h" #include @@ -31,7 +31,7 @@ void MarkMmsgUnavailable(void) } // One buffer block per thread that actually batches -- see the declaration in -// MmsgBatch.h for why these live here rather than inline in the header. +// mmsg_batch.h for why these live here rather than inline in the header. char *RNS2SendBatch::Slot(unsigned i) { struct Block diff --git a/Source/src/MtuBlackHole.cpp b/Source/src/mtu_black_hole.cpp similarity index 93% rename from Source/src/MtuBlackHole.cpp rename to Source/src/mtu_black_hole.cpp index 68b0365fa..2aae1360f 100644 --- a/Source/src/MtuBlackHole.cpp +++ b/Source/src/mtu_black_hole.cpp @@ -5,9 +5,9 @@ * license.txt file in the root directory of this source tree. */ -#include "mafianet/MtuBlackHole.h" +#include "mafianet/mtu_black_hole.h" -#include "mafianet/MTUSize.h" +#include "mafianet/mtu_size.h" namespace MafiaNet { diff --git a/Source/src/NatPunchthroughClient.cpp b/Source/src/nat_punchthrough_client.cpp similarity index 96% rename from Source/src/NatPunchthroughClient.cpp rename to Source/src/nat_punchthrough_client.cpp index 79bf3e597..ec9ab4f68 100644 --- a/Source/src/NatPunchthroughClient.cpp +++ b/Source/src/nat_punchthrough_client.cpp @@ -13,16 +13,16 @@ * license found in the license.txt file in the root directory of this source tree. */ -#include "mafianet/NativeFeatureIncludes.h" +#include "mafianet/native_feature_includes.h" #if _RAKNET_SUPPORT_NatPunchthroughClient==1 -#include "mafianet/NatPunchthroughClient.h" -#include "mafianet/BitStream.h" -#include "mafianet/MessageIdentifiers.h" -#include "mafianet/PeerInterface.h" -#include "mafianet/GetTime.h" -#include "mafianet/PacketLogger.h" -#include "mafianet/Itoa.h" +#include "mafianet/nat_punchthrough_client.h" +#include "mafianet/bit_stream.h" +#include "mafianet/message_identifiers.h" +#include "mafianet/peer_interface.h" +#include "mafianet/get_time.h" +#include "mafianet/packet_logger.h" +#include "mafianet/itoa.h" using namespace MafiaNet; diff --git a/Source/src/NatPunchthroughServer.cpp b/Source/src/nat_punchthrough_server.cpp similarity index 95% rename from Source/src/NatPunchthroughServer.cpp rename to Source/src/nat_punchthrough_server.cpp index 1cec6964c..2f3f6527d 100644 --- a/Source/src/NatPunchthroughServer.cpp +++ b/Source/src/nat_punchthrough_server.cpp @@ -13,19 +13,19 @@ * license found in the license.txt file in the root directory of this source tree. */ -#include "mafianet/NativeFeatureIncludes.h" +#include "mafianet/native_feature_includes.h" #if _RAKNET_SUPPORT_NatPunchthroughServer==1 -#include "mafianet/NatPunchthroughServer.h" -#include "mafianet/SocketLayer.h" -#include "mafianet/BitStream.h" -#include "mafianet/MessageIdentifiers.h" -#include "mafianet/PeerInterface.h" -#include "mafianet/MTUSize.h" -#include "mafianet/GetTime.h" -#include "mafianet/PacketLogger.h" -#include "mafianet/LinuxAdapter.h" -#include "mafianet/OsxAdapter.h" +#include "mafianet/nat_punchthrough_server.h" +#include "mafianet/socket_layer.h" +#include "mafianet/bit_stream.h" +#include "mafianet/message_identifiers.h" +#include "mafianet/peer_interface.h" +#include "mafianet/mtu_size.h" +#include "mafianet/get_time.h" +#include "mafianet/packet_logger.h" +#include "mafianet/linux_adapter.h" +#include "mafianet/osx_adapter.h" using namespace MafiaNet; diff --git a/Source/src/NatTypeDetectionClient.cpp b/Source/src/nat_type_detection_client.cpp similarity index 92% rename from Source/src/NatTypeDetectionClient.cpp rename to Source/src/nat_type_detection_client.cpp index 6967612c6..977dd068b 100644 --- a/Source/src/NatTypeDetectionClient.cpp +++ b/Source/src/nat_type_detection_client.cpp @@ -13,18 +13,18 @@ * license found in the license.txt file in the root directory of this source tree. */ -#include "mafianet/NativeFeatureIncludes.h" +#include "mafianet/native_feature_includes.h" #if _RAKNET_SUPPORT_NatTypeDetectionClient==1 -#include "mafianet/NatTypeDetectionClient.h" -#include "mafianet/SmartPtr.h" -#include "mafianet/BitStream.h" -#include "mafianet/SocketIncludes.h" -#include "mafianet/String.h" -#include "mafianet/PeerInterface.h" -#include "mafianet/MessageIdentifiers.h" -#include "mafianet/SocketLayer.h" -#include "mafianet/SocketDefines.h" +#include "mafianet/nat_type_detection_client.h" +#include "mafianet/smart_ptr.h" +#include "mafianet/bit_stream.h" +#include "mafianet/socket_includes.h" +#include "mafianet/string.h" +#include "mafianet/peer_interface.h" +#include "mafianet/message_identifiers.h" +#include "mafianet/socket_layer.h" +#include "mafianet/socket_defines.h" using namespace MafiaNet; diff --git a/Source/src/NatTypeDetectionCommon.cpp b/Source/src/nat_type_detection_common.cpp similarity index 93% rename from Source/src/NatTypeDetectionCommon.cpp rename to Source/src/nat_type_detection_common.cpp index f666fc891..914c73e5d 100644 --- a/Source/src/NatTypeDetectionCommon.cpp +++ b/Source/src/nat_type_detection_common.cpp @@ -13,13 +13,13 @@ * license found in the license.txt file in the root directory of this source tree. */ -#include "mafianet/NatTypeDetectionCommon.h" +#include "mafianet/nat_type_detection_common.h" #if _RAKNET_SUPPORT_NatTypeDetectionServer==1 || _RAKNET_SUPPORT_NatTypeDetectionClient==1 -#include "mafianet/SocketLayer.h" -#include "mafianet/SocketIncludes.h" -#include "mafianet/SocketDefines.h" +#include "mafianet/socket_layer.h" +#include "mafianet/socket_includes.h" +#include "mafianet/socket_defines.h" using namespace MafiaNet; diff --git a/Source/src/NatTypeDetectionServer.cpp b/Source/src/nat_type_detection_server.cpp similarity index 90% rename from Source/src/NatTypeDetectionServer.cpp rename to Source/src/nat_type_detection_server.cpp index 6638b4d53..448a8570b 100644 --- a/Source/src/NatTypeDetectionServer.cpp +++ b/Source/src/nat_type_detection_server.cpp @@ -13,20 +13,20 @@ * license found in the license.txt file in the root directory of this source tree. */ -#include "mafianet/NativeFeatureIncludes.h" +#include "mafianet/native_feature_includes.h" #if _RAKNET_SUPPORT_NatTypeDetectionServer==1 -#include "mafianet/NatTypeDetectionServer.h" -#include "mafianet/SocketLayer.h" -#include "mafianet/SmartPtr.h" -#include "mafianet/SocketIncludes.h" -#include "mafianet/PeerInterface.h" -#include "mafianet/MessageIdentifiers.h" -#include "mafianet/GetTime.h" -#include "mafianet/BitStream.h" -#include "mafianet/SocketDefines.h" -#include "mafianet/LinuxAdapter.h" -#include "mafianet/OsxAdapter.h" +#include "mafianet/nat_type_detection_server.h" +#include "mafianet/socket_layer.h" +#include "mafianet/smart_ptr.h" +#include "mafianet/socket_includes.h" +#include "mafianet/peer_interface.h" +#include "mafianet/message_identifiers.h" +#include "mafianet/get_time.h" +#include "mafianet/bit_stream.h" +#include "mafianet/socket_defines.h" +#include "mafianet/linux_adapter.h" +#include "mafianet/osx_adapter.h" // #define NTDS_VERBOSE @@ -163,12 +163,12 @@ void NatTypeDetectionServer::Update(void) } else { - // RakAssert("j==0 in Update when looking up GUID in NatTypeDetectionServer.cpp. Either a bug or a late resend" && 0); + // RakAssert("j==0 in Update when looking up GUID in nat_type_detection_server.cpp. Either a bug or a late resend" && 0); } } else { - // RakAssert("Didn't read GUID in Update in NatTypeDetectionServer.cpp. Message format error" && 0); + // RakAssert("Didn't read GUID in Update in nat_type_detection_server.cpp. Message format error" && 0); } } @@ -229,12 +229,12 @@ void NatTypeDetectionServer::Update(void) } else { - // RakAssert("i==0 in Update when looking up GUID in NatTypeDetectionServer.cpp. Either a bug or a late resend" && 0); + // RakAssert("i==0 in Update when looking up GUID in nat_type_detection_server.cpp. Either a bug or a late resend" && 0); } } else { - // RakAssert("Didn't read GUID in Update in NatTypeDetectionServer.cpp. Message format error" && 0); + // RakAssert("Didn't read GUID in Update in nat_type_detection_server.cpp. Message format error" && 0); } len=NatTypeRecvFrom(data, s3p4, senderAddr); diff --git a/Source/src/NetworkIDManager.cpp b/Source/src/network_id_manager.cpp similarity index 90% rename from Source/src/NetworkIDManager.cpp rename to Source/src/network_id_manager.cpp index 645535d7a..c9ae900a0 100644 --- a/Source/src/NetworkIDManager.cpp +++ b/Source/src/network_id_manager.cpp @@ -17,13 +17,13 @@ /// -#include "mafianet/NetworkIDManager.h" -#include "mafianet/NetworkIDObject.h" -#include "mafianet/Assert.h" -#include "mafianet/GetTime.h" -#include "mafianet/Sleep.h" -#include "mafianet/SuperFastHash.h" -#include "mafianet/PeerInterface.h" +#include "mafianet/network_id_manager.h" +#include "mafianet/network_id_object.h" +#include "mafianet/assert.h" +#include "mafianet/get_time.h" +#include "mafianet/sleep.h" +#include "mafianet/super_fast_hash.h" +#include "mafianet/peer_interface.h" using namespace MafiaNet; diff --git a/Source/src/NetworkIDObject.cpp b/Source/src/network_id_object.cpp similarity index 89% rename from Source/src/NetworkIDObject.cpp rename to Source/src/network_id_object.cpp index cd97d7a31..9cb6ec6ae 100644 --- a/Source/src/NetworkIDObject.cpp +++ b/Source/src/network_id_object.cpp @@ -17,10 +17,10 @@ /// -#include "mafianet/NetworkIDObject.h" -#include "mafianet/NetworkIDManager.h" -#include "mafianet/Assert.h" -#include "mafianet/Alloca.h" +#include "mafianet/network_id_object.h" +#include "mafianet/network_id_manager.h" +#include "mafianet/assert.h" +#include "mafianet/alloca.h" using namespace MafiaNet; diff --git a/Source/src/OsxAdapter.cpp b/Source/src/osx_adapter.cpp similarity index 99% rename from Source/src/OsxAdapter.cpp rename to Source/src/osx_adapter.cpp index ebdc79738..ad52e429d 100644 --- a/Source/src/OsxAdapter.cpp +++ b/Source/src/osx_adapter.cpp @@ -9,7 +9,7 @@ */ #ifdef __APPLE__ -#include "mafianet/OsxAdapter.h" +#include "mafianet/osx_adapter.h" #include // for std::max, std::min #include // for errno diff --git a/Source/src/PacketConsoleLogger.cpp b/Source/src/packet_console_logger.cpp similarity index 86% rename from Source/src/PacketConsoleLogger.cpp rename to Source/src/packet_console_logger.cpp index 88f2599f0..959f8bf97 100644 --- a/Source/src/PacketConsoleLogger.cpp +++ b/Source/src/packet_console_logger.cpp @@ -13,10 +13,10 @@ * license found in the license.txt file in the root directory of this source tree. */ -#include "mafianet/NativeFeatureIncludes.h" +#include "mafianet/native_feature_includes.h" #if _RAKNET_SUPPORT_LogCommandParser==1 && _RAKNET_SUPPORT_PacketLogger==1 -#include "mafianet/PacketConsoleLogger.h" -#include "mafianet/LogCommandParser.h" +#include "mafianet/packet_console_logger.h" +#include "mafianet/log_command_parser.h" #include using namespace MafiaNet; diff --git a/Source/src/PacketFileLogger.cpp b/Source/src/packet_file_logger.cpp similarity index 83% rename from Source/src/PacketFileLogger.cpp rename to Source/src/packet_file_logger.cpp index e5545be58..918d581a6 100644 --- a/Source/src/PacketFileLogger.cpp +++ b/Source/src/packet_file_logger.cpp @@ -13,14 +13,14 @@ * license found in the license.txt file in the root directory of this source tree. */ -#include "mafianet/NativeFeatureIncludes.h" +#include "mafianet/native_feature_includes.h" #if _RAKNET_SUPPORT_PacketLogger==1 -#include "mafianet/PacketFileLogger.h" -#include "mafianet/GetTime.h" -#include "mafianet/LinuxAdapter.h" -#include "mafianet/OsxAdapter.h" -#include "mafianet/MemoryOverride.h" +#include "mafianet/packet_file_logger.h" +#include "mafianet/get_time.h" +#include "mafianet/linux_adapter.h" +#include "mafianet/osx_adapter.h" +#include "mafianet/memory_override.h" using namespace MafiaNet; diff --git a/Source/src/PacketLogger.cpp b/Source/src/packet_logger.cpp similarity index 94% rename from Source/src/PacketLogger.cpp rename to Source/src/packet_logger.cpp index bbf0145d9..97bd89672 100644 --- a/Source/src/PacketLogger.cpp +++ b/Source/src/packet_logger.cpp @@ -13,26 +13,26 @@ * license found in the license.txt file in the root directory of this source tree. */ -#include "mafianet/NativeFeatureIncludes.h" +#include "mafianet/native_feature_includes.h" #if _RAKNET_SUPPORT_PacketLogger==1 -#include "mafianet/PacketLogger.h" -#include "mafianet/BitStream.h" -#include "mafianet/DS_List.h" -#include "mafianet/InternalPacket.h" -#include "mafianet/PeerInterface.h" -#include "mafianet/MessageIdentifiers.h" -#include "mafianet/StringCompressor.h" -#include "mafianet/GetTime.h" +#include "mafianet/packet_logger.h" +#include "mafianet/bit_stream.h" +#include "mafianet/ds_list.h" +#include "mafianet/internal_packet.h" +#include "mafianet/peer_interface.h" +#include "mafianet/message_identifiers.h" +#include "mafianet/string_compressor.h" +#include "mafianet/get_time.h" #include #include #include -#include "mafianet/Itoa.h" +#include "mafianet/itoa.h" #include -#include "mafianet/SocketIncludes.h" -#include "mafianet/GetTimeOfDay.h" -#include "mafianet/LinuxAdapter.h" -#include "mafianet/OsxAdapter.h" +#include "mafianet/socket_includes.h" +#include "mafianet/get_time_of_day.h" +#include "mafianet/linux_adapter.h" +#include "mafianet/osx_adapter.h" using namespace MafiaNet; diff --git a/Source/src/PacketOutputWindowLogger.cpp b/Source/src/packet_output_window_logger.cpp similarity index 82% rename from Source/src/PacketOutputWindowLogger.cpp rename to Source/src/packet_output_window_logger.cpp index 2025dad13..79d024ac6 100644 --- a/Source/src/PacketOutputWindowLogger.cpp +++ b/Source/src/packet_output_window_logger.cpp @@ -13,17 +13,17 @@ * license found in the license.txt file in the root directory of this source tree. */ -#include "mafianet/NativeFeatureIncludes.h" +#include "mafianet/native_feature_includes.h" #if _RAKNET_SUPPORT_PacketLogger==1 #if defined(UNICODE) -#include "mafianet/WString.h" +#include "mafianet/wstring.h" #endif -#include "mafianet/PacketOutputWindowLogger.h" -#include "mafianet/String.h" +#include "mafianet/packet_output_window_logger.h" +#include "mafianet/string.h" #if defined(_WIN32) -#include "mafianet/WindowsIncludes.h" +#include "mafianet/windows_includes.h" #endif using namespace MafiaNet; diff --git a/Source/src/PacketizedTCP.cpp b/Source/src/packetized_tcp.cpp similarity index 94% rename from Source/src/PacketizedTCP.cpp rename to Source/src/packetized_tcp.cpp index 474c88766..a1ba1bcf7 100644 --- a/Source/src/PacketizedTCP.cpp +++ b/Source/src/packetized_tcp.cpp @@ -13,15 +13,15 @@ * license found in the license.txt file in the root directory of this source tree. */ -#include "mafianet/NativeFeatureIncludes.h" +#include "mafianet/native_feature_includes.h" #if _RAKNET_SUPPORT_PacketizedTCP==1 && _RAKNET_SUPPORT_TCPInterface==1 #include // used for std::min -#include "mafianet/PacketizedTCP.h" -#include "mafianet/NativeTypes.h" -#include "mafianet/BitStream.h" -#include "mafianet/MessageIdentifiers.h" -#include "mafianet/Alloca.h" +#include "mafianet/packetized_tcp.h" +#include "mafianet/native_types.h" +#include "mafianet/bit_stream.h" +#include "mafianet/message_identifiers.h" +#include "mafianet/alloca.h" using namespace MafiaNet; diff --git a/Source/src/RakPeer.cpp b/Source/src/peer.cpp similarity index 97% rename from Source/src/RakPeer.cpp rename to Source/src/peer.cpp index 6ca5a8ee0..68456a88a 100644 --- a/Source/src/RakPeer.cpp +++ b/Source/src/peer.cpp @@ -20,10 +20,10 @@ #define CAT_NEUTER_EXPORT /* Neuter dllimport for libcat */ -#include "mafianet/Defines.h" -#include "mafianet/Peer.h" -#include "mafianet/SessionAdmission.h" -#include "mafianet/Types.h" +#include "mafianet/defines.h" +#include "mafianet/peer.h" +#include "mafianet/session_admission.h" +#include "mafianet/types.h" #ifdef _WIN32 @@ -40,33 +40,33 @@ #include #include // toupper #include -#include "mafianet/GetTime.h" +#include "mafianet/get_time.h" #include #include -#include "mafianet/MessageIdentifiers.h" -#include "mafianet/MtuBlackHole.h" -#include "mafianet/DS_HuffmanEncodingTree.h" -#include "mafianet/Rand.h" -#include "mafianet/PluginInterface2.h" -#include "mafianet/StringCompressor.h" -#include "mafianet/StringTable.h" -#include "mafianet/NetworkIDObject.h" -#include "mafianet/Types.h" -#include "mafianet/DR_SHA1.h" -#include "mafianet/Sleep.h" -#include "mafianet/Assert.h" -#include "mafianet/Version.h" -#include "mafianet/NetworkIDManager.h" -#include "mafianet/GetTimeOfDay.h" -#include "mafianet/SignaledEvent.h" -#include "mafianet/SuperFastHash.h" -#include "mafianet/Alloca.h" -#include "mafianet/WSAStartupSingleton.h" -#include "mafianet/LinuxAdapter.h" -#include "mafianet/OsxAdapter.h" +#include "mafianet/message_identifiers.h" +#include "mafianet/mtu_black_hole.h" +#include "mafianet/ds_huffman_encoding_tree.h" +#include "mafianet/rand.h" +#include "mafianet/plugin_interface2.h" +#include "mafianet/string_compressor.h" +#include "mafianet/string_table.h" +#include "mafianet/network_id_object.h" +#include "mafianet/types.h" +#include "mafianet/dr_sha1.h" +#include "mafianet/sleep.h" +#include "mafianet/assert.h" +#include "mafianet/version.h" +#include "mafianet/network_id_manager.h" +#include "mafianet/get_time_of_day.h" +#include "mafianet/signaled_event.h" +#include "mafianet/super_fast_hash.h" +#include "mafianet/alloca.h" +#include "mafianet/wsa_startup_singleton.h" +#include "mafianet/linux_adapter.h" +#include "mafianet/osx_adapter.h" #ifdef USE_THREADED_SEND -#include "mafianet/SendToThread.h" +#include "mafianet/send_to_thread.h" #endif #ifdef CAT_AUDIT @@ -119,7 +119,7 @@ extern void Console2GetIPAndPort(unsigned int, char *, unsigned short *, unsigne // from MAXIMUM_MTU_SIZE straight to 1200 that used to sit here meant a peer one // byte over the top rung gave up ~20% of its payload capacity to find that out. // -// The ladder itself lives in MtuBlackHole.h: the in-session black-hole +// The ladder itself lives in mtu_black_hole.h: the in-session black-hole // step-down (ReliabilityLayer) walks the same rungs this handshake probes. static const int NUM_MTU_SIZES=MafiaNet::MTU_LADDER_SIZE; static const int *const mtuSizes=MafiaNet::MTU_LADDER; @@ -1396,8 +1396,8 @@ uint32_t RakPeer::Send( const MafiaNet::BitStream * bitStream, MafiaNet::Priorit // \param[in] data An array of pointers to blocks of data // \param[in] lengths An array of integers indicating the length of each block of data // \param[in] numParameters Length of the arrays data and lengths -// \param[in] priority What priority level to send on. See PacketPriority.h -// \param[in] reliability How reliability to send this data. See PacketPriority.h +// \param[in] priority What priority level to send on. See packet_priority.h +// \param[in] reliability How reliability to send this data. See packet_priority.h // \param[in] orderingChannel When using ordered or sequenced messages, what channel to order these on. Messages are only ordered relative to other messages on the same stream // \param[in] systemIdentifier Who to send this packet to, or in the case of broadcasting who not to send it to. Pass either a SystemAddress structure or a RakNetGUID structure. Use UNASSIGNED_SYSTEM_ADDRESS or to specify none // \param[in] broadcast True to send this packet to all connected systems. If true, then systemAddress specifies who not to send the packet to. diff --git a/Source/src/PeerHandle.cpp b/Source/src/peer_handle.cpp similarity index 96% rename from Source/src/PeerHandle.cpp rename to Source/src/peer_handle.cpp index a4acd2e6a..ea9212a7c 100644 --- a/Source/src/PeerHandle.cpp +++ b/Source/src/peer_handle.cpp @@ -5,11 +5,11 @@ * license.txt file in the root directory of this source tree. */ -#include "mafianet/PeerHandle.h" +#include "mafianet/peer_handle.h" #include -#include "mafianet/MessageIdentifiers.h" // ID_TIMESTAMP +#include "mafianet/message_identifiers.h" // ID_TIMESTAMP namespace MafiaNet { diff --git a/Source/src/PluginInterface2.cpp b/Source/src/plugin_interface2.cpp similarity index 94% rename from Source/src/PluginInterface2.cpp rename to Source/src/plugin_interface2.cpp index 70a990596..97acdf314 100644 --- a/Source/src/PluginInterface2.cpp +++ b/Source/src/plugin_interface2.cpp @@ -14,10 +14,10 @@ */ -#include "mafianet/PluginInterface2.h" -#include "mafianet/PacketizedTCP.h" -#include "mafianet/PeerInterface.h" -#include "mafianet/BitStream.h" +#include "mafianet/plugin_interface2.h" +#include "mafianet/packetized_tcp.h" +#include "mafianet/peer_interface.h" +#include "mafianet/bit_stream.h" using namespace MafiaNet; diff --git a/Source/src/PointGridSectorizer.cpp b/Source/src/point_grid_sectorizer.cpp similarity index 99% rename from Source/src/PointGridSectorizer.cpp rename to Source/src/point_grid_sectorizer.cpp index ce618b453..658b66266 100644 --- a/Source/src/PointGridSectorizer.cpp +++ b/Source/src/point_grid_sectorizer.cpp @@ -5,7 +5,7 @@ * license.txt file in the root directory of this source tree. */ -#include "mafianet/PointGridSectorizer.h" +#include "mafianet/point_grid_sectorizer.h" #include #include diff --git a/Source/src/Rackspace.cpp b/Source/src/rackspace.cpp similarity index 96% rename from Source/src/Rackspace.cpp rename to Source/src/rackspace.cpp index 208589ac0..15d86f989 100644 --- a/Source/src/Rackspace.cpp +++ b/Source/src/rackspace.cpp @@ -13,12 +13,12 @@ * license found in the license.txt file in the root directory of this source tree. */ -#include "mafianet/NativeFeatureIncludes.h" +#include "mafianet/native_feature_includes.h" #if _RAKNET_SUPPORT_Rackspace==1 && _RAKNET_SUPPORT_TCPInterface==1 -#include "mafianet/Rackspace.h" -#include "mafianet/String.h" -#include "mafianet/TCPInterface.h" +#include "mafianet/rackspace.h" +#include "mafianet/string.h" +#include "mafianet/tcp_interface.h" using namespace MafiaNet; diff --git a/Source/src/Rand.cpp b/Source/src/rand.cpp similarity index 96% rename from Source/src/Rand.cpp rename to Source/src/rand.cpp index da4b4ffe5..b4a3d8383 100644 --- a/Source/src/Rand.cpp +++ b/Source/src/rand.cpp @@ -49,7 +49,7 @@ #include #include #include -#include "mafianet/Rand.h" +#include "mafianet/rand.h" // // uint32 must be an unsigned integer type capable of holding at least 32 diff --git a/Source/src/RandSync.cpp b/Source/src/rand_sync.cpp similarity index 95% rename from Source/src/RandSync.cpp rename to Source/src/rand_sync.cpp index 40478a862..cd5decdf9 100644 --- a/Source/src/RandSync.cpp +++ b/Source/src/rand_sync.cpp @@ -13,8 +13,8 @@ * license found in the license.txt file in the root directory of this source tree. */ -#include "mafianet/RandSync.h" -#include "mafianet/BitStream.h" +#include "mafianet/rand_sync.h" +#include "mafianet/bit_stream.h" #include #include diff --git a/Source/src/ReadyEvent.cpp b/Source/src/ready_event.cpp similarity index 95% rename from Source/src/ReadyEvent.cpp rename to Source/src/ready_event.cpp index f900852a9..65eedba12 100644 --- a/Source/src/ReadyEvent.cpp +++ b/Source/src/ready_event.cpp @@ -13,14 +13,14 @@ * license found in the license.txt file in the root directory of this source tree. */ -#include "mafianet/NativeFeatureIncludes.h" +#include "mafianet/native_feature_includes.h" #if _RAKNET_SUPPORT_ReadyEvent==1 -#include "mafianet/ReadyEvent.h" -#include "mafianet/PeerInterface.h" -#include "mafianet/BitStream.h" -#include "mafianet/MessageIdentifiers.h" -#include "mafianet/Assert.h" +#include "mafianet/ready_event.h" +#include "mafianet/peer_interface.h" +#include "mafianet/bit_stream.h" +#include "mafianet/message_identifiers.h" +#include "mafianet/assert.h" using namespace MafiaNet; diff --git a/Source/src/RelayPlugin.cpp b/Source/src/relay_plugin.cpp similarity index 95% rename from Source/src/RelayPlugin.cpp rename to Source/src/relay_plugin.cpp index db1edd61f..0a9be4ed4 100644 --- a/Source/src/RelayPlugin.cpp +++ b/Source/src/relay_plugin.cpp @@ -13,13 +13,13 @@ * license found in the license.txt file in the root directory of this source tree. */ -#include "mafianet/NativeFeatureIncludes.h" +#include "mafianet/native_feature_includes.h" #if _RAKNET_SUPPORT_RelayPlugin==1 -#include "mafianet/RelayPlugin.h" -#include "mafianet/MessageIdentifiers.h" -#include "mafianet/PeerInterface.h" -#include "mafianet/BitStream.h" +#include "mafianet/relay_plugin.h" +#include "mafianet/message_identifiers.h" +#include "mafianet/peer_interface.h" +#include "mafianet/bit_stream.h" using namespace MafiaNet; diff --git a/Source/src/ReliabilityLayer.cpp b/Source/src/reliability_layer.cpp similarity index 97% rename from Source/src/ReliabilityLayer.cpp rename to Source/src/reliability_layer.cpp index 8fa2e50b3..79343711e 100644 --- a/Source/src/ReliabilityLayer.cpp +++ b/Source/src/reliability_layer.cpp @@ -18,21 +18,21 @@ -#include "mafianet/ReliabilityLayer.h" -#include "mafianet/MmsgBatch.h" -#include "mafianet/MtuBlackHole.h" -#include "mafianet/GetTime.h" -#include "mafianet/SocketLayer.h" -#include "mafianet/PluginInterface2.h" -#include "mafianet/Assert.h" -#include "mafianet/Rand.h" -#include "mafianet/MessageIdentifiers.h" +#include "mafianet/reliability_layer.h" +#include "mafianet/mmsg_batch.h" +#include "mafianet/mtu_black_hole.h" +#include "mafianet/get_time.h" +#include "mafianet/socket_layer.h" +#include "mafianet/plugin_interface2.h" +#include "mafianet/assert.h" +#include "mafianet/rand.h" +#include "mafianet/message_identifiers.h" #ifdef USE_THREADED_SEND -#include "mafianet/SendToThread.h" +#include "mafianet/send_to_thread.h" #endif #include -#include "mafianet/LinuxAdapter.h" -#include "mafianet/OsxAdapter.h" +#include "mafianet/linux_adapter.h" +#include "mafianet/osx_adapter.h" using namespace MafiaNet; @@ -230,7 +230,7 @@ struct DatagramHeaderFormat #ifdef _WIN32 //#define _DEBUG_LOGGER #ifdef _DEBUG_LOGGER -#include "mafianet/WindowsIncludes.h" +#include "mafianet/windows_includes.h" #endif #endif @@ -1070,7 +1070,7 @@ bool ReliabilityLayer::HandleSocketReceiveFromConnectedPlayer( } } else { // holeCount>=receivedPackets.Size() if (holeCount > (DatagramSequenceNumberType)1000000) { - RakAssert("Hole count too high. See ReliabilityLayer.h" && 0); + RakAssert("Hole count too high. See reliability_layer.h" && 0); for (unsigned int messageHandlerIndex = 0; messageHandlerIndex < messageHandlerList.Size(); messageHandlerIndex++) { messageHandlerList[messageHandlerIndex]->OnReliabilityLayerNotification("holeCount > 1000000", BYTES_TO_BITS(length), systemAddress, true); @@ -2914,7 +2914,7 @@ InternalPacket* ReliabilityLayer::CreateInternalPacketFromBitStream(MafiaNet::Bi if ( bitStreamSucceeded == false ) { - // If this hits, most likely the variable buff is too small in RunUpdateCycle in RakPeer.cpp + // If this hits, most likely the variable buff is too small in RunUpdateCycle in peer.cpp RakAssert("Couldn't read all the data" && 0); FreeInternalPacketData(internalPacket, _FILE_AND_LINE_ ); @@ -3159,7 +3159,7 @@ void ReliabilityLayer::SplitPacket( InternalPacket *internalPacket ) } //------------------------------------------------------------------------------------------------------- -// In-session path-MTU black-hole recovery. Documented in ReliabilityLayer.h. +// In-session path-MTU black-hole recovery. Documented in reliability_layer.h. //------------------------------------------------------------------------------------------------------- void ReliabilityLayer::StepDownMtuAfterBlackHole(void) { diff --git a/Source/src/ReplicaManager3.cpp b/Source/src/replica_manager3.cpp similarity index 97% rename from Source/src/ReplicaManager3.cpp rename to Source/src/replica_manager3.cpp index 9c472c4ce..fe72deaa3 100644 --- a/Source/src/ReplicaManager3.cpp +++ b/Source/src/replica_manager3.cpp @@ -13,15 +13,15 @@ * license found in the license.txt file in the root directory of this source tree. */ -#include "mafianet/NativeFeatureIncludes.h" +#include "mafianet/native_feature_includes.h" #if _RAKNET_SUPPORT_ReplicaManager3==1 -#include "mafianet/ReplicaManager3.h" -#include "mafianet/VirtualWorldReplica3.h" -#include "mafianet/GetTime.h" -#include "mafianet/MessageIdentifiers.h" -#include "mafianet/PeerInterface.h" -#include "mafianet/NetworkIDManager.h" +#include "mafianet/replica_manager3.h" +#include "mafianet/virtual_world_replica3.h" +#include "mafianet/get_time.h" +#include "mafianet/message_identifiers.h" +#include "mafianet/peer_interface.h" +#include "mafianet/network_id_manager.h" using namespace MafiaNet; @@ -497,7 +497,7 @@ void ReplicaManager3::GetConnectionsInVirtualWorld(VirtualWorldId virtualWorld, // lightweight per-connection tag we filter that list by. We are not switching // RM3 worlds here -- we look up the RM3 world only to get its connections, // then keep the ones whose virtual world matches. (Most setups only ever use - // the auto-created RM3 world 0.) See VirtualWorld.h. + // the auto-created RM3 world 0.) See virtual_world.h. RakAssert(worldsArray[worldId]!=0 && "World not in use"); RM3World *world = worldsArray[worldId]; diff --git a/Source/src/Router2.cpp b/Source/src/router2.cpp similarity index 96% rename from Source/src/Router2.cpp rename to Source/src/router2.cpp index 877d452a7..ceac79ba9 100644 --- a/Source/src/Router2.cpp +++ b/Source/src/router2.cpp @@ -13,18 +13,18 @@ * license found in the license.txt file in the root directory of this source tree. */ -#include "mafianet/NativeFeatureIncludes.h" +#include "mafianet/native_feature_includes.h" #if _RAKNET_SUPPORT_Router2==1 && _RAKNET_SUPPORT_UDPForwarder==1 -#include "mafianet/Router2.h" -#include "mafianet/PeerInterface.h" -#include "mafianet/BitStream.h" -#include "mafianet/Time.h" -#include "mafianet/GetTime.h" -#include "mafianet/DS_OrderedList.h" -#include "mafianet/SocketLayer.h" -#include "mafianet/FormatString.h" -#include "mafianet/SocketDefines.h" +#include "mafianet/router2.h" +#include "mafianet/peer_interface.h" +#include "mafianet/bit_stream.h" +#include "mafianet/time.h" +#include "mafianet/get_time.h" +#include "mafianet/ds_ordered_list.h" +#include "mafianet/socket_layer.h" +#include "mafianet/format_string.h" +#include "mafianet/socket_defines.h" using namespace MafiaNet; diff --git a/Source/src/RPC4Plugin.cpp b/Source/src/rpc4_plugin.cpp similarity index 95% rename from Source/src/RPC4Plugin.cpp rename to Source/src/rpc4_plugin.cpp index 221174499..d521f8b37 100644 --- a/Source/src/RPC4Plugin.cpp +++ b/Source/src/rpc4_plugin.cpp @@ -13,19 +13,19 @@ * license found in the license.txt file in the root directory of this source tree. */ -#include "mafianet/NativeFeatureIncludes.h" +#include "mafianet/native_feature_includes.h" #if _RAKNET_SUPPORT_RPC4Plugin==1 -#include "mafianet/RPC4Plugin.h" -#include "mafianet/MessageIdentifiers.h" -#include "mafianet/PeerInterface.h" -#include "mafianet/PacketizedTCP.h" -#include "mafianet/Sleep.h" -#include "mafianet/Defines.h" -#include "mafianet/DS_Queue.h" -//#include "mafianet/GetTime.h" -#include "mafianet/LinuxAdapter.h" -#include "mafianet/OsxAdapter.h" +#include "mafianet/rpc4_plugin.h" +#include "mafianet/message_identifiers.h" +#include "mafianet/peer_interface.h" +#include "mafianet/packetized_tcp.h" +#include "mafianet/sleep.h" +#include "mafianet/defines.h" +#include "mafianet/ds_queue.h" +//#include "mafianet/get_time.h" +#include "mafianet/linux_adapter.h" +#include "mafianet/osx_adapter.h" using namespace MafiaNet; diff --git a/Source/src/SecureHandshake.cpp b/Source/src/secure_handshake.cpp similarity index 95% rename from Source/src/SecureHandshake.cpp rename to Source/src/secure_handshake.cpp index 54a04c816..dd64da695 100644 --- a/Source/src/SecureHandshake.cpp +++ b/Source/src/secure_handshake.cpp @@ -17,7 +17,7 @@ /// -#include "mafianet/NativeFeatureIncludes.h" +#include "mafianet/native_feature_includes.h" #if LIBCAT_SECURITY==1 diff --git a/Source/src/SendToThread.cpp b/Source/src/send_to_thread.cpp similarity index 88% rename from Source/src/SendToThread.cpp rename to Source/src/send_to_thread.cpp index 37033cf08..de4b055a2 100644 --- a/Source/src/SendToThread.cpp +++ b/Source/src/send_to_thread.cpp @@ -13,16 +13,16 @@ * license found in the license.txt file in the root directory of this source tree. */ -#include "mafianet/SendToThread.h" +#include "mafianet/send_to_thread.h" #ifdef USE_THREADED_SEND -#include "mafianet/Thread.h" -#include "mafianet/InternalPacket.h" -#include "mafianet/GetTime.h" +#include "mafianet/thread.h" +#include "mafianet/internal_packet.h" +#include "mafianet/get_time.h" #if USE_SLIDING_WINDOW_CONGESTION_CONTROL!=1 -#include "mafianet/CCRakNetUDT.h" +#include "mafianet/cc_udt.h" #else -#include "mafianet/CCRakNetSlidingWindow.h" +#include "mafianet/cc_sliding_window.h" #endif using namespace MafiaNet; diff --git a/Source/src/SignaledEvent.cpp b/Source/src/signaled_event.cpp similarity index 92% rename from Source/src/SignaledEvent.cpp rename to Source/src/signaled_event.cpp index e94f0cc3a..cac22065f 100644 --- a/Source/src/SignaledEvent.cpp +++ b/Source/src/signaled_event.cpp @@ -13,9 +13,9 @@ * license found in the license.txt file in the root directory of this source tree. */ -#include "mafianet/SignaledEvent.h" -#include "mafianet/Assert.h" -#include "mafianet/Sleep.h" +#include "mafianet/signaled_event.h" +#include "mafianet/assert.h" +#include "mafianet/sleep.h" #if defined(__GNUC__) #include diff --git a/Source/src/SimpleMutex.cpp b/Source/src/simple_mutex.cpp similarity index 91% rename from Source/src/SimpleMutex.cpp rename to Source/src/simple_mutex.cpp index 046fade0b..f14755fa1 100644 --- a/Source/src/SimpleMutex.cpp +++ b/Source/src/simple_mutex.cpp @@ -18,8 +18,8 @@ -#include "mafianet/SimpleMutex.h" -#include "mafianet/Assert.h" +#include "mafianet/simple_mutex.h" +#include "mafianet/assert.h" using namespace MafiaNet; diff --git a/Source/src/RakSleep.cpp b/Source/src/sleep.cpp similarity index 91% rename from Source/src/RakSleep.cpp rename to Source/src/sleep.cpp index 4f8f99cf8..32f8d18cd 100644 --- a/Source/src/RakSleep.cpp +++ b/Source/src/sleep.cpp @@ -14,7 +14,7 @@ */ #if defined(_WIN32) -#include "mafianet/WindowsIncludes.h" // Sleep +#include "mafianet/windows_includes.h" // Sleep @@ -30,7 +30,7 @@ pthread_mutex_t fakeMutex = PTHREAD_MUTEX_INITIALIZER; pthread_cond_t fakeCond = PTHREAD_COND_INITIALIZER; #endif -#include "mafianet/Sleep.h" +#include "mafianet/sleep.h" void RakSleep(unsigned int ms) { diff --git a/Source/src/RakNetSocket2.cpp b/Source/src/socket2.cpp similarity index 94% rename from Source/src/RakNetSocket2.cpp rename to Source/src/socket2.cpp index 294a2eb7c..1468c6134 100644 --- a/Source/src/RakNetSocket2.cpp +++ b/Source/src/socket2.cpp @@ -13,13 +13,13 @@ * license found in the license.txt file in the root directory of this source tree. */ -#include "mafianet/Socket2.h" -#include "mafianet/MmsgBatch.h" -#include "mafianet/MemoryOverride.h" -#include "mafianet/Assert.h" -#include "mafianet/Sleep.h" -#include "mafianet/SocketDefines.h" -#include "mafianet/GetTime.h" +#include "mafianet/socket2.h" +#include "mafianet/mmsg_batch.h" +#include "mafianet/memory_override.h" +#include "mafianet/assert.h" +#include "mafianet/sleep.h" +#include "mafianet/socket_defines.h" +#include "mafianet/get_time.h" #include #include // memcpy #include // EMSGSIZE, classified by RNS2_IsDatagramTooLargeError @@ -43,8 +43,8 @@ using namespace MafiaNet; #endif #define RAKNET_SOCKET_2_INLINE_FUNCTIONS -#include "RakNetSocket2_Windows_Linux.cpp" -#include "RakNetSocket2_Berkley.cpp" +#include "socket2_windows_linux.cpp" +#include "socket2_berkley.cpp" #undef RAKNET_SOCKET_2_INLINE_FUNCTIONS #ifndef INVALID_SOCKET @@ -285,7 +285,7 @@ void RNS2_Berkley::BlockOnStopRecvPollingThread(void) } const RNS2_BerkleyBindParameters *RNS2_Berkley::GetBindings(void) const {return &binding;} RNS2Socket RNS2_Berkley::GetSocket(void) const {return rns2Socket;} -// See RakNetSocket2_Berkley.cpp for WriteSharedIPV4, BindSharedIPV4And6 and other implementations +// See socket2_berkley.cpp for WriteSharedIPV4, BindSharedIPV4And6 and other implementations #if defined(_WIN32) RNS2_Windows::RNS2_Windows() {slo=0;} diff --git a/Source/src/RakNetSocket2_Berkley.cpp b/Source/src/socket2_berkley.cpp similarity index 96% rename from Source/src/RakNetSocket2_Berkley.cpp rename to Source/src/socket2_berkley.cpp index 06596ea13..0d75988dc 100644 --- a/Source/src/RakNetSocket2_Berkley.cpp +++ b/Source/src/socket2_berkley.cpp @@ -13,7 +13,7 @@ * license found in the license.txt file in the root directory of this source tree. */ -#include "mafianet/EmptyHeader.h" +#include "mafianet/empty_header.h" #ifdef RAKNET_SOCKET_2_INLINE_FUNCTIONS @@ -25,14 +25,14 @@ #ifdef _WIN32 #include // used for _tprintf() (via RAKNET_DEBUG_TPRINTF) #else -#include "mafianet/LinuxStrings.h" // used for _stricmp() +#include "mafianet/linux_strings.h" // used for _stricmp() #include // used for getaddrinfo() #include // used for getaddrinfo() #include // used for getaddrinfo() #endif -#include "mafianet/Itoa.h" -#include "mafianet/WSAStartupSingleton.h" +#include "mafianet/itoa.h" +#include "mafianet/wsa_startup_singleton.h" // Domain name resolution functions void DomainNameToIP_Berkley_IPV4And6( const char *domainName, char ip[65] ) diff --git a/Source/src/RakNetSocket2_Windows_Linux.cpp b/Source/src/socket2_windows_linux.cpp similarity index 96% rename from Source/src/RakNetSocket2_Windows_Linux.cpp rename to Source/src/socket2_windows_linux.cpp index e8262b90b..fc4d9cc9d 100644 --- a/Source/src/RakNetSocket2_Windows_Linux.cpp +++ b/Source/src/socket2_windows_linux.cpp @@ -13,7 +13,7 @@ * license found in the license.txt file in the root directory of this source tree. */ -#include "mafianet/EmptyHeader.h" +#include "mafianet/empty_header.h" #ifdef RAKNET_SOCKET_2_INLINE_FUNCTIONS diff --git a/Source/src/SocketLayer.cpp b/Source/src/socket_layer.cpp similarity index 93% rename from Source/src/SocketLayer.cpp rename to Source/src/socket_layer.cpp index 793c170a8..e4c089b60 100644 --- a/Source/src/SocketLayer.cpp +++ b/Source/src/socket_layer.cpp @@ -17,15 +17,15 @@ /// \brief SocketLayer class implementation /// -#include "mafianet/SocketLayer.h" -#include "mafianet/Assert.h" -#include "mafianet/Types.h" -#include "mafianet/Peer.h" -#include "mafianet/GetTime.h" -#include "mafianet/LinuxStrings.h" -#include "mafianet/SocketDefines.h" -#include "mafianet/LinuxAdapter.h" -#include "mafianet/OsxAdapter.h" +#include "mafianet/socket_layer.h" +#include "mafianet/assert.h" +#include "mafianet/types.h" +#include "mafianet/peer.h" +#include "mafianet/get_time.h" +#include "mafianet/linux_strings.h" +#include "mafianet/socket_defines.h" +#include "mafianet/linux_adapter.h" +#include "mafianet/osx_adapter.h" #if (defined(__GNUC__) || defined(__GCCXML__)) && !defined(__WIN32__) #include #endif @@ -41,17 +41,17 @@ using namespace MafiaNet; #if USE_SLIDING_WINDOW_CONGESTION_CONTROL!=1 -#include "mafianet/CCRakNetUDT.h" +#include "mafianet/cc_udt.h" #else -#include "mafianet/CCRakNetSlidingWindow.h" +#include "mafianet/cc_sliding_window.h" #endif //SocketLayerOverride *SocketLayer::slo=0; #ifdef _WIN32 -#include "mafianet/WSAStartupSingleton.h" -#include "mafianet/WindowsIncludes.h" +#include "mafianet/wsa_startup_singleton.h" +#include "mafianet/windows_includes.h" #else @@ -72,9 +72,9 @@ using namespace MafiaNet; #endif -#include "mafianet/Sleep.h" +#include "mafianet/sleep.h" #include -#include "mafianet/Itoa.h" +#include "mafianet/itoa.h" namespace MafiaNet { diff --git a/Source/src/RakNetStatistics.cpp b/Source/src/statistics.cpp similarity index 96% rename from Source/src/RakNetStatistics.cpp rename to Source/src/statistics.cpp index 11420a37d..22ca74927 100644 --- a/Source/src/RakNetStatistics.cpp +++ b/Source/src/statistics.cpp @@ -18,12 +18,12 @@ -#include "mafianet/Statistics.h" +#include "mafianet/statistics.h" #include // sprintf -#include "mafianet/GetTime.h" -#include "mafianet/String.h" -#include "mafianet/LinuxAdapter.h" -#include "mafianet/OsxAdapter.h" +#include "mafianet/get_time.h" +#include "mafianet/string.h" +#include "mafianet/linux_adapter.h" +#include "mafianet/osx_adapter.h" using namespace MafiaNet; diff --git a/Source/src/StatisticsHistory.cpp b/Source/src/statistics_history.cpp similarity index 96% rename from Source/src/StatisticsHistory.cpp rename to Source/src/statistics_history.cpp index eaa1beb0b..3ba358c6c 100644 --- a/Source/src/StatisticsHistory.cpp +++ b/Source/src/statistics_history.cpp @@ -13,13 +13,13 @@ * license found in the license.txt file in the root directory of this source tree. */ -#include "mafianet/NativeFeatureIncludes.h" +#include "mafianet/native_feature_includes.h" #if _RAKNET_SUPPORT_StatisticsHistory==1 -#include "mafianet/StatisticsHistory.h" -#include "mafianet/GetTime.h" -#include "mafianet/Statistics.h" -#include "mafianet/PeerInterface.h" +#include "mafianet/statistics_history.h" +#include "mafianet/get_time.h" +#include "mafianet/statistics.h" +#include "mafianet/peer_interface.h" using namespace MafiaNet; diff --git a/Source/src/RakString.cpp b/Source/src/string.cpp similarity index 94% rename from Source/src/RakString.cpp rename to Source/src/string.cpp index 25fc89536..a92399952 100644 --- a/Source/src/RakString.cpp +++ b/Source/src/string.cpp @@ -13,20 +13,20 @@ * license found in the license.txt file in the root directory of this source tree. */ -#include "mafianet/String.h" -#include "mafianet/Assert.h" -#include "mafianet/MemoryOverride.h" -#include "mafianet/BitStream.h" +#include "mafianet/string.h" +#include "mafianet/assert.h" +#include "mafianet/memory_override.h" +#include "mafianet/bit_stream.h" #include #include -#include "mafianet/LinuxStrings.h" -#include "mafianet/StringCompressor.h" -#include "mafianet/SimpleMutex.h" +#include "mafianet/linux_strings.h" +#include "mafianet/string_compressor.h" +#include "mafianet/simple_mutex.h" #include -#include "mafianet/Itoa.h" +#include "mafianet/itoa.h" #include -#include "mafianet/LinuxAdapter.h" -#include "mafianet/OsxAdapter.h" +#include "mafianet/linux_adapter.h" +#include "mafianet/osx_adapter.h" using namespace MafiaNet; @@ -1573,9 +1573,9 @@ void RakString::UnlockMutex(void) } /* -#include "mafianet/String.h" +#include "mafianet/string.h" #include -#include "mafianet/GetTime.h" +#include "mafianet/get_time.h" using namespace MafiaNet; diff --git a/Source/src/StringCompressor.cpp b/Source/src/string_compressor.cpp similarity index 92% rename from Source/src/StringCompressor.cpp rename to Source/src/string_compressor.cpp index 9643c42f1..a5c9ec60a 100644 --- a/Source/src/StringCompressor.cpp +++ b/Source/src/string_compressor.cpp @@ -18,11 +18,11 @@ -#include "mafianet/StringCompressor.h" -#include "mafianet/DS_HuffmanEncodingTree.h" -#include "mafianet/BitStream.h" -#include "mafianet/String.h" -#include "mafianet/Assert.h" +#include "mafianet/string_compressor.h" +#include "mafianet/ds_huffman_encoding_tree.h" +#include "mafianet/bit_stream.h" +#include "mafianet/string.h" +#include "mafianet/assert.h" #include #include diff --git a/Source/src/StringTable.cpp b/Source/src/string_table.cpp similarity index 90% rename from Source/src/StringTable.cpp rename to Source/src/string_table.cpp index 3ac5f94ef..5ad19849b 100644 --- a/Source/src/StringTable.cpp +++ b/Source/src/string_table.cpp @@ -13,14 +13,14 @@ * license found in the license.txt file in the root directory of this source tree. */ -#include "mafianet/StringTable.h" +#include "mafianet/string_table.h" #include -#include "mafianet/Assert.h" +#include "mafianet/assert.h" #include -#include "mafianet/BitStream.h" -#include "mafianet/StringCompressor.h" -#include "mafianet/LinuxAdapter.h" -#include "mafianet/OsxAdapter.h" +#include "mafianet/bit_stream.h" +#include "mafianet/string_compressor.h" +#include "mafianet/linux_adapter.h" +#include "mafianet/osx_adapter.h" using namespace MafiaNet; StringTable* StringTable::instance=0; diff --git a/Source/src/SuperFastHash.cpp b/Source/src/super_fast_hash.cpp similarity index 92% rename from Source/src/SuperFastHash.cpp rename to Source/src/super_fast_hash.cpp index d295e8fb4..636a3a4a5 100644 --- a/Source/src/SuperFastHash.cpp +++ b/Source/src/super_fast_hash.cpp @@ -13,15 +13,15 @@ * license found in the license.txt file in the root directory of this source tree. */ -#include "mafianet/SuperFastHash.h" -#include "mafianet/NativeTypes.h" +#include "mafianet/super_fast_hash.h" +#include "mafianet/native_types.h" #include #if !defined(_WIN32) #include #endif -#include "mafianet/LinuxAdapter.h" -#include "mafianet/OsxAdapter.h" +#include "mafianet/linux_adapter.h" +#include "mafianet/osx_adapter.h" #undef get16bits diff --git a/Source/src/TableSerializer.cpp b/Source/src/table_serializer.cpp similarity index 95% rename from Source/src/TableSerializer.cpp rename to Source/src/table_serializer.cpp index 4f18681df..6f679cfdd 100644 --- a/Source/src/TableSerializer.cpp +++ b/Source/src/table_serializer.cpp @@ -13,11 +13,11 @@ * license found in the license.txt file in the root directory of this source tree. */ -#include "mafianet/TableSerializer.h" -#include "mafianet/DS_Table.h" -#include "mafianet/BitStream.h" -#include "mafianet/StringCompressor.h" -#include "mafianet/Assert.h" +#include "mafianet/table_serializer.h" +#include "mafianet/ds_table.h" +#include "mafianet/bit_stream.h" +#include "mafianet/string_compressor.h" +#include "mafianet/assert.h" using namespace MafiaNet; diff --git a/Source/src/TCPInterface.cpp b/Source/src/tcp_interface.cpp similarity index 95% rename from Source/src/TCPInterface.cpp rename to Source/src/tcp_interface.cpp index d2edee8f1..f1b2640e2 100644 --- a/Source/src/TCPInterface.cpp +++ b/Source/src/tcp_interface.cpp @@ -13,7 +13,7 @@ * license found in the license.txt file in the root directory of this source tree. */ -#include "mafianet/NativeFeatureIncludes.h" +#include "mafianet/native_feature_includes.h" #if _RAKNET_SUPPORT_TCPInterface==1 /// \file @@ -22,7 +22,7 @@ -#include "mafianet/TCPInterface.h" +#include "mafianet/tcp_interface.h" #ifdef _WIN32 typedef int socklen_t; #else @@ -31,15 +31,15 @@ #include #endif #include -#include "mafianet/Assert.h" +#include "mafianet/assert.h" #include -#include "mafianet/Assert.h" -#include "mafianet/Sleep.h" -#include "mafianet/StringCompressor.h" -#include "mafianet/StringTable.h" -#include "mafianet/Itoa.h" -#include "mafianet/SocketLayer.h" -#include "mafianet/SocketDefines.h" +#include "mafianet/assert.h" +#include "mafianet/sleep.h" +#include "mafianet/string_compressor.h" +#include "mafianet/string_table.h" +#include "mafianet/itoa.h" +#include "mafianet/socket_layer.h" +#include "mafianet/socket_defines.h" #if (defined(__GNUC__) || defined(__GCCXML__)) && !defined(__WIN32__) #include #endif @@ -48,7 +48,7 @@ #endif #ifdef _WIN32 -#include "mafianet/WSAStartupSingleton.h" +#include "mafianet/wsa_startup_singleton.h" #endif namespace MafiaNet { @@ -58,8 +58,8 @@ RAK_THREAD_DECLARATION(ConnectionAttemptLoop); #ifdef _MSC_VER #pragma warning( push ) #endif -#include "mafianet/LinuxAdapter.h" -#include "mafianet/OsxAdapter.h" +#include "mafianet/linux_adapter.h" +#include "mafianet/osx_adapter.h" using namespace MafiaNet; diff --git a/Source/src/TeamBalancer.cpp b/Source/src/team_balancer.cpp similarity index 95% rename from Source/src/TeamBalancer.cpp rename to Source/src/team_balancer.cpp index 69f7d7302..c615292c5 100644 --- a/Source/src/TeamBalancer.cpp +++ b/Source/src/team_balancer.cpp @@ -13,14 +13,14 @@ * license found in the license.txt file in the root directory of this source tree. */ -#include "mafianet/NativeFeatureIncludes.h" +#include "mafianet/native_feature_includes.h" #if _RAKNET_SUPPORT_TeamBalancer==1 -#include "mafianet/TeamBalancer.h" -#include "mafianet/BitStream.h" -#include "mafianet/MessageIdentifiers.h" -#include "mafianet/PeerInterface.h" -#include "mafianet/Rand.h" +#include "mafianet/team_balancer.h" +#include "mafianet/bit_stream.h" +#include "mafianet/message_identifiers.h" +#include "mafianet/peer_interface.h" +#include "mafianet/rand.h" using namespace MafiaNet; diff --git a/Source/src/TeamManager.cpp b/Source/src/team_manager.cpp similarity index 97% rename from Source/src/TeamManager.cpp rename to Source/src/team_manager.cpp index d197a74c2..6480bf39b 100644 --- a/Source/src/TeamManager.cpp +++ b/Source/src/team_manager.cpp @@ -13,13 +13,13 @@ * license found in the license.txt file in the root directory of this source tree. */ -#include "mafianet/NativeFeatureIncludes.h" +#include "mafianet/native_feature_includes.h" #if _RAKNET_SUPPORT_TeamManager==1 -#include "mafianet/TeamManager.h" -#include "mafianet/BitStream.h" -#include "mafianet/MessageIdentifiers.h" -#include "mafianet/GetTime.h" +#include "mafianet/team_manager.h" +#include "mafianet/bit_stream.h" +#include "mafianet/message_identifiers.h" +#include "mafianet/get_time.h" using namespace MafiaNet; diff --git a/Source/src/TelnetTransport.cpp b/Source/src/telnet_transport.cpp similarity index 94% rename from Source/src/TelnetTransport.cpp rename to Source/src/telnet_transport.cpp index 136aa9a56..0ea791cfa 100644 --- a/Source/src/TelnetTransport.cpp +++ b/Source/src/telnet_transport.cpp @@ -13,17 +13,17 @@ * license found in the license.txt file in the root directory of this source tree. */ -#include "mafianet/NativeFeatureIncludes.h" +#include "mafianet/native_feature_includes.h" #if _RAKNET_SUPPORT_TelnetTransport==1 && _RAKNET_SUPPORT_TCPInterface==1 -#include "mafianet/TelnetTransport.h" -#include "mafianet/TCPInterface.h" +#include "mafianet/telnet_transport.h" +#include "mafianet/tcp_interface.h" #include #include #include -#include "mafianet/LinuxStrings.h" -#include "mafianet/LinuxAdapter.h" -#include "mafianet/OsxAdapter.h" +#include "mafianet/linux_strings.h" +#include "mafianet/linux_adapter.h" +#include "mafianet/osx_adapter.h" // #define _PRINTF_DEBUG diff --git a/Source/src/RakThread.cpp b/Source/src/thread.cpp similarity index 81% rename from Source/src/RakThread.cpp rename to Source/src/thread.cpp index 6523643a7..e9a5fbe29 100644 --- a/Source/src/RakThread.cpp +++ b/Source/src/thread.cpp @@ -13,16 +13,16 @@ * license found in the license.txt file in the root directory of this source tree. */ -#include "mafianet/Thread.h" -#include "mafianet/Assert.h" -#include "mafianet/Defines.h" -#include "mafianet/Sleep.h" -#include "mafianet/MemoryOverride.h" +#include "mafianet/thread.h" +#include "mafianet/assert.h" +#include "mafianet/defines.h" +#include "mafianet/sleep.h" +#include "mafianet/memory_override.h" using namespace MafiaNet; #if defined(_WIN32) - #include "mafianet/WindowsIncludes.h" + #include "mafianet/windows_includes.h" #include #include #else @@ -111,7 +111,7 @@ int RakThread::Create( void* start_address( void* ), void *arglist, int priority pthread_attr_setdetachstate( &attr, PTHREAD_CREATE_DETACHED ); int res = pthread_create( &threadHandle, &attr, start_address, arglist ); - RakAssert(res==0 && "pthread_create in RakThread.cpp failed.") + RakAssert(res==0 && "pthread_create in thread.cpp failed.") return res; #endif } diff --git a/Source/src/ThreadsafePacketLogger.cpp b/Source/src/threadsafe_packet_logger.cpp similarity index 85% rename from Source/src/ThreadsafePacketLogger.cpp rename to Source/src/threadsafe_packet_logger.cpp index 5f04bd03e..2999ab72a 100644 --- a/Source/src/ThreadsafePacketLogger.cpp +++ b/Source/src/threadsafe_packet_logger.cpp @@ -13,13 +13,13 @@ * license found in the license.txt file in the root directory of this source tree. */ -#include "mafianet/NativeFeatureIncludes.h" +#include "mafianet/native_feature_includes.h" #if _RAKNET_SUPPORT_PacketLogger==1 -#include "mafianet/ThreadsafePacketLogger.h" +#include "mafianet/threadsafe_packet_logger.h" #include -#include "mafianet/LinuxAdapter.h" -#include "mafianet/OsxAdapter.h" +#include "mafianet/linux_adapter.h" +#include "mafianet/osx_adapter.h" using namespace MafiaNet; diff --git a/Source/src/RakNetTransport2.cpp b/Source/src/transport2.cpp similarity index 89% rename from Source/src/RakNetTransport2.cpp rename to Source/src/transport2.cpp index 054bec010..601c2d358 100644 --- a/Source/src/RakNetTransport2.cpp +++ b/Source/src/transport2.cpp @@ -13,20 +13,20 @@ * license found in the license.txt file in the root directory of this source tree. */ -#include "mafianet/NativeFeatureIncludes.h" +#include "mafianet/native_feature_includes.h" #if _RAKNET_SUPPORT_TelnetTransport==1 -#include "mafianet/Transport2.h" +#include "mafianet/transport2.h" -#include "mafianet/PeerInterface.h" -#include "mafianet/BitStream.h" -#include "mafianet/MessageIdentifiers.h" +#include "mafianet/peer_interface.h" +#include "mafianet/bit_stream.h" +#include "mafianet/message_identifiers.h" #include #include #include -#include "mafianet/LinuxStrings.h" -#include "mafianet/LinuxAdapter.h" -#include "mafianet/OsxAdapter.h" +#include "mafianet/linux_strings.h" +#include "mafianet/linux_adapter.h" +#include "mafianet/osx_adapter.h" using namespace MafiaNet; diff --git a/Source/src/TwoWayAuthentication.cpp b/Source/src/two_way_authentication.cpp similarity index 95% rename from Source/src/TwoWayAuthentication.cpp rename to Source/src/two_way_authentication.cpp index fff18e3a6..f6a949111 100644 --- a/Source/src/TwoWayAuthentication.cpp +++ b/Source/src/two_way_authentication.cpp @@ -13,15 +13,15 @@ * license found in the license.txt file in the root directory of this source tree. */ -#include "mafianet/NativeFeatureIncludes.h" +#include "mafianet/native_feature_includes.h" #if _RAKNET_SUPPORT_TwoWayAuthentication==1 -#include "mafianet/TwoWayAuthentication.h" -#include "mafianet/Rand.h" -#include "mafianet/GetTime.h" -#include "mafianet/MessageIdentifiers.h" -#include "mafianet/BitStream.h" -#include "mafianet/PeerInterface.h" +#include "mafianet/two_way_authentication.h" +#include "mafianet/rand.h" +#include "mafianet/get_time.h" +#include "mafianet/message_identifiers.h" +#include "mafianet/bit_stream.h" +#include "mafianet/peer_interface.h" #if LIBCAT_SECURITY==1 static const int HASH_BITS = 256; diff --git a/Source/src/RakNetTypes.cpp b/Source/src/types.cpp similarity index 94% rename from Source/src/RakNetTypes.cpp rename to Source/src/types.cpp index 3377932f2..5f95b0362 100644 --- a/Source/src/RakNetTypes.cpp +++ b/Source/src/types.cpp @@ -16,20 +16,20 @@ /// \file /// -#include "mafianet/Types.h" -#include "mafianet/Assert.h" +#include "mafianet/types.h" +#include "mafianet/assert.h" #include #include -#include "mafianet/WindowsIncludes.h" -#include "mafianet/WSAStartupSingleton.h" -#include "mafianet/SocketDefines.h" -#include "mafianet/Socket2.h" +#include "mafianet/windows_includes.h" +#include "mafianet/wsa_startup_singleton.h" +#include "mafianet/socket_defines.h" +#include "mafianet/socket2.h" #if defined(_WIN32) // extern __int64 _strtoui64(const char*, char**, int); // needed for Code::Blocks. Does not compile on Visual Studio 2010 // IP_DONTFRAGMENT is different between winsock 1 and winsock 2. Therefore, Winsock2.h must be linked againt Ws2_32.lib // winsock.h must be linked against WSock32.lib. If these two are mixed up the flag won't work correctly -#include "mafianet/WindowsIncludes.h" +#include "mafianet/windows_includes.h" #else #include // used for getnameinfo() @@ -38,12 +38,12 @@ #include #endif -#include "mafianet/Itoa.h" -#include "mafianet/SocketLayer.h" -#include "mafianet/SuperFastHash.h" +#include "mafianet/itoa.h" +#include "mafianet/socket_layer.h" +#include "mafianet/super_fast_hash.h" #include -#include "mafianet/LinuxAdapter.h" -#include "mafianet/OsxAdapter.h" +#include "mafianet/linux_adapter.h" +#include "mafianet/osx_adapter.h" using namespace MafiaNet; @@ -68,7 +68,7 @@ const char *AddressOrGUID::ToString(bool writePort) const { // Rotating static buffer, mirroring SystemAddress::ToString below. // NOT THREADSAFE — for an owning, thread-safe string use - // MafiaNet::to_string(guid) from "mafianet/GuidUtil.h". + // MafiaNet::to_string(guid) from "mafianet/guid_util.h". static unsigned char strIndex=0; static char str[8][64]; unsigned char lastStrIndex=strIndex; diff --git a/Source/src/UDPForwarder.cpp b/Source/src/udp_forwarder.cpp similarity index 94% rename from Source/src/UDPForwarder.cpp rename to Source/src/udp_forwarder.cpp index 864f53b56..35104665a 100644 --- a/Source/src/UDPForwarder.cpp +++ b/Source/src/udp_forwarder.cpp @@ -13,18 +13,18 @@ * license found in the license.txt file in the root directory of this source tree. */ -#include "mafianet/UDPForwarder.h" +#include "mafianet/udp_forwarder.h" #if _RAKNET_SUPPORT_UDPForwarder==1 -#include "mafianet/GetTime.h" -#include "mafianet/MTUSize.h" -#include "mafianet/SocketLayer.h" -#include "mafianet/WSAStartupSingleton.h" -#include "mafianet/Sleep.h" -#include "mafianet/DS_OrderedList.h" -#include "mafianet/LinuxStrings.h" -#include "mafianet/SocketDefines.h" +#include "mafianet/get_time.h" +#include "mafianet/mtu_size.h" +#include "mafianet/socket_layer.h" +#include "mafianet/wsa_startup_singleton.h" +#include "mafianet/sleep.h" +#include "mafianet/ds_ordered_list.h" +#include "mafianet/linux_strings.h" +#include "mafianet/socket_defines.h" #include "errno.h" #ifdef _WIN32 diff --git a/Source/src/UDPProxyClient.cpp b/Source/src/udp_proxy_client.cpp similarity index 95% rename from Source/src/UDPProxyClient.cpp rename to Source/src/udp_proxy_client.cpp index 1511f4671..abaceaee5 100644 --- a/Source/src/UDPProxyClient.cpp +++ b/Source/src/udp_proxy_client.cpp @@ -13,15 +13,15 @@ * license found in the license.txt file in the root directory of this source tree. */ -#include "mafianet/NativeFeatureIncludes.h" +#include "mafianet/native_feature_includes.h" #if _RAKNET_SUPPORT_UDPProxyClient==1 -#include "mafianet/UDPProxyClient.h" -#include "mafianet/BitStream.h" -#include "mafianet/UDPProxyCommon.h" -#include "mafianet/PeerInterface.h" -#include "mafianet/MessageIdentifiers.h" -#include "mafianet/GetTime.h" +#include "mafianet/udp_proxy_client.h" +#include "mafianet/bit_stream.h" +#include "mafianet/udp_proxy_common.h" +#include "mafianet/peer_interface.h" +#include "mafianet/message_identifiers.h" +#include "mafianet/get_time.h" using namespace MafiaNet; static const int DEFAULT_UNRESPONSIVE_PING_TIME_COORDINATOR=1000; diff --git a/Source/src/UDPProxyCoordinator.cpp b/Source/src/udp_proxy_coordinator.cpp similarity index 95% rename from Source/src/UDPProxyCoordinator.cpp rename to Source/src/udp_proxy_coordinator.cpp index 4dce76480..65d9362b9 100644 --- a/Source/src/UDPProxyCoordinator.cpp +++ b/Source/src/udp_proxy_coordinator.cpp @@ -13,17 +13,17 @@ * license found in the license.txt file in the root directory of this source tree. */ -#include "mafianet/NativeFeatureIncludes.h" +#include "mafianet/native_feature_includes.h" #if _RAKNET_SUPPORT_UDPProxyCoordinator==1 && _RAKNET_SUPPORT_UDPForwarder==1 -#include "mafianet/UDPProxyCoordinator.h" -#include "mafianet/BitStream.h" -#include "mafianet/UDPProxyCommon.h" -#include "mafianet/PeerInterface.h" -#include "mafianet/MessageIdentifiers.h" -#include "mafianet/Rand.h" -#include "mafianet/GetTime.h" -#include "mafianet/UDPForwarder.h" +#include "mafianet/udp_proxy_coordinator.h" +#include "mafianet/bit_stream.h" +#include "mafianet/udp_proxy_common.h" +#include "mafianet/peer_interface.h" +#include "mafianet/message_identifiers.h" +#include "mafianet/rand.h" +#include "mafianet/get_time.h" +#include "mafianet/udp_forwarder.h" // Larger than the client version static const int DEFAULT_CLIENT_UNRESPONSIVE_PING_TIME=2000; diff --git a/Source/src/UDPProxyServer.cpp b/Source/src/udp_proxy_server.cpp similarity index 93% rename from Source/src/UDPProxyServer.cpp rename to Source/src/udp_proxy_server.cpp index 178f0fb07..8be05cc55 100644 --- a/Source/src/UDPProxyServer.cpp +++ b/Source/src/udp_proxy_server.cpp @@ -13,14 +13,14 @@ * license found in the license.txt file in the root directory of this source tree. */ -#include "mafianet/NativeFeatureIncludes.h" +#include "mafianet/native_feature_includes.h" #if _RAKNET_SUPPORT_UDPProxyServer==1 && _RAKNET_SUPPORT_UDPForwarder==1 -#include "mafianet/UDPProxyServer.h" -#include "mafianet/BitStream.h" -#include "mafianet/UDPProxyCommon.h" -#include "mafianet/PeerInterface.h" -#include "mafianet/MessageIdentifiers.h" +#include "mafianet/udp_proxy_server.h" +#include "mafianet/bit_stream.h" +#include "mafianet/udp_proxy_common.h" +#include "mafianet/peer_interface.h" +#include "mafianet/message_identifiers.h" using namespace MafiaNet; diff --git a/Source/src/VariableDeltaSerializer.cpp b/Source/src/variable_delta_serializer.cpp similarity index 96% rename from Source/src/VariableDeltaSerializer.cpp rename to Source/src/variable_delta_serializer.cpp index d3781df3f..493d97d14 100644 --- a/Source/src/VariableDeltaSerializer.cpp +++ b/Source/src/variable_delta_serializer.cpp @@ -13,7 +13,7 @@ * license found in the license.txt file in the root directory of this source tree. */ -#include "mafianet/VariableDeltaSerializer.h" +#include "mafianet/variable_delta_serializer.h" using namespace MafiaNet; diff --git a/Source/src/VariableListDeltaTracker.cpp b/Source/src/variable_list_delta_tracker.cpp similarity index 94% rename from Source/src/VariableListDeltaTracker.cpp rename to Source/src/variable_list_delta_tracker.cpp index 01f7412c5..6f7866a30 100644 --- a/Source/src/VariableListDeltaTracker.cpp +++ b/Source/src/variable_list_delta_tracker.cpp @@ -13,7 +13,7 @@ * license found in the license.txt file in the root directory of this source tree. */ -#include "mafianet/VariableListDeltaTracker.h" +#include "mafianet/variable_list_delta_tracker.h" using namespace MafiaNet; diff --git a/Source/src/VariadicSQLParser.cpp b/Source/src/variadic_sql_parser.cpp similarity index 95% rename from Source/src/VariadicSQLParser.cpp rename to Source/src/variadic_sql_parser.cpp index 0b5348aa9..68b82a887 100644 --- a/Source/src/VariadicSQLParser.cpp +++ b/Source/src/variadic_sql_parser.cpp @@ -13,8 +13,8 @@ * license found in the license.txt file in the root directory of this source tree. */ -#include "mafianet/VariadicSQLParser.h" -#include "mafianet/BitStream.h" +#include "mafianet/variadic_sql_parser.h" +#include "mafianet/bit_stream.h" #include using namespace VariadicSQLParser; diff --git a/Source/src/RakVoice.cpp b/Source/src/voice.cpp similarity index 96% rename from Source/src/RakVoice.cpp rename to Source/src/voice.cpp index d2cb56a9c..e877879ed 100644 --- a/Source/src/RakVoice.cpp +++ b/Source/src/voice.cpp @@ -14,17 +14,17 @@ * license found in the license.txt file in the root directory of this source tree. */ -#include "mafianet/RakVoice.h" +#include "mafianet/voice.h" #include #include -#include "mafianet/BitStream.h" -#include "mafianet/PacketPriority.h" -#include "mafianet/MessageIdentifiers.h" -#include "mafianet/PeerInterface.h" -#include "mafianet/ReliabilityLayer.h" +#include "mafianet/bit_stream.h" +#include "mafianet/packet_priority.h" +#include "mafianet/message_identifiers.h" +#include "mafianet/peer_interface.h" +#include "mafianet/reliability_layer.h" #include #include -#include "mafianet/GetTime.h" +#include "mafianet/get_time.h" #ifdef _DEBUG #include @@ -33,7 +33,7 @@ using namespace MafiaNet; #define SAMPLESIZE 2 -// Single definition lives in RakVoice.h so relay hosts can bound inbound frames. +// Single definition lives in voice.h so relay hosts can bound inbound frames. #define MAX_OPUS_PACKET_SIZE ((int)MafiaNet::RAKVOICE_MAX_OPUS_PACKET_SIZE) // RNNoise frame size is fixed at 480 samples (10ms at 48kHz) @@ -246,7 +246,7 @@ bool RakVoice::EvictIdlestRelaySpeaker(MafiaNet::TimeMS now) RakNetGUID RakVoice::ReadRelayOrigin(Packet *packet) { - // Offsets are derived in RakVoice.h, so this stays correct as the header grows. + // Offsets are derived in voice.h, so this stays correct as the header grows. if (packet == nullptr || packet->length < RAKVOICE_RELAY_OFFSET_ORIGIN + sizeof(uint64_t)) return UNASSIGNED_RAKNET_GUID; diff --git a/Source/src/WSAStartupSingleton.cpp b/Source/src/wsa_startup_singleton.cpp similarity index 91% rename from Source/src/WSAStartupSingleton.cpp rename to Source/src/wsa_startup_singleton.cpp index 5b7b3a3f8..de10bac34 100644 --- a/Source/src/WSAStartupSingleton.cpp +++ b/Source/src/wsa_startup_singleton.cpp @@ -13,7 +13,7 @@ * license found in the license.txt file in the root directory of this source tree. */ -#include "mafianet/WSAStartupSingleton.h" +#include "mafianet/wsa_startup_singleton.h" @@ -28,7 +28,7 @@ #endif -#include "mafianet/Defines.h" +#include "mafianet/defines.h" #include #ifdef _WIN32 diff --git a/Source/src/RakWString.cpp b/Source/src/wstring.cpp similarity index 95% rename from Source/src/RakWString.cpp rename to Source/src/wstring.cpp index 7ee1ca4f5..72e1a042f 100644 --- a/Source/src/RakWString.cpp +++ b/Source/src/wstring.cpp @@ -13,13 +13,13 @@ * license found in the license.txt file in the root directory of this source tree. */ -#include "mafianet/WString.h" -#include "mafianet/BitStream.h" +#include "mafianet/wstring.h" +#include "mafianet/bit_stream.h" #include #include #include -#include "mafianet/LinuxAdapter.h" -#include "mafianet/OsxAdapter.h" +#include "mafianet/linux_adapter.h" +#include "mafianet/osx_adapter.h" using namespace MafiaNet; diff --git a/Tests/Integration/ComprehensiveConvertTests.cpp b/Tests/Integration/ComprehensiveConvertTests.cpp index 9d37280ef..bb844e98a 100644 --- a/Tests/Integration/ComprehensiveConvertTests.cpp +++ b/Tests/Integration/ComprehensiveConvertTests.cpp @@ -7,12 +7,12 @@ #include -#include "mafianet/PeerInterface.h" -#include "mafianet/MessageIdentifiers.h" -#include "mafianet/Sleep.h" -#include "mafianet/GetTime.h" -#include "mafianet/Rand.h" -#include "mafianet/Statistics.h" +#include "mafianet/peer_interface.h" +#include "mafianet/message_identifiers.h" +#include "mafianet/sleep.h" +#include "mafianet/get_time.h" +#include "mafianet/rand.h" +#include "mafianet/statistics.h" #include "CommonFunctions.h" diff --git a/Tests/Integration/ConnectWithSocketTests.cpp b/Tests/Integration/ConnectWithSocketTests.cpp index 46c40b793..a3807d2a6 100644 --- a/Tests/Integration/ConnectWithSocketTests.cpp +++ b/Tests/Integration/ConnectWithSocketTests.cpp @@ -7,14 +7,14 @@ #include -#include "mafianet/String.h" -#include "mafianet/PeerInterface.h" -#include "mafianet/MessageIdentifiers.h" -#include "mafianet/BitStream.h" -#include "mafianet/Peer.h" -#include "mafianet/Sleep.h" -#include "mafianet/Time.h" -#include "mafianet/GetTime.h" +#include "mafianet/string.h" +#include "mafianet/peer_interface.h" +#include "mafianet/message_identifiers.h" +#include "mafianet/bit_stream.h" +#include "mafianet/peer.h" +#include "mafianet/sleep.h" +#include "mafianet/time.h" +#include "mafianet/get_time.h" #include "TestHelpers.h" #include "CommonFunctions.h" #include "RakTimer.h" diff --git a/Tests/Integration/CrossConnectionConvertTests.cpp b/Tests/Integration/CrossConnectionConvertTests.cpp index 418b209d2..5f98b96c7 100644 --- a/Tests/Integration/CrossConnectionConvertTests.cpp +++ b/Tests/Integration/CrossConnectionConvertTests.cpp @@ -7,11 +7,11 @@ #include -#include "mafianet/PeerInterface.h" -#include "mafianet/MessageIdentifiers.h" -#include "mafianet/BitStream.h" -#include "mafianet/Sleep.h" -#include "mafianet/GetTime.h" +#include "mafianet/peer_interface.h" +#include "mafianet/message_identifiers.h" +#include "mafianet/bit_stream.h" +#include "mafianet/sleep.h" +#include "mafianet/get_time.h" #include // For getenv #include diff --git a/Tests/Integration/DirectoryDeltaTransferStreamingLiveTests.cpp b/Tests/Integration/DirectoryDeltaTransferStreamingLiveTests.cpp index c21255b5f..20f8b6854 100644 --- a/Tests/Integration/DirectoryDeltaTransferStreamingLiveTests.cpp +++ b/Tests/Integration/DirectoryDeltaTransferStreamingLiveTests.cpp @@ -14,15 +14,15 @@ #include #include -#include "mafianet/Peer.h" -#include "mafianet/PeerInterface.h" -#include "mafianet/MessageIdentifiers.h" -#include "mafianet/FileListTransfer.h" -#include "mafianet/FileListTransferCBInterface.h" -#include "mafianet/DirectoryDeltaTransfer.h" -#include "mafianet/IncrementalReadInterface.h" -#include "mafianet/Sleep.h" -#include "mafianet/GetTime.h" +#include "mafianet/peer.h" +#include "mafianet/peer_interface.h" +#include "mafianet/message_identifiers.h" +#include "mafianet/file_list_transfer.h" +#include "mafianet/file_list_transfer_cb_interface.h" +#include "mafianet/directory_delta_transfer.h" +#include "mafianet/incremental_read_interface.h" +#include "mafianet/sleep.h" +#include "mafianet/get_time.h" using namespace MafiaNet; diff --git a/Tests/Integration/DisconnectReasonTests.cpp b/Tests/Integration/DisconnectReasonTests.cpp index f40048a76..55245a55b 100644 --- a/Tests/Integration/DisconnectReasonTests.cpp +++ b/Tests/Integration/DisconnectReasonTests.cpp @@ -7,10 +7,10 @@ #include -#include "mafianet/PeerInterface.h" -#include "mafianet/MessageIdentifiers.h" -#include "mafianet/BitStream.h" -#include "mafianet/Sleep.h" +#include "mafianet/peer_interface.h" +#include "mafianet/message_identifiers.h" +#include "mafianet/bit_stream.h" +#include "mafianet/sleep.h" #include "CommonFunctions.h" using namespace MafiaNet; diff --git a/Tests/Integration/DispatcherLiveTests.cpp b/Tests/Integration/DispatcherLiveTests.cpp index 56ff76f3f..7e91f0528 100644 --- a/Tests/Integration/DispatcherLiveTests.cpp +++ b/Tests/Integration/DispatcherLiveTests.cpp @@ -7,10 +7,10 @@ #include -#include "mafianet/Dispatcher.h" -#include "mafianet/PeerHandle.h" // Peer, PacketPtr (live round-trip) -#include "mafianet/GetTime.h" // GetTime, GetTimeMS -#include "mafianet/Sleep.h" // RakSleep +#include "mafianet/dispatcher.h" +#include "mafianet/peer_handle.h" // Peer, PacketPtr (live round-trip) +#include "mafianet/get_time.h" // GetTime, GetTimeMS +#include "mafianet/sleep.h" // RakSleep #include diff --git a/Tests/Integration/DroppedConnectionConvertTests.cpp b/Tests/Integration/DroppedConnectionConvertTests.cpp index be7817a25..1c4bbef63 100644 --- a/Tests/Integration/DroppedConnectionConvertTests.cpp +++ b/Tests/Integration/DroppedConnectionConvertTests.cpp @@ -7,11 +7,11 @@ #include -#include "mafianet/PeerInterface.h" -#include "mafianet/MessageIdentifiers.h" -#include "mafianet/Sleep.h" -#include "mafianet/GetTime.h" -#include "mafianet/Rand.h" // randomMT +#include "mafianet/peer_interface.h" +#include "mafianet/message_identifiers.h" +#include "mafianet/sleep.h" +#include "mafianet/get_time.h" +#include "mafianet/rand.h" // randomMT #include "CommonFunctions.h" #include "RakTimer.h" diff --git a/Tests/Integration/EightPeerTests.cpp b/Tests/Integration/EightPeerTests.cpp index c3c593436..0d8291442 100644 --- a/Tests/Integration/EightPeerTests.cpp +++ b/Tests/Integration/EightPeerTests.cpp @@ -7,13 +7,13 @@ #include -#include "mafianet/PeerInterface.h" -#include "mafianet/MessageIdentifiers.h" -#include "mafianet/BitStream.h" -#include "mafianet/Peer.h" -#include "mafianet/Sleep.h" -#include "mafianet/Time.h" -#include "mafianet/GetTime.h" +#include "mafianet/peer_interface.h" +#include "mafianet/message_identifiers.h" +#include "mafianet/bit_stream.h" +#include "mafianet/peer.h" +#include "mafianet/sleep.h" +#include "mafianet/time.h" +#include "mafianet/get_time.h" #include diff --git a/Tests/Integration/FileListTransferWindowLiveTests.cpp b/Tests/Integration/FileListTransferWindowLiveTests.cpp index fb2488bdb..cd5c437ad 100644 --- a/Tests/Integration/FileListTransferWindowLiveTests.cpp +++ b/Tests/Integration/FileListTransferWindowLiveTests.cpp @@ -14,15 +14,15 @@ #include #include -#include "mafianet/Peer.h" -#include "mafianet/PeerInterface.h" -#include "mafianet/MessageIdentifiers.h" -#include "mafianet/FileList.h" -#include "mafianet/FileListTransfer.h" -#include "mafianet/FileListTransferCBInterface.h" -#include "mafianet/IncrementalReadInterface.h" -#include "mafianet/Sleep.h" -#include "mafianet/GetTime.h" +#include "mafianet/peer.h" +#include "mafianet/peer_interface.h" +#include "mafianet/message_identifiers.h" +#include "mafianet/file_list.h" +#include "mafianet/file_list_transfer.h" +#include "mafianet/file_list_transfer_cb_interface.h" +#include "mafianet/incremental_read_interface.h" +#include "mafianet/sleep.h" +#include "mafianet/get_time.h" using namespace MafiaNet; diff --git a/Tests/Integration/LocalIsConnectedTests.cpp b/Tests/Integration/LocalIsConnectedTests.cpp index e6d1deaad..883f331fe 100644 --- a/Tests/Integration/LocalIsConnectedTests.cpp +++ b/Tests/Integration/LocalIsConnectedTests.cpp @@ -7,14 +7,14 @@ #include -#include "mafianet/String.h" -#include "mafianet/PeerInterface.h" -#include "mafianet/MessageIdentifiers.h" -#include "mafianet/BitStream.h" -#include "mafianet/Peer.h" -#include "mafianet/Sleep.h" -#include "mafianet/Time.h" -#include "mafianet/GetTime.h" +#include "mafianet/string.h" +#include "mafianet/peer_interface.h" +#include "mafianet/message_identifiers.h" +#include "mafianet/bit_stream.h" +#include "mafianet/peer.h" +#include "mafianet/sleep.h" +#include "mafianet/time.h" +#include "mafianet/get_time.h" #include "CommonFunctions.h" #include diff --git a/Tests/Integration/MTUNegotiationTests.cpp b/Tests/Integration/MTUNegotiationTests.cpp index 1a4f88b3b..7b22900d0 100644 --- a/Tests/Integration/MTUNegotiationTests.cpp +++ b/Tests/Integration/MTUNegotiationTests.cpp @@ -10,13 +10,13 @@ #include #include -#include "mafianet/Peer.h" -#include "mafianet/PeerInterface.h" -#include "mafianet/MessageIdentifiers.h" -#include "mafianet/MTUSize.h" -#include "mafianet/BitStream.h" -#include "mafianet/Sleep.h" -#include "mafianet/GetTime.h" +#include "mafianet/peer.h" +#include "mafianet/peer_interface.h" +#include "mafianet/message_identifiers.h" +#include "mafianet/mtu_size.h" +#include "mafianet/bit_stream.h" +#include "mafianet/sleep.h" +#include "mafianet/get_time.h" #ifdef _WIN32 #include // inet_pton, htons (winsock2 pulled in via peer.h) @@ -158,7 +158,7 @@ namespace return false; } - // Mirrors the constant of the same name in RakPeer.cpp, which is file-static and so cannot be + // Mirrors the constant of the same name in peer.cpp, which is file-static and so cannot be // included. It is the marker that makes a receiving peer treat a datagram as an offline // (pre-connection) message rather than reliability-layer traffic. Duplicated deliberately: a // test for what an unconforming peer can put on the wire should pin the wire format itself. diff --git a/Tests/Integration/ManyClientsOneServerBlockingTests.cpp b/Tests/Integration/ManyClientsOneServerBlockingTests.cpp index 6c50feb8a..758153d1e 100644 --- a/Tests/Integration/ManyClientsOneServerBlockingTests.cpp +++ b/Tests/Integration/ManyClientsOneServerBlockingTests.cpp @@ -7,13 +7,13 @@ #include -#include "mafianet/PeerInterface.h" -#include "mafianet/MessageIdentifiers.h" -#include "mafianet/BitStream.h" -#include "mafianet/Peer.h" -#include "mafianet/Sleep.h" -#include "mafianet/Time.h" -#include "mafianet/GetTime.h" +#include "mafianet/peer_interface.h" +#include "mafianet/message_identifiers.h" +#include "mafianet/bit_stream.h" +#include "mafianet/peer.h" +#include "mafianet/sleep.h" +#include "mafianet/time.h" +#include "mafianet/get_time.h" #include "CommonFunctions.h" diff --git a/Tests/Integration/ManyClientsOneServerDeallocateBlockingTests.cpp b/Tests/Integration/ManyClientsOneServerDeallocateBlockingTests.cpp index 7fef8d487..64db584c8 100644 --- a/Tests/Integration/ManyClientsOneServerDeallocateBlockingTests.cpp +++ b/Tests/Integration/ManyClientsOneServerDeallocateBlockingTests.cpp @@ -7,13 +7,13 @@ #include -#include "mafianet/PeerInterface.h" -#include "mafianet/MessageIdentifiers.h" -#include "mafianet/BitStream.h" -#include "mafianet/Peer.h" -#include "mafianet/Sleep.h" -#include "mafianet/Time.h" -#include "mafianet/GetTime.h" +#include "mafianet/peer_interface.h" +#include "mafianet/message_identifiers.h" +#include "mafianet/bit_stream.h" +#include "mafianet/peer.h" +#include "mafianet/sleep.h" +#include "mafianet/time.h" +#include "mafianet/get_time.h" #include "CommonFunctions.h" diff --git a/Tests/Integration/ManyClientsOneServerNonBlockingTests.cpp b/Tests/Integration/ManyClientsOneServerNonBlockingTests.cpp index 195930f27..da98d3c3e 100644 --- a/Tests/Integration/ManyClientsOneServerNonBlockingTests.cpp +++ b/Tests/Integration/ManyClientsOneServerNonBlockingTests.cpp @@ -7,13 +7,13 @@ #include -#include "mafianet/PeerInterface.h" -#include "mafianet/MessageIdentifiers.h" -#include "mafianet/BitStream.h" -#include "mafianet/Peer.h" -#include "mafianet/Sleep.h" -#include "mafianet/Time.h" -#include "mafianet/GetTime.h" +#include "mafianet/peer_interface.h" +#include "mafianet/message_identifiers.h" +#include "mafianet/bit_stream.h" +#include "mafianet/peer.h" +#include "mafianet/sleep.h" +#include "mafianet/time.h" +#include "mafianet/get_time.h" #include "CommonFunctions.h" diff --git a/Tests/Integration/MaximumConnectTests.cpp b/Tests/Integration/MaximumConnectTests.cpp index 099974ec3..cba6b9e6a 100644 --- a/Tests/Integration/MaximumConnectTests.cpp +++ b/Tests/Integration/MaximumConnectTests.cpp @@ -7,13 +7,13 @@ #include -#include "mafianet/PeerInterface.h" -#include "mafianet/MessageIdentifiers.h" -#include "mafianet/BitStream.h" -#include "mafianet/Peer.h" -#include "mafianet/Sleep.h" -#include "mafianet/Time.h" -#include "mafianet/GetTime.h" +#include "mafianet/peer_interface.h" +#include "mafianet/message_identifiers.h" +#include "mafianet/bit_stream.h" +#include "mafianet/peer.h" +#include "mafianet/sleep.h" +#include "mafianet/time.h" +#include "mafianet/get_time.h" #include diff --git a/Tests/Integration/MmsgBatchLiveTests.cpp b/Tests/Integration/MmsgBatchLiveTests.cpp index 7f8ed8507..ac92514bb 100644 --- a/Tests/Integration/MmsgBatchLiveTests.cpp +++ b/Tests/Integration/MmsgBatchLiveTests.cpp @@ -22,13 +22,13 @@ #include -#include "mafianet/PeerInterface.h" -#include "mafianet/MessageIdentifiers.h" -#include "mafianet/BitStream.h" -#include "mafianet/PeerHandle.h" // Peer, PacketPtr (RAII: survives a failed ASSERT) -#include "mafianet/GetTime.h" -#include "mafianet/Sleep.h" -#include "mafianet/MmsgBatch.h" // MMSG_BATCH_MAX +#include "mafianet/peer_interface.h" +#include "mafianet/message_identifiers.h" +#include "mafianet/bit_stream.h" +#include "mafianet/peer_handle.h" // Peer, PacketPtr (RAII: survives a failed ASSERT) +#include "mafianet/get_time.h" +#include "mafianet/sleep.h" +#include "mafianet/mmsg_batch.h" // MMSG_BATCH_MAX #include #include diff --git a/Tests/Integration/PacketAndLowLevelTests.cpp b/Tests/Integration/PacketAndLowLevelTests.cpp index 9c8a91d8a..6945bef76 100644 --- a/Tests/Integration/PacketAndLowLevelTests.cpp +++ b/Tests/Integration/PacketAndLowLevelTests.cpp @@ -7,13 +7,13 @@ #include -#include "mafianet/String.h" -#include "mafianet/PeerInterface.h" -#include "mafianet/MessageIdentifiers.h" -#include "mafianet/BitStream.h" -#include "mafianet/Sleep.h" -#include "mafianet/Time.h" -#include "mafianet/GetTime.h" +#include "mafianet/string.h" +#include "mafianet/peer_interface.h" +#include "mafianet/message_identifiers.h" +#include "mafianet/bit_stream.h" +#include "mafianet/sleep.h" +#include "mafianet/time.h" +#include "mafianet/get_time.h" #include "DebugTools.h" #include "CommonFunctions.h" #include "TestHelpers.h" diff --git a/Tests/Integration/PeerBuilderTests.cpp b/Tests/Integration/PeerBuilderTests.cpp index e1c8a106a..8a825a388 100644 --- a/Tests/Integration/PeerBuilderTests.cpp +++ b/Tests/Integration/PeerBuilderTests.cpp @@ -7,15 +7,15 @@ #include -#include "mafianet/String.h" -#include "mafianet/DS_List.h" -#include "mafianet/PeerInterface.h" -#include "mafianet/PeerHandle.h" -#include "mafianet/MessageIdentifiers.h" -#include "mafianet/BitStream.h" -#include "mafianet/Sleep.h" -#include "mafianet/Time.h" -#include "mafianet/GetTime.h" +#include "mafianet/string.h" +#include "mafianet/ds_list.h" +#include "mafianet/peer_interface.h" +#include "mafianet/peer_handle.h" +#include "mafianet/message_identifiers.h" +#include "mafianet/bit_stream.h" +#include "mafianet/sleep.h" +#include "mafianet/time.h" +#include "mafianet/get_time.h" #include // std::move diff --git a/Tests/Integration/PeerConnectDisconnectTests.cpp b/Tests/Integration/PeerConnectDisconnectTests.cpp index 77e4e2546..44f8c393b 100644 --- a/Tests/Integration/PeerConnectDisconnectTests.cpp +++ b/Tests/Integration/PeerConnectDisconnectTests.cpp @@ -7,13 +7,13 @@ #include -#include "mafianet/PeerInterface.h" -#include "mafianet/MessageIdentifiers.h" -#include "mafianet/BitStream.h" -#include "mafianet/Peer.h" -#include "mafianet/Sleep.h" -#include "mafianet/Time.h" -#include "mafianet/GetTime.h" +#include "mafianet/peer_interface.h" +#include "mafianet/message_identifiers.h" +#include "mafianet/bit_stream.h" +#include "mafianet/peer.h" +#include "mafianet/sleep.h" +#include "mafianet/time.h" +#include "mafianet/get_time.h" #include "CommonFunctions.h" #include diff --git a/Tests/Integration/PeerConnectDisconnectWithCancelPendingTests.cpp b/Tests/Integration/PeerConnectDisconnectWithCancelPendingTests.cpp index c1616ee7e..89355049d 100644 --- a/Tests/Integration/PeerConnectDisconnectWithCancelPendingTests.cpp +++ b/Tests/Integration/PeerConnectDisconnectWithCancelPendingTests.cpp @@ -7,13 +7,13 @@ #include -#include "mafianet/PeerInterface.h" -#include "mafianet/MessageIdentifiers.h" -#include "mafianet/BitStream.h" -#include "mafianet/Peer.h" -#include "mafianet/Sleep.h" -#include "mafianet/Time.h" -#include "mafianet/GetTime.h" +#include "mafianet/peer_interface.h" +#include "mafianet/message_identifiers.h" +#include "mafianet/bit_stream.h" +#include "mafianet/peer.h" +#include "mafianet/sleep.h" +#include "mafianet/time.h" +#include "mafianet/get_time.h" #include "CommonFunctions.h" #include diff --git a/Tests/Integration/PeerHandleTests.cpp b/Tests/Integration/PeerHandleTests.cpp index a4257c4ce..f23ce700e 100644 --- a/Tests/Integration/PeerHandleTests.cpp +++ b/Tests/Integration/PeerHandleTests.cpp @@ -7,15 +7,15 @@ #include -#include "mafianet/String.h" -#include "mafianet/DS_List.h" -#include "mafianet/PeerInterface.h" -#include "mafianet/PeerHandle.h" -#include "mafianet/MessageIdentifiers.h" -#include "mafianet/BitStream.h" -#include "mafianet/Sleep.h" -#include "mafianet/Time.h" -#include "mafianet/GetTime.h" +#include "mafianet/string.h" +#include "mafianet/ds_list.h" +#include "mafianet/peer_interface.h" +#include "mafianet/peer_handle.h" +#include "mafianet/message_identifiers.h" +#include "mafianet/bit_stream.h" +#include "mafianet/sleep.h" +#include "mafianet/time.h" +#include "mafianet/get_time.h" #include // std::move diff --git a/Tests/Integration/RPC4ContextTests.cpp b/Tests/Integration/RPC4ContextTests.cpp index e9466f9c0..5e248877c 100644 --- a/Tests/Integration/RPC4ContextTests.cpp +++ b/Tests/Integration/RPC4ContextTests.cpp @@ -7,13 +7,13 @@ #include -#include "mafianet/String.h" -#include "mafianet/DS_List.h" -#include "mafianet/PeerInterface.h" -#include "mafianet/RPC4Plugin.h" -#include "mafianet/MessageIdentifiers.h" -#include "mafianet/BitStream.h" -#include "mafianet/Sleep.h" +#include "mafianet/string.h" +#include "mafianet/ds_list.h" +#include "mafianet/peer_interface.h" +#include "mafianet/rpc4_plugin.h" +#include "mafianet/message_identifiers.h" +#include "mafianet/bit_stream.h" +#include "mafianet/sleep.h" #include #include diff --git a/Tests/Integration/ReliableOrderedConvertedTests.cpp b/Tests/Integration/ReliableOrderedConvertedTests.cpp index da2d07e5a..a3db4506f 100644 --- a/Tests/Integration/ReliableOrderedConvertedTests.cpp +++ b/Tests/Integration/ReliableOrderedConvertedTests.cpp @@ -7,13 +7,13 @@ #include -#include "mafianet/PeerInterface.h" -#include "mafianet/GetTime.h" -#include "mafianet/MessageIdentifiers.h" -#include "mafianet/BitStream.h" -#include "mafianet/Rand.h" -#include "mafianet/Statistics.h" -#include "mafianet/Sleep.h" +#include "mafianet/peer_interface.h" +#include "mafianet/get_time.h" +#include "mafianet/message_identifiers.h" +#include "mafianet/bit_stream.h" +#include "mafianet/rand.h" +#include "mafianet/statistics.h" +#include "mafianet/sleep.h" #include // For atoi #include diff --git a/Tests/Integration/SecurityFunctionsTests.cpp b/Tests/Integration/SecurityFunctionsTests.cpp index 6df3864ac..8c8251a9f 100644 --- a/Tests/Integration/SecurityFunctionsTests.cpp +++ b/Tests/Integration/SecurityFunctionsTests.cpp @@ -7,14 +7,14 @@ #include -#include "mafianet/String.h" -#include "mafianet/PeerInterface.h" -#include "mafianet/MessageIdentifiers.h" -#include "mafianet/BitStream.h" -#include "mafianet/Peer.h" -#include "mafianet/Sleep.h" -#include "mafianet/Time.h" -#include "mafianet/GetTime.h" +#include "mafianet/string.h" +#include "mafianet/peer_interface.h" +#include "mafianet/message_identifiers.h" +#include "mafianet/bit_stream.h" +#include "mafianet/peer.h" +#include "mafianet/sleep.h" +#include "mafianet/time.h" +#include "mafianet/get_time.h" #include "CommonFunctions.h" #include diff --git a/Tests/Integration/SessionConfigLiveTests.cpp b/Tests/Integration/SessionConfigLiveTests.cpp index 223cb6336..cba702eb2 100644 --- a/Tests/Integration/SessionConfigLiveTests.cpp +++ b/Tests/Integration/SessionConfigLiveTests.cpp @@ -11,12 +11,12 @@ #include #include -#include "mafianet/Peer.h" -#include "mafianet/PeerInterface.h" -#include "mafianet/MessageIdentifiers.h" -#include "mafianet/BitStream.h" -#include "mafianet/Sleep.h" -#include "mafianet/GetTime.h" +#include "mafianet/peer.h" +#include "mafianet/peer_interface.h" +#include "mafianet/message_identifiers.h" +#include "mafianet/bit_stream.h" +#include "mafianet/sleep.h" +#include "mafianet/get_time.h" using namespace MafiaNet; diff --git a/Tests/Integration/TypedSendLiveTests.cpp b/Tests/Integration/TypedSendLiveTests.cpp index 4778272fb..820f4a9ee 100644 --- a/Tests/Integration/TypedSendLiveTests.cpp +++ b/Tests/Integration/TypedSendLiveTests.cpp @@ -7,10 +7,10 @@ #include -#include "mafianet/Dispatcher.h" -#include "mafianet/PeerHandle.h" // Peer, PacketPtr, send()/broadcast() -#include "mafianet/GetTime.h" // GetTimeMS -#include "mafianet/Sleep.h" // RakSleep +#include "mafianet/dispatcher.h" +#include "mafianet/peer_handle.h" // Peer, PacketPtr, send()/broadcast() +#include "mafianet/get_time.h" // GetTimeMS +#include "mafianet/sleep.h" // RakSleep #include diff --git a/Tests/Support/CommonFunctions.h b/Tests/Support/CommonFunctions.h index 43dcd405d..f0f17241e 100644 --- a/Tests/Support/CommonFunctions.h +++ b/Tests/Support/CommonFunctions.h @@ -11,15 +11,15 @@ #pragma once -#include "mafianet/String.h" +#include "mafianet/string.h" -#include "mafianet/PeerInterface.h" -#include "mafianet/MessageIdentifiers.h" -#include "mafianet/BitStream.h" -#include "mafianet/Peer.h" -#include "mafianet/Sleep.h" -#include "mafianet/Time.h" -#include "mafianet/GetTime.h" +#include "mafianet/peer_interface.h" +#include "mafianet/message_identifiers.h" +#include "mafianet/bit_stream.h" +#include "mafianet/peer.h" +#include "mafianet/sleep.h" +#include "mafianet/time.h" +#include "mafianet/get_time.h" #include "DebugTools.h" #include "RakTimer.h" diff --git a/Tests/Support/DebugTools.h b/Tests/Support/DebugTools.h index c1459ed63..d1b540a80 100644 --- a/Tests/Support/DebugTools.h +++ b/Tests/Support/DebugTools.h @@ -11,7 +11,7 @@ #pragma once -#include "mafianet/String.h" +#include "mafianet/string.h" using namespace MafiaNet; class DebugTools diff --git a/Tests/Support/PacketChangerPlugin.h b/Tests/Support/PacketChangerPlugin.h index 842a25e48..473bce6ac 100644 --- a/Tests/Support/PacketChangerPlugin.h +++ b/Tests/Support/PacketChangerPlugin.h @@ -10,11 +10,11 @@ #pragma once -#include "mafianet/Types.h" -#include "mafianet/PluginInterface2.h" -#include "mafianet/PacketPriority.h" -#include "mafianet/MessageIdentifiers.h" -#include "mafianet/InternalPacket.h" +#include "mafianet/types.h" +#include "mafianet/plugin_interface2.h" +#include "mafianet/packet_priority.h" +#include "mafianet/message_identifiers.h" +#include "mafianet/internal_packet.h" using namespace MafiaNet; class PacketChangerPlugin: public PluginInterface2 diff --git a/Tests/Support/PacketDropPlugin.h b/Tests/Support/PacketDropPlugin.h index 8df845f04..68f594ba1 100644 --- a/Tests/Support/PacketDropPlugin.h +++ b/Tests/Support/PacketDropPlugin.h @@ -11,11 +11,11 @@ #pragma once -#include "mafianet/Types.h" -#include "mafianet/PluginInterface2.h" -#include "mafianet/PacketPriority.h" -#include "mafianet/MessageIdentifiers.h" -#include "mafianet/InternalPacket.h" +#include "mafianet/types.h" +#include "mafianet/plugin_interface2.h" +#include "mafianet/packet_priority.h" +#include "mafianet/message_identifiers.h" +#include "mafianet/internal_packet.h" #include "RakTimer.h" using namespace MafiaNet; diff --git a/Tests/Support/RakTimer.h b/Tests/Support/RakTimer.h index 794f3defd..11e2b45db 100644 --- a/Tests/Support/RakTimer.h +++ b/Tests/Support/RakTimer.h @@ -11,8 +11,8 @@ #pragma once -#include "mafianet/Time.h" -#include "mafianet/GetTime.h" +#include "mafianet/time.h" +#include "mafianet/get_time.h" using namespace MafiaNet; class RakTimer diff --git a/Tests/Support/TestHelpers.h b/Tests/Support/TestHelpers.h index 77caa073c..dd04f8054 100644 --- a/Tests/Support/TestHelpers.h +++ b/Tests/Support/TestHelpers.h @@ -11,13 +11,13 @@ #pragma once -#include "mafianet/String.h" +#include "mafianet/string.h" -#include "mafianet/PeerInterface.h" -#include "mafianet/MessageIdentifiers.h" -#include "mafianet/BitStream.h" -#include "mafianet/Peer.h" -#include "mafianet/Sleep.h" +#include "mafianet/peer_interface.h" +#include "mafianet/message_identifiers.h" +#include "mafianet/bit_stream.h" +#include "mafianet/peer.h" +#include "mafianet/sleep.h" #include "DebugTools.h" #include "CommonFunctions.h" #include "RakTimer.h" diff --git a/Tests/Unit/ArchiveTests.cpp b/Tests/Unit/ArchiveTests.cpp index 036db9834..273b1648e 100644 --- a/Tests/Unit/ArchiveTests.cpp +++ b/Tests/Unit/ArchiveTests.cpp @@ -7,9 +7,9 @@ #include -#include "mafianet/String.h" -#include "mafianet/BitStream.h" -#include "mafianet/Archive.h" +#include "mafianet/string.h" +#include "mafianet/bit_stream.h" +#include "mafianet/archive.h" #include diff --git a/Tests/Unit/BitStreamStringTests.cpp b/Tests/Unit/BitStreamStringTests.cpp index 38cbf53a7..e17bd0277 100644 --- a/Tests/Unit/BitStreamStringTests.cpp +++ b/Tests/Unit/BitStreamStringTests.cpp @@ -7,8 +7,8 @@ #include -#include "mafianet/String.h" -#include "mafianet/BitStream.h" +#include "mafianet/string.h" +#include "mafianet/bit_stream.h" #include #include diff --git a/Tests/Unit/DispatcherTests.cpp b/Tests/Unit/DispatcherTests.cpp index 3e39720ec..cf544ff61 100644 --- a/Tests/Unit/DispatcherTests.cpp +++ b/Tests/Unit/DispatcherTests.cpp @@ -7,10 +7,10 @@ #include -#include "mafianet/Dispatcher.h" -#include "mafianet/BitStream.h" -#include "mafianet/MessageIdentifiers.h" -#include "mafianet/GetTime.h" +#include "mafianet/dispatcher.h" +#include "mafianet/bit_stream.h" +#include "mafianet/message_identifiers.h" +#include "mafianet/get_time.h" #include diff --git a/Tests/Unit/GuidUtilTests.cpp b/Tests/Unit/GuidUtilTests.cpp index d8d52b48c..b0669cc1d 100644 --- a/Tests/Unit/GuidUtilTests.cpp +++ b/Tests/Unit/GuidUtilTests.cpp @@ -7,9 +7,9 @@ #include -#include "mafianet/GuidUtil.h" -#include "mafianet/Types.h" -#include "mafianet/PeerInterface.h" +#include "mafianet/guid_util.h" +#include "mafianet/types.h" +#include "mafianet/peer_interface.h" #include #include diff --git a/Tests/Unit/LocalAddressTests.cpp b/Tests/Unit/LocalAddressTests.cpp index 6cd806514..b2e22c852 100644 --- a/Tests/Unit/LocalAddressTests.cpp +++ b/Tests/Unit/LocalAddressTests.cpp @@ -7,8 +7,8 @@ #include -#include "mafianet/PeerInterface.h" -#include "mafianet/Types.h" +#include "mafianet/peer_interface.h" +#include "mafianet/types.h" #include diff --git a/Tests/Unit/MmsgBatchTests.cpp b/Tests/Unit/MmsgBatchTests.cpp index e561d073e..4e22125d0 100644 --- a/Tests/Unit/MmsgBatchTests.cpp +++ b/Tests/Unit/MmsgBatchTests.cpp @@ -5,7 +5,7 @@ * license.txt file in the root directory of this source tree. * * Hermetic unit tests for the portable batched-datagram helpers in - * MmsgBatch.h. These exercise the logic that is genuinely bug-prone in a + * mmsg_batch.h. These exercise the logic that is genuinely bug-prone in a * recvmmsg/sendmmsg integration -- the sendmmsg partial-send resume loop, the * byte-order handling when decoding a raw sockaddr, and fanning a received * batch out to the event handler -- without touching any actual syscall, so @@ -14,9 +14,9 @@ #include -#include "mafianet/MmsgBatch.h" -#include "mafianet/Socket2.h" -#include "mafianet/Types.h" +#include "mafianet/mmsg_batch.h" +#include "mafianet/socket2.h" +#include "mafianet/types.h" #ifdef _WIN32 #include // inet_pton, htons (winsock2 pulled in via socket2.h) diff --git a/Tests/Unit/MtuBlackHoleTests.cpp b/Tests/Unit/MtuBlackHoleTests.cpp index e537ba453..011e3e551 100644 --- a/Tests/Unit/MtuBlackHoleTests.cpp +++ b/Tests/Unit/MtuBlackHoleTests.cpp @@ -24,8 +24,8 @@ #include -#include "mafianet/MtuBlackHole.h" -#include "mafianet/MTUSize.h" +#include "mafianet/mtu_black_hole.h" +#include "mafianet/mtu_size.h" using namespace MafiaNet; diff --git a/Tests/Unit/PeerGuidTests.cpp b/Tests/Unit/PeerGuidTests.cpp index 52b405a4e..8732b06d1 100644 --- a/Tests/Unit/PeerGuidTests.cpp +++ b/Tests/Unit/PeerGuidTests.cpp @@ -7,8 +7,8 @@ #include -#include "mafianet/Types.h" -#include "mafianet/BitStream.h" +#include "mafianet/types.h" +#include "mafianet/bit_stream.h" #include #include diff --git a/Tests/Unit/PointGridSectorizerTests.cpp b/Tests/Unit/PointGridSectorizerTests.cpp index 95b1a60ab..b37f9a1db 100644 --- a/Tests/Unit/PointGridSectorizerTests.cpp +++ b/Tests/Unit/PointGridSectorizerTests.cpp @@ -7,7 +7,7 @@ #include -#include "mafianet/PointGridSectorizer.h" +#include "mafianet/point_grid_sectorizer.h" #include #include diff --git a/Tests/Unit/RPC4GlobalRegistrationTests.cpp b/Tests/Unit/RPC4GlobalRegistrationTests.cpp index 39bac1a54..53be8592e 100644 --- a/Tests/Unit/RPC4GlobalRegistrationTests.cpp +++ b/Tests/Unit/RPC4GlobalRegistrationTests.cpp @@ -7,8 +7,8 @@ #include -#include "mafianet/RPC4Plugin.h" -#include "mafianet/PeerInterface.h" +#include "mafianet/rpc4_plugin.h" +#include "mafianet/peer_interface.h" #include diff --git a/Tests/Unit/RakVoiceRelayTests.cpp b/Tests/Unit/RakVoiceRelayTests.cpp index f31c40759..59e11dcd2 100644 --- a/Tests/Unit/RakVoiceRelayTests.cpp +++ b/Tests/Unit/RakVoiceRelayTests.cpp @@ -15,9 +15,9 @@ #include -#include "mafianet/MessageIdentifiers.h" -#include "mafianet/RakVoice.h" -#include "mafianet/Types.h" +#include "mafianet/message_identifiers.h" +#include "mafianet/voice.h" +#include "mafianet/types.h" #include #include diff --git a/Tests/Unit/ReliabilityLayerBlackHoleTests.cpp b/Tests/Unit/ReliabilityLayerBlackHoleTests.cpp index 93ce5d350..93a64b2da 100644 --- a/Tests/Unit/ReliabilityLayerBlackHoleTests.cpp +++ b/Tests/Unit/ReliabilityLayerBlackHoleTests.cpp @@ -22,17 +22,17 @@ #include #include -#include "mafianet/BitStream.h" -#include "mafianet/DS_List.h" -#include "mafianet/GetTime.h" -#include "mafianet/MTUSize.h" -#include "mafianet/MessageIdentifiers.h" -#include "mafianet/MtuBlackHole.h" -#include "mafianet/PacketPriority.h" -#include "mafianet/PluginInterface2.h" -#include "mafianet/Rand.h" -#include "mafianet/ReliabilityLayer.h" -#include "mafianet/Socket2.h" +#include "mafianet/bit_stream.h" +#include "mafianet/ds_list.h" +#include "mafianet/get_time.h" +#include "mafianet/mtu_size.h" +#include "mafianet/message_identifiers.h" +#include "mafianet/mtu_black_hole.h" +#include "mafianet/packet_priority.h" +#include "mafianet/plugin_interface2.h" +#include "mafianet/rand.h" +#include "mafianet/reliability_layer.h" +#include "mafianet/socket2.h" using namespace MafiaNet; diff --git a/Tests/Unit/ReplicaManager3SendSerializeTests.cpp b/Tests/Unit/ReplicaManager3SendSerializeTests.cpp index 44404eeae..0ecb3a645 100644 --- a/Tests/Unit/ReplicaManager3SendSerializeTests.cpp +++ b/Tests/Unit/ReplicaManager3SendSerializeTests.cpp @@ -7,11 +7,11 @@ #include -#include "mafianet/ReplicaManager3.h" -#include "mafianet/BitStream.h" -#include "mafianet/MessageIdentifiers.h" -#include "mafianet/NetworkIDManager.h" -#include "mafianet/PeerInterface.h" +#include "mafianet/replica_manager3.h" +#include "mafianet/bit_stream.h" +#include "mafianet/message_identifiers.h" +#include "mafianet/network_id_manager.h" +#include "mafianet/peer_interface.h" #include diff --git a/Tests/Unit/ReplicaManager3WorldTests.cpp b/Tests/Unit/ReplicaManager3WorldTests.cpp index 25034973e..883243003 100644 --- a/Tests/Unit/ReplicaManager3WorldTests.cpp +++ b/Tests/Unit/ReplicaManager3WorldTests.cpp @@ -7,7 +7,7 @@ #include -#include "mafianet/ReplicaManager3.h" +#include "mafianet/replica_manager3.h" using namespace MafiaNet; diff --git a/Tests/Unit/SessionAdmissionTests.cpp b/Tests/Unit/SessionAdmissionTests.cpp index b68ffc1b2..5a7622b6b 100644 --- a/Tests/Unit/SessionAdmissionTests.cpp +++ b/Tests/Unit/SessionAdmissionTests.cpp @@ -9,10 +9,10 @@ #include -#include "mafianet/SessionAdmission.h" -#include "mafianet/PeerInterface.h" -#include "mafianet/MessageIdentifiers.h" -#include "mafianet/Defines.h" +#include "mafianet/session_admission.h" +#include "mafianet/peer_interface.h" +#include "mafianet/message_identifiers.h" +#include "mafianet/defines.h" using namespace MafiaNet; diff --git a/Tests/Unit/SessionConfigTests.cpp b/Tests/Unit/SessionConfigTests.cpp index 1b84c44c2..4ae56656f 100644 --- a/Tests/Unit/SessionConfigTests.cpp +++ b/Tests/Unit/SessionConfigTests.cpp @@ -9,9 +9,9 @@ #include -#include "mafianet/PeerInterface.h" -#include "mafianet/MessageIdentifiers.h" -#include "mafianet/Defines.h" +#include "mafianet/peer_interface.h" +#include "mafianet/message_identifiers.h" +#include "mafianet/defines.h" using namespace MafiaNet; diff --git a/Tests/Unit/SocketErrorTests.cpp b/Tests/Unit/SocketErrorTests.cpp index f509d3b66..d5032a10e 100644 --- a/Tests/Unit/SocketErrorTests.cpp +++ b/Tests/Unit/SocketErrorTests.cpp @@ -17,8 +17,8 @@ #include -#include "mafianet/Socket2.h" -#include "mafianet/MTUSize.h" +#include "mafianet/socket2.h" +#include "mafianet/mtu_size.h" #include diff --git a/Tests/Unit/StatisticsHistorySamplingTests.cpp b/Tests/Unit/StatisticsHistorySamplingTests.cpp index bc58968a0..9e3685418 100644 --- a/Tests/Unit/StatisticsHistorySamplingTests.cpp +++ b/Tests/Unit/StatisticsHistorySamplingTests.cpp @@ -7,8 +7,8 @@ #include -#include "mafianet/StatisticsHistory.h" -#include "mafianet/PeerInterface.h" +#include "mafianet/statistics_history.h" +#include "mafianet/peer_interface.h" using namespace MafiaNet; diff --git a/Tests/Unit/TwoWayAuthenticationTimeoutTests.cpp b/Tests/Unit/TwoWayAuthenticationTimeoutTests.cpp index 321843d4e..2b9096f09 100644 --- a/Tests/Unit/TwoWayAuthenticationTimeoutTests.cpp +++ b/Tests/Unit/TwoWayAuthenticationTimeoutTests.cpp @@ -7,9 +7,9 @@ #include -#include "mafianet/TwoWayAuthentication.h" -#include "mafianet/MessageIdentifiers.h" -#include "mafianet/PeerInterface.h" +#include "mafianet/two_way_authentication.h" +#include "mafianet/message_identifiers.h" +#include "mafianet/peer_interface.h" using namespace MafiaNet; diff --git a/Tests/Unit/VirtualWorldTests.cpp b/Tests/Unit/VirtualWorldTests.cpp index ba4c33bad..17e134305 100644 --- a/Tests/Unit/VirtualWorldTests.cpp +++ b/Tests/Unit/VirtualWorldTests.cpp @@ -7,11 +7,11 @@ #include -#include "mafianet/ReplicaManager3.h" -#include "mafianet/VirtualWorld.h" -#include "mafianet/VirtualWorldReplica3.h" -#include "mafianet/BitStream.h" -#include "mafianet/PeerInterface.h" +#include "mafianet/replica_manager3.h" +#include "mafianet/virtual_world.h" +#include "mafianet/virtual_world_replica3.h" +#include "mafianet/bit_stream.h" +#include "mafianet/peer_interface.h" using namespace MafiaNet; diff --git a/cmake/FetchVoiceDependencies.cmake b/cmake/FetchVoiceDependencies.cmake index 05911d7e3..ceaa0eafc 100644 --- a/cmake/FetchVoiceDependencies.cmake +++ b/cmake/FetchVoiceDependencies.cmake @@ -87,7 +87,7 @@ if(NOT TARGET rnnoise) target_include_directories(rnnoise PUBLIC # Build-interface only: rnnoise is bundled into the MafiaNet export, - # but its headers are not installed (RakVoice.h forward-declares the + # but its headers are not installed (voice.h forward-declares the # RNNoise types), so this build-tree path must not leak into the # exported/installed interface. $ diff --git a/docs/advanced/congestion-control.rst b/docs/advanced/congestion-control.rst index 882e3d5ec..83e8b52d8 100644 --- a/docs/advanced/congestion-control.rst +++ b/docs/advanced/congestion-control.rst @@ -91,7 +91,7 @@ Tuning Parameters // There is no setter; read the result back with: peer->GetMTUSize(remoteAddress); - // The ceiling is compile-time. Lower MAXIMUM_MTU_SIZE (mafianet/MTUSize.h) if + // The ceiling is compile-time. Lower MAXIMUM_MTU_SIZE (mafianet/mtu_size.h) if // your peers sit behind tunnelling with more overhead than 1400 leaves room for. // Timeout settings diff --git a/docs/advanced/custom-memory-management.rst b/docs/advanced/custom-memory-management.rst index 32359ed2d..1642ca899 100644 --- a/docs/advanced/custom-memory-management.rst +++ b/docs/advanced/custom-memory-management.rst @@ -21,7 +21,7 @@ Basic Usage .. code-block:: cpp - #include "mafianet/MemoryOverride.h" + #include "mafianet/memory_override.h" // Define custom allocation functions void* MyMalloc(size_t size) { @@ -72,7 +72,7 @@ Basic Usage .. code-block:: cpp - #include "mafianet/DS_MemoryPool.h" + #include "mafianet/ds_memory_pool.h" // Create a pool for fixed-size objects MafiaNet::DataStructures::MemoryPool packetPool; diff --git a/docs/advanced/debugging-disconnects.rst b/docs/advanced/debugging-disconnects.rst index b04150d0d..af6604d28 100644 --- a/docs/advanced/debugging-disconnects.rst +++ b/docs/advanced/debugging-disconnects.rst @@ -43,7 +43,7 @@ Diagnostic Tools .. code-block:: cpp - #include "mafianet/PacketLogger.h" + #include "mafianet/packet_logger.h" MafiaNet::PacketLogger logger; peer->AttachPlugin(&logger); diff --git a/docs/advanced/nat-traversal-architecture.rst b/docs/advanced/nat-traversal-architecture.rst index 176bfddc6..9692c58b0 100644 --- a/docs/advanced/nat-traversal-architecture.rst +++ b/docs/advanced/nat-traversal-architecture.rst @@ -40,8 +40,8 @@ Basic Usage .. code-block:: cpp - #include "mafianet/NatPunchthroughServer.h" - #include "mafianet/UDPProxyCoordinator.h" + #include "mafianet/nat_punchthrough_server.h" + #include "mafianet/udp_proxy_coordinator.h" MafiaNet::NatPunchthroughServer natServer; MafiaNet::UDPProxyCoordinator proxyCoord; @@ -53,7 +53,7 @@ Basic Usage .. code-block:: cpp - #include "mafianet/NatPunchthroughClient.h" + #include "mafianet/nat_punchthrough_client.h" MafiaNet::NatPunchthroughClient natClient; peer->AttachPlugin(&natClient); @@ -77,7 +77,7 @@ Basic Usage .. code-block:: cpp - #include "mafianet/NatPunchthroughClient.h" + #include "mafianet/nat_punchthrough_client.h" // Attempt UPnP port mapping first natClient.SetUPNP(true); diff --git a/docs/api/core.rst b/docs/api/core.rst index 56ed50c19..fdf9d02d1 100644 --- a/docs/api/core.rst +++ b/docs/api/core.rst @@ -75,9 +75,9 @@ Configuration for network sockets. Message Identifiers ------------------- -Built-in message types are defined in ``MessageIdentifiers.h``. +Built-in message types are defined in ``message_identifiers.h``. -.. doxygenfile:: MessageIdentifiers.h +.. doxygenfile:: message_identifiers.h :sections: enum Enumerations @@ -153,7 +153,7 @@ opt-in via ``RakPeerInterface::InitializeSecurity()`` (see Canonical Type Aliases ---------------------- -``mafianet/Aliases.h`` (also pulled in by the umbrella header) provides +``mafianet/aliases.h`` (also pulled in by the umbrella header) provides canonical MafiaNet names over the legacy RakNet-named public types. They are ``using`` aliases denoting the *exact same* types/objects, so old and new names interoperate freely: @@ -176,7 +176,7 @@ interoperate freely: RAII Handles (Peer / PacketPtr) ------------------------------- -``mafianet/PeerHandle.h`` (exported from the umbrella header) provides two RAII +``mafianet/peer_handle.h`` (exported from the umbrella header) provides two RAII owners that remove manual ``DestroyInstance`` / ``DeallocatePacket`` bookkeeping: @@ -264,7 +264,7 @@ returns. Serialization Archives (WriteArchive / ReadArchive) --------------------------------------------------- -``mafianet/Archive.h`` (pulled in by the umbrella header) provides a single +``mafianet/archive.h`` (pulled in by the umbrella header) provides a single serialization convention over ``BitStream``. A user type describes its wire format once with a member template, and the same ``serialize()`` serves both directions — no duplicated read/write field lists: @@ -304,7 +304,7 @@ are the :ref:`Dispatcher `'s job. Typed Message Dispatcher (Dispatcher / Sender) ---------------------------------------------- -``mafianet/Dispatcher.h`` (pulled in by the umbrella header) replaces the +``mafianet/dispatcher.h`` (pulled in by the umbrella header) replaces the classic giant ``switch`` on ``packet->data[0]`` — plus the hand-rolled ``ID_TIMESTAMP``-skipping helper — with typed handlers. It builds on the receive iterator, ``PacketPtr``, and the serialization archives: @@ -374,7 +374,7 @@ identifier must be known), and the raw ``Send()`` remains untouched. Value-Type GUID Helpers ----------------------- -``mafianet/GuidUtil.h`` provides modern, thread-safe value-type accessors: +``mafianet/guid_util.h`` provides modern, thread-safe value-type accessors: * ``std::string MafiaNet::to_string(const RakNetGUID&)`` — owns its buffer and is thread-safe (replaces the removed ``RakNetGUID::ToString(void)``). diff --git a/docs/basics/bitstreams.rst b/docs/basics/bitstreams.rst index 360dd5155..28dad7c04 100644 --- a/docs/basics/bitstreams.rst +++ b/docs/basics/bitstreams.rst @@ -18,7 +18,7 @@ BitStream is templated to accept any data type: .. code-block:: cpp - #include "mafianet/BitStream.h" + #include "mafianet/bit_stream.h" MafiaNet::BitStream bs; @@ -81,7 +81,7 @@ The serialize() Convention (Archives) Instead of writing both shift operators, a type can describe its wire format once with a member ``serialize()`` template and be read/written through the -``WriteArchive`` / ``ReadArchive`` adapters (``mafianet/Archive.h``): +``WriteArchive`` / ``ReadArchive`` adapters (``mafianet/archive.h``): .. code-block:: cpp diff --git a/docs/basics/data-compression.rst b/docs/basics/data-compression.rst index 748de9ca8..eed6a11e9 100644 --- a/docs/basics/data-compression.rst +++ b/docs/basics/data-compression.rst @@ -87,7 +87,7 @@ Use StringCompressor for repeated strings: .. code-block:: cpp - #include "mafianet/StringCompressor.h" + #include "mafianet/string_compressor.h" // Add common strings to table MafiaNet::StringCompressor::Instance()->AddReference( @@ -111,7 +111,7 @@ For larger data blocks: .. code-block:: cpp - #include "mafianet/DataCompressor.h" + #include "mafianet/data_compressor.h" // Compress unsigned compressedSize; diff --git a/docs/basics/network-id-object.rst b/docs/basics/network-id-object.rst index 168738459..cdf27b278 100644 --- a/docs/basics/network-id-object.rst +++ b/docs/basics/network-id-object.rst @@ -28,7 +28,7 @@ Inherit from NetworkIDObject .. code-block:: cpp - #include "mafianet/NetworkIDObject.h" + #include "mafianet/network_id_object.h" class Player : public MafiaNet::NetworkIDObject { public: diff --git a/docs/basics/network-messages.rst b/docs/basics/network-messages.rst index fe54bcdf3..6f4381bb8 100644 --- a/docs/basics/network-messages.rst +++ b/docs/basics/network-messages.rst @@ -6,7 +6,7 @@ MafiaNet uses message IDs to identify packet types. The first byte of every pack Built-in Message IDs -------------------- -MafiaNet reserves IDs 0-134 for internal use. These are defined in ``MessageIdentifiers.h``. +MafiaNet reserves IDs 0-134 for internal use. These are defined in ``message_identifiers.h``. Connection Messages ~~~~~~~~~~~~~~~~~~~ diff --git a/docs/basics/secure-connections.rst b/docs/basics/secure-connections.rst index 72ab6e691..3c15f9f62 100644 --- a/docs/basics/secure-connections.rst +++ b/docs/basics/secure-connections.rst @@ -94,7 +94,7 @@ For password-based authentication without exposing the password: .. code-block:: cpp - #include "mafianet/TwoWayAuthentication.h" + #include "mafianet/two_way_authentication.h" MafiaNet::TwoWayAuthentication* auth = MafiaNet::TwoWayAuthentication::GetInstance(); diff --git a/docs/basics/startup.rst b/docs/basics/startup.rst index 7267a1ccf..0ada70fa9 100644 --- a/docs/basics/startup.rst +++ b/docs/basics/startup.rst @@ -130,7 +130,7 @@ Example: Basic Server Startup .. code-block:: cpp - #include "mafianet/PeerInterface.h" + #include "mafianet/peer_interface.h" MafiaNet::RakPeerInterface* server = MafiaNet::RakPeerInterface::GetInstance(); diff --git a/docs/basics/statistics.rst b/docs/basics/statistics.rst index 15df49d8a..bba6e2c1b 100644 --- a/docs/basics/statistics.rst +++ b/docs/basics/statistics.rst @@ -166,7 +166,7 @@ For tracking statistics over time, use the StatisticsHistory plugin: .. code-block:: cpp - #include "mafianet/StatisticsHistory.h" + #include "mafianet/statistics_history.h" MafiaNet::StatisticsHistoryPlugin* statsHistory = MafiaNet::StatisticsHistoryPlugin::GetInstance(); diff --git a/docs/changelog.rst b/docs/changelog.rst index 0492e890b..2a01dc020 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -8,13 +8,13 @@ Unreleased **Build** -* **New CMake options: ``MAFIANET_DISABLED_FEATURES`` and ``MAFIANET_MINIMAL``.** The ``_RAKNET_SUPPORT_`` plugin flags from ``NativeFeatureIncludes.h`` can now be set from CMake (``-DMAFIANET_DISABLED_FEATURES="ReplicaManager3;RPC4Plugin"`` or ``-DMAFIANET_MINIMAL=ON`` for the core transport alone). The definitions are ``PUBLIC`` on the library targets so consumers see the same configuration. Unknown names are a configure error. A ``linux-minimal`` CI job builds the ``MAFIANET_MINIMAL`` configuration. See :doc:`/getting-started/building`. +* **New CMake options: ``MAFIANET_DISABLED_FEATURES`` and ``MAFIANET_MINIMAL``.** The ``_RAKNET_SUPPORT_`` plugin flags from ``native_feature_includes.h`` can now be set from CMake (``-DMAFIANET_DISABLED_FEATURES="ReplicaManager3;RPC4Plugin"`` or ``-DMAFIANET_MINIMAL=ON`` for the core transport alone). The definitions are ``PUBLIC`` on the library targets so consumers see the same configuration. Unknown names are a configure error. A ``linux-minimal`` CI job builds the ``MAFIANET_MINIMAL`` configuration. See :doc:`/getting-started/building`. -**Header names.** Every public header is now PascalCase, without the RakNet prefix the project dropped (``peerinterface.h`` → ``PeerInterface.h``, ``peer.h`` → ``Peer.h``, ``types.h`` → ``Types.h``, ``string.h`` → ``String.h``, ``wstring.h`` → ``WString.h``, ``time.h`` → ``Time.h``, ``sleep.h`` → ``Sleep.h``, ``thread.h`` → ``Thread.h``, ``assert.h`` → ``Assert.h``, ``alloca.h`` → ``Alloca.h``, ``defines.h`` → ``Defines.h``, ``defineoverrides.h`` → ``DefineOverrides.h``, ``memoryoverride.h`` → ``MemoryOverride.h``, ``smartptr.h`` → ``SmartPtr.h``, ``socket2.h`` → ``Socket2.h``, ``statistics.h`` → ``Statistics.h``, ``transport2.h`` → ``Transport2.h``, ``commandparser.h`` → ``CommandParser.h``, ``guid_util.h`` → ``GuidUtil.h``, ``linux_adapter.h`` → ``LinuxAdapter.h``, ``osx_adapter.h`` → ``OsxAdapter.h``, ``gettimeofday.h`` → ``GetTimeOfDay.h``, ``aliases.h`` → ``Aliases.h``, ``version.h`` → ``Version.h``). The umbrella header stays ``mafianet/mafianet.h``. On Windows and macOS the old lowercase spellings still resolve, since those file systems ignore case; on Linux includes must be updated. ``guid_util.h``, ``linux_adapter.h`` and ``osx_adapter.h`` remain as forwarding headers that emit a ``#pragma message`` and will be removed in the next minor release (define ``MAFIANET_SILENCE_DEPRECATED_INCLUDES`` to quiet it). The matching sources were renamed too (``GuidUtil.cpp``, ``LinuxAdapter.cpp``, ``OsxAdapter.cpp``, ``GetTimeOfDay.cpp``). +**File names are snake_case.** Every header and source under ``Source/`` is now lowercase ``snake_case`` (``BitStream.h`` → ``bit_stream.h``, ``ReliabilityLayer.h`` → ``reliability_layer.h``, ``peerinterface.h`` → ``peer_interface.h``, ``DS_List.h`` → ``ds_list.h``, ``HTTPConnection2.h`` → ``http_connection2.h``), and the RakNet prefix is gone from file names (``RakVoice.h`` → ``voice.h``, ``RakPeer.cpp`` → ``peer.cpp``, ``CCRakNetUDT.h`` → ``cc_udt.h``). Class names are unchanged. The umbrella header stays ``mafianet/mafianet.h`` and the ``crypto/`` headers were already lowercase. Since almost every rename differs from the old name only by case, no forwarding headers are possible: on Windows and macOS the old spellings still resolve, on Linux every ``#include "mafianet/..."`` must be updated (a case-insensitive search-and-replace over the names above). Library headers now include each other only as ``"mafianet/.h"``; a CI check rejects bare quoted includes inside ``include/mafianet/`` so that ``string.h``, ``time.h`` and ``assert.h`` can never shadow the C headers. **Extras library.** ``EmailSender``, ``HTTPConnection``, ``HTTPConnection2``, ``TelnetTransport``, ``RakNetTransport2``, ``ConsoleServer``, ``CommandParserInterface``, ``RakNetCommandParser``, ``LogCommandParser`` and ``PacketConsoleLogger`` moved out of the core library into ``MafiaNetExtras`` (``MafiaNet::MafiaNetExtras``), built with ``MAFIANET_BUILD_EXTRAS=ON`` (forced on by ``MAFIANET_BUILD_SAMPLES``). Headers and include paths are unchanged; code using these classes must link the extras target. See :doc:`/getting-started/building`. -**Deprecated containers.** ``DS_BinarySearchTree.h``, ``DS_QueueLinkedList.h``, ``DS_HuffmanEncodingTreeFactory.h``, ``DS_OrderedChannelHeap.h`` and ``DS_BytePool.h`` have no consumer in the library. They now emit a ``#pragma message`` on inclusion and will be removed in the next minor release; copy them into your project if you depend on them. +**Deprecated containers.** ``ds_binary_search_tree.h``, ``ds_queue_linked_list.h``, ``ds_huffman_encoding_tree_factory.h``, ``ds_ordered_channel_heap.h`` and ``ds_byte_pool.h`` have no consumer in the library. They now emit a ``#pragma message`` on inclusion and will be removed in the next minor release; copy them into your project if you depend on them. **Removed: dead platform code.** Xbox 360, PlayStation 3, PlayStation 4, PlayStation Vita and Google Native Client could not be targeted for years; their remaining headers were already empty. Removed in this release: @@ -70,7 +70,7 @@ Version 0.21.0 * **New: ``ID_SESSION_CONFIG_ABANDONED``.** An interactive server is told when a request it was holding goes away unanswered -- the client left, the transport dropped, or the session timeout passed -- so it can drop the decision it was working on. Sent once, never for a request the application answered. -* **New header: ``SessionAdmission.h``.** The slot accounting as pure functions, unit tested directly. +* **New header: ``session_admission.h``.** The slot accounting as pure functions, unit tested directly. * **New guide: Admission and Queues.** How the pool, the session timeout, status and abandonment fit together, with a complete queue. @@ -355,7 +355,7 @@ Version 0.11.0 failure — never collapsed to a bool. Security stays opt-in (``ServerBuilder::secure()``, ``ClientBuilder::public_key()``). -* **Serialization archives** in ``mafianet/Archive.h``. A single +* **Serialization archives** in ``mafianet/archive.h``. A single ``serialize()`` convention over ``BitStream``: a user type describes its wire format once (``template void serialize(Ar& ar) { ar & a & b; }``) and ``WriteArchive`` / ``ReadArchive`` run it in either direction. Fields @@ -363,7 +363,7 @@ Version 0.11.0 ``BitStream``'s ``operator<<`` / ``operator>>`` and its per-type specializations. Exported from the umbrella header. -* **Typed message dispatcher** in ``mafianet/Dispatcher.h``. +* **Typed message dispatcher** in ``mafianet/dispatcher.h``. ``MafiaNet::Dispatcher`` replaces the giant switch-on-first-byte receive loop: ``on(handler)`` registers a typed handler (auto-assigning identifiers from ``ID_USER_PACKET_ENUM`` in registration order — a documented @@ -384,8 +384,8 @@ Version 0.11.0 **Build** -* **RakVoice is built into the core library.** ``RakVoice.h`` moved to - ``mafianet/RakVoice.h`` and its codec dependencies (Opus, RNNoise) are +* **RakVoice is built into the core library.** ``voice.h`` moved to + ``mafianet/voice.h`` and its codec dependencies (Opus, RNNoise) are fetched and linked into the core library automatically — no separate extension build required. @@ -416,7 +416,7 @@ Version 0.10.0 headers are intentionally omitted; connection security stays opt-in via ``RakPeerInterface::InitializeSecurity()``. -* **Canonical type aliases** in ``mafianet/Aliases.h`` over the legacy +* **Canonical type aliases** in ``mafianet/aliases.h`` over the legacy RakNet-named public types: ``PeerInterface`` (``RakPeerInterface``), ``Guid`` (``RakNetGUID``), ``Statistics`` (``RakNetStatistics``) and ``UnassignedGuid`` (``UNASSIGNED_RAKNET_GUID``). These are ``using`` aliases denoting the exact @@ -424,14 +424,14 @@ Version 0.10.0 declarations are left untouched and un-deprecated. Pulled into the umbrella header. -* **RAII handles** ``Peer`` and ``PacketPtr`` in ``mafianet/PeerHandle.h`` +* **RAII handles** ``Peer`` and ``PacketPtr`` in ``mafianet/peer_handle.h`` (exported from the umbrella header). ``Peer`` owns a ``RakPeerInterface`` instance and destroys it on scope exit; ``PacketPtr`` owns a received ``Packet`` and deallocates it automatically — removing manual ``DestroyInstance`` / ``DeallocatePacket`` bookkeeping. The ChatExample client is rewritten to demonstrate them. -* **Thread-safe value-type GUID accessors** in ``mafianet/GuidUtil.h``: +* **Thread-safe value-type GUID accessors** in ``mafianet/guid_util.h``: ``std::string MafiaNet::to_string(const RakNetGUID&)`` owns its buffer and is thread-safe, and ``std::optional connected_address(...)`` maps the ``UNASSIGNED_SYSTEM_ADDRESS`` sentinel to ``std::nullopt``. @@ -540,13 +540,13 @@ Version 0.7.0 world (or the ``VIRTUAL_WORLD_GLOBAL`` sentinel), switchable on the fly with no reconnect, while staying on the same connection and the same RM3 ``WorldId``. Derive entities from the new ``VirtualWorldReplica3`` base - (``mafianet/VirtualWorldReplica3.h``); ``Connection_RM3`` gains + (``mafianet/virtual_world_replica3.h``); ``Connection_RM3`` gains ``Get/SetVirtualWorld``; ``ReplicaManager3`` gains ``GetConnectionsInVirtualWorld`` / ``GetGuidsInVirtualWorld`` (recipient-filter helpers for scoping non-replica traffic like chat and RPC) and ``SetPlayerVirtualWorld``. The filter is applied only by the authority for an (entity, connection) pair, so a downloaded copy never despawns the entity at - its owner. See ``mafianet/VirtualWorld.h`` and the ``Samples/VirtualWorld`` demo. + its owner. See ``mafianet/virtual_world.h`` and the ``Samples/VirtualWorld`` demo. **Documentation** diff --git a/docs/getting-started/building.rst b/docs/getting-started/building.rst index 90018fa33..f16365f2b 100644 --- a/docs/getting-started/building.rst +++ b/docs/getting-started/building.rst @@ -75,7 +75,7 @@ Minimal builds Every optional plugin in the core library (``ReplicaManager3``, ``RPC4Plugin``, ``FileListTransfer``, the NAT traversal plugins, ``TCPInterface`` and its users, and so on) is guarded by a ``_RAKNET_SUPPORT_`` flag declared in -``mafianet/NativeFeatureIncludes.h``. The transport itself, ``BitStream``, +``mafianet/native_feature_includes.h``. The transport itself, ``BitStream``, ``RakPeer``, the reliability layer and ``RakVoice`` are always built. The supported way to compile plugins out is through CMake, not by editing the @@ -127,7 +127,7 @@ only the link line changes. The extras target links the core library The classes still honour their ``_RAKNET_SUPPORT_`` flags, and ``MAFIANET_DISABLED_FEATURES`` applies to the extras target too. -Using ``NativeFeatureIncludesOverrides.h`` to set the same flags still works, +Using ``native_feature_includes_overrides.h`` to set the same flags still works, but the CMake route keeps the configuration in the build system, where it is visible to consumers through the exported targets. @@ -194,7 +194,7 @@ figures. Reproduce with: The per-datagram column is the code every non-Linux platform runs. To reproduce it on Linux, flip the ``#if defined(__linux__)`` batching guards in -``RakNetSocket2.cpp``, ``RakNetSocket2_Berkley.cpp``, ``ReliabilityLayer.cpp`` and +``socket2.cpp``, ``socket2_berkley.cpp``, ``reliability_layer.cpp`` and ``RakNetSocket2.h`` to ``#if 0``. Running Tests diff --git a/docs/getting-started/quickstart.rst b/docs/getting-started/quickstart.rst index 78b3576b8..8f61c5b23 100644 --- a/docs/getting-started/quickstart.rst +++ b/docs/getting-started/quickstart.rst @@ -65,8 +65,8 @@ Basic Server .. code-block:: cpp - #include "mafianet/PeerInterface.h" - #include "mafianet/MessageIdentifiers.h" + #include "mafianet/peer_interface.h" + #include "mafianet/message_identifiers.h" int main() { // Create the peer interface @@ -108,8 +108,8 @@ Basic Client .. code-block:: cpp - #include "mafianet/PeerInterface.h" - #include "mafianet/MessageIdentifiers.h" + #include "mafianet/peer_interface.h" + #include "mafianet/message_identifiers.h" int main() { MafiaNet::RakPeerInterface* client = MafiaNet::RakPeerInterface::GetInstance(); @@ -159,7 +159,7 @@ Send a message using BitStream: .. code-block:: cpp - #include "mafianet/BitStream.h" + #include "mafianet/bit_stream.h" // Create message MafiaNet::BitStream bs; diff --git a/docs/getting-started/system-overview.rst b/docs/getting-started/system-overview.rst index 4665527b9..efc27400a 100644 --- a/docs/getting-started/system-overview.rst +++ b/docs/getting-started/system-overview.rst @@ -123,7 +123,7 @@ Namespaces ---------- - ``MafiaNet::`` - Primary namespace for all classes -- ``MNet`` - Preprocessor macro shorthand that expands to ``MafiaNet`` (defined in ``mafianet/Defines.h``) +- ``MNet`` - Preprocessor macro shorthand that expands to ``MafiaNet`` (defined in ``mafianet/defines.h``) - ``DataStructures::`` - Container classes (DS_List, DS_Queue, etc.) Common Patterns diff --git a/docs/getting-started/tutorial.rst b/docs/getting-started/tutorial.rst index d6f318a15..725c9eddc 100644 --- a/docs/getting-started/tutorial.rst +++ b/docs/getting-started/tutorial.rst @@ -20,7 +20,7 @@ Create ``ChatCommon.h``: .. code-block:: cpp #pragma once - #include "mafianet/MessageIdentifiers.h" + #include "mafianet/message_identifiers.h" // Custom message types enum ChatMessages { @@ -38,9 +38,9 @@ Create ``ChatServer.cpp``: .. code-block:: cpp - #include "mafianet/PeerInterface.h" - #include "mafianet/BitStream.h" - #include "mafianet/String.h" + #include "mafianet/peer_interface.h" + #include "mafianet/bit_stream.h" + #include "mafianet/string.h" #include "ChatCommon.h" #include @@ -112,10 +112,10 @@ Create ``ChatClient.cpp``: .. code-block:: cpp - #include "mafianet/PeerInterface.h" - #include "mafianet/BitStream.h" - #include "mafianet/String.h" - #include "mafianet/Gets.h" + #include "mafianet/peer_interface.h" + #include "mafianet/bit_stream.h" + #include "mafianet/string.h" + #include "mafianet/gets.h" #include "ChatCommon.h" #include #include diff --git a/docs/guide/peer-to-peer.rst b/docs/guide/peer-to-peer.rst index dbe850dd8..bd0756516 100644 --- a/docs/guide/peer-to-peer.rst +++ b/docs/guide/peer-to-peer.rst @@ -10,7 +10,7 @@ The ``FullyConnectedMesh2`` plugin helps establish fully connected peer-to-peer .. code-block:: cpp - #include "mafianet/FullyConnectedMesh2.h" + #include "mafianet/fully_connected_mesh2.h" MafiaNet::FullyConnectedMesh2* fcm2 = MafiaNet::FullyConnectedMesh2::GetInstance(); peer->AttachPlugin(fcm2); @@ -27,7 +27,7 @@ For peers behind NAT, use the NAT punchthrough system. .. code-block:: cpp - #include "mafianet/NatPunchthroughServer.h" + #include "mafianet/nat_punchthrough_server.h" MafiaNet::NatPunchthroughServer* natServer = MafiaNet::NatPunchthroughServer::GetInstance(); @@ -37,7 +37,7 @@ For peers behind NAT, use the NAT punchthrough system. .. code-block:: cpp - #include "mafianet/NatPunchthroughClient.h" + #include "mafianet/nat_punchthrough_client.h" MafiaNet::NatPunchthroughClient* natClient = MafiaNet::NatPunchthroughClient::GetInstance(); diff --git a/docs/guide/plugins.rst b/docs/guide/plugins.rst index 9f99f0b75..84f414cd8 100644 --- a/docs/guide/plugins.rst +++ b/docs/guide/plugins.rst @@ -53,7 +53,7 @@ The ``ReplicaManager3`` plugin handles object replication: .. code-block:: cpp - #include "mafianet/ReplicaManager3.h" + #include "mafianet/replica_manager3.h" class MyReplica : public MafiaNet::Replica3 { public: @@ -82,7 +82,7 @@ Call functions on remote peers: .. code-block:: cpp - #include "mafianet/RPC4Plugin.h" + #include "mafianet/rpc4_plugin.h" MafiaNet::RPC4* rpc = MafiaNet::RPC4::GetInstance(); peer->AttachPlugin(rpc); diff --git a/docs/plugins/autopatcher.rst b/docs/plugins/autopatcher.rst index e0437476f..1875084d1 100644 --- a/docs/plugins/autopatcher.rst +++ b/docs/plugins/autopatcher.rst @@ -13,7 +13,7 @@ Basic Usage .. code-block:: cpp #include "AutopatcherServer.h" - #include "mafianet/AutopatcherRepositoryInterface.h" + #include "mafianet/autopatcher_repository_interface.h" // Use file-based or database repository MafiaNet::AutopatcherServer autopatcherServer; diff --git a/docs/plugins/cloud-computing.rst b/docs/plugins/cloud-computing.rst index 162c13018..0585af876 100644 --- a/docs/plugins/cloud-computing.rst +++ b/docs/plugins/cloud-computing.rst @@ -12,7 +12,7 @@ Basic Usage .. code-block:: cpp - #include "mafianet/CloudServer.h" + #include "mafianet/cloud_server.h" MafiaNet::CloudServer cloudServer; peer->AttachPlugin(&cloudServer); @@ -25,7 +25,7 @@ Basic Usage .. code-block:: cpp - #include "mafianet/CloudClient.h" + #include "mafianet/cloud_client.h" MafiaNet::CloudClient cloudClient; peer->AttachPlugin(&cloudClient); diff --git a/docs/plugins/directory-delta-transfer.rst b/docs/plugins/directory-delta-transfer.rst index 9b1371a03..3679a2781 100644 --- a/docs/plugins/directory-delta-transfer.rst +++ b/docs/plugins/directory-delta-transfer.rst @@ -12,7 +12,7 @@ Basic Usage .. code-block:: cpp - #include "mafianet/DirectoryDeltaTransfer.h" + #include "mafianet/directory_delta_transfer.h" MafiaNet::DirectoryDeltaTransfer ddt; MafiaNet::FileListTransfer flt; diff --git a/docs/plugins/file-list-transfer.rst b/docs/plugins/file-list-transfer.rst index 9a3bb98c0..9e9665789 100644 --- a/docs/plugins/file-list-transfer.rst +++ b/docs/plugins/file-list-transfer.rst @@ -12,8 +12,8 @@ Basic Usage .. code-block:: cpp - #include "mafianet/FileListTransfer.h" - #include "mafianet/FileList.h" + #include "mafianet/file_list_transfer.h" + #include "mafianet/file_list.h" MafiaNet::FileListTransfer flt; peer->AttachPlugin(&flt); diff --git a/docs/plugins/fully-connected-mesh-2.rst b/docs/plugins/fully-connected-mesh-2.rst index 55a8783c3..1f57bf3fa 100644 --- a/docs/plugins/fully-connected-mesh-2.rst +++ b/docs/plugins/fully-connected-mesh-2.rst @@ -12,7 +12,7 @@ Basic Usage .. code-block:: cpp - #include "mafianet/FullyConnectedMesh2.h" + #include "mafianet/fully_connected_mesh2.h" MafiaNet::FullyConnectedMesh2 fcm2; peer->AttachPlugin(&fcm2); diff --git a/docs/plugins/message-filter.rst b/docs/plugins/message-filter.rst index 1697a46e4..dae6201f5 100644 --- a/docs/plugins/message-filter.rst +++ b/docs/plugins/message-filter.rst @@ -12,7 +12,7 @@ Basic Usage .. code-block:: cpp - #include "mafianet/MessageFilter.h" + #include "mafianet/message_filter.h" MafiaNet::MessageFilter messageFilter; peer->AttachPlugin(&messageFilter); diff --git a/docs/plugins/nat-punchthrough.rst b/docs/plugins/nat-punchthrough.rst index e197268df..f8a6a2a0a 100644 --- a/docs/plugins/nat-punchthrough.rst +++ b/docs/plugins/nat-punchthrough.rst @@ -40,7 +40,7 @@ Server Setup (Facilitator) .. code-block:: cpp - #include "mafianet/NatPunchthroughServer.h" + #include "mafianet/nat_punchthrough_server.h" MafiaNet::RakPeerInterface* server = MafiaNet::RakPeerInterface::GetInstance(); @@ -59,7 +59,7 @@ Client Setup .. code-block:: cpp - #include "mafianet/NatPunchthroughClient.h" + #include "mafianet/nat_punchthrough_client.h" MafiaNet::RakPeerInterface* peer = MafiaNet::RakPeerInterface::GetInstance(); diff --git a/docs/plugins/nat-type-detection.rst b/docs/plugins/nat-type-detection.rst index 474a777c2..6cdfe952f 100644 --- a/docs/plugins/nat-type-detection.rst +++ b/docs/plugins/nat-type-detection.rst @@ -12,7 +12,7 @@ Basic Usage .. code-block:: cpp - #include "mafianet/NatTypeDetectionClient.h" + #include "mafianet/nat_type_detection_client.h" MafiaNet::NatTypeDetectionClient natClient; peer->AttachPlugin(&natClient); @@ -55,7 +55,7 @@ Basic Usage .. code-block:: cpp - #include "mafianet/NatTypeDetectionServer.h" + #include "mafianet/nat_type_detection_server.h" // Server requires 3 different IP addresses MafiaNet::NatTypeDetectionServer natServer; diff --git a/docs/plugins/overview.rst b/docs/plugins/overview.rst index 194f1f599..d03a54f45 100644 --- a/docs/plugins/overview.rst +++ b/docs/plugins/overview.rst @@ -8,7 +8,7 @@ Using Plugins .. code-block:: cpp - #include "mafianet/PluginInterface2.h" + #include "mafianet/plugin_interface2.h" // Create plugin instance MafiaNet::SomePlugin* plugin = MafiaNet::SomePlugin::GetInstance(); diff --git a/docs/plugins/packet-logger.rst b/docs/plugins/packet-logger.rst index 4290798fe..c7dec0450 100644 --- a/docs/plugins/packet-logger.rst +++ b/docs/plugins/packet-logger.rst @@ -12,7 +12,7 @@ Basic Usage .. code-block:: cpp - #include "mafianet/PacketLogger.h" + #include "mafianet/packet_logger.h" MafiaNet::PacketLogger packetLogger; peer->AttachPlugin(&packetLogger); diff --git a/docs/plugins/rakvoice.rst b/docs/plugins/rakvoice.rst index 800743fcf..d605f8324 100644 --- a/docs/plugins/rakvoice.rst +++ b/docs/plugins/rakvoice.rst @@ -23,7 +23,7 @@ Setup .. code-block:: cpp - #include "mafianet/RakVoice.h" + #include "mafianet/voice.h" MafiaNet::RakVoice rakVoice; peer->AttachPlugin(&rakVoice); diff --git a/docs/plugins/ready-event.rst b/docs/plugins/ready-event.rst index 2784b071e..2263fe349 100644 --- a/docs/plugins/ready-event.rst +++ b/docs/plugins/ready-event.rst @@ -12,7 +12,7 @@ Basic Usage .. code-block:: cpp - #include "mafianet/ReadyEvent.h" + #include "mafianet/ready_event.h" MafiaNet::ReadyEvent readyEvent; peer->AttachPlugin(&readyEvent); diff --git a/docs/plugins/replica-manager-3.rst b/docs/plugins/replica-manager-3.rst index cacc63a34..b1241e7e9 100644 --- a/docs/plugins/replica-manager-3.rst +++ b/docs/plugins/replica-manager-3.rst @@ -18,7 +18,7 @@ Setup .. code-block:: cpp - #include "mafianet/ReplicaManager3.h" + #include "mafianet/replica_manager3.h" // Create and attach MafiaNet::ReplicaManager3* replicaManager = diff --git a/docs/plugins/router2.rst b/docs/plugins/router2.rst index 87b95054e..aa9103fa2 100644 --- a/docs/plugins/router2.rst +++ b/docs/plugins/router2.rst @@ -12,7 +12,7 @@ Basic Usage .. code-block:: cpp - #include "mafianet/Router2.h" + #include "mafianet/router2.h" MafiaNet::Router2 router2; peer->AttachPlugin(&router2); diff --git a/docs/plugins/rpc4.rst b/docs/plugins/rpc4.rst index f9e667362..1fd545574 100644 --- a/docs/plugins/rpc4.rst +++ b/docs/plugins/rpc4.rst @@ -12,7 +12,7 @@ Basic Usage .. code-block:: cpp - #include "mafianet/RPC4Plugin.h" + #include "mafianet/rpc4_plugin.h" void MyCallback(MafiaNet::BitStream* parameters, MafiaNet::Packet* packet, void* context) { int value; diff --git a/docs/plugins/team-balancer.rst b/docs/plugins/team-balancer.rst index 7677e5c27..0c935cc15 100644 --- a/docs/plugins/team-balancer.rst +++ b/docs/plugins/team-balancer.rst @@ -18,7 +18,7 @@ Setup .. code-block:: cpp - #include "mafianet/TeamBalancer.h" + #include "mafianet/team_balancer.h" MafiaNet::TeamBalancer* balancer = MafiaNet::TeamBalancer::GetInstance(); peer->AttachPlugin(balancer); diff --git a/docs/plugins/team-manager.rst b/docs/plugins/team-manager.rst index a3f85c548..53b1ac5f1 100644 --- a/docs/plugins/team-manager.rst +++ b/docs/plugins/team-manager.rst @@ -12,7 +12,7 @@ Basic Usage .. code-block:: cpp - #include "mafianet/TeamManager.h" + #include "mafianet/team_manager.h" MafiaNet::TeamManager teamManager; peer->AttachPlugin(&teamManager); diff --git a/docs/plugins/two-way-authentication.rst b/docs/plugins/two-way-authentication.rst index 7c0285d34..2cd499e0b 100644 --- a/docs/plugins/two-way-authentication.rst +++ b/docs/plugins/two-way-authentication.rst @@ -12,7 +12,7 @@ Basic Usage .. code-block:: cpp - #include "mafianet/TwoWayAuthentication.h" + #include "mafianet/two_way_authentication.h" MafiaNet::TwoWayAuthentication twoWayAuth; peer->AttachPlugin(&twoWayAuth); diff --git a/docs/plugins/virtual-worlds.rst b/docs/plugins/virtual-worlds.rst index f4e5bbee2..99f6b79e8 100644 --- a/docs/plugins/virtual-worlds.rst +++ b/docs/plugins/virtual-worlds.rst @@ -42,7 +42,7 @@ global value: .. code-block:: cpp - #include "mafianet/VirtualWorld.h" + #include "mafianet/virtual_world.h" typedef uint32_t VirtualWorldId; // many dimensions static const VirtualWorldId VIRTUAL_WORLD_DEFAULT = 0; // the overworld @@ -64,7 +64,7 @@ topology defaults. You do **not** override the ``Query*`` methods themselves. .. code-block:: cpp - #include "mafianet/VirtualWorldReplica3.h" + #include "mafianet/virtual_world_replica3.h" class Player : public MafiaNet::VirtualWorldReplica3 { public: diff --git a/docs/utilities/console-server.rst b/docs/utilities/console-server.rst index e720d98bb..5307e2dd9 100644 --- a/docs/utilities/console-server.rst +++ b/docs/utilities/console-server.rst @@ -12,8 +12,8 @@ Basic Usage .. code-block:: cpp - #include "mafianet/ConsoleServer.h" - #include "mafianet/TCPInterface.h" + #include "mafianet/console_server.h" + #include "mafianet/tcp_interface.h" MafiaNet::TCPInterface tcp; MafiaNet::ConsoleServer console; diff --git a/docs/utilities/crash-reporter.rst b/docs/utilities/crash-reporter.rst index 744ee9875..28fbf6e45 100644 --- a/docs/utilities/crash-reporter.rst +++ b/docs/utilities/crash-reporter.rst @@ -56,7 +56,7 @@ Basic Usage .. code-block:: cpp - #include "mafianet/TCPInterface.h" + #include "mafianet/tcp_interface.h" // Simple crash report receiver void RunCrashServer() { diff --git a/docs/utilities/email-sender.rst b/docs/utilities/email-sender.rst index 1a89326d2..13a4885c0 100644 --- a/docs/utilities/email-sender.rst +++ b/docs/utilities/email-sender.rst @@ -12,7 +12,7 @@ Basic Usage .. code-block:: cpp - #include "mafianet/EmailSender.h" + #include "mafianet/email_sender.h" MafiaNet::EmailSender emailSender; @@ -63,7 +63,7 @@ Basic Usage .. code-block:: cpp - #include "mafianet/FileList.h" + #include "mafianet/file_list.h" MafiaNet::FileList attachments; attachments.AddFile("report.txt", "report.txt", diff --git a/docs/utilities/string-compressor.rst b/docs/utilities/string-compressor.rst index 35c88a3b3..0203b8103 100644 --- a/docs/utilities/string-compressor.rst +++ b/docs/utilities/string-compressor.rst @@ -12,8 +12,8 @@ Basic Usage .. code-block:: cpp - #include "mafianet/StringCompressor.h" - #include "mafianet/BitStream.h" + #include "mafianet/string_compressor.h" + #include "mafianet/bit_stream.h" // Get the global instance MafiaNet::StringCompressor* compressor = diff --git a/docs/utilities/tcp-interface.rst b/docs/utilities/tcp-interface.rst index 984b030a1..830c33a9e 100644 --- a/docs/utilities/tcp-interface.rst +++ b/docs/utilities/tcp-interface.rst @@ -12,7 +12,7 @@ Basic Usage .. code-block:: cpp - #include "mafianet/TCPInterface.h" + #include "mafianet/tcp_interface.h" MafiaNet::TCPInterface tcp; From 25657cbcff18ddea2c546f18d28ad5dfd5f3a14b Mon Sep 17 00:00:00 2001 From: Segfault <5221072+Segfaultd@users.noreply.github.com> Date: Thu, 8 Oct 2026 11:48:38 +0200 Subject: [PATCH 5/7] fix(samples): keep the DirectoryDeltaTransfer sample's own source name The snake_case pass rewrote the sample's SOURCES line too, although that file belongs to the sample, not the library, and was not renamed. --- Samples/DirectoryDeltaTransfer/CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Samples/DirectoryDeltaTransfer/CMakeLists.txt b/Samples/DirectoryDeltaTransfer/CMakeLists.txt index 998a1a32c..3791e2c54 100644 --- a/Samples/DirectoryDeltaTransfer/CMakeLists.txt +++ b/Samples/DirectoryDeltaTransfer/CMakeLists.txt @@ -1,10 +1,10 @@ # DirectoryDeltaTransfer sample -# There are two test files with main() - build only directory_delta_transfer.cpp +# There are two test files with main() - build only DirectoryDeltaTransfer.cpp mafianet_add_sample( NAME DirectoryDeltaTransfer FOLDER "FileTransfer" - SOURCES directory_delta_transfer.cpp + SOURCES DirectoryDeltaTransfer.cpp ) # Optionally build the test version as a separate target From 46cd178267998596ab5c6e450b3339e7b120823b Mon Sep 17 00:00:00 2001 From: Segfault <5221072+Segfaultd@users.noreply.github.com> Date: Thu, 8 Oct 2026 11:54:00 +0200 Subject: [PATCH 6/7] ci: build and test on pull requests only; tags drive release and docs Pushes to master no longer rebuild or retest, since master only changes through a PR that already ran Build & Test. A release tag triggers the packaging workflow and the documentation deploy, neither of which runs tests. A new push to a PR cancels that PR's in-flight run. --- .github/workflows/build.yml | 16 +++++++++++++--- .github/workflows/docs.yml | 9 ++++----- .github/workflows/release.yml | 3 ++- docs/changelog.rst | 2 ++ 4 files changed, 21 insertions(+), 9 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 2ec9063bc..89f715612 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,10 +1,20 @@ name: Build & Test +# Runs on pull requests only. Pushes to master do not build or test: master is +# only ever changed by merging a PR that already passed this workflow, and a +# release tag (vX.Y.Z) triggers release.yml, which packages without testing. +# workflow_dispatch allows a manual run on any branch. on: - push: - branches: [master] pull_request: - branches: [master] + workflow_dispatch: + +# A new push to the same PR cancels the run still in flight for it. +concurrency: + group: build-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + +permissions: + contents: read jobs: # Linux: Build and test in Docker container (full network access). diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 128b3369b..c424bea6b 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -1,12 +1,11 @@ name: Deploy Documentation +# Published documentation follows releases: it is rebuilt when a release tag +# (vX.Y.Z) is pushed, never on ordinary pushes to master. workflow_dispatch +# allows a manual rebuild. on: push: - branches: [master] - paths: - - 'docs/**' - - 'Source/include/**' - - '.github/workflows/docs.yml' + tags: ["v*"] workflow_dispatch: permissions: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 6e659962f..dc5d0f2b7 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -2,7 +2,8 @@ name: Release # Builds precompiled MafiaNet packages for every supported platform when a # release tag (vX.Y.Z) is pushed, then creates/updates the GitHub release for -# that tag with the archives attached. +# that tag with the archives attached. No tests run here: the commit being +# tagged reached master through a pull request that already ran build.yml. # # Each archive is a full install tree (cmake --install): shared + static # libraries, the bundled opus/rnnoise static libs, all public headers, and the diff --git a/docs/changelog.rst b/docs/changelog.rst index 2a01dc020..8490b3faf 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -8,6 +8,8 @@ Unreleased **Build** +* **CI runs only where it is useful.** Build & Test runs on pull requests (and on demand); pushes to master no longer rebuild or retest, since master only changes through a PR that already passed. A release tag triggers the release packaging workflow and the documentation deploy, neither of which runs tests. A new push to a PR cancels that PR's run still in flight. + * **New CMake options: ``MAFIANET_DISABLED_FEATURES`` and ``MAFIANET_MINIMAL``.** The ``_RAKNET_SUPPORT_`` plugin flags from ``native_feature_includes.h`` can now be set from CMake (``-DMAFIANET_DISABLED_FEATURES="ReplicaManager3;RPC4Plugin"`` or ``-DMAFIANET_MINIMAL=ON`` for the core transport alone). The definitions are ``PUBLIC`` on the library targets so consumers see the same configuration. Unknown names are a configure error. A ``linux-minimal`` CI job builds the ``MAFIANET_MINIMAL`` configuration. See :doc:`/getting-started/building`. **File names are snake_case.** Every header and source under ``Source/`` is now lowercase ``snake_case`` (``BitStream.h`` → ``bit_stream.h``, ``ReliabilityLayer.h`` → ``reliability_layer.h``, ``peerinterface.h`` → ``peer_interface.h``, ``DS_List.h`` → ``ds_list.h``, ``HTTPConnection2.h`` → ``http_connection2.h``), and the RakNet prefix is gone from file names (``RakVoice.h`` → ``voice.h``, ``RakPeer.cpp`` → ``peer.cpp``, ``CCRakNetUDT.h`` → ``cc_udt.h``). Class names are unchanged. The umbrella header stays ``mafianet/mafianet.h`` and the ``crypto/`` headers were already lowercase. Since almost every rename differs from the old name only by case, no forwarding headers are possible: on Windows and macOS the old spellings still resolve, on Linux every ``#include "mafianet/..."`` must be updated (a case-insensitive search-and-replace over the names above). Library headers now include each other only as ``"mafianet/.h"``; a CI check rejects bare quoted includes inside ``include/mafianet/`` so that ``string.h``, ``time.h`` and ``assert.h`` can never shadow the C headers. From 472a1cdf3159851d44c11cec41996860739c56ba Mon Sep 17 00:00:00 2001 From: Segfault <5221072+Segfaultd@users.noreply.github.com> Date: Thu, 8 Oct 2026 12:18:48 +0200 Subject: [PATCH 7/7] fix(filelist): directory walks never terminated on Linux _findnext copied each entry name with a count equal to the destination size. The strncpy_s shim then read one byte past dirent::d_name to decide whether the copy fit, saw garbage on Linux, returned ERANGE and an empty name. The empty name slipped past the "."/".." filter and AddFilesFromDirectory recursed into "dir//" forever, allocating until the OOM killer stopped it; that is the 600 s timeout of DirectoryDeltaTransferStreaming on Linux CI. _findnext now copies with _TRUNCATE, and the shim reads at most count bytes of the source and rejects a copy that would not fit, as MSVC does, instead of writing the terminator one byte past the destination. Unit tests pin both. --- Source/src/find_first.cpp | 2 +- Source/src/linux_adapter.cpp | 10 ++- Source/src/osx_adapter.cpp | 10 ++- Tests/Unit/FileListDirectoryTests.cpp | 120 ++++++++++++++++++++++++++ docs/changelog.rst | 4 + 5 files changed, 139 insertions(+), 7 deletions(-) create mode 100644 Tests/Unit/FileListDirectoryTests.cpp diff --git a/Source/src/find_first.cpp b/Source/src/find_first.cpp index 285de4770..d5a02e3b1 100644 --- a/Source/src/find_first.cpp +++ b/Source/src/find_first.cpp @@ -137,7 +137,7 @@ int _findnext(long h, _finddata_t *f) // are not supported. f->size = filestat.st_size; - strncpy_s(f->name, entry->d_name, STRING_BUFFER_SIZE); + strncpy_s(f->name, entry->d_name, _TRUNCATE); return 0; } diff --git a/Source/src/linux_adapter.cpp b/Source/src/linux_adapter.cpp index cdb054815..b0610f8e8 100644 --- a/Source/src/linux_adapter.cpp +++ b/Source/src/linux_adapter.cpp @@ -237,12 +237,16 @@ errno_t strncpy_s(char *strDest, size_t numberOfElements, const char *strSource, } } else { - // otherwise we use count, but have to check that the destination buffer is of sufficient size - if ((count > numberOfElements) || ((count == numberOfElements) && (strSource[count] != '\0'))) { + // Otherwise copy at most count characters. Only read as far as count: + // the source need not be terminated within reach (dirent::d_name is + // 256 bytes, callers pass larger counts), and reading past it is what + // made this shim return garbage on Linux. The copy plus its terminator + // must fit the destination, as with MSVC. + numChars = strnlen(strSource, count); + if (numChars >= numberOfElements) { strDest[0] = '\0'; // ensure trailing \0 is written return 34; // error: ERANGE } - numChars = count; } (void)strncpy(strDest, strSource, numChars); diff --git a/Source/src/osx_adapter.cpp b/Source/src/osx_adapter.cpp index ad52e429d..5b894781e 100644 --- a/Source/src/osx_adapter.cpp +++ b/Source/src/osx_adapter.cpp @@ -252,12 +252,16 @@ errno_t strncpy_s(char *strDest, size_t numberOfElements, const char *strSource, } } else { - // otherwise we use count, but have to check that the destination buffer is of sufficient size - if ((count > numberOfElements) || ((count == numberOfElements) && (strSource[count] != '\0'))) { + // Otherwise copy at most count characters. Only read as far as count: + // the source need not be terminated within reach (dirent::d_name is + // 256 bytes, callers pass larger counts), and reading past it is what + // made this shim return garbage on Linux. The copy plus its terminator + // must fit the destination, as with MSVC. + numChars = strnlen(strSource, count); + if (numChars >= numberOfElements) { strDest[0] = '\0'; // ensure trailing \0 is written return 34; // error: ERANGE } - numChars = count; } (void)strncpy(strDest, strSource, numChars); diff --git a/Tests/Unit/FileListDirectoryTests.cpp b/Tests/Unit/FileListDirectoryTests.cpp new file mode 100644 index 000000000..9b450ff7f --- /dev/null +++ b/Tests/Unit/FileListDirectoryTests.cpp @@ -0,0 +1,120 @@ +/* + * Copyright (c) 2026, MafiaHub + * Licensed under MIT-style license + * + * FileList::AddFilesFromDirectory walks a directory tree through the _findfirst/_findnext + * emulation. On Linux that walk never terminated: the emulation copied each entry name with a + * count equal to the destination size, which the strncpy_s shim rejected after reading past the + * end of dirent::d_name, so every name came back empty, the "." and ".." filter never matched, + * and the walk recursed into "dir//" forever until the process ran out of memory. These tests + * pin the shim's bounds and the walk's termination. Hermetic: a temp directory, no networking. + */ + +#include + +#include "mafianet/file_list.h" +#include "mafianet/file_list_node_context.h" +#include "mafianet/linux_adapter.h" +#include "mafianet/osx_adapter.h" + +#include +#include +#include +#include +#include + +using namespace MafiaNet; + +namespace +{ + struct TempTree + { + std::filesystem::path root; + TempTree() + { + root = std::filesystem::temp_directory_path() / "mafianet_filelist_unit"; + std::filesystem::remove_all(root); + std::filesystem::create_directories(root / "sub" / "deeper"); + Write("a.bin", 10); + Write("sub/b.bin", 20); + Write("sub/deeper/c.bin", 30); + } + ~TempTree() { std::filesystem::remove_all(root); } + void Write(const char *rel, size_t size) + { + std::ofstream out(root / rel, std::ios::binary); + std::string bytes(size, 'x'); + out.write(bytes.data(), (std::streamsize)bytes.size()); + } + }; + + std::set Names(const FileList &list) + { + std::set names; + for (unsigned i = 0; i < list.fileList.Size(); ++i) + names.insert(list.fileList[i].filename.C_String()); + return names; + } +} // namespace + +TEST(FileListDirectory, RecursiveWalkFindsEveryFileAndTerminates) +{ + TempTree tree; + const std::string dir = tree.root.string() + "/"; + + FileList list; + list.AddFilesFromDirectory(dir.c_str(), nullptr, true, false, true, FileListNodeContext(0, 0, 0, 0)); + + EXPECT_EQ(Names(list), (std::set{"a.bin", "sub/b.bin", "sub/deeper/c.bin"})); +} + +TEST(FileListDirectory, NonRecursiveWalkStaysInTheTopDirectory) +{ + TempTree tree; + const std::string dir = tree.root.string() + "/"; + + FileList list; + list.AddFilesFromDirectory(dir.c_str(), nullptr, false, false, false, FileListNodeContext(0, 0, 0, 0)); + + EXPECT_EQ(Names(list), (std::set{"a.bin"})); + ASSERT_EQ(list.fileList.Size(), 1u); + EXPECT_EQ(list.fileList[0].fileLengthBytes, 10u); +} + +#ifndef _WIN32 +// The shim is only compiled on Linux and macOS; MSVC provides the real function. + +TEST(StrncpySShim, CountEqualToBufferSizeCopiesAShortSource) +{ + char dest[8]; + std::memset(dest, 'Z', sizeof(dest)); + EXPECT_EQ(strncpy_s(dest, sizeof(dest), "abc", sizeof(dest)), 0); + EXPECT_STREQ(dest, "abc"); +} + +TEST(StrncpySShim, SourceThatDoesNotFitIsRejectedWithoutOverflow) +{ + // A guard byte after the destination catches a write of the terminator at dest[size]. + char block[8 + 1]; + block[8] = 'G'; + EXPECT_EQ(strncpy_s(block, 8, "abcdefgh", 8), 34); // ERANGE: 8 chars need 9 bytes + EXPECT_STREQ(block, ""); + EXPECT_EQ(block[8], 'G'); +} + +TEST(StrncpySShim, OnlyCountCharactersOfTheSourceAreRead) +{ + // The source is not terminated within count bytes; the shim must not read past count. + const char source[4] = {'a', 'b', 'c', 'd'}; + char dest[8]; + EXPECT_EQ(strncpy_s(dest, sizeof(dest), source, 4), 0); + EXPECT_STREQ(dest, "abcd"); +} + +TEST(StrncpySShim, TruncateCopiesWhatFits) +{ + char dest[4]; + EXPECT_EQ(strncpy_s(dest, sizeof(dest), "abcdefgh", _TRUNCATE), 80); // STRUNCATE + EXPECT_STREQ(dest, "abc"); +} +#endif diff --git a/docs/changelog.rst b/docs/changelog.rst index 8490b3faf..0fb73ef16 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -6,6 +6,10 @@ All notable changes to MafiaNet are documented here. Unreleased ---------- +**FileList / DirectoryDeltaTransfer** + +* **Fix: directory walks never terminated on Linux.** ``FileList::AddFilesFromDirectory`` (and so every ``DirectoryDeltaTransfer`` download) looped forever on Linux, allocating until the process was killed. The ``_findnext`` emulation copied each entry name with a count equal to the destination size; the ``strncpy_s`` shim then read one byte past the end of ``dirent::d_name`` to decide whether the copy fit, saw garbage, returned ``ERANGE`` and an empty name. The empty name defeated the ``"."``/``".."`` filter and the walk recursed into ``dir//`` without end. macOS happened to read a zero byte there and never showed it. ``_findnext`` now copies with ``_TRUNCATE``, and the shim reads at most ``count`` bytes of the source and rejects a copy that would not fit, as MSVC does, instead of writing its terminator one byte past the destination. Unit tests cover the shim's bounds and the walk's termination. + **Build** * **CI runs only where it is useful.** Build & Test runs on pull requests (and on demand); pushes to master no longer rebuild or retest, since master only changes through a PR that already passed. A release tag triggers the release packaging workflow and the documentation deploy, neither of which runs tests. A new push to a PR cancels that PR's run still in flight.