Skip to content
forked from gorcon/rcon

Source RCON Protocol implementation in Go.

License

Notifications You must be signed in to change notification settings

highcard-dev/gorcon

 
 

Repository files navigation

Rcon

GitHub Build Coverage Go Report Card GoDoc

Source RCON Protocol implementation in Go.

Protocol Specifications

RCON Protocol described in the valve documentation.

Supported Games

Open pull request if you have successfully used a package with another game with rcon support and add it to the list.

Install

go get github.com/highcard-dev/gorcon

See Changelog for release details.

Usage

package main

import (
	"log"
	"fmt"

	"github.com/highcard-dev/gorcon"
)

func main() {
	conn, err := rcon.Dial("127.0.0.1:16260", "password")
	if err != nil {
		log.Fatal(err)
	}
	defer conn.Close()

	response, err := conn.Execute("help")
	if err != nil {
		log.Fatal(err)
	}

	fmt.Println(response)
}

Requirements

Go 1.15 or higher

Contribute

Contributions are more than welcome!

If you think that you have found a bug, create an issue and publish the minimum amount of code triggering the bug so it can be reproduced.

If you want to fix the bug then you can create a pull request. If possible, write a test that will cover this bug.

License

MIT License, see LICENSE