Skip to content

1.23

Compare
Choose a tag to compare
@cesantabot cesantabot released this 29 Dec 14:43
· 100 commits to master since this release
BREAKING: Move mgos_net API to mgos_event

`mgos_net_add_event_handler()` is removed in favor of `mgos_event`-based
API.

Example:
```c
static void my_net_ev_handler(int ev, void *evd, void *arg) {
  if (ev == MGOS_NET_EV_IP_ACQUIRED) {
    LOG(LL_INFO, ("Just got IP!"));
    // Fetch something very useful from somewhere
  }
  (void) evd;
  (void) arg;
}

// Somewhere else:
mgos_event_add_group_handler(MGOS_EVENT_GRP_NET, my_net_ev_handler, NULL);
```

PUBLISHED_FROM=3e468cd9d0698d49713e57429776c29c624b1325