A go written library for the RCON Protocol.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Augusto Dwenger J. cde545b144 Move test password to a global constant 4 months ago
.drone.yml Add Drone CI setup 5 months ago
.gitignore Add gitignore 5 months ago
LICENSE Add copyright holder 5 months ago
README.md Fix typos 4 months ago
go.mod Add go module 5 months ago
rcon.go Add missing return documentation for errors 5 months ago
rcon_test.go Move test password to a global constant 4 months ago

README.md

rcon

A go written library for the RCON Protocol.

This is a fork from james4k/rcon with the support for go modules and with a rework of the original implementation for better readability.

Usage

// Establish a connection.
remoteConsole, err := rcon.Dial("127.0.0.1", "password")
if err != nil {
    fmt.Println(err)
}

// Send a command.
requestID, err := remoteConsole.Write("command")
if err != nil {
    fmt.Println(err)
}

// Read the response
response, responseID, err := remoteConsole.Read()
if err != nil {
    fmt.Println(err)
}
if requestID != responseID {
    fmt.Println("response id doesn't match the request id!")
}

fmt.Println(response)

License

This lib is licensed under the MIT License.

Contributors

If you should encounter a bug or a missing feature don't hesitate to open an issue or even submit a pull-request.

Special thx to nhh and dnltinney for the great help debugging this lib.