4 Developing applications with LwIP stack4.1 Developing in standalone mode using the Raw API4.1.1 Operation modelใน standalone mode, the operation model จะตั้งอยู่บน continuous software polling เพื่อเช็คว่า a packet ถูกรับแล้วหรือไม่.
เมื่อ a packet ถูกรับแล้ว, ก่อนอื่นมันจะถูกก๊อปปี้จาก the Ethernet driver buffers ลงใน the LwIP buffers. เพื่อก๊อปปี้ the packet ให้เร็วที่สุดเท่าที่เป็นได้, the LwIP buffers (pbufs) ควรถูกจัดสรรจาก the pool of buffers (PBUF_POOL).
เมื่อ a packet ถูกก๊อปปี้แล้ว, มันจะถูกส่งไปยัง the LwIP stack เพื่อประมวลผล. ขึ้นอยู่กับ the received packet, the stack อาจแจ้งหรือไม่แจ้ง the application layer.
LwIP สื่อสารกับ the application layer โดยใช้ event callback functions. ฟังก์ชันเหล่านี้ควรถูกกำหนดก่อนการสตาร์ท the communication process.
ดูที่ Figure 4 สำหรับการอธิบายของ the standalone operation model flowchart

สำหรับ TCP applications, the following common callback functions ต้องถูกกำหนด:
• Callback for incoming TCP connection event, ที่กำหนดโดย TCP_accept API call
• Callback for incoming TCP data packet event, ที่กำหนดโดย TCP_recev API call
• Callback for signaling successful data transmission, ที่กำหนดโดย TCP_sent API call
• Callback for signaling TCP error (after a TCP abort event), ที่กำหนดโดย TCP_err API call
• Periodic callback (ทุกๆ 1 หรือ 2 วินาที) for polling the application, ที่กำหนดโดย TCP_poll API call