StreamUpgradeInitiator.InitiateUpgrade(Stream) 方法

定义

通过请求流连接的另一端升级通道传输层,启动流的升级。Initiates the upgrade of the stream by requesting the other end of its connection to upgrade the channel transport layer.

public:
 abstract System::IO::Stream ^ InitiateUpgrade(System::IO::Stream ^ stream);
public abstract System.IO.Stream InitiateUpgrade (System.IO.Stream stream);
abstract member InitiateUpgrade : System.IO.Stream -> System.IO.Stream
Public MustOverride Function InitiateUpgrade (stream As Stream) As Stream

参数

stream
Stream

要升级的流。The stream to be upgraded.

返回

Stream

返回升级后的流。Returns the upgraded stream.

注解

对于升级提供程序所支持的每个升级,可多次调用此方法。This method can be called multiple times for each upgrade supported by the upgrade provider. 例如,支持压缩和安全性的升级提供程序将两次调用此方法:第一次升级默认传输流以进行压缩,第二次升级安全性。For example, an upgrade provider that supports compression and security would call this method twice: first to upgrade the default transport streaming for compression, and second to upgrade the security. 对此方法的后续调用应传入来自前一个调用的升级流。Subsequent calls to this method should pass in the upgrade stream from the previous call.

适用于