Demo entry 6341920

c

   

Submitted by anonymous on Jan 05, 2017 at 03:41
Language: C. Code size: 271 Bytes.

//锁住read buffer, packet的data指针在循环内始终有效
//pkt的data指针有效期期在循环内,即不能被持有 
conn->busy_ = true; 
while(processed < limit_process_once && pkt.valid()) { 
    //由派生类实现该虚函数逻辑
    processPacket(conn, pkt);
    pkt = conn->recvNext();
    processed++; 
}
conn->busy_ = false;

This snippet took 0.00 seconds to highlight.

Back to the Entry List or Home.

Delete this entry (admin only).