xrtSshChannelCoreOpenInit
初始化等待 peer confirmation 的本端 channel open。
| 参数 | 说明 |
|---|---|
| xsshchannelcore* pChannel | 通道对象 |
| uint32 iLocal | Local 参数 |
| uint32 iReceiveWindow | ReceveWndow 参数 |
| uint32 iReceiveMaxPacket | ReceveMaxPacket 参数 |
| uint32 iAdjustThreshold | AdjustThreshold 参数 |
示例已编译验证
sshchannelcoreopeninit obj; xrtSshChannelCoreOpenInit(&obj, pChannel, iLocal, iReceiveWindow, iReceiveMaxPacket, iAdjustThreshold);
xrtSshChannelCoreAcceptInit
从已解析 peer open 初始化等待本端 confirmation 的 channel。
| 参数 | 说明 |
|---|---|
| xsshchannelcore* pChannel | 通道对象 |
| uint32 iLocal | Local 参数 |
| const xsshchannelopen* pOpen | Oen 参数 |
| uint32 iReceiveWindow | ReceveWndow 参数 |
| uint32 iReceiveMaxPacket | ReceveMaxPacket 参数 |
| uint32 iAdjustThreshold | AdjustThreshold 参数 |
示例已编译验证
sshchannelcoreacceptinit obj; xrtSshChannelCoreAcceptInit(&obj, pChannel, iLocal, pOpen, iReceiveWindow, iReceiveMaxPacket, iAdjustThreshold);
xrtSshChannelCoreClear
清除 channel core;不会清理调用方数据或 request reply 队列。
| 参数 | 说明 |
|---|---|
| xsshchannelcore* pChannel | 通道对象 |
示例已编译验证
/* 清除 channel core;不会清理调用方数据或 request reply 队列。 */ result = xrtSshChannelCoreClear(pChannel);
xrtSshChannelCorePhase
返回公开 channel 阶段;无效对象返回 FAILED。
| 参数 | 说明 |
|---|---|
| const xsshchannelcore* pChannel | 通道对象 |
示例已编译验证
/* 返回公开 channel 阶段;无效对象返回 FAILED。 */ result = xrtSshChannelCorePhase(pChannel);
xrtSshChannelCoreIds
返回本端 channel id;远端 id 仅在 accepting/open/closed 阶段可用。
| 参数 | 说明 |
|---|---|
| const xsshchannelcore* pChannel | 通道对象 |
| uint32* pLocal | 本地地址 |
| uint32* pRemote | 远端地址 |
示例已编译验证
/* 返回本端 channel id;远端 id 仅在 accepting/open/closed 阶段可用。 */ result = xrtSshChannelCoreIds(pChannel, pLocal, pRemote);
xrtSshChannelCoreConfirmationCommit
提交 peer 对本端 open 的 confirmation,并原子开放数据面。
| 参数 | 说明 |
|---|---|
| xsshchannelcore* pChannel | 通道对象 |
| const xsshchannelconfirmation* pConfirmation | Confrmaton 参数 |
示例已编译验证
/* 提交 peer 对本端 open 的 confirmation,并原子开放数据面。 */ result = xrtSshChannelCoreConfirmationCommit(pChannel, pConfirmation);
xrtSshChannelCoreFailureCommit
提交 peer 对本端 open 的 failure,并保留失败 reason。
| 参数 | 说明 |
|---|---|
| xsshchannelcore* pChannel | 通道对象 |
| const xsshchannelopenfailure* pFailure | Falure 参数 |
示例已编译验证
/* 提交 peer 对本端 open 的 failure,并保留失败 reason。 */ result = xrtSshChannelCoreFailureCommit(pChannel, pFailure);
xrtSshChannelCoreAcceptCommit
本端 confirmation 已可靠排队后提交 peer open。
| 参数 | 说明 |
|---|---|
| xsshchannelcore* pChannel | 通道对象 |
示例已编译验证
/* 本端 confirmation 已可靠排队后提交 peer open。 */ result = xrtSshChannelCoreAcceptCommit(pChannel);
xrtSshChannelCoreRejectCommit
本端 failure 已可靠排队后提交拒绝结果。
| 参数 | 说明 |
|---|---|
| xsshchannelcore* pChannel | 通道对象 |
| uint32 iReason | 原因文本 |
示例已编译验证
/* 本端 failure 已可靠排队后提交拒绝结果。 */ result = xrtSshChannelCoreRejectCommit(pChannel, iReason);
xrtSshChannelCoreOpen
判断数据面是否已打开或双向 close 是否已经完成。
| 参数 | 说明 |
|---|---|
| const xsshchannelcore* pChannel | 通道对象 |
示例已编译验证
/* 判断数据面是否已打开或双向 close 是否已经完成。 */ result = xrtSshChannelCoreOpen(pChannel);
xrtSshChannelCoreClosed
XRT_API bool xrtSshChannelCoreClosed(const xsshchannelcore* pChannel);
示例已编译验证
/* XRT_API bool xrtSshChannelCoreClosed(const xsshchannelcore* pChannel); */ result = xrtSshChannelCoreClosed();
xrtSshChannelCoreSendLimit
返回下一条 data/extended-data payload 可发送的最大字节数。
| 参数 | 说明 |
|---|---|
| const xsshchannelcore* pChannel | 通道对象 |
示例已编译验证
/* 返回下一条 data/extended-data payload 可发送的最大字节数。 */ result = xrtSshChannelCoreSendLimit(pChannel);
xrtSshChannelCoreDataSendCommit
data 可靠排队后扣减远端窗口;EOF/CLOSE 后拒绝新数据。
| 参数 | 说明 |
|---|---|
| xsshchannelcore* pChannel | 通道对象 |
| uint32 iBytes | 字节数 |
示例已编译验证
/* data 可靠排队后扣减远端窗口;EOF/CLOSE 后拒绝新数据。 */ result = xrtSshChannelCoreDataSendCommit(pChannel, iBytes);
xrtSshChannelCoreDataReceiveCommit
提交已验证的 peer data,并校验本端 recipient、窗口和生命周期。
| 参数 | 说明 |
|---|---|
| xsshchannelcore* pChannel | 通道对象 |
| uint32 iRecipient | 收件人通道号 |
| uint32 iBytes | 字节数 |
示例已编译验证
/* 提交已验证的 peer data,并校验本端 recipient、窗口和生命周期。 */ result = xrtSshChannelCoreDataReceiveCommit(pChannel, iRecipient, iBytes);
xrtSshChannelCoreDataConsume
应用消费已接收数据;close 后仍可释放此前缓冲的数据。
| 参数 | 说明 |
|---|---|
| xsshchannelcore* pChannel | 通道对象 |
| uint32 iBytes | 字节数 |
示例已编译验证
/* 应用消费已接收数据;close 后仍可释放此前缓冲的数据。 */ result = xrtSshChannelCoreDataConsume(pChannel, iBytes);
xrtSshChannelCoreAdjustReady
判断是否应发送 WINDOW_ADJUST,并返回当前可安全返还额度。
| 参数 | 说明 |
|---|---|
| const xsshchannelcore* pChannel | 通道对象 |
示例已编译验证
/* 判断是否应发送 WINDOW_ADJUST,并返回当前可安全返还额度。 */ result = xrtSshChannelCoreAdjustReady(pChannel);
xrtSshChannelCoreAdjustLimit
XRT_API uint32 xrtSshChannelCoreAdjustLimit( const xsshchannelcore* pChannel );
示例已编译验证
/* XRT_API uint32 xrtSshChannelCoreAdjustLimit( const xsshchannelcore* pChannel ); */ result = xrtSshChannelCoreAdjustLimit();
xrtSshChannelCoreAdjustSendCommit
WINDOW_ADJUST 可靠排队后提交本端返还额度。
| 参数 | 说明 |
|---|---|
| xsshchannelcore* pChannel | 通道对象 |
| uint32 iBytes | 字节数 |
示例已编译验证
/* WINDOW_ADJUST 可靠排队后提交本端返还额度。 */ result = xrtSshChannelCoreAdjustSendCommit(pChannel, iBytes);
xrtSshChannelCoreAdjustReceiveCommit
提交已验证的 peer WINDOW_ADJUST。
| 参数 | 说明 |
|---|---|
| xsshchannelcore* pChannel | 通道对象 |
| const xsshchanneladjust* pAdjust | Adjust 参数 |
示例已编译验证
/* 提交已验证的 peer WINDOW_ADJUST。 */ result = xrtSshChannelCoreAdjustReceiveCommit(pChannel, pAdjust);
xrtSshChannelCoreCanSendRequest
判断当前方向是否还能发送或接收 channel request。
| 参数 | 说明 |
|---|---|
| const xsshchannelcore* pChannel | 通道对象 |
示例已编译验证
/* 判断当前方向是否还能发送或接收 channel request。 */ result = xrtSshChannelCoreCanSendRequest(pChannel);
xrtSshChannelCoreCanReceiveRequest
XRT_API bool xrtSshChannelCoreCanReceiveRequest( const xsshchannelcore* pChannel );
示例已编译验证
/* XRT_API bool xrtSshChannelCoreCanReceiveRequest( const xsshchannelcore* pChannel ); */ result = xrtSshChannelCoreCanReceiveRequest();
xrtSshChannelCoreRecipientCheck
校验已解析 peer channel 消息的 recipient,不推进状态。
| 参数 | 说明 |
|---|---|
| const xsshchannelcore* pChannel | 通道对象 |
| uint32 iRecipient | 收件人通道号 |
示例已编译验证
/* 校验已解析 peer channel 消息的 recipient,不推进状态。 */ result = xrtSshChannelCoreRecipientCheck(pChannel, iRecipient);
xrtSshChannelCoreEofSendCommit
EOF 可靠排队或验证接收后提交对应方向的半关闭。
| 参数 | 说明 |
|---|---|
| xsshchannelcore* pChannel | 通道对象 |
示例已编译验证
/* EOF 可靠排队或验证接收后提交对应方向的半关闭。 */ result = xrtSshChannelCoreEofSendCommit(pChannel);
xrtSshChannelCoreEofReceiveCommit
XRT_API xsshcode xrtSshChannelCoreEofReceiveCommit( xsshchannelcore* pChannel, uint32 iRecipient );
示例已编译验证
/* XRT_API xsshcode xrtSshChannelCoreEofReceiveCommit( xsshchannelcore* pChannel, uint32 iRecipient ); */ result = xrtSshChannelCoreEofReceiveCommit();
xrtSshChannelCoreCloseSendCommit
CLOSE 可靠排队或验证接收后提交;双向完成时进入 CLOSED。
| 参数 | 说明 |
|---|---|
| xsshchannelcore* pChannel | 通道对象 |
示例已编译验证
/* CLOSE 可靠排队或验证接收后提交;双向完成时进入 CLOSED。 */ result = xrtSshChannelCoreCloseSendCommit(pChannel);
xrtSshChannelCoreCloseReceiveCommit
XRT_API xsshcode xrtSshChannelCoreCloseReceiveCommit( xsshchannelcore* pChannel, uint32 iRecipient );
示例已编译验证
/* XRT_API xsshcode xrtSshChannelCoreCloseReceiveCommit( xsshchannelcore* pChannel, uint32 iRecipient ); */ result = xrtSshChannelCoreCloseReceiveCommit();