Event-driven Model in C with Sockets

后端 未结 5 1318
攒了一身酷
攒了一身酷 2021-01-30 14:40

I am really interested in event-driven programming in C especially with sockets so I am going to dedicate some time doing my researches.

Let\'s assume that I want to bui

5条回答
  •  粉色の甜心
    2021-01-30 15:14

    "what is the philosophy behind this model"

    Event driven means there is no "monitoring", but that the event itself initiates the action.

    Usually this is initiated by an interrupt, which is a signal to the system from an external device, or (in the case of a software interrupt) an asynchronous process.

    https://en.wikipedia.org/wiki/Interrupt

    Further reading seems to be here:

    https://docs.oracle.com/cd/E19455-01/806-1017/6jab5di2m/index.html#sockets-40 - "Interrupt-Driven Socket I/O"

    Also http://cs.baylor.edu/~donahoo/practical/CSockets/textcode.html has some examples of Interrupt-Driven Sockets, as well as other socket programming examples.

提交回复
热议问题