WSMessageReady (C 函数)
int WSMessageReady(WSLINK link)
查询链接对象 link,看链接是否有带外消息.
更多信息
- 若消息可以读取,则 WSMessageReady() 返回非零值,否则为零.
- WSTP 的标头文件 wstp.h 已对 WSMessageReady() 作出声明.
范例
基本范例 (1)
#include "wstp.h"
/* calculate the sum of the integers in a list and check for a message on a link */
int f(WSLINK lp, int *list, int len)
{
int sum;
while(len--)
{
sum += *list++;
if(WSMessageReady(lp))
{ /* read the message */ }
}
return sum;
}
相关指南
历史
1996年引入 (3.0) | 在以下年份被更新:2007 (6.0)