mirror of
https://github.com/jorisvink/kore
synced 2025-03-09 12:39:01 -04:00
Change the callback prototypes to: void callback(struct kore_msg *msg, const void *data); This allows the callbacks to receive the full kore_msg data structure as sent over the wire (including length and id). Useful for future additions to the kore_msg structure (such as worker origin). Several other improvements: * Accesslog now uses the msg framework as well. * Websocket WEBSOCKET_BROADCAST_GLOBAL now works. Small websocket improvement in this commit: * Build the frame to be sent only once when broadcasting instead of per connection we are broadcasting towards.
Kore message framework example
Run:
# kore run
Test:
Perform a simple GET request against the root page.
This should trigger the example app to send a message
to the other workers which will display it.
# curl -k https://127.0.0.1:8888