Skip to content

Latest commit

 

History

History
68 lines (45 loc) · 2.57 KB

File metadata and controls

68 lines (45 loc) · 2.57 KB

Transport Extension Architecture

This document clarifies the relationship between transport extensions and the QWKSync.NET library.

Two Layers

QWKSync.NET has two distinct layers:

  1. Transport Layer — Moves files between local and remote endpoints
  2. Orchestration Layer — Discovers, orders, and coordinates transfers

Transport extensions (like QWKSync.HTTP) implement the transport layer only. They do not implement orchestration, retries, concurrency guards, or packet semantics.

What Transport Extensions Provide

A transport extension provides:

  • An ITransport implementation (e.g., HttpTransport)
  • An ITransportFactory implementation (e.g., HttpTransportFactory)
  • Transport-specific settings parsing

What Transport Extensions Do Not Do

Transport extensions:

  • Do not register themselves with QwkSyncClient
  • Do not call QwkSyncClient methods
  • Do not implement sync orchestration
  • Do not parse or interpret QWK/REP packet contents

Using Transport Extensions

Transport extensions implement public interfaces (ITransport, ITransportFactory) and can be used without modifying QWKSync.NET:

  1. Add QWKSync.NET to your project: dotnet add package QwkSync
  2. Add QWKSync.HTTP to your project: dotnet add package QwkSync.HTTP
// Create the transport
FtpTransportFactory factory = new FtpTransportFactory();
await using ITransport transport = factory.Create(profile, policy);

// Use it directly
IReadOnlyList<RemoteItem> files = await transport.ListAsync(null, "*.qwk", ct);
await transport.DownloadAsync(files[0], localPath, progress, ct);
await transport.UploadAsync(localFile, remotePath, fileName, progress, ct);

For greater detail, review the QWKSync.HTTP.Demo ..it works!

QwkSyncClient

QwkSyncClient is a convenience orchestrator that comes with built-in transports (e.g., local-folder). It handles discovery, ordering, retries, and concurrency guards.

However, QwkSyncClient does not expose transport registration. Its internal registry is populated with built-in transports only. This is a design choice, not a limitation — transport extensions work independently of QwkSyncClient.

If you need orchestration with a custom transport, implement it in your application using the transport directly, as shown above.

Summary

Responsibility Transport Extension QWKSync.NET Library
File transfer
Settings parsing
Transport registration
Sync orchestration
Retry logic
Concurrency guards