Categorygithub.com/FuseBarTV/nex-protocols-go
repositorypackage
1.0.11
Repository: https://github.com/fusebartv/nex-protocols-go.git
Documentation: pkg.go.dev

# README

NEX Protocols Go

NEX servers with protocol support in Go

GoDoc

Other NEX libraries

nex-go - Barebones NEX/PRUDP server implementation

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

Install

go get github.com/FuseBarTV/nex-protocols-go

Usage

nex-protocols-go provides a higher level API than the NEX Go module to the underlying PRUDP server by providing a set of NEX protocols. This module only provides access to the lower level raw RMC method calls, however, and all method handlers must be defined in full manually. For a higher level API, see the common NEX method handlers module

Example, friends (Wii U) authentication server

For a complete example, see the complete Friends Authentication Server, and other game servers

package main

import (
	"fmt"

	nex "github.com/PretendoNetwork/nex-go"
	nexproto "github.com/PretendoNetwork/nex-protocols-go"
)

var nexServer *nex.Server

func main() {
	nexServer = nex.NewServer()
	nexServer.SetPrudpVersion(0)
	nexServer.SetSignatureVersion(1)
	nexServer.SetKerberosKeySize(16)
	nexServer.SetAccessKey("ridfebb9")

	authenticationServer := nexproto.NewAuthenticationProtocol(nexServer)

	// Handle Login RMC method
	authenticationServer.Login(login)

	// Handle RequestTicket RMC method
	authenticationServer.RequestTicket(requestTicket)

	nexServer.Listen(":60000")
}