|
| UWebSocket (Poco::Net::HTTPServerRequest *req, Poco::Net::HTTPServerResponse *resp, int jpoolCapacity=100, int jpoolPeakCapacity=500) |
|
std::string | getInfo () const noexcept |
|
bool | isActive () |
|
void | set (ev::dynamic_loop &loop, std::shared_ptr< ev::async > a) |
|
void | send (ev::timer &t, int revents) |
|
void | ping (ev::timer &t, int revents) |
|
void | read (ev::io &io, int revents) |
|
void | pong (ev::timer &t, int revents) |
|
void | ask (uniset::ObjectId id) |
|
void | del (uniset::ObjectId id) |
|
void | get (uniset::ObjectId id) |
|
void | set (uniset::ObjectId id, long value) |
|
void | freeze (uniset::ObjectId id, long value) |
|
void | unfreeze (uniset::ObjectId id) |
|
void | sensorInfo (const uniset::SensorMessage *sm) |
|
void | doCommand (const std::shared_ptr< SMInterface > &ui) |
|
void | term () |
|
void | waitCompletion () |
|
void | setHearbeatTime (const double &sec) |
|
void | setSendPeriod (const double &sec) |
|
void | setMaxSendCount (size_t val) |
|
void | setMaxCmdCount (size_t val) |
|
void | setPongTimeout (const double &set) |
|
|
ev::timer | iosend |
|
double | send_sec = { 0.5 } |
|
size_t | maxsend = { 5000 } |
|
size_t | maxcmd = { 200 } |
|
const int | Kbuf = { 10 } |
|
char | sbuf [sbufLen] |
|
ev::timer | ioping |
|
double | ping_sec = { 3.0 } |
|
ev::timer | iopong |
|
double | pongTimeout_sec = { 5.0 } |
|
size_t | pongCounter = { 0 } |
|
ev::io | iorecv |
|
char | rbuf [64 *1024] |
|
timeout_t | recvTimeout = { 200 } |
|
std::shared_ptr< ev::async > | cmdsignal |
|
std::mutex | finishmut |
|
std::condition_variable | finish |
|
std::atomic_bool | cancelled = { false } |
|
std::unordered_map< uniset::ObjectId, std::shared_ptr< sinfo > > | smap |
|
std::queue< std::shared_ptr< sinfo > > | qcmd |
|
Poco::Net::HTTPServerRequest * | req |
|
Poco::Net::HTTPServerResponse * | resp |
|
std::queue< Poco::JSON::Object::Ptr > | jbuf |
|
std::unique_ptr< Poco::ObjectPool< Poco::JSON::Object, Poco::JSON::Object::Ptr > > | jpoolSM |
|
std::unique_ptr< Poco::ObjectPool< Poco::JSON::Object, Poco::JSON::Object::Ptr > > | jpoolErr |
|
std::unique_ptr< Poco::ObjectPool< Poco::JSON::Object, Poco::JSON::Object::Ptr > > | jpoolShortSM |
|
std::unique_ptr< Poco::ObjectPool< uniset::UTCPCore::Buffer > > | wbufpool |
|
std::queue< uniset::UTCPCore::Buffer * > | wbuf |
|
size_t | maxsize |
|
класс реализует работу с websocket через eventloop Из-за того, что поступление событий может быть достаточно быстрым чтобы не "завалить" клиента кучей сообщений, сделана посылка не по факту приёма сообщения, а раз в send_sec, не более maxsend сообщений.