hn12404988 / hast_web Goto Github PK
View Code? Open in Web Editor NEWA C++11 websocket server, which is multi-threading, easy to use, and able to receive large data.
License: GNU General Public License v3.0
A C++11 websocket server, which is multi-threading, easy to use, and able to receive large data.
License: GNU General Public License v3.0
Now hast_web
can process INCOMPLETE_FRAME
, but there is a potential infinite loop condition under INCOMPLETE_FRAME
Develop new algorithm of add/delete thread for new structure (process request in parallel on one socket).
==1335== Thread 2:
==1335== Invalid read of size 1
==1335== at 0x426E6F: hast_web::server_thread<ssl_st*>::get_thread() (in /home/server_2/node/control_socket.o)
==1335== by 0x42592E: hast_web::socket_server<ssl_st*>::msg_recv(short) (in /home/server_2/node/control_socket.o)
==1335== by 0x41DF2C: $_0::operator()(short) const (in /home/server_2/node/control_socket.o)
==1335== by 0x41DA94: std::_Function_handler<void (short), $_0>::_M_invoke(std::_Any_data const&, short) (in /home/server_2/node/control_socket.o)
==1335== by 0x43324D: std::function<void (short)>::operator()(short) const (in /home/server_2/node/control_socket.o)
==1335== by 0x4331B1: void std::_Bind_simple<std::function<void (short)> (short)>::_M_invoke<0ul>(std::_Index_tuple<0ul>) (in /home/server_2/node/control_socket.o)
==1335== by 0x433164: std::_Bind_simple<std::function<void (short)> (short)>::operator()() (in /home/server_2/node/control_socket.o)
==1335== by 0x43313B: std::thread::_Impl<std::_Bind_simple<std::function<void (short)> (short)> >::_M_run() (in /home/server_2/node/control_socket.o)
==1335== by 0x5C1F9BF: execute_native_thread_routine (thread.cc:84)
==1335== by 0x6403DC4: start_thread (in /usr/lib64/libpthread-2.17.so)
==1335== by 0x670F73C: clone (in /usr/lib64/libc-2.17.so)
==1335== Address 0x84d160f is 1 bytes before a block of size 3 alloc'd
==1335== at 0x4C288A8: operator new[](unsigned long) (vg_replace_malloc.c:423)
==1335== by 0x4047BC: hast_web::server_thread<ssl_st*>::init() (in /home/server_2/node/control_socket.o)
==1335== by 0x4202A2: hast_web::socket_server<ssl_st*>::init(std::string, unsigned short) (in /home/server_2/node/control_socket.o)
==1335== by 0x405A77: wss_server::init(char const*, char const*, std::string, unsigned short) (in /home/server_2/node/control_socket.o)
==1335== by 0x41D850: main (in /home/server_2/node/control_socket.o)
==1335==
==1335== Invalid write of size 1
==1335== at 0x426E94: hast_web::server_thread<ssl_st*>::get_thread() (in /home/server_2/node/control_socket.o)
==1335== by 0x42592E: hast_web::socket_server<ssl_st*>::msg_recv(short) (in /home/server_2/node/control_socket.o)
==1335== by 0x41DF2C: $_0::operator()(short) const (in /home/server_2/node/control_socket.o)
==1335== by 0x41DA94: std::_Function_handler<void (short), $_0>::_M_invoke(std::_Any_data const&, short) (in /home/server_2/node/control_socket.o)
==1335== by 0x43324D: std::function<void (short)>::operator()(short) const (in /home/server_2/node/control_socket.o)
==1335== by 0x4331B1: void std::_Bind_simple<std::function<void (short)> (short)>::_M_invoke<0ul>(std::_Index_tuple<0ul>) (in /home/server_2/node/control_socket.o)
==1335== by 0x433164: std::_Bind_simple<std::function<void (short)> (short)>::operator()() (in /home/server_2/node/control_socket.o)
==1335== by 0x43313B: std::thread::_Impl<std::_Bind_simple<std::function<void (short)> (short)> >::_M_run() (in /home/server_2/node/control_socket.o)
==1335== by 0x5C1F9BF: execute_native_thread_routine (thread.cc:84)
==1335== by 0x6403DC4: start_thread (in /usr/lib64/libpthread-2.17.so)
==1335== by 0x670F73C: clone (in /usr/lib64/libc-2.17.so)
==1335== Address 0x84d160f is 1 bytes before a block of size 3 alloc'd
==1335== at 0x4C288A8: operator new[](unsigned long) (vg_replace_malloc.c:423)
==1335== by 0x4047BC: hast_web::server_thread<ssl_st*>::init() (in /home/server_2/node/control_socket.o)
==1335== by 0x4202A2: hast_web::socket_server<ssl_st*>::init(std::string, unsigned short) (in /home/server_2/node/control_socket.o)
==1335== by 0x405A77: wss_server::init(char const*, char const*, std::string, unsigned short) (in /home/server_2/node/control_socket.o)
==1335== by 0x41D850: main (in /home/server_2/node/control_socket.o)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.