Barebones PRUDP/NEX server library written in Go
Find a file
Jonathan Barrow 0a47838d53
Merge pull request #30 from DaniElectra/map
Add Bytes() to Variant and implement ReadMap() and WriteMap()
2023-06-06 11:20:02 -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 Fix comments linting issues 2023-05-27 23:33:52 +01: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 go modules 2023-05-21 17:09:30 -04:00
go.sum Updated go modules 2023-05-21 17:09:30 -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 Add WriteDateTime for clarity 2023-04-01 17:02:22 -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 Removed unnecessary nil checks for v0 packet payloads 2023-01-01 14:02:27 -05:00
packet_v1.go Removed SetNexVersion and added methods for setting specific NEX protocol versions 2023-04-05 19:28:18 -04:00
README.md Updated README.md 2022-09-03 17:13:42 -04:00
rmc.go Add Bytes() to Variant and minor changes 2023-06-05 20:09:31 +01:00
server.go Add getter for PasswordFromPIDFunction 2023-04-23 18:05:19 +01:00
stream_in.go Revert ReadMap() to original implementation 2023-06-06 15:52:36 +01:00
stream_out.go Revert ReadMap() to original implementation 2023-06-06 15:52:36 +01:00
sum.go Moved all source files back to root 2022-03-29 00:15:55 -04:00
types.go Add Bytes() to Variant and minor changes 2023-06-05 20:09:31 +01: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")
}