mirror of https://git.kore.io/kore.git
a64808c6b0
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. |
||
---|---|---|
.. | ||
assets | ||
conf | ||
src | ||
.gitignore | ||
README.md |
README.md
Kore example websocket server
Run:
# kore run
Test:
Open a browser that does websockets, surf to https://127.0.0.1:8888
or whatever configured IP you have in the config.
Hit the connect button to open a websocket session, open a second
tab and surf to the same address and hit the connection button there
as well. This should cause the number of messages sent/recv to keep
incrementing as each message is broadcast to the other connection.