ESPSoftAPTransport
public class ESPSoftAPTransport : ESPCommunicable
The ESPSoftAPTransport
class conforms and implememnt methods of ESPCommunicable
protocol.
This class provides methods for sending configuration and session related data to ESPDevice
.
-
Instance of
ESPUtility
.Declaration
Swift
var utility: ESPUtility
-
Undocumented
Declaration
Swift
var session: URLSession
-
Check device configuration status.
Declaration
Swift
func isDeviceConfigured() -> Bool
Return Value
Yes
if device is configured. -
URL fo sending data to device.
Declaration
Swift
var baseUrl: String
-
Create HTTP implementation of Transport protocol
Declaration
Swift
public init(baseUrl: String)
Parameters
baseUrl
base URL for the HTTP endpoints
-
HTTP implementation of the Transport protocol.
Declaration
Swift
func SendSessionData(data: Data, sessionPath: String?, completionHandler: @escaping (Data?, Error?) -> Swift.Void)
Parameters
data
Data to be sent.
sessionPath
Path for sending session related data.
completionHandler
Handler called when data is successfully sent and response received.
-
HTTP implementation of the Transport protocol
Declaration
Swift
public func SendConfigData(path: String, data: Data, completionHandler: @escaping (Data?, Error?) -> Swift.Void)
Parameters
path
Endpoint of base url.
data
Data to be sent.
completionHandler
Handler called when data is successfully sent and response received.
-
Declaration
Swift
func disconnect()