Class InProcessTransport
- Namespace
- KernLab.Cell
- Assembly
- KernLab.Cell.dll
InProcess 载体(§4 载体阶梯 0 级——内存对拷,测试同构): Bind/Connect 以端点描述符配对,对拷经内存管道(无 socket、无内核通路——往返损耗 ≈0)。
★ 单元秒级纪律(§10)的载体底座:协议通道测试在真 ICellTransport 面上跑, 与环回 TCP/UDS 载体等价复跑(C204 对抗纪律)。
★ 只接受 inproc: 端点(载体限定——用错 scheme 即错连面,fail-fast)。
public sealed class InProcessTransport : ICellTransport, IAsyncDisposable
- Inheritance
-
InProcessTransport
- Implements
- Inherited Members
Constructors
InProcessTransport()
构造(每实例一个独立端点空间——测试/进程内档互不串扰)。
public InProcessTransport()
Methods
BindAsync(CellEndpointDescriptor, CancellationToken)
Bind——绑定端点为服务端听点(宿主侧 spawn 前调用;载体限定描述符)。
public ValueTask<ICellTransportListener> BindAsync(CellEndpointDescriptor endpoint, CancellationToken cancellationToken = default)
Parameters
endpointCellEndpointDescriptorcancellationTokenCancellationToken
Returns
ConnectAsync(CellEndpointDescriptor, CancellationToken)
Connect——向端点发起连接(容器侧;端点未绑定即失败,绝不静默重试)。
public ValueTask<ICellTransportConnection> ConnectAsync(CellEndpointDescriptor endpoint, CancellationToken cancellationToken = default)
Parameters
endpointCellEndpointDescriptorcancellationTokenCancellationToken
Returns
DisposeAsync()
public ValueTask DisposeAsync()