All Projects → stefanodriussi → rconsharp

stefanodriussi / rconsharp

Licence: MIT license
rconsharp is a Valve RCON protocol implementation written in C# targeting netstandard 2.1

Programming Languages

C#
18002 projects

Projects that are alternatives of or similar to rconsharp

docker-rcon-web-admin
A Docker image that runs rcon-web-admin
Stars: ✭ 34 (-20.93%)
Mutual labels:  rcon, rcon-client
AdminTools
AdminTools for minecraft - rcon and status for mc server and mojang api-s
Stars: ✭ 18 (-58.14%)
Mutual labels:  rcon, rcon-client
rcon-cli
A little RCON cli based on james4k's RCON library for golang
Stars: ✭ 108 (+151.16%)
Mutual labels:  rcon, rcon-client
samp-client
GTA SA-MP API client library for Python
Stars: ✭ 21 (-51.16%)
Mutual labels:  rcon, rcon-client
Rubicon
Swift parser + mock generator
Stars: ✭ 42 (-2.33%)
Mutual labels:  protocol
diepindepth
Collection of protocol, memory, and other information for the browser game diepio
Stars: ✭ 39 (-9.3%)
Mutual labels:  protocol
specs
Kontalk specifications and documentation
Stars: ✭ 20 (-53.49%)
Mutual labels:  protocol
net-protocol
golang模拟内核协议栈 实现链路层、网络层、传输层、应用层 用户态协议栈 ,基于虚拟网卡TUN/TAP
Stars: ✭ 129 (+200%)
Mutual labels:  protocol
wayland-explorer
Easily browse and read Wayland protocols documentation
Stars: ✭ 78 (+81.4%)
Mutual labels:  protocol
ipfs-companion
Browser extension that simplifies access to IPFS resources on the web
Stars: ✭ 1,745 (+3958.14%)
Mutual labels:  protocol
protocol-registry
This module allows you to set custom protocol handler for your nodejs app.
Stars: ✭ 45 (+4.65%)
Mutual labels:  protocol
FTAPIKit
Declarative and generic REST API framework using Codable.
Stars: ✭ 18 (-58.14%)
Mutual labels:  protocol
PSAVanCanBridge
VAN - CAN protocol bridge (V2C) for cars made by PSA Group (Peugeot, Citroen)
Stars: ✭ 67 (+55.81%)
Mutual labels:  protocol
spunkybot
Multi-platform administration and RCON tool for Urban Terror
Stars: ✭ 19 (-55.81%)
Mutual labels:  rcon
metacom
RPC communication protocol for Metarhia stack 🔌
Stars: ✭ 42 (-2.33%)
Mutual labels:  protocol
Motoro
Smart contracts for decentralized rentals of vehicles.
Stars: ✭ 96 (+123.26%)
Mutual labels:  protocol
SwiftArchitectureWithPOP
A base architecture written in swift and protocol oriented, for building new apps easily and quickly
Stars: ✭ 28 (-34.88%)
Mutual labels:  protocol
diepssect
A public repo for hacky diep stuff - networking protocol, WebAssembly, memory editing, & physics
Stars: ✭ 26 (-39.53%)
Mutual labels:  protocol
minecraft-protocol
Library for decoding and encoding Minecraft packets
Stars: ✭ 20 (-53.49%)
Mutual labels:  protocol
LXFProtocolTool
由Swift中协议方式实现功能的实用工具库【Refreshable、EmptyDataSetable 支持 Rx 】
Stars: ✭ 101 (+134.88%)
Mutual labels:  protocol

rconsharp

banner

rconsharp is a Valve RCON protocol implementation for netstandard

Games Support

In theory all servers claiming to implement Valve's RCON protocol should be supported. In reality there are subtle differences in the way many developer chooses to interpret the protocol, leading to some unexpected result here and there. The library has been tested successfully with:

  • CS:GO
  • Minecraft
  • ARK: Survival Evolved

If you stumble upon a game that doesn't work for some reason, please fill an issue and I'll do my best to see what's wrong.

Build

netstandard

The easiest way to build rconsharp is by cloning the repo, open the solution file in Visual Studio and then build the proeject via Build menu Alternatively dotnet CLI can be used to achieve the same result (both Windows and Unix environments are supported)

dotnet restore
dotnet build --configuration Release --no-restore

Tests

A xUnit test project is included in this repository and covers most of the rconsharp API (feel free to submit a PR to improve coverage). All tests can be executed using Visual Studio runner with a nice report of all the results. As for the build process, the same result can be achieved using dotnet CLI

dotnet restore
dotnet build --configuration Release --no-restore
dotnet test --no-restore --verbosity normal

NuGet packages

Nuget Nuget

A package is available via NuGet. Search for RconSharp via Visual Studio dependencies manager window or use NuGet Packet Manager CLI

PM> Install-Package rconsharp

Samples

Authenticate and send a command

This is a very basic snippet that allows you to forward commands to a Rcon enabled remote server.

// Create an instance of RconClient pointing to an IP and a PORT
var client = RconClient.Create("127.0.0.1", 15348);

// Open the connection
await client.ConnectAsync();

// Send a RCON packet with type AUTH and the RCON password for the target server
var authenticated = await client.AuthenticateAsync("RCONPASSWORD");
if (authenticated)
{
    // If the response is positive, the connection is authenticated and further commands can be sent
    var status = await client.ExecuteCommandAsync("status");
    // Some responses will be split into multiple RCON pakcets when body length exceeds the maximum allowed
    // For this reason these commands needs to be issued with isMultiPacketResponse parameter set to true
    // An example is CS:GO cvarlist
    var cvarlist = await client.ExecuteCommandAsync("cvarlist", true);
}

Please note that while AuthenticateAsync method call will always return true or false, a call to ExecuteCommandAsync could raise a TaskCanceledException in the event of a connection loss or timeout. You should surround the requesting code with a try .. catch block to properly handle these situations.

Updating from v1

The previous version of netstandard was built as a PCL and contained platform specific implementations for the actual Socket communication. The new version is an almost complete rewrite of the whole library and backward compatibility has not been preserved, sorry about that. The good news is that the API has been simplified, resulting in a fairly easy port.

Licensing

This code is distributed under the very permissive MIT License but, if you use it, you might consider referring to the repository. Please refer to LICENSE file for the complete license description.

Credits

Thanks to

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].