As far as I know Mendix does not offer this out of the box, but maybe you can wrap one of the existing technologies below.
Both Android and iOS offer some native functionality for their respective platform:
Android: https://developer.android.com/guide/topics/connectivity/wifip2p
iOS: https://developer.apple.com/documentation/multipeerconnectivity
If you look for a crossplatform solution this one is available.
iOS+Android(Commercial): http://p2pkit.io/