Platforms to show: All Mac Windows Linux Cross-Platform

NWPathMonitorMBS class

Type Topic Plugin Version macOS Windows Linux iOS Targets
class Network MBS MacOSX Plugin 24.1 ✅ Yes ❌ No ❌ No ✅ Yes All
An observer that you use to monitor and react to network changes.
Example
// get notified when the network connection changes
// MyPathMonitor is a subclass of NWPathMonitorMBS with the Update event implemented.
// Monitor is a property of the app: Monitor As MyPathMonitor
Monitor = New MyPathMonitor
Monitor.Start

// in MyPathMonitor:
Sub Update(path As NWPathMBS) Handles Update
If path.Status = NWPathMBS.kStatusSatisfied Then
System.DebugLog "Online, expensive: " + path.IsExpensive.ToString
Else
System.DebugLog "Offline"
End If
End Sub

The Network Path Monitor allows the caller to fetch the current global path (or a path restricted to a specific network interface type). The path is delivered in an event that is called every time the network path changes.

This class has no subclasses.

Blog Entries

Xojo Developer Magazine

Release notes

Some examples using this class:

Some related classes:


The items on this page are in the following plugins: MBS MacOSX Plugin.


NWPathMBS   -   ODNodeMBS


The biggest plugin in space...