Commit Graph

771 Commits

Author SHA1 Message Date
Joris Vink a88e56ae25 Do not call TAILQ_INIT() on domain list twice. 2015-11-27 11:15:36 +01:00
Joris Vink 963bdfdb2c Move towards 1.3.0-devel target, skipping 1.2.4.
Mostly done due to incoming library changes.
2015-11-12 09:20:14 +01:00
Joris Vink 036a4e4d3c NOTLS means no tls, not no openssl. 2015-11-05 09:18:14 +01:00
Joris Vink cc2e317d30 Merge pull request #82 from fourdollars/master
Fix typos.
2015-11-04 08:53:25 +01:00
Shih-Yuan Lee (FourDollars) 384ac824ee Fix typos. 2015-11-04 09:54:55 +08:00
Joris Vink 0b0ba0f6f5 Manually add cpipe to connection list in example. 2015-10-23 12:13:23 +02:00
Joris Vink 02c667e940 Merge pull request #77 from apfohl/apfohl-travis
Updated .travis.yml to use new container-based infrastructure.
2015-10-19 08:47:16 +02:00
Andreas Pfohl 6dba32c66c Updated .travis.yml to use new container-based infrastructure. 2015-10-18 14:26:44 +02:00
Joris Vink 656931380c Bump to 1.2.4-rc1 2015-09-17 12:33:40 +02:00
Joris Vink b5736ef158 Unbreak ktunnel example after recent changes. 2015-09-03 08:24:55 +02:00
Joris Vink 63dc498807 Unbreak the sse example. 2015-08-06 08:21:28 +02:00
Joris Vink 7b3224ad30 Remove 'behind' argument from timers.
Also calculate next run for a timer as now + interval
instead of last nextrun + interval - delta.
2015-08-06 08:20:41 +02:00
Joris Vink a20fb00789 req can be NULL if we are coming from an error path. 2015-08-02 16:53:40 +02:00
Joris Vink e95d9cc88e Bump HTTP_MAX_QUERY_ARGS to 20. 2015-07-31 15:29:16 +02:00
Joris Vink aa1f475bab Merge pull request #74 from bonifaido/master
Don't link object files if not needed
2015-07-27 18:10:22 +02:00
Nandor Kracser 3633270de3 Don't link object files if not needed 2015-07-25 19:10:48 +02:00
Joris Vink a572a9eeae Always correctly add websocket frame length.
In certain scenarios the addition frame length
would not be set, found the hard way.
2015-07-16 06:55:44 +02:00
Joris Vink 1003cbcd50 Just point hldr_extra to kw->id.
Not sure what state of crazy my mind was in for writing
the previous code like that.
2015-07-07 16:11:40 +02:00
Joris Vink 0281fb7b99 Update the msg->dst member accordingly when sending.
This way the worker will always receive a message with
the correct destination set instead of KORE_MSG_WORKER_ALL.
2015-07-06 21:16:22 +02:00
Joris Vink 064f2095b0 Update message framework with src/dst for workers.
One can now send messages to specific workers and
receiving workers can see the origin of the messages.
2015-07-06 21:08:36 +02:00
Joris Vink d8508f4a7b Add the actual task changes for last commit. 2015-07-01 11:03:54 +02:00
Joris Vink cf94a53be7 Add user callbacks for task activity.
Allows one to bind a callback to a Kore task which is called
everytime activity happens on the task channel.

Add an example as well on how this works.

Inspired by issue #68.
2015-07-01 11:01:23 +02:00
Joris Vink be3fa17201 Do not send connection:close for websocket upgrades. 2015-06-30 16:43:21 +02:00
Joris Vink a4e462b36c Merge pull request #68 from Indrikoterio/master
Make sure we set connection to upgrade only in websocket responses.
2015-06-30 16:37:15 +02:00
Cleve Lendon 18becccd5a Fix indentation. 2015-06-30 18:07:45 +09:00
Joris Vink 4dff0b57ae Add openssl paths for homebrew/ports for osx.
These are the default paths openssl should be installed under
for both projects. This at least kills the need for user CFLAGS
for a normal build.

