0.9.2: Unique global request, channel, and channel request IDs
Pre-releaseThis release adds unique global request, channel, and channel request IDs.
In this change we are adding an uint64 parameter to all handler methods that deal with requests and channels. IDs are unique within their scope: global request IDs are unique among all global requests within the connection, channel IDs are guaranteed to be unique among all channel IDs within the conection, and channel request IDs are guaranteed to be unique within the channel. These IDs are also guaranteed to be monotonic, but they are not guaranteed to be continuous.
Furthermore, the onExit
methods in the SessionChannelHandler
interface now take the alias type sshserver.ExitStatus
instead of uint32
to provide better documentation.
The affected method changes are listed below.
Changes to the SSHConnectionHandler
interface
OnUnsupportedGlobalRequest(requestID uint64, ...)
: addedrequestID
OnUnsupportedChannel(channelID uint64, ...)
: addedchannelID
OnSessionChannel(channelID uint64, ...) (...)
: addedchannelID
Changes to the SessionChannelHandler
interface
OnUnsupportedChannelRequest(requestID uint64, ...)
: addedrequestID
OnFailedDecodeChannelRequest(requestID uint64, ...)
: addedrequestID
OnEnvRequest(requestID uint64, ...)
: addedrequestID
OnPtyRequest(requestID uint64, ...)
: addedrequestID
OnExecRequest(requestID uint64, ..., onExit func(exitStatus ExitStatus))
: addedrequestID
, changedonExit
OnShell(requestID uint64, ..., onExit func(exitStatus ExitStatus))
: addedrequestID
, changedonExit
OnSubsystem(requestID uint64, ..., onExit func(exitStatus ExitStatus))
: addedrequestID
, changedonExit
OnSignal(requestID uint64, ...)
: addedrequestID
OnWindow(requestID uint64, ...)
: addedrequestID