Table of Contents

Class ContainerShmTransport

Namespace
KernLab.Cell.Runtime
Assembly
KernLab.Cell.Runtime.dll

shm 载体(容器侧接入形态——D2 自足,不引用宿主侧内核):Windows 按名 Open; Unix 匿名段经 bootstrap UDS 接收描述符(1 段 + 4 门铃,槽位序 = 段, Bell0..Bell3—— Tier ShmRing §7 契约)后 Open。接入端用 B 端(写 B→A 回执域,读 A→B 调用域)。

public sealed class ContainerShmTransport : ICellTransport, IAsyncDisposable
Inheritance
ContainerShmTransport
Implements
Inherited Members

Constructors

ContainerShmTransport(string, string?, ShmRingWaitStrategy)

构造(attach 形态)。

public ContainerShmTransport(string name, string? bootstrapPath, ShmRingWaitStrategy waitStrategy = ShmRingWaitStrategy.Hybrid)

Parameters

name string

段名(Windows 跨进程接入名;Unix 仅诊断标签)。

bootstrapPath string

Unix bootstrap UDS 路径(接收 5 描述符);Windows 为 null。

waitStrategy ShmRingWaitStrategy

读侧等待策略(Tier §7 三档,各进程自选;缺省 hybrid)。

Properties

SegmentName

段名(端点描述符地址段)。

public string SegmentName { get; }

Property Value

string

Methods

BindAsync(CellEndpointDescriptor, CancellationToken)

Bind——绑定端点为服务端听点(宿主侧 spawn 前调用;载体限定描述符)。

public ValueTask<ICellTransportListener> BindAsync(CellEndpointDescriptor endpoint, CancellationToken cancellationToken = default)

Parameters

endpoint CellEndpointDescriptor
cancellationToken CancellationToken

Returns

ValueTask<ICellTransportListener>

ConnectAsync(CellEndpointDescriptor, CancellationToken)

Connect——向端点发起连接(容器侧;端点未绑定即失败,绝不静默重试)。

public ValueTask<ICellTransportConnection> ConnectAsync(CellEndpointDescriptor endpoint, CancellationToken cancellationToken = default)

Parameters

endpoint CellEndpointDescriptor
cancellationToken CancellationToken

Returns

ValueTask<ICellTransportConnection>

DisposeAsync()

public ValueTask DisposeAsync()

Returns

ValueTask