djgroen/MPWide — pull request #17 by blootsvoets (2013-08-05 13:45:07+00:00)
Title: Refactored MPWide to use arrays instead of vectors

This is a large change and assumes three things: once a path number is assigned it is never modified and once stream numbers are assigned they are never modified and both paths and streams have a compile-time maximum. As a consequence, code that deals only with its own stream number is thread-safe towards other calls with other stream numbers, even when that stream is created or destroyed. Stream creation and destruction must be protected from each other with a mutex.

Because of this change, the stream numbers no longer have to be contiguous so any time a new stream is created, the first contiguous empty space is used, and the same goes for paths.

Another small change is that the minimum number of bytes per stream is now a compile-time variable, set in mpwide-macros.h, and that TCP_NODELAY is set by default.