AsyncUDPPacket with generic Stream interface from sivar2311 is much more useful!
Forked from me-no-dev/ESPAsyncUDP with cherry-picked open pull request
In your platform.ini:
lib_deps = https://github.com/stephas/ESPAsyncUDP.git
Async UDP Library for ESP8266 Arduino
This is a fully asynchronous UDP library, aimed at enabling trouble-free, multi-connection network environment for Espressif's ESP8266 MCUs.
The library is easy to use and includes support for Unicast, Broadcast and Multicast environments
Latest GIT version of ESP8266 Arduino might be required for this library to work