ServerProcessing 列挙体

サーバー メッセージ処理のステータスを示します。

<Serializable>
Public Enum ServerProcessing
[C#]
[Serializable]
public enum ServerProcessing
[C++]
[Serializable]
__value public enum ServerProcessing
[JScript]
public
   Serializable
enum ServerProcessing

メンバ

メンバ名 説明
Async 呼び出しが非同期的にディスパッチされました。これは、後で処理するためにシンクが応答データをスタックに格納する必要があることを示します。
Complete サーバーはメッセージを同期的に処理しました。
OneWay メッセージがディスパッチされましたが、応答を送信できません。

使用例

 
Public Function ProcessMessage(ByVal myServerChannelSinkStack As IServerChannelSinkStack, _
ByVal requestMsg As IMessage, ByVal requestHeaders As ITransportHeaders, ByVal requestStream As Stream, ByRef _
msg As IMessage, ByRef responseHeaders As ITransportHeaders, ByRef responseStream _
As Stream) As ServerProcessing Implements IServerChannelSink.ProcessMessage
         If myBoolEnabled Then
            LoggingHelper.PrintRequest(myTextWriterOutput, requestHeaders, requestStream)
         End If
         myServerChannelSinkStack.Push(Me, Nothing)
         Dim myServerProcessing As ServerProcessing = myNewNextSink.ProcessMessage( _
          myServerChannelSinkStack, requestMsg, requestHeaders, requestStream, msg, responseHeaders, responseStream)

         Console.WriteLine("ServerProcessing.Complete value is:   " + ServerProcessing.Complete.Tostring())
         Console.WriteLine("ServerProcessing.OneWay Value is:     " + ServerProcessing.OneWay.Tostring())
         Console.WriteLine("ServerProcessing.Async value is:      " + ServerProcessing.Async.Tostring())

         Select Case myServerProcessing
            Case ServerProcessing.Complete
               myServerChannelSinkStack.Pop(Me)
               If myBoolEnabled Then
LoggingHelper.PrintResponse(myTextWriterOutput, responseHeaders, responseStream)
               End If

            Case ServerProcessing.OneWay
               myServerChannelSinkStack.Pop(Me)

            Case ServerProcessing.Async
               myServerChannelSinkStack.Store(Me, Nothing)

         End Select
         Return myServerProcessing
      End Function 'ProcessMessage


[C#] 
public ServerProcessing ProcessMessage(IServerChannelSinkStack myServerChannelSinkStack,
   IMessage requestMsg, ITransportHeaders requestHeaders, Stream requestStream,
   out IMessage msg, out ITransportHeaders responseHeaders,
   out Stream responseStream)
{
   if (myBoolEnabled)
      LoggingHelper.PrintRequest(myTextWriterOutput, requestHeaders, ref requestStream);

   myServerChannelSinkStack.Push(this, null);
   ServerProcessing myServerProcessing =
      myNewNextSink.ProcessMessage(myServerChannelSinkStack, requestMsg, requestHeaders, requestStream, out msg,
      out responseHeaders, out responseStream);

   Console.WriteLine("ServerProcessing.Complete value is:   " +ServerProcessing.Complete);
   Console.WriteLine("ServerProcessing.OneWay Value is:     " +ServerProcessing.OneWay);
   Console.WriteLine("ServerProcessing.Async value is:      " +ServerProcessing.Async);

   switch (myServerProcessing)
   {
      case ServerProcessing.Complete:
      {
         myServerChannelSinkStack.Pop(this);
         if (myBoolEnabled)
            LoggingHelper.PrintResponse(myTextWriterOutput, responseHeaders, ref responseStream);
         break;
      }

      case ServerProcessing.OneWay:
      {
         myServerChannelSinkStack.Pop(this);
         break;
      }

      case ServerProcessing.Async:
      {
         myServerChannelSinkStack.Store(this, null);
         break;
      }
   }
   return myServerProcessing;
}

[C++] 
public:
   ServerProcessing ProcessMessage(IServerChannelSinkStack* myServerChannelSinkStack,
      IMessage* requestMsg, ITransportHeaders* requestHeaders, Stream* requestStream,
      [Out]IMessage** msg, [Out]ITransportHeaders** responseHeaders,
      [Out]Stream** responseStream)
   {
      if (myBoolEnabled)
         LoggingHelper::PrintRequest(myTextWriterOutput, requestHeaders, &requestStream);

      myServerChannelSinkStack->Push(this, 0);
      ServerProcessing myServerProcessing =
         myNewNextSink->ProcessMessage(myServerChannelSinkStack, requestMsg, requestHeaders, requestStream, msg,
         responseHeaders, responseStream);

      Console::WriteLine(S"ServerProcessing.Complete value is:   {0}", __box(ServerProcessing::Complete));
      Console::WriteLine(S"ServerProcessing.OneWay Value is:     {0}", __box(ServerProcessing::OneWay));
      Console::WriteLine(S"ServerProcessing.Async value is:      {0}", __box(ServerProcessing::Async));

      switch (myServerProcessing)
      {
      case ServerProcessing::Complete:
         {
            myServerChannelSinkStack->Pop(this);
            if (myBoolEnabled)
               LoggingHelper::PrintResponse(myTextWriterOutput, *responseHeaders, responseStream);
            break;
         }

      case ServerProcessing::OneWay:
         {
            myServerChannelSinkStack->Pop(this);
            break;
         }

      case ServerProcessing::Async:
         {
            myServerChannelSinkStack->Store(this, 0);
            break;
         }
      }
      return myServerProcessing;
   }

[JScript] JScript のサンプルはありません。Visual Basic、C#、および C++ のサンプルを表示するには、このページの左上隅にある言語のフィルタ ボタン 言語のフィルタ をクリックします。

必要条件

名前空間: System.Runtime.Remoting.Channels

プラットフォーム: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 ファミリ

アセンブリ: Mscorlib (Mscorlib.dll 内)

参照

System.Runtime.Remoting.Channels 名前空間