DITTransport
@interface DITTransport : NSObject
An abstract class that is used to represent any of the transports that Ditto can use.
-
The type of the transport.
Declaration
Objective-C
@property (nonatomic, readonly) DITTransportType type; -
Creates an instance of the Bluetooth transport identifier.
Declaration
Objective-C
+ (nonnull DITTransportBluetooth *)Bluetooth;Return Value
An instance of the Bluetooth transport identifier.
-
Creates an instance of the WiFi transport identifier.
Declaration
Objective-C
+ (nonnull DITTransportWiFi *)WiFi;Return Value
An instance of the WiFi transport identifier.
-
Creates an instance of the AWDL transport identifier.
Declaration
Objective-C
+ (nonnull DITTransportAWDL *)AWDL;Return Value
An instance of the AWDL transport identifier.
-
Creates an instance of the TCPServer transport identifier, with the provided server address.
Declaration
Objective-C
+ (nonnull DITTransportTCPServer *)TCPServerWithAddress: (nonnull NSString *)serverAddress;Parameters
serverAddressThe host:port of the TCP server to connect to.
Return Value
An instance of the TCPServer transport identifier.
-
Creates an instance of the WiFiFixedPort transport identifier, with the provided listen port.
Declaration
Objective-C
+ (nonnull DITTransportWiFiFixedPort *)WiFiFixedPort:(uint16_t)listenPort;Parameters
listenPortThe port number that this device should listen on.
Return Value
An instance of the WiFiFixedPort transport identifier.
-
Creates an instance of the WebServer transport identifier, with the provided server URL.
Declaration
Objective-C
+ (nonnull DITTransportWebServer *)WebServerWithAddress: (nonnull NSString *)serverURL;Parameters
serverURLThe base URL of the HTTP/WebSocket server to connect to. Example: ws://ditto.example.com/
Return Value
An instance of the WebServer transport identifier.
DITTransport Class Reference