FDSRem 1.0.0
dotnet add package FDSRem --version 1.0.0
NuGet\Install-Package FDSRem -Version 1.0.0
<PackageReference Include="FDSRem" Version="1.0.0" />
paket add FDSRem --version 1.0.0
#r "nuget: FDSRem, 1.0.0"
// Install FDSRem as a Cake Addin #addin nuget:?package=FDSRem&version=1.0.0 // Install FDSRem as a Cake Tool #tool nuget:?package=FDSRem&version=1.0.0
FDSRem
FDSRem is a ibrary to communicate with C&C Renegade servers over RenRem protocol with useful extra features such as keep alive.
Features
- Keep Alive: This feature keeps the connection to RenRem alive and runs a timeout check in the client-side.
- Keep alive sends the password to server every 20 seconds to keep the connection alive. After 10 failed attempts (server does not acknowledge the password, or library fails to send password) connection status will be set to
ConnectionStatus.Connecting
, and library will automatically attempt to reconnect. - If keep alive closes connection due to a client-side timeout,
DisconnectedEvent
will raise withDisconnectReason.ClientTimeOut
. - After another 10 failed attempts while connection status is
ConnectionStatus.Connecting
, keep alive procedure will end, connection status will be set toConnectionStatus.Disconnected
and connection will need to be restarted manually. - If keep alive is disabled, application or service which is using the library will need to perform connectivity check while sending commands to RenRem for cases like connection closure without acknowledging clients.
- If keep alive is disabled,
DisconnectedEvent
will never raise withDisconnectReason.ClientTimeOut
.
- Keep alive sends the password to server every 20 seconds to keep the connection alive. After 10 failed attempts (server does not acknowledge the password, or library fails to send password) connection status will be set to
- Automatic Connection Handling: Library will automatically handle and supress connection begin/closure messages.
- Messages that represent connection closures, which are
** Connection timed out - Bye! **
and** Server exiting - Connection closed! **
will be automatically handled and suppressed fromDataReceivedEvent
. Instead, these will be raised as an event viaDisconnectedEvent
, withDisconnectReason.ServerTimeOut
andDisconnectReason.ServerShutdown
. - Message beginning with
Password accepted.
will be automatically handled and suppressed fromDataReceivedEvent
. Instead, this will raiseConnectedEvent
. Continuing lines afterPassword accepted.
will be extracted toRenRemClient.MessageOfTheDay
property.
- Messages that represent connection closures, which are
Examples
There is an example below of initializing RenRemClient
with a host name.
var renremPort = 4849;
var client = new RenRemClient("myserver.com", renremPort);
Alternatively, you can specify a local port number to bind the UdpClient
.
Every RenRemClient
constructor accepts the last parameter as local port optionally.
var renremPort = 4849;
var localPort = 1337;
var client = new RenRemClient("myserver.com", renremPort, localPort);
It is also possible to initialize RenRemClient
with an IP address instead.
var renremPort = 4849;
var ipAddress = System.Net.IPAddress.Parse("127.0.0.1");
var client = new RenRemClient(ipAddress, renremPort);
Or an IPEndPoint
instead.
var renremPort = 4849;
var ipAddress = System.Net.IPAddress.Parse("127.0.0.1");
var ep = new System.Net.IPEndPoint(ipAddress, renremPort);
var client = new RenRemClient(ep);
To enable Keep Alive feature, you need to set KeepAlive
property to true
.
client.KeepAlive = true;
- You can start connection to RenRem synchronously using
client.Start()
, or asynchronously usingclient.StartAsync()
methods. - You can send lines to RenRem synchronously or asynchronously, using
client.Send()
orclient.SendAsync()
methods. - Disposing
RenRemClient
forces an immediate closure, and does not raise any events. Useclient.Stop()
if you want events to raise with a graceful closure.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 is compatible. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. 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. |
-
net5.0
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
1.0.0 | 286 | 11/19/2021 |