Skip to content

Instantly share code, notes, and snippets.

@jyaif
jyaif / stun.cpp
Last active December 9, 2025 01:47
A simple stun client in C++ (posix only)
// How to compile:
// clang++ -std=c++11 stun.cpp
#include <arpa/inet.h>
#include <netdb.h>
#include <stdio.h>
#include <sys/socket.h>
#include <unistd.h>
#include <array>
#include <cstring>
@gamerxl
gamerxl / ue4-json-parsing.cpp
Last active January 27, 2025 08:24
How to parse a json response (e.g. a json array) in ue4 c++ context.
/**
* Include the PrivateDependencyModuleNames entries below in your project build target configuration:
* PrivateDependencyModuleNames.AddRange(new string[] { "Json", "JsonUtilities" });
*/
#include "Runtime/Online/HTTP/Public/Http.h"
#include "Serialization/JsonSerializer.h"
FHttpResponsePtr Response;