kore/examples/websocket
Joris Vink a64808c6b0 Improvements to our message framework.
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.
2015-06-23 18:17:14 +02:00
..
assets Add websocket support to Kore. 2014-11-24 11:08:34 +01:00
conf Improvements to our message framework. 2015-06-23 18:17:14 +02:00
src Improvements to our message framework. 2015-06-23 18:17:14 +02:00
.gitignore Add websocket support to Kore. 2014-11-24 11:08:34 +01:00
README.md Fixed typos 2015-05-17 02:51:46 +01:00

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.