Inspired by #70.
2015-06-28 13:43:01 +02:00
Cleve Lendon fef3ee8efe Fix websockets. Connection must be Upgrade, not keep-alive, Upgrade 2015-06-26 12:14:01 +09:00
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
Joris Vink 0e3271cf9d Add EV_CLEAR to the bsd event code for kqueue.
This was missing and makes dealing with events easier.
2015-06-23 18:16:19 +02:00
Joris Vink c322bbd3c8 Kill the websocket message type. We're not there yet. 2015-06-22 22:20:42 +02:00
Joris Vink 28e48727a5 Kill TCP_NODELAY warnings for socketpair() fds. 2015-06-22 22:11:03 +02:00
Joris Vink e9832b4416 Remove dh2048.pem from messaging example. 2015-06-22 21:22:24 +02:00
Joris Vink 7100ab0dd3 Remove useless log message. 2015-06-22 21:21:03 +02:00
Joris Vink 49ca95f390 Add our messaging framework.
With this framework apps can now send messages between worker processes.

A new API function exists:
	int kore_msg_register(u_int8_t id, void (*cb)(const void *, u_int32_t);

This API call allows your app to register a new message callback for a given ID.

You can then send messages on this ID to other workers using:
	void kore_msg_send(u_int8_t id, void *data, u_int32_t length);

This framework will interally be used for a few things such as allowing
websocket data to broadcasted between all workers, adding unified caching
and hopefully eventually moving the access log to this as well.

Some internals have changed with this commit:
	* worker_clients has been called connections.
	* the parent now initializes the net, and event subsystems.
	* kore_worker_websocket_broadcast() is dead.
2015-06-22 21:13:32 +02:00
Joris Vink 63b0c0a903 Fix typo. 2015-06-14 17:21:16 +02:00
Joris Vink db198578c6 Allow Kore to function under DragonflyBSD.
From David Carlier
2015-06-14 16:54:44 +02:00
Joris Vink 9217fb0bd8 Fix typo. 2015-06-14 16:50:10 +02:00
Joris Vink 13795ead63 NetBSD fixes, from David Carlier. 2015-06-14 16:44:37 +02:00
Joris Vink 512e305e20 When building assets, skip empty files. 2015-06-11 19:33:30 +02:00
Joris Vink 81d119ff93 Let kore build pickup any environment CFLAGS. 2015-06-11 19:20:08 +02:00
Joris Vink 3682c759f9 Kill docker files.
After some pondering they do not belong in this repo. If anyone
wants to maintain these outside of this repo, go right ahead.
2015-06-11 18:46:44 +02:00
Joris Vink 1d604643b5 Add task_threads configuration option.
Before Kore would spawn a task thread per task started
if none were available. This was an obvious bad idiom
but never really hit me hard until now.

Kore will now only spawn as many task threads as configured
by "task_threads" and queue up any newly started tasks ontop
of already running threads if the limit was hit.
2015-06-04 10:29:22 +02:00
Joris Vink 854b916597 Update usage text. 2015-05-28 22:20:43 +02:00
Joris Vink 428818c76b Correct the module its init() function. 2015-05-28 19:58:06 +02:00
Joris Vink 21035cd3f2 Merge pull request #67 from Geenz/master
Small tweak to kore's output when running a module
2015-05-27 16:25:13 +02:00
Geenz 0f5b39c977 Small tweak to kore's output when running a module 2015-05-27 09:34:47 -04:00
Joris Vink 76823c9d07 Merge pull request #66 from Geenz/master
Rename BENCHMARK to NOTLS.

This communicates better what the build option actually does.
2015-05-25 15:51:07 +02:00
Geenz 817b916e1f Call it NOTLS instead.
Per @jorisvink's feedback.
2015-05-25 09:42:34 -04:00
Geenz c44de3f629 Rename BENCHMARK to reflect its actual function.
NO_SSL makes a bit more sense, especially for people who proxy their requests via nginx, apache, or similar.
2015-05-25 09:28:13 -04:00
Joris Vink 9d7cf2aa4a Move to 1.2.4-develop 2015-05-21 15:50:12 +02:00