Skip to content

3.7 Extends Controller, to control message

luosheng edited this page Jun 7, 2023 · 1 revision

IController is to schedule messages before sending, simulate industry switch.

  • Derive IController or BaseController

    • Implement SendStart/SendStop,to implement controller switcher。
    • Implement AddMessage,to add messages to data structure。
    • Implement ConfirmMessage,to bind receive message to send message。
    • Implement ForceRemoveWaitingMessage,to remove message when they are timeout。
    • Implement Clear,to clear all messages。

By the way, you need to use data structures to manage message packet.

Home

Clone this wiki locally