Speedify SDK for Android 15.5.0
Loading...
Searching...
No Matches
Introduction to Dispatch

Dispatch is a local proxy service that allows automatic network fail over an load balancing. It is a separate library that can be added to the Speedify SDK.

To use Dispatch, you must first initialize the Speedify SDK and enable the Dispatch add-on library. See the Initializing the SDK page for more information.

To enable Dispatch, add the following code to your application:

// set routing mode to FAILOVER or ROUND_ROBIN
Dispatch dispatch = Dispatch.getInstance();
dispatch.setRoutingMode(RoutingMode.ROUND_ROBIN);
// Connect Speedify in proxy mode
SpeedifySDK speedify = SpeedifySDK.getInstance();
speedify.connectProxy();

To receive statistics updates from Dispatch, you can add a receiver:

IDispatchStateReceiver receiver = new IDispatchStateReceiver() {
@Override
void OnSettings(Dispatch.Settings settings) {}
@Override
void OnStats(Dispatch.Stats stats) {}
};
Dispatch dispatch = Dispatch.getInstance();
dispatch.sdkStateReceivers.register(receiver);