xrtSshChannelStateInit
初始化已经完成 open confirmation 的 channel 生命周期。
bool xrtSshChannelStateInit(xsshchannelstate* pState);
| 参数 | 说明 |
|---|---|
| xsshchannelstate* pState | 状态对象 |
返回:初始化已经完成 open confirmation 的 channel 生命周期。
示例已编译验证
sshchannelstateinit obj; xrtSshChannelStateInit(&obj, pState);
xrtSshChannelCanSendData
判断本端是否仍可发送 data 或 extended-data。
bool xrtSshChannelCanSendData(const xsshchannelstate* pState);
| 参数 | 说明 |
|---|---|
| const xsshchannelstate* pState | 状态对象 |
返回:判断本端是否仍可发送 data 或 extended-data。
示例已编译验证
/* 判断本端是否仍可发送 data 或 extended-data。 */ result = xrtSshChannelCanSendData(pState);
xrtSshChannelCanReceiveData
判断远端 data 或 extended-data 是否仍可被接受。
bool xrtSshChannelCanReceiveData(const xsshchannelstate* pState);
| 参数 | 说明 |
|---|---|
| const xsshchannelstate* pState | 状态对象 |
返回:判断远端 data 或 extended-data 是否仍可被接受。
示例已编译验证
/* 判断远端 data 或 extended-data 是否仍可被接受。 */ result = xrtSshChannelCanReceiveData(pState);
xrtSshChannelCanSendRequest
判断本端是否仍可发送 channel request。
bool xrtSshChannelCanSendRequest(const xsshchannelstate* pState);
| 参数 | 说明 |
|---|---|
| const xsshchannelstate* pState | 状态对象 |
返回:判断本端是否仍可发送 channel request。
示例已编译验证
/* 判断本端是否仍可发送 channel request。 */ result = xrtSshChannelCanSendRequest(pState);
xrtSshChannelCloseReplyNeeded
判断收到远端 close 后是否仍需排队本端 close。
bool xrtSshChannelCloseReplyNeeded(const xsshchannelstate* pState);
| 参数 | 说明 |
|---|---|
| const xsshchannelstate* pState | 状态对象 |
返回:判断收到远端 close 后是否仍需排队本端 close。
示例已编译验证
/* 判断收到远端 close 后是否仍需排队本端 close。 */ result = xrtSshChannelCloseReplyNeeded(pState);
xrtSshChannelClosed
判断双向 close 握手是否完成,可以回收 channel slot。
bool xrtSshChannelClosed(const xsshchannelstate* pState);
| 参数 | 说明 |
|---|---|
| const xsshchannelstate* pState | 状态对象 |
返回:判断双向 close 握手是否完成,可以回收 channel slot。
示例已编译验证
/* 判断双向 close 握手是否完成,可以回收 channel slot。 */ result = xrtSshChannelClosed(pState);
xrtSshChannelLocalEofCommit
在本端 EOF 已可靠排队后提交单向发送结束。
xsshcode xrtSshChannelLocalEofCommit(xsshchannelstate* pState);
| 参数 | 说明 |
|---|---|
| xsshchannelstate* pState | 状态对象 |
返回:在本端 EOF 已可靠排队后提交单向发送结束。
示例已编译验证
/* 在本端 EOF 已可靠排队后提交单向发送结束。 */ result = xrtSshChannelLocalEofCommit(pState);
xrtSshChannelRemoteEofCommit
接收远端 EOF;重复或 close 后 EOF 是协议错误。
xsshcode xrtSshChannelRemoteEofCommit(xsshchannelstate* pState);
| 参数 | 说明 |
|---|---|
| xsshchannelstate* pState | 状态对象 |
返回:接收远端 EOF;重复或 close 后 EOF 是协议错误。
示例已编译验证
/* 接收远端 EOF;重复或 close 后 EOF 是协议错误。 */ result = xrtSshChannelRemoteEofCommit(pState);
xrtSshChannelLocalCloseCommit
在本端 close 已可靠排队后提交本端关闭。
xsshcode xrtSshChannelLocalCloseCommit(xsshchannelstate* pState);
| 参数 | 说明 |
|---|---|
| xsshchannelstate* pState | 状态对象 |
返回:在本端 close 已可靠排队后提交本端关闭。
示例已编译验证
/* 在本端 close 已可靠排队后提交本端关闭。 */ result = xrtSshChannelLocalCloseCommit(pState);
xrtSshChannelRemoteCloseCommit
接收远端 close;调用方随后按需回复 close。
xsshcode xrtSshChannelRemoteCloseCommit(xsshchannelstate* pState);
| 参数 | 说明 |
|---|---|
| xsshchannelstate* pState | 状态对象 |
返回:接收远端 close;调用方随后按需回复 close。
示例已编译验证
/* 接收远端 close;调用方随后按需回复 close。 */ result = xrtSshChannelRemoteCloseCommit(pState);