hreinhardt/amqp — pull request #35 by gseitz (2013-10-14 22:22:22+00:00)
Title: Add support for tune-ok.channel-max

Hi

As previously mentioned, I started working on supporting the `channel-max`property.

* Similar to the Java client library, `Data.BitSet.Dynamic` from the [`bitset`](http://hackage.haskell.org/package/bitset) package is used for an `IdAllocator`.
* Caveat: the `bitset` package requires a native library (`gmp`), which might not be available on some platforms (eg. on Windows). It might be better to remove this dependency again and implement `IdAllocator` differently.
* The current signature for `openChannel` always assumes that a channel can be opened or an exception is thrown along the way. Having now a potential limit on concurrently open channels, opening a channel might fail in a non-lethal way (ie. `Maybe Channel`). For now, an exception is thrown if the channel limit is reached.

This patch is obviously not finished, but I wanted to get a discussion started.

Cheers