-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathListener.h
More file actions
61 lines (47 loc) · 1010 Bytes
/
Listener.h
File metadata and controls
61 lines (47 loc) · 1010 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
// name: Listener.h
// desc: header for Listener.cpp
// creator: @kpers
// created: 03.03.2025
// updated: 1.05.2025
#ifndef LISTENER_H
#define LISTENER_H
#include "Arduino.h"
class Listener
{
public:
// Listener function
// creates a new listener
// returns void
Listener(
char *server_ip,
int server_port,
int client_port,
const char *ssid,
const char *password
);
// send_server function
// sends signal to the server
// returns void
void send(
const char *data
);
// get_from_server function
// receives signal from server
// returns String
char *get(
);
// begin function
// initializes listener
// returns void
void begin(
const char *board_info
);
private:
bool _running;
char *_server_ip;
int _server_port;
int _client_port;
const char *_ssid;
const char *_password;
};
#endif