A C++ client demo to demonstrate lock-free ring buffer and code generation for message dispatching.
C++ C Prolog
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
lib
protos
.gitignore
Makefile
README.md
campmiddleware.cpp
campmiddleware.h
config.h
dispatcher.h
handler.h
libcamp.pro
main.cpp
message_ids.h
scope_ptr.h
serializer.h
socket_utils.h
thread.cpp
thread.h

README.md

  • main.cpp: The use case.
  • dispatcher.h: The switch cases are generated by script.
  • campmiddleware.cpp the main class including a look-free buffer (in single comsumer thread and single producer thread).