Barebones PRUDP/NEX server library written in Go
Find a file
2023-06-29 17:44:59 -04:00
.gitignore Updated .gitignore 2022-08-29 18:06:53 -04:00
.golangci.yml Added golangci-lint config for aggregated linting 2022-12-31 13:16:55 -05:00
client.go Added missing error checks 2023-06-07 23:18:05 -04:00
compression.go Moved all source files back to root 2022-03-29 00:15:55 -04:00
counter.go Moved all source files back to root 2022-03-29 00:15:55 -04:00
errors.go Unexport InitErrorsData 2023-01-01 13:47:27 -05:00
go.mod Updated library versions 2023-06-29 17:44:06 -04:00
go.sum Updated library versions 2023-06-29 17:44:06 -04:00
hpp_packet.go Add getter for PasswordFromPIDFunction 2023-04-23 18:05:19 +01:00
init.go Unexport InitErrorsData 2023-01-01 13:47:27 -05:00
kerberos.go All relevant methods now return errors, and all errors are now checked 2023-06-07 23:12:13 -04:00
LICENSE Create LICENSE 2022-08-13 20:16:23 -04:00
md5.go Moved all source files back to root 2022-03-29 00:15:55 -04:00
nex_version.go Removed SetNexVersion and added methods for setting specific NEX protocol versions 2023-04-05 19:28:18 -04:00
packet.go Moved all source files back to root 2022-03-29 00:15:55 -04:00
packet_flags.go Moved all source files back to root 2022-03-29 00:15:55 -04:00
packet_interface.go Moved all source files back to root 2022-03-29 00:15:55 -04:00
packet_types.go Moved all source files back to root 2022-03-29 00:15:55 -04:00
packet_v0.go All relevant methods now return errors, and all errors are now checked 2023-06-07 23:12:13 -04:00
packet_v1.go Update PRUDPv1 magic comment 2023-06-07 23:13:41 -04:00
README.md Updated README.md 2022-09-03 17:13:42 -04:00
rmc.go All relevant methods now return errors, and all errors are now checked 2023-06-07 23:12:13 -04:00
server.go Added missing error checks 2023-06-07 23:18:05 -04:00
stream_in.go Added all missing Stream read/write methods for number types 2023-06-09 12:53:57 -04:00
stream_out.go Added all missing Stream read/write methods for number types 2023-06-09 12:53:57 -04:00
sum.go All relevant methods now return errors, and all errors are now checked 2023-06-07 23:12:13 -04:00
types.go Added String and FormatToString methods to all types 2023-06-29 17:44:59 -04:00

NEX Go

Barebones PRUDP/NEX server library written in Go

GoDoc

Other NEX libraries

nex-protocols-go - NEX protocol definitions

nex-protocols-common-go - NEX protocols used by many games with premade handlers and a high level API

Install

go get github.com/PretendoNetwork/nex-go

Usage note

This module provides a barebones PRUDP server for use with titles using the Nintendo NEX library. It does not provide any support for titles using the original Rendez-Vous library developed by Quazal. This library only provides the low level packet data, as such it is recommended to use NEX Protocols Go to develop servers.

Usage

package main

import (
	"fmt"

	nex "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) {
		request := packet.RMCRequest()

		fmt.Println("==Friends - Auth==")
		fmt.Printf("Protocol ID: %#v\n", request.ProtocolID())
		fmt.Printf("Method ID: %#v\n", request.MethodID())
		fmt.Println("==================")
	})

	nexServer.Listen(":60000")
}