[DEV] change Time type std::chrono to echrono
This commit is contained in:
parent
85c8aeaad8
commit
65ff5fb439
@ -167,7 +167,7 @@ void enet::WebSocket::onReceiveData(enet::Tcp& _connection) {
|
|||||||
ENET_VERBOSE("ReadRaw 2 [STOP]");
|
ENET_VERBOSE("ReadRaw 2 [STOP]");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
m_lastReceive = std::chrono::steady_clock::now();
|
m_lastReceive = echrono::Steady::now();
|
||||||
if ((opcode & 0x80) == 0) {
|
if ((opcode & 0x80) == 0) {
|
||||||
ENET_ERROR("Multiple frames ... NOT managed ... : " << (opcode & 0x80) << (opcode & 0x40) << (opcode & 0x20) << (opcode & 0x10) << (opcode & 0x08) << (opcode & 0x04) << (opcode & 0x02) << (opcode & 0x01));
|
ENET_ERROR("Multiple frames ... NOT managed ... : " << (opcode & 0x80) << (opcode & 0x40) << (opcode & 0x20) << (opcode & 0x10) << (opcode & 0x08) << (opcode & 0x04) << (opcode & 0x02) << (opcode & 0x01));
|
||||||
m_interface->stop(true);
|
m_interface->stop(true);
|
||||||
@ -510,7 +510,7 @@ void enet::WebSocket::controlPing() {
|
|||||||
}
|
}
|
||||||
uint8_t header = enet::websocket::FLAG_FIN
|
uint8_t header = enet::websocket::FLAG_FIN
|
||||||
| enet::websocket::OPCODE_FRAME_PING;
|
| enet::websocket::OPCODE_FRAME_PING;
|
||||||
m_lastSend = std::chrono::steady_clock::now();
|
m_lastSend = echrono::Steady::now();
|
||||||
m_interface->write(&header, sizeof(uint8_t));
|
m_interface->write(&header, sizeof(uint8_t));
|
||||||
header = 0;
|
header = 0;
|
||||||
m_interface->write(&header, sizeof(uint8_t));
|
m_interface->write(&header, sizeof(uint8_t));
|
||||||
@ -523,7 +523,7 @@ void enet::WebSocket::controlPong() {
|
|||||||
}
|
}
|
||||||
uint8_t header = enet::websocket::FLAG_FIN
|
uint8_t header = enet::websocket::FLAG_FIN
|
||||||
| enet::websocket::OPCODE_FRAME_PONG;
|
| enet::websocket::OPCODE_FRAME_PONG;
|
||||||
m_lastSend = std::chrono::steady_clock::now();
|
m_lastSend = echrono::Steady::now();
|
||||||
m_interface->write(&header, sizeof(uint8_t));
|
m_interface->write(&header, sizeof(uint8_t));
|
||||||
header = 0;
|
header = 0;
|
||||||
m_interface->write(&header, sizeof(uint8_t));
|
m_interface->write(&header, sizeof(uint8_t));
|
||||||
@ -536,7 +536,7 @@ void enet::WebSocket::controlClose() {
|
|||||||
}
|
}
|
||||||
uint8_t header = enet::websocket::FLAG_FIN
|
uint8_t header = enet::websocket::FLAG_FIN
|
||||||
| enet::websocket::OPCODE_FRAME_CLOSE;
|
| enet::websocket::OPCODE_FRAME_CLOSE;
|
||||||
m_lastSend = std::chrono::steady_clock::now();
|
m_lastSend = echrono::Steady::now();
|
||||||
m_interface->write(&header, sizeof(uint8_t));
|
m_interface->write(&header, sizeof(uint8_t));
|
||||||
header = 0;
|
header = 0;
|
||||||
m_interface->write(&header, sizeof(uint8_t));
|
m_interface->write(&header, sizeof(uint8_t));
|
||||||
|
@ -7,6 +7,7 @@
|
|||||||
|
|
||||||
#include <enet/Http.hpp>
|
#include <enet/Http.hpp>
|
||||||
#include <ememory/memory.hpp>
|
#include <ememory/memory.hpp>
|
||||||
|
#include <echrono/Steady.hpp>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include <map>
|
#include <map>
|
||||||
|
|
||||||
@ -18,13 +19,13 @@ namespace enet {
|
|||||||
ememory::SharedPtr<enet::Http> m_interface;
|
ememory::SharedPtr<enet::Http> m_interface;
|
||||||
std::vector<uint8_t> m_buffer;
|
std::vector<uint8_t> m_buffer;
|
||||||
std::string m_checkKey;
|
std::string m_checkKey;
|
||||||
std::chrono::steady_clock::time_point m_lastReceive;
|
echrono::Steady m_lastReceive;
|
||||||
std::chrono::steady_clock::time_point m_lastSend;
|
echrono::Steady m_lastSend;
|
||||||
public:
|
public:
|
||||||
const std::chrono::steady_clock::time_point& getLastTimeReceive() {
|
const echrono::Steady& getLastTimeReceive() {
|
||||||
return m_lastReceive;
|
return m_lastReceive;
|
||||||
}
|
}
|
||||||
const std::chrono::steady_clock::time_point& getLastTimeSend() {
|
const echrono::Steady& getLastTimeSend() {
|
||||||
return m_lastSend;
|
return m_lastSend;
|
||||||
}
|
}
|
||||||
public:
|
public:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user