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 Server transport identifier, with the provided server address.

    Declaration

    Objective-C

    + (nonnull DITTransportServer *)ServerWithAddress:
        (nonnull NSString *)serverAddress;

    Parameters

    serverAddress

    The address of the server to connect to.

    Return Value

    An instance of the Server 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

    listenPort

    The port number that this device should listen on.

    Return Value

    An instance of the WiFiFixedPort transport identifier.