RustPlusApi 1.0.2
There is a newer version of this package available.
See the version list below for details.
See the version list below for details.
dotnet add package RustPlusApi --version 1.0.2
NuGet\Install-Package RustPlusApi -Version 1.0.2
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="RustPlusApi" Version="1.0.2" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add RustPlusApi --version 1.0.2
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: RustPlusApi, 1.0.2"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install RustPlusApi as a Cake Addin
#addin nuget:?package=RustPlusApi&version=1.0.2
// Install RustPlusApi as a Cake Tool
#tool nuget:?package=RustPlusApi&version=1.0.2
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
RustPlusApi
This is a C# client for the Rust+ API. It allows you to interact with the Rust+ server.
Prerequisites
- .NET 8 or later
Usage
First, instantiate the RustPlus
class with the necessary parameters:
var rustPlusApi = new RustPlus(server, port, playerId, playerToken, useFacepunchProxy);
Parameters:
server
: The IP address of the Rust+ server.port
: The port dedicated for the Rust+ companion app (not the one used to connect in-game).playerId
: Your Steam ID.playerToken
: Your player token acquired with FCM.useFacepunchProxy
: Specifies whether to use the Facepunch proxy. Default is false.
Then, connect to the Rust+ server:
await rustPlusApi.ConnectAsync();
You can subscribe to events to handle connection, disconnection, errors, and received messages:
rustPlusApi.Connecting += (sender, e) => { /* handle connecting event */ };
rustPlusApi.Connected += (sender, e) => { /* handle connected event */ };
rustPlusApi.Disconnected += (sender, e) => { /* handle disconnected event */ };
rustPlusApi.ErrorOccurred += (sender, e) => { /* handle error event */ };
rustPlusApi.MessageReceived += (sender, e) => { /* handle received message event */ };
Remember to dispose the RustPlus
instance when you're done:
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net8.0
- Google.Protobuf (>= 3.26.1)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.