When receiving a lot of route changes (10,000 routes are enough), the
default receive buffer size (value of
`/proc/sys/net/core/rmem_default`) is too small and we get a `ENOBUF`
error. A user may want to increase the buffer size up to the value of
`/proc/sys/net/core/rmem_max` (by default, this is the same value). A
`SetSocketReceiveBufferSize()` function is provided to this
destination.
Possible improvements:
1. automatically increase receive buffer size in higher level
functions until we hit a maximum (get an error and/or the current
value is smaller than expected)
2. accept a "force" argument to use `SO_RCVBUFFORCE` to increase the
value over `rmem_max` value
If the socket is closed the recv that are waiting for messages
are not woken up. The result especially for Subscribe socket is
most likely a go routine leak.
This commit introduces a method to set the timeout
Signed-off-by: Flavio Crisciani <flavio.crisciani@docker.com>