shared pointer for socket and other stuff

This commit is contained in:
j3d1 2015-11-01 20:39:24 +01:00
parent ba786e388c
commit 967a3038f3
7 changed files with 178 additions and 113 deletions

View file

@ -26,7 +26,7 @@ public:
void send(bytes);
void listen();
void setHostIp(ipAddr);
int (*callback)(Packet)=[](Packet a) {
std::function<int(Packet)> callback = [](Packet a) {
return 0;
};
@ -40,6 +40,7 @@ private:
boost::asio::deadline_timer timer;
bytes data = bytes(MAX_LENGTH);
ipAddr local_ip;
int initialized = 0;
};