@@ -28,100 +28,100 @@ class MbedSocketClass {
28
28
void config (IPAddress local_ip);
29
29
30
30
/* Change Ip configuration settings disabling the dhcp client
31
- *
32
- * param local_ip: Static ip configuration as string
33
- */
31
+ *
32
+ * param local_ip: Static ip configuration as string
33
+ */
34
34
void config (const char * local_ip);
35
35
36
36
/* Change Ip configuration settings disabling the dhcp client
37
- *
38
- * param local_ip: Static ip configuration
39
- * param dns_server: IP configuration for DNS server 1
40
- */
37
+ *
38
+ * param local_ip: Static ip configuration
39
+ * param dns_server: IP configuration for DNS server 1
40
+ */
41
41
void config (IPAddress local_ip, IPAddress dns_server);
42
42
43
43
/* Change Ip configuration settings disabling the dhcp client
44
- *
45
- * param local_ip: Static ip configuration
46
- * param dns_server: IP configuration for DNS server 1
47
- * param gateway : Static gateway configuration
48
- */
44
+ *
45
+ * param local_ip: Static ip configuration
46
+ * param dns_server: IP configuration for DNS server 1
47
+ * param gateway : Static gateway configuration
48
+ */
49
49
void config (IPAddress local_ip, IPAddress dns_server, IPAddress gateway);
50
50
51
51
/* Change Ip configuration settings disabling the dhcp client
52
- *
53
- * param local_ip: Static ip configuration
54
- * param dns_server: IP configuration for DNS server 1
55
- * param gateway: Static gateway configuration
56
- * param subnet: Static Subnet mask
57
- */
52
+ *
53
+ * param local_ip: Static ip configuration
54
+ * param dns_server: IP configuration for DNS server 1
55
+ * param gateway: Static gateway configuration
56
+ * param subnet: Static Subnet mask
57
+ */
58
58
void config (IPAddress local_ip, IPAddress dns_server, IPAddress gateway, IPAddress subnet);
59
59
60
60
/* Change DNS Ip configuration
61
- *
62
- * param dns_server1: ip configuration for DNS server 1
63
- */
61
+ *
62
+ * param dns_server1: ip configuration for DNS server 1
63
+ */
64
64
void setDNS (IPAddress dns_server1);
65
65
66
66
/* Change DNS Ip configuration
67
- *
68
- * param dns_server1: ip configuration for DNS server 1
69
- * param dns_server2: ip configuration for DNS server 2
70
- *
71
- */
67
+ *
68
+ * param dns_server1: ip configuration for DNS server 1
69
+ * param dns_server2: ip configuration for DNS server 2
70
+ *
71
+ */
72
72
void setDNS (IPAddress dns_server1, IPAddress dns_server2);
73
73
74
74
/*
75
- * Get the interface IP address.
76
- *
77
- * return: Ip address value
78
- */
75
+ * Get the interface IP address.
76
+ *
77
+ * return: Ip address value
78
+ */
79
79
IPAddress localIP ();
80
80
81
81
/*
82
- * Get the interface subnet mask address.
83
- *
84
- * return: subnet mask address value
85
- */
82
+ * Get the interface subnet mask address.
83
+ *
84
+ * return: subnet mask address value
85
+ */
86
86
IPAddress subnetMask ();
87
87
88
88
/*
89
- * Get the gateway ip address.
90
- *
91
- * return: gateway ip address value
92
- */
89
+ * Get the gateway ip address.
90
+ *
91
+ * return: gateway ip address value
92
+ */
93
93
IPAddress gatewayIP ();
94
94
95
95
/*
96
- * Get the DNS Server ip address.
97
- *
98
- * return: DNS Server ip address value
99
- */
96
+ * Get the DNS Server ip address.
97
+ *
98
+ * return: DNS Server ip address value
99
+ */
100
100
IPAddress dnsServerIP ();
101
101
102
102
/*
103
- * Get the DNS Server ip address.
104
- *
105
- * return: DNS Server ip address value
106
- */
103
+ * Get the DNS Server ip address.
104
+ *
105
+ * return: DNS Server ip address value
106
+ */
107
107
IPAddress dnsIP (int n = 0 );
108
108
109
109
virtual NetworkInterface* getNetwork () = 0;
110
-
110
+
111
111
/*
112
- * Download a file from an HTTP endpoint and save it in the provided `target` location on the fs
113
- * The parameter cbk can be used to perform actions on the buffer before saving on the fs
114
- *
115
- * return: on success the size of the downloaded file, on error -status code
116
- */
112
+ * Download a file from an HTTP endpoint and save it in the provided `target` location on the fs
113
+ * The parameter cbk can be used to perform actions on the buffer before saving on the fs
114
+ *
115
+ * return: on success the size of the downloaded file, on error -status code
116
+ */
117
117
int download (
118
118
const char * url, const char * target, bool const is_https = false );
119
119
/*
120
- * Download a file from an HTTP endpoint and handle the body of the request on a callback
121
- * passed as an argument
122
- *
123
- * return: on success the size of the downloaded file, on error -status code
124
- */
120
+ * Download a file from an HTTP endpoint and handle the body of the request on a callback
121
+ * passed as an argument
122
+ *
123
+ * return: on success the size of the downloaded file, on error -status code
124
+ */
125
125
int download (
126
126
const char * url, bool const is_https = false ,
127
127
mbed::Callback<void (const char *, uint32_t )> cbk = nullptr);
0 commit comments