Skip to content

Latest commit

 

History

History
36 lines (24 loc) · 889 Bytes

README.md

File metadata and controls

36 lines (24 loc) · 889 Bytes

Barebones PRUDP/NEX server library written in Go

GoDoc

Install

go get github.com/PretendoNetwork/nex-go

Usage note

While this package can be used stand-alone, it only provides the bare minimum for a PRUDP/NEX server. It does not support any NEX protocols. To make proper NEX servers, see NEX Protocols Go

Usage

package main

import (
	"github.com/PretendoNetwork/nex-go"
)

func main() {
	nexServer := nex.NewServer()

	nexServer.SetPrudpVersion(0)
	nexServer.SetSignatureVersion(1)
	nexServer.SetKerberosKeySize(16)
	nexServer.SetAccessKey("ridfebb9")

	nexServer.On("Data", func(packet *nex.PacketV0) {
		// Handle data packet
	})

	nexServer.Listen("192.168.0.28:60000")
}