Class SplitIpDbBuilder
- Namespace
- VpnHood.Core.Filtering.Sqlite
- Assembly
- VpnHood.Core.Filtering.Sqlite.dll
Provides the build of a split IP database: IPv4 and IPv6 address ranges in include, exclude and block sets, which SqliteIpFilter reads.
public abstract class SplitIpDbBuilder : SplitDbBuilder
- Inheritance
-
SplitIpDbBuilder
- Derived
- Inherited Members
Remarks
A derived class gives the source's signature and its ranges.
Methods
InsertRangesAsync(SplitIpDbInserter, CancellationToken)
Writes the source's ranges through an inserter, during a build.
protected abstract Task InsertRangesAsync(SplitIpDbInserter inserter, CancellationToken cancellationToken)
Parameters
inserterSplitIpDbInserterThe inserter, which adds each range to the build's transaction.
cancellationTokenCancellationTokenThe token to monitor for cancellation requests.
Returns
- Task
A task that represents the asynchronous operation.
Remarks
It is called only when a build runs. The ranges of a set must not overlap: a lookup checks only the range whose start is the greatest at or below the address.