gtaylor / factorio-rcon

RCON package that deals with some Factorio-specific behaviors

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

factorio-rcon

GoDoc License

This package is a fork of madcitygg/rcon with a few tweaks to work with Factorio. Namely, Factorio's rejection of sending SERVERDATA_RESPONSE_VALUE packets to check for multi-packet responses (details here).

Usage

A simple example:

package main

import (
    "fmt"
    "github.com/gtaylor/factorio-rcon"
)

func main() {
    r, err := rcon.Dial("10.10.10.10:27015")
    if err != nil {
        panic(err)
    }
    defer r.Close()

    err = r.Authenticate("password")
    if err != nil {
        panic(err)
    }

    response, err := r.Execute("status")
    if err != nil {
        panic(err)
    }

    fmt.Printf("Response: %+v\n", response)
}

License

Like the upstream madcitygg/rcon, this package is licensed under the MIT License.

About

RCON package that deals with some Factorio-specific behaviors

License:MIT License


Languages

Language:Go 100.0%