The Multiple Transports feature allows apps connected to SDL Core to start another connection over a different transport for certain services. For example, an app connected over Bluetooth can use WiFi as a Secondary Transport for video streaming. This guide will give an overview of the process which is used to establish a Secondary Transport connection. See SDL-0141 - Supporting Simultaneous Multiple Transports for more details on the original feature proposal.
RPC and Hybrid services only run on the Primary Transport
There are three protocol control frames which are used in the implementation of Multiple Transports.
Payload Example:
{ ... "audioServiceTransports" : [1, 2], "videoServiceTransports" : [1, 2], "secondaryTransports" : ["TCP_WIFI"] }
Core responds to the proxy's StartService
request with additional parameters audioServiceTransports
, videoServiceTransports
and secondaryTransports
.
secondaryTransports
parameter contains an array of the allowed Secondary Transports for the current Primary Transport. audioServiceTransports
and videoServiceTransports
describe which services are allowed to run on which transports (Primary=1, Secondary=2, or both). The proxy uses this information and starts services only on allowed transports.Payload Example:
{ "tcpIpAddress" : "192.168.1.1", "tcpPort" : 12345 }
Core sends a TransportEventUpdate
notification to the proxy to provide additional information required to connect over the TCP transport when it is available.
tcpIpAddress
field is empty, the Secondary Transport is unavailable and the proxy will not send a RegisterSecondaryTransport
request.Using the information in the StartService ACK
and TransportEventUpdate
frames, the proxy sends a RegisterSecondaryTransport
request over the Secondary Transport with the same session ID as the Primary Transport.
RegisterSecondaryTransport ACK
, the proxy can start services over the Secondary Transport.