blob: b2147fa6290cdc955f235b51f1c35928cb8b2b6b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
#include "connectionbase.h"
#include <iostream>
#include <string>
void ConnectionBase::connected() {
std::cout << "Connection established." << std::endl;
write_data((uint8_t*)"Hei!\n", 5);
request_data(10);
}
void ConnectionBase::got_data(uint8_t* data, std::size_t bytes) {
std::cout << "Fikk data: " << std::string((char*)data, bytes) << std::endl;
}
|