Table of Contents

Class SplitIpDbInserter

Namespace
VpnHood.Core.Filtering.Sqlite
Assembly
VpnHood.Core.Filtering.Sqlite.dll

Inserts address ranges into a split IP database during its build.

public sealed class SplitIpDbInserter : IDisposable
Inheritance
SplitIpDbInserter
Implements
Inherited Members

Remarks

SplitIpDbBuilder makes one for its InsertRangesAsync; the rows join the build's transaction. It checks the build's cancellation every 20,000 rows.

Methods

Dispose()

Releases the inserter's statements.

public void Dispose()

Insert(FilterAction, byte[], byte[])

Inserts a range into a set.

public void Insert(FilterAction action, byte[] start, byte[] end)

Parameters

action FilterAction

The set: Include, Exclude or Block.

start byte[]

The range's first address, in network byte order: 4 bytes for IPv4, 16 for IPv6.

end byte[]

The range's last address, of the same length.

Remarks

The ranges of a set must not overlap (see SplitIpDbBuilder).

Exceptions

ArgumentOutOfRangeException

action is Default.

SqliteException

SQLite refused the row.

OperationCanceledException

The build's cancellation was requested.