Class ContainerSocketTransport
容器侧 socket 载体(D2 边界内的必然自足——宿主侧实现不可引用;仅 tcp/uds)。 形态与宿主侧同构:socket→内存管道桥,小内核缓冲让有界管道主导背压; 终端 Close=出站排空后收 socket——对端先见帧、后见 EOF。
public sealed class ContainerSocketTransport : ICellTransport, IAsyncDisposable
- Inheritance
-
ContainerSocketTransport
- Implements
- Inherited Members
Constructors
ContainerSocketTransport(bool, string?)
构造。
public ContainerSocketTransport(bool useUds, string? socketDirectory = null)
Parameters
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()