Skip to content

Instantly share code, notes, and snippets.

View AlpaGit's full-sized avatar
🎯
Focusing

Alpa AlpaGit

🎯
Focusing
  • War Legend
View GitHub Profile
@AlpaGit
AlpaGit / adler32.c3
Created October 9, 2024 04:11
Adler32.c3 implementation
module adler32;
import logger;
// largest prime smaller than 65536
const uint BASE = 65521;
// NMAX is the largest n such that 255n(n+1)/2 + (n+1)(BASE-1) <= 2^32 - 1
const uint NMAX = 5552;
exception ZaapError {
1: required i32 code,
2: optional string details
}
enum ErrorCode {
UNKNOWN = 1,
UNAUTHORIZED = 2,
INVALID_GAME_SESSION = 3,
CONNECTION_FAILED = 1001,
using System.Diagnostics;
using System.Net;
using System.Runtime.InteropServices;
namespace CheckTcpConnection;
public class Main
{
[DllImport("iphlpapi")]
public static extern unsafe uint GetTcpTable2(MIB_TCPTABLE2* TcpTable, ref uint SizePointer, bool Order);