cubemap
8 years agoFix an issue where clients would be put twice into sleeping_clients (probably since...
Steinar H. Gunderson [Sun, 7 Apr 2013 20:06:24 +0000 (22:06 +0200)]
Fix an issue where clients would be put twice into sleeping_clients (probably since the EPOLLOUT trigger would go off once unexpectedly), causing a chain reaction where we did tons of empty write() calls.

8 years agoSome fixes to issues that could cause client hangs.
Steinar H. Gunderson [Sun, 7 Apr 2013 19:10:20 +0000 (21:10 +0200)]
Some fixes to issues that could cause client hangs.

8 years agoStop doing find_stream() every time we send out data; it takes some CPU.
Steinar H. Gunderson [Sun, 7 Apr 2013 19:06:16 +0000 (21:06 +0200)]
Stop doing find_stream() every time we send out data; it takes some CPU.

8 years agoChange from level-triggered to edge-triggered epoll mode. More than halves CPU usage.
Steinar H. Gunderson [Sun, 7 Apr 2013 18:49:54 +0000 (20:49 +0200)]
Change from level-triggered to edge-triggered epoll mode. More than halves CPU usage.

8 years agoHandle streams coming and going from the configuration file across restarts.
Steinar H. Gunderson [Sun, 7 Apr 2013 17:03:42 +0000 (19:03 +0200)]
Handle streams coming and going from the configuration file across restarts.

8 years agoEINTR-protect a bunch of calls, and warn on close() failing.
Steinar H. Gunderson [Sun, 7 Apr 2013 16:51:27 +0000 (18:51 +0200)]
EINTR-protect a bunch of calls, and warn on close() failing.

8 years agoHandle EINTR in epoll_wait().
Steinar H. Gunderson [Sun, 7 Apr 2013 15:46:32 +0000 (17:46 +0200)]
Handle EINTR in epoll_wait().

8 years agoSupport parsing streams from config file. Also support multiple streams (includes...
Steinar H. Gunderson [Sun, 7 Apr 2013 15:42:23 +0000 (17:42 +0200)]
Support parsing streams from config file. Also support multiple streams (includes parsing HTTP), with HTTP error messages and all.

8 years agoWhen a transfer ends, output the URL.
Steinar H. Gunderson [Sun, 7 Apr 2013 15:11:55 +0000 (17:11 +0200)]
When a transfer ends, output the URL.

8 years agoFactor out some config parsing into its own function.
Steinar H. Gunderson [Sun, 7 Apr 2013 15:02:37 +0000 (17:02 +0200)]
Factor out some config parsing into its own function.

8 years agoAdd a sample configuration file.
Steinar H. Gunderson [Sun, 7 Apr 2013 14:11:28 +0000 (16:11 +0200)]
Add a sample configuration file.

8 years agoFetch num_servers from the config file.
Steinar H. Gunderson [Sun, 7 Apr 2013 14:10:39 +0000 (16:10 +0200)]
Fetch num_servers from the config file.

8 years agoMove the logic of load-balancing etc. into ServerPool, which frees external users...
Steinar H. Gunderson [Sun, 7 Apr 2013 14:01:03 +0000 (16:01 +0200)]
Move the logic of load-balancing etc. into ServerPool, which frees external users from knowing anything about NUM_SERVERS.

8 years agoReopen the port if it changes between runs.
Steinar H. Gunderson [Sun, 7 Apr 2013 13:43:36 +0000 (15:43 +0200)]
Reopen the port if it changes between runs.

8 years agoTake the port from the configuration file.
Steinar H. Gunderson [Sun, 7 Apr 2013 13:39:54 +0000 (15:39 +0200)]
Take the port from the configuration file.

8 years agoParse a config file. Not used for anything yet.
Steinar H. Gunderson [Sun, 7 Apr 2013 13:33:37 +0000 (15:33 +0200)]
Parse a config file. Not used for anything yet.

8 years agoSupport deserialization of most state (curl input is not really good yet).
Steinar H. Gunderson [Sun, 7 Apr 2013 11:10:03 +0000 (13:10 +0200)]
Support deserialization of most state (curl input is not really good yet).

8 years agoRemember to turn off has_metacube_header once we have consumed a block.
Steinar H. Gunderson [Sun, 7 Apr 2013 00:22:49 +0000 (02:22 +0200)]
Remember to turn off has_metacube_header once we have consumed a block.

8 years agoMake Input honor should_stop even when it is not connected to an encoder.
Steinar H. Gunderson [Sat, 6 Apr 2013 22:51:43 +0000 (00:51 +0200)]
Make Input honor should_stop even when it is not connected to an encoder.

8 years agoWhen we get a header, retroactively send it out to all clients that have received...
Steinar H. Gunderson [Sat, 6 Apr 2013 22:51:12 +0000 (00:51 +0200)]
When we get a header, retroactively send it out to all clients that have received no data yet. Useful if the clients connect before the encoder does.

8 years agoMakefile tweaks to deal with the protobuf dependency.
Steinar H. Gunderson [Sat, 6 Apr 2013 22:14:30 +0000 (00:14 +0200)]
Makefile tweaks to deal with the protobuf dependency.

8 years agoReconnect when the input goes away.
Steinar H. Gunderson [Sat, 6 Apr 2013 22:09:07 +0000 (00:09 +0200)]
Reconnect when the input goes away.

8 years agoSerialize and die on SIGHUP (no deserialization yet). Required a whole bunch of Valgr...
Steinar H. Gunderson [Sat, 6 Apr 2013 22:07:40 +0000 (00:07 +0200)]
Serialize and die on SIGHUP (no deserialization yet). Required a whole bunch of Valgrind fixes to actually work.

8 years agoFix broken Client constructor.
Steinar H. Gunderson [Sat, 6 Apr 2013 21:08:34 +0000 (23:08 +0200)]
Fix broken Client constructor.

8 years agoStart working on serialization.
Steinar H. Gunderson [Sat, 6 Apr 2013 20:08:14 +0000 (22:08 +0200)]
Start working on serialization.

8 years agoMake a useful constructor for Client.
Steinar H. Gunderson [Sat, 6 Apr 2013 19:34:48 +0000 (21:34 +0200)]
Make a useful constructor for Client.

8 years agoFix the broken SO_REUSEADDR.
Steinar H. Gunderson [Sat, 6 Apr 2013 19:11:12 +0000 (21:11 +0200)]
Fix the broken SO_REUSEADDR.

8 years agoMake Server stoppable.
Steinar H. Gunderson [Sat, 6 Apr 2013 17:02:43 +0000 (19:02 +0200)]
Make Server stoppable.

8 years agoMerge remote-tracking branch 'origin/master'
Steinar H. Gunderson [Sat, 6 Apr 2013 16:39:10 +0000 (18:39 +0200)]
Merge remote-tracking branch 'origin/master'

8 years agoRename client_request to request, and clear it when we are done with it.
Steinar H. Gunderson [Sat, 6 Apr 2013 16:36:14 +0000 (18:36 +0200)]
Rename client_request to request, and clear it when we are done with it.

8 years agoRename client_request to request, and clear it when we are done with it.
Steinar H. Gunderson [Sat, 6 Apr 2013 16:36:14 +0000 (18:36 +0200)]
Rename client_request to request, and clear it when we are done with it.

8 years agoRemove a no longer relevant TODO.
Steinar H. Gunderson [Sat, 6 Apr 2013 16:18:35 +0000 (18:18 +0200)]
Remove a no longer relevant TODO.

8 years agoWhen closing a client, make sure it is not left in sleeping_clients.
Steinar H. Gunderson [Sat, 6 Apr 2013 16:17:12 +0000 (18:17 +0200)]
When closing a client, make sure it is not left in sleeping_clients.

8 years agoImplement writev(). Working reflector!
Steinar H. Gunderson [Sat, 6 Apr 2013 16:13:55 +0000 (18:13 +0200)]
Implement writev(). Working reflector!

8 years agoImplement sleeping/waking clients.
Steinar H. Gunderson [Sat, 6 Apr 2013 16:08:51 +0000 (18:08 +0200)]
Implement sleeping/waking clients.

8 years agoImplement add_data().
Steinar H. Gunderson [Sat, 6 Apr 2013 16:00:54 +0000 (18:00 +0200)]
Implement add_data().

8 years agoImplement basic data sending support.
Steinar H. Gunderson [Sat, 6 Apr 2013 15:56:48 +0000 (17:56 +0200)]
Implement basic data sending support.

8 years agoSkip the Metacube header when adding data.
Steinar H. Gunderson [Sat, 6 Apr 2013 15:48:24 +0000 (17:48 +0200)]
Skip the Metacube header when adding data.

8 years agoImplement header sending.
Steinar H. Gunderson [Sat, 6 Apr 2013 15:47:44 +0000 (17:47 +0200)]
Implement header sending.

8 years agoImplement epoll main loop in Server, and parse header.
Steinar H. Gunderson [Sat, 6 Apr 2013 14:58:54 +0000 (16:58 +0200)]
Implement epoll main loop in Server, and parse header.

8 years agoSet SO_REUSEADDR on the server socket.
Steinar H. Gunderson [Sat, 6 Apr 2013 14:55:16 +0000 (16:55 +0200)]
Set SO_REUSEADDR on the server socket.

8 years agoSplit Input into its own file.
Steinar H. Gunderson [Sat, 6 Apr 2013 14:10:21 +0000 (16:10 +0200)]
Split Input into its own file.

8 years agoSplit Server and MutexLock out into separate source files.
Steinar H. Gunderson [Sat, 6 Apr 2013 14:05:47 +0000 (16:05 +0200)]
Split Server and MutexLock out into separate source files.

8 years agoPiece a lot more stuff together.
Steinar H. Gunderson [Sat, 6 Apr 2013 14:01:02 +0000 (16:01 +0200)]
Piece a lot more stuff together.

8 years agoAdd a Makefile.
Steinar H. Gunderson [Sat, 6 Apr 2013 13:31:15 +0000 (15:31 +0200)]
Add a Makefile.

8 years agoFire off worker threads (that do nothing right now).
Steinar H. Gunderson [Sat, 6 Apr 2013 13:29:11 +0000 (15:29 +0200)]
Fire off worker threads (that do nothing right now).

8 years agoMake a mutex locker.
Steinar H. Gunderson [Sat, 6 Apr 2013 12:35:18 +0000 (14:35 +0200)]
Make a mutex locker.

8 years agoOpen a server socket, and listen on it.
Steinar H. Gunderson [Sat, 6 Apr 2013 12:35:10 +0000 (14:35 +0200)]
Open a server socket, and listen on it.

8 years agoStart adding scaffolds for most of the basic classes.
Steinar H. Gunderson [Sat, 6 Apr 2013 11:59:38 +0000 (13:59 +0200)]
Start adding scaffolds for most of the basic classes.

8 years agogitignore the binary.
Steinar H. Gunderson [Sat, 6 Apr 2013 10:18:19 +0000 (12:18 +0200)]
gitignore the binary.

8 years agoRemove remux.cpp, which seems to be irrelevant.
Steinar H. Gunderson [Sat, 6 Apr 2013 10:16:21 +0000 (12:16 +0200)]
Remove remux.cpp, which seems to be irrelevant.

8 years agoInitial checkin.
Steinar H. Gunderson [Sat, 6 Apr 2013 10:16:09 +0000 (12:16 +0200)]
Initial checkin.