WSNextPacket (C 函数)

int WSNextPacket(WSLINK link)

进入 link 中下一个包并返回一个常量表明它的标头.

更多信息

范例

基本范例  (1)

#include "wstp.h"

/* read the type of the incoming packet on a link */

void f(WSLINK lp)
{
    switch(WSNextPacket(lp))
    {
        case CALLPKT:
            /* read the CallPacket[] */
            break;
        case EVALUATEPKT:
            /* read the EvaluatePacket[] */
            break;
        case RETURNPKT:
            /* read the EvaluatePacket[] */

        /* ... */

        case ILLEGALPKT:
            /* unable to read the next packet from lp */
    }    
}