valheim

package
v0.0.0-...-5c9ae66 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 12, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client for talking to Valheim servers

func NewClient

func NewClient(address string) Client

New client for the provided address

func (Client) CountPlayers

func (c Client) CountPlayers(ctx context.Context) (int, error)

CountPlayers on the Server right now

func (Client) Info

func (c Client) Info() (*a2s.ServerInfo, error)

Info returns an a2s ServerInfo response

func (Client) Players

func (c Client) Players(ctx context.Context) (int, []string, error)

Players on the server right now NOTE: Valheim currently does not provide the player names, so the list of players is left empty

func (Client) Setup

func (c Client) Setup() (Client, error)

Setup establishes the initial connection and authenticates the session

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL