Skip to content

Instantly share code, notes, and snippets.

@noggs
noggs / SteamworksNetEmu.cs
Last active December 12, 2019 12:37
Drop in wrapper for the SteamNetworking component of Steamworks.NET for easily testing different network connections. Set the Latency or Packetloss properties and the rest is handled by the wrapper. Currently uses Unity for Random and Time functions, but they could easily be replaced.
using System;
using System.Collections.Generic;
using UnityEngine;
using Steamworks;
public class SteamworksNetEmu
{
private int _latency = 0;
private int _packetloss = 0;
@noggs
noggs / echo_test.js
Created May 16, 2012 08:38
node.js echo test
"use strict";
var http = require('http');
var fs = require('fs');
var WebSocketServer = require('websocket').server;
var clients = [];
var next_client = 0;
var mainHtml = (function () {
var f;