Peter Gutmann wrote:
Is there any concept of an invalid channel number for SSH channels, akin to the Posix convention that -1 is always an invalid file descriptor/error status value? It'd be useful to have a never-valid value to use akin to the way -1 is used (or at least returned) for open/creat to indicate a non-file descriptor.
Just on the offchance that someone's already implemented with channel numbers counting down 0, -1, -2, I'd guess 0x80000000 might be a safer value to pick. I admit it's unlikely, but nonetheless...
-- Jon Bright Silicon Circus Ltd. http://www.siliconcircus.com