Speedify SDK for Desktop  14.5.3
Network Sharing

As of version 14.0, Speedify SDK supports sharing cellular connections from mobile devices to other devices via Wi-Fi and/or Ethernet. These shared connections are used for VPN connection transports.

Overview

Devices discover each other via MDNS announcements and queries. Host devices (Android and iOS devices with cellular interfaces) announce themselves as network sharing hosts and run a TCP listen socket. Client devices query for hosts and connect to them. Command and control messaging is sent over these TCP sockets, with transport connections established over separate UDP sockets.

Configuration

SpeedifySDK_SetNetworkSharingClientEnabled and SpeedifySDK_SetNetworkSharingHostEnabled enable network sharing on the device.

A default display name is pulled from the device. This can be overridden with SpeedifySDK_SetNetworkSharingDisplayName.

Discovery

Discovery/discoverability phases are automatically initiated on network or user data changes, and last for 10 seconds. Discovery can also be manually initiated with SpeedifySDK_StartNetworkSharingDiscovery. Each call to this starts a discovery phase which lasts for 30 seconds.

Newly discovered peers are signaled via SpeedifySDK_ListenForNetworkShareNewPeerAvailable.

Pairing

Peers may be paired by calling SpeedifySDK_RequestNetworkSharingPair. This sends a pairing request to the peer, which is signaled via SpeedifySDK_ListenForNetworkSharePairRequest and accepted or rejected with SpeedifySDK_AllowNetworkSharingPair.

Pair requests may be set to be automatically accepted or rejected with SpeedifySDK_SetNetworkSharingPairRequestBehavior.

A peer may be removed with SpeedifySDK_UnpairNetworkSharingPeer.

Manual Connections

SpeedifySDK_ConnectToNetworkShareViaConnectCode is used to manually connect to a network shared host via their connect code.

SpeedifySDK_ReconnectToNetworkShare reconnects to a previously authenticated network share peer.

Status

Currently available and previously paired peers are available via SpeedifySDK_GetNetworkSharesAvailable.