ManiaNet.DedicatedServer

This library contains all the required MethodCalls and Structs for interfacing with ManiaPlanet Dedicated Servers using the XmlRpc library.


Keywords
trackmania, maniaplanet, xmlrpc, dedicated, server, manianet, maniadotnet
License
LGPL-2.1
Install
Install-Package ManiaNet.DedicatedServer -Version 1.1.0

Documentation

ManiaNet DedicatedServer

This library contains all the required MethodCalls and Structs for interfacing with ManiaPlanet Dedicated Servers using the XmlRpc library.

An automatically generated Documentation of all the Types is avilable here, courtesy of SharpDox.

The official documentation for all the methods offered by the Dedicated Server can be found here.


Usage

Simply new up an instance of the XmlRpcClient and you're ready to send/receive method calls.

using ManiaNet.DedicatedServer.XmlRpc;
using ManiaNet.DedicatedServer.XmlRpc.Methods;

// You'll most likely have to change the port that is used (5000 is the default port - also used by the game)
var xmlRpcConnection = new XmlRpcClient(new XmlRpcClient.Config(port: 5001));

// If you don't care for the response, you don't have to store the returned handle.
var responseHandle = xmlRpcConnection.SendRequest(new Authenticate(login, password));

// If you do, just register for the MethodResponse event on the Client, and wait for the right handle to return.
// Then just parse the response into the right methodCall and it will contain the response.
xmlRpcConnection.MethodResponse += xmlRpcConnection_MethodResponse;

If you're using the ManiaNet Server Controller, it's all done for you.

var success = controller.CallMethod(methodCall, timeout);

if (success)
{
    // methodCall contains the response.
}

License

LGPL V2.1