Skip to content

SanctumTerra/Raknet

Repository files navigation

RakNet Library

This is a library for the RakNet protocol.

Installation

npm install @sanctumterra/raknet

Examples

Server

import { Server } from "./src/index";

const server = new Server({
    host: "0.0.0.0",
    port: 19132,
});

server.on("connect", (connection) => {
    console.log(`New connection from ${connection.remoteInfo.address}`);
    connection.on("encapsulated", (buffer) => {
        console.log(`Received encapsulated data from ${connection.remoteInfo.address}`);
        console.log(buffer);
    });
});
server.start();

Client

	const client = new Client({
		address: "127.0.0.1",
		port: 19132,
		mtuSize: 1492,
		debug: false,
	});
	client.connect().then((ad) => {
		console.log(ad);
	});

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published