E2e4.Chess.Fics.Client
1.1.0
Prefix Reserved
See the version list below for details.
dotnet add package E2e4.Chess.Fics.Client --version 1.1.0
NuGet\Install-Package E2e4.Chess.Fics.Client -Version 1.1.0
<PackageReference Include="E2e4.Chess.Fics.Client" Version="1.1.0" />
<PackageVersion Include="E2e4.Chess.Fics.Client" Version="1.1.0" />
<PackageReference Include="E2e4.Chess.Fics.Client" />
paket add E2e4.Chess.Fics.Client --version 1.1.0
#r "nuget: E2e4.Chess.Fics.Client, 1.1.0"
#:package E2e4.Chess.Fics.Client@1.1.0
#addin nuget:?package=E2e4.Chess.Fics.Client&version=1.1.0
#tool nuget:?package=E2e4.Chess.Fics.Client&version=1.1.0
E2e4.Chess.Fics.Client
![]()
A cross-platform (net10.0) client library for the Free Internet Chess Server (FICS):
System.IO.Pipelines framing, a typed message parser, style-12 board parsing, an IFicsTransport seam over TCP and
an optional, pluggable timeseal codec. Install from NuGet: E2e4.Chess.Fics.Client.
This is an unofficial library. It is not affiliated with, or endorsed by, FICS or its administrators.
await using IFicsClient client = new FicsClientFactory(Options.Create(new FicsClientOptions()), new TcpFicsTransport()).Create();
client.BoardUpdated += (_, e) => Console.WriteLine(e.Board);
await client.ConnectAsync();
string user = await client.LoginAsGuestAsync();
await client.SendCommandAsync("seek 5 0");
With dependency injection, call services.AddFicsClient(options => ...) and inject IFicsClientFactory. A client is a single
use session; long-lived services should inject the factory and dispose each client with DisposeAsync.
Using timeseal
The timeseal cipher is GPL v2 or later and lives in a separate package, E2e4.Chess.OpenSeal. An application that includes that package is distributed under the GPL. If you accept that, the adapter is one line:
sealed class OpenSealCodec : ITimesealCodec
{
public string Encode(string line) => OpenSealCipher.Encode(line);
}
Do not reference E2e4.Chess.OpenSeal from a library you want to keep permissively licensed.
Privacy and security notes
- FICS speaks plain, unencrypted Telnet. A password sent with
LoginAsyncand everything you chat crosses the network in the clear, and this library cannot change that. Prefer guest logins for demos, and never reuse a password from elsewhere. - Outbound lines are checked: a command, user name, password or interface name containing
/r,/nor/0is rejected, so a value cannot smuggle in a second command. - Inbound lines and frames have length caps, and the parser turns anything it does not understand into
UnknownLineMessageinstead of throwing. - The optional
ILoggerreceives state changes and swallowed failures, never raw lines or passwords. FicsClientOptions.Hostdefaults tofreechess.org; point it elsewhere for another server.
Build and test
dotnet test E2e4.Chess.Fics.Client.slnx
See SECURITY.md to report a vulnerability.
Licence
MIT, see LICENSE. The library has no dependency on any GPL
code. Timeseal is optional and plugs in through ITimesealCodec (FicsClientOptions.Timeseal); leave it null to send plain lines.
The test fixtures are synthetic; see NOTICE.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 10.0.13)
- Microsoft.Extensions.Logging.Abstractions (>= 10.0.13)
- Microsoft.Extensions.Options (>= 10.0.13)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
See https://github.com/th3snark/E2e4.Chess.Fics.Client/releases for what changed in each version.