Skip to content
/ ws Public

Minimal and extensible websocket server library written in C++11 and using boost ASIO

Notifications You must be signed in to change notification settings

alxyng/ws

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

WS

TODO:

  • random disconnect sometimes when client sends message in chat example?
  • Licensing...
  • Allow specifying max websocket message length to receive
  • Opening/Closing handshake timeouts
  • Test support for 64bit payload lengths

A note about session_base in the examples

In the examples, a class called session_base is used to fully initialise the socket_ member before passing a reference to that member to ws::session. This is an example of the C++ base-from-member idiom. Even though the ws::session constructor only stores a reference to the socket_ member and doesn't call any of it's member functions (which is defined behaviour), it may do in the future which could introduce bugs.

Using boost::base_from_member<tcp::socket> caused a compiler error which I think is because of the move-constructor needed to initialise the tcp::socket member.

socket_ could be a member of ws::session however when using ws:session with ssl, access to the the underlying socket may be needed.

About

Minimal and extensible websocket server library written in C++11 and using boost ASIO

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published