xrtSshConnectionSessionInit
初始化无网络会话;全局 FIFO 必须为空,空 resolver 只允许 global 与新 channel open。
| 参数 | 说明 |
|---|---|
| xsshconnectionsession* pSession | 会话对象 |
| xsshrole Role | 本地角色 |
| xsshchannelresolveproc pResolve | Resolve 参数 |
| ptr pUserData | 透传用户数据 |
| xsshreplyqueue* pGlobalReplies | GlobalReles 参数 |
示例已编译验证
sshconnectionsessioninit obj; xrtSshConnectionSessionInit(&obj, pSession, Role, pResolve, pUserData, pGlobalReplies);
xrtSshConnectionSessionClear
清除事务与借用指针,不清理调用方 channel 或 reply FIFO。
| 参数 | 说明 |
|---|---|
| xsshconnectionsession* pSession | 会话对象 |
示例已编译验证
/* 清除事务与借用指针,不清理调用方 channel 或 reply FIFO。 */ result = xrtSshConnectionSessionClear(pSession);
xrtSshConnectionSessionBegin
在 server USERAUTH_SUCCESS 已按正确方向提交后开放 connection 层。
| 参数 | 说明 |
|---|---|
| xsshconnectionsession* pSession | 会话对象 |
| const xsshtransportcore* pCore | 核心对象 |
示例已编译验证
/* 在 server USERAUTH_SUCCESS 已按正确方向提交后开放 connection 层。 */ result = xrtSshConnectionSessionBegin(pSession, pCore);
xrtSshConnectionSessionActive
返回会话是否仍可处理 connection 消息。
| 参数 | 说明 |
|---|---|
| const xsshconnectionsession* pSession | 会话对象 |
示例已编译验证
/* 返回会话是否仍可处理 connection 消息。 */ result = xrtSshConnectionSessionActive(pSession);
xrtSshConnectionSessionWritePrepare
XRT_API xsshcode xrtSshConnectionSessionWritePrepare( xsshconnectionsession* pSession, const xsshtransportcore* pCore, xbytesview Payload, xsshchannelcore* pChannel, xsshreplyqueue* pReplies, uint64 iReplyToken );
示例已编译验证
/* XRT_API xsshcode xrtSshConnectionSessionWritePrepare( xsshconnectionsession* pSession, const xsshtransportcore* pCore, xbytesview Payload, xsshchannelcore* pChannel, xsshreplyqueue* pReplies, uint64 iReplyToken ); */ result = xrtSshConnectionSessionWritePrepare();
xrtSshConnectionSessionWriteCommit
transport 已可靠提交输出后,原子提交 channel 与 request FIFO 状态。
| 参数 | 说明 |
|---|---|
| xsshconnectionsession* pSession | 会话对象 |
| const xsshtransportcore* pCore | 核心对象 |
示例已编译验证
/* transport 已可靠提交输出后,原子提交 channel 与 request FIFO 状态。 */ result = xrtSshConnectionSessionWriteCommit(pSession, pCore);
xrtSshConnectionSessionWriteAbort
放弃未交给 transport 的输出,不修改 channel 或 reply FIFO。
| 参数 | 说明 |
|---|---|
| xsshconnectionsession* pSession | 会话对象 |
示例已编译验证
/* 放弃未交给 transport 的输出,不修改 channel 或 reply FIFO。 */ result = xrtSshConnectionSessionWriteAbort(pSession);
xrtSshConnectionSessionReadPrepare
XRT_API xsshcode xrtSshConnectionSessionReadPrepare( xsshconnectionsession* pSession, const xsshtransportcore* pCore, xbytesview Payload, xsshconnectionpacket* pPacket );
示例已编译验证
/* XRT_API xsshcode xrtSshConnectionSessionReadPrepare( xsshconnectionsession* pSession, const xsshtransportcore* pCore, xbytesview Payload, xsshconnectionpacket* pPacket ); */ result = xrtSshConnectionSessionReadPrepare();
xrtSshConnectionSessionReadCommit
transport 已提交输入后,原子提交 channel 与 reply FIFO 状态。
| 参数 | 说明 |
|---|---|
| xsshconnectionsession* pSession | 会话对象 |
| const xsshtransportcore* pCore | 核心对象 |
示例已编译验证
/* transport 已提交输入后,原子提交 channel 与 reply FIFO 状态。 */ result = xrtSshConnectionSessionReadCommit(pSession, pCore);
xrtSshConnectionSessionReadAbort
放弃已认证输入并终止 connection 会话;对应 transport 也必须关闭。
| 参数 | 说明 |
|---|---|
| xsshconnectionsession* pSession | 会话对象 |
示例已编译验证
/* 放弃已认证输入并终止 connection 会话;对应 transport 也必须关闭。 */ result = xrtSshConnectionSessionReadAbort(pSession);
xrtSshConnectionSessionFail
显式终止 connection 编排;重复调用保持失败状态。
| 参数 | 说明 |
|---|---|
| xsshconnectionsession* pSession | 会话对象 |
示例已编译验证
/* 显式终止 connection 编排;重复调用保持失败状态。 */ result = xrtSshConnectionSessionFail(pSession);