当前位置: 首页>>代码示例>>C#>>正文


C# IServerResponseChannelSinkStack类代码示例

本文整理汇总了C#中IServerResponseChannelSinkStack的典型用法代码示例。如果您正苦于以下问题:C# IServerResponseChannelSinkStack类的具体用法?C# IServerResponseChannelSinkStack怎么用?C# IServerResponseChannelSinkStack使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


IServerResponseChannelSinkStack类属于命名空间,在下文中一共展示了IServerResponseChannelSinkStack类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: AsyncProcessResponse

		public void AsyncProcessResponse (IServerResponseChannelSinkStack sinkStack, object state,
			IMessage msg, ITransportHeaders headers, Stream responseStream)
		{
			ContextWithId ctx = (ContextWithId) state;
			WriteOut (ctx.Context, headers, responseStream);
			ctx.Context.Response.Close ();
		}
开发者ID:nlhepler,项目名称:mono,代码行数:7,代码来源:HttpServerTransportSink.cs

示例2: GetResponseStream

		public Stream GetResponseStream (IServerResponseChannelSinkStack sinkStack,
						 object state,
						 IMessage msg,
						 ITransportHeaders headers)
		{
			return null;
		}
开发者ID:nlhepler,项目名称:mono,代码行数:7,代码来源:SdlChannelSink.cs

示例3: AsyncProcessResponse

		public void AsyncProcessResponse(
			IServerResponseChannelSinkStack sinkStack_in, 
			object state_in,
			IMessage message_in, 
			ITransportHeaders headers_in, 
			Stream stream_in
		) {
#if DEBUG
			Console.WriteLine("compression sink: AsyncProcessResponse...");
#endif
			bool _hasBeenCompressed = (bool)state_in;

			if (_hasBeenCompressed) {
				#region compress...
				headers_in[CompressionHelper.X_COMPRESS] = "1";

				stream_in = CompressionHelper.GetCompressedStreamCopy(
					stream_in
				); 
				#endregion
			} else {
				if (this.mustdo_) {
					throw new Exception("\n\n\t\tyour activity is being logged!\n\n\t\tun-compressed communications not allowed!\n\n");
				}
			}

			sinkStack_in.AsyncProcessResponse(
				message_in,
				headers_in, 
				stream_in
			);
		} 
开发者ID:katshann,项目名称:ogen,代码行数:32,代码来源:CompressionServerSink.cs

示例4: GetResponseStream

 public Stream GetResponseStream (IServerResponseChannelSinkStack sinkStack,
                                  object state,
                                  IMessage msg,
                                  ITransportHeaders headers)
 {
   throw new NotImplementedException();
 }
开发者ID:emtees,项目名称:old-code,代码行数:7,代码来源:IceServerTransportSink.cs

示例5: AsyncProcessResponse

		public void AsyncProcessResponse (IServerResponseChannelSinkStack sinkStack,
						  object state,
						  IMessage msg,
						  ITransportHeaders headers,
						  Stream stream)
		{
			throw new NotSupportedException ();	// Never called
		}
开发者ID:nlhepler,项目名称:mono,代码行数:8,代码来源:SdlChannelSink.cs

示例6: GetResponseStream

 public Stream GetResponseStream(IServerResponseChannelSinkStack sinkStack, object state, IMessage msg, ITransportHeaders headers)
 {
     HttpServerSocketHandler handler = (HttpServerSocketHandler) state;
     if (handler.AllowChunkedResponse)
     {
         return handler.GetResponseStream("200", "OK", headers);
     }
     return null;
 }
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:9,代码来源:HttpServerTransportSink.cs

示例7: AsyncProcessResponse

 public void AsyncProcessResponse(IServerResponseChannelSinkStack sinkStack
     , object state
     , IMessage msg
     , ITransportHeaders headers
     , Stream stream)
 {
     SerializeResponseMessage(sinkStack, msg, ref headers, ref stream);
     sinkStack.AsyncProcessResponse(msg, headers, stream);
 }
开发者ID:wsky,项目名称:top-link,代码行数:9,代码来源:JsonServerFormatterSinkProvider.cs

示例8: AsyncProcessResponse

 public void AsyncProcessResponse (IServerResponseChannelSinkStack sinkStack, object state,
                                   IMessage msg, ITransportHeaders headers, Stream responseStream)
 {
     ClientConnection connection = (ClientConnection)state;
     NetworkStream stream = new NetworkStream (connection.Client);
     UnixMessageIO.SendMessageStream (stream, responseStream, headers, connection.Buffer);
     stream.Flush ();
     stream.Close ();
 }
开发者ID:Jakosa,项目名称:MonoLibraries,代码行数:9,代码来源:UnixServerTransportSink.cs

示例9: AsyncProcessResponse

 public void AsyncProcessResponse(
     IServerResponseChannelSinkStack sinkStack,
     object state,
     IMessage msg,
     ITransportHeaders headers,
     Stream stream)
 {
     // Send the response to the client.
     sinkStack.AsyncProcessResponse(msg, headers, stream);
 }
开发者ID:yallie,项目名称:zyan,代码行数:10,代码来源:CompressionServerChannelSink.cs

示例10: AsyncProcessResponse

		/// <summary></summary>
		public void AsyncProcessResponse(
			IServerResponseChannelSinkStack sinkStack,
			Object state,
			IMessage message,
			ITransportHeaders headers,
			Stream stream)
		{
			SetClientIpAddressDataHelper(headers);
			sinkStack.AsyncProcessResponse(message, headers, stream);
		}
开发者ID:sillsdev,项目名称:FieldWorks,代码行数:11,代码来源:ClientIPServerSink.cs

示例11: AsyncProcessResponse

 public void AsyncProcessResponse(
         IServerResponseChannelSinkStack sinkStack,
         Object state,
         IMessage message,
         ITransportHeaders headers,
         Stream stream)
 {
     IPAddress ip = headers[CommonTransportKeys.IPAddress] as IPAddress;
         CallContext.SetData("ClientIPAddress", ip);
         sinkStack.AsyncProcessResponse(message, headers, stream);
 }
开发者ID:jsvgoncalves,项目名称:tdin-chat-server,代码行数:11,代码来源:ClientIPServerSinkProvider.cs

示例12: AsyncProcessResponse

        public void AsyncProcessResponse(IServerResponseChannelSinkStack sinkStack, object state, IMessage msg, ITransportHeaders headers, Stream stream)
        {
            ClientState cs = state as ClientState;
            if (cs != null && cs.clientCompressed) {
                // compress the shits
                stream = CompressionHelper.CompressStream(stream);
                headers[CompressionHelper.CompressKey] = CompressionHelper.CompressedFlag;
            }

            sinkStack.AsyncProcessResponse(msg, headers, stream);
        }
开发者ID:anand-ajmera,项目名称:cornell-urban-challenge,代码行数:11,代码来源:CompressedServerChannelSink.cs

示例13: AsyncProcessResponse

		public void AsyncProcessResponse (IServerResponseChannelSinkStack sinkStack, object state,
						  IMessage message, ITransportHeaders headers, Stream stream)
		{
			ITransportHeaders responseHeaders = new TransportHeaders();

			if (sinkStack != null) stream = sinkStack.GetResponseStream (message, responseHeaders);
			if (stream == null) stream = new MemoryStream();

			_binaryCore.Serializer.Serialize (stream, message, null);
			if (stream is MemoryStream) stream.Position = 0;

			sinkStack.AsyncProcessResponse (message, responseHeaders, stream);
		}
开发者ID:Jakosa,项目名称:MonoLibraries,代码行数:13,代码来源:UnixBinaryServerFormatterSink.cs

示例14: AsyncProcessResponse

 public void AsyncProcessResponse(IServerResponseChannelSinkStack sinkStack, object state, IMessage msg, ITransportHeaders headers, Stream stream)
 {
     HttpServerSocketHandler handler = null;
     handler = (HttpServerSocketHandler) state;
     handler.SendResponse(stream, "200", "OK", headers);
     if (handler.CanServiceAnotherRequest())
     {
         handler.BeginReadMessage();
     }
     else
     {
         handler.Close();
     }
 }
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:14,代码来源:HttpServerTransportSink.cs

示例15: GetResponseStream

		public Stream GetResponseStream(IServerResponseChannelSinkStack sinkStack, object state, IMessage responseMsg, ITransportHeaders responseHeaders)
		{
			// parameters validation
			if (responseHeaders == null)
				throw new ArgumentNullException("responseHeaders");

			IMethodReturnMessage methodReturn = responseMsg as IMethodReturnMessage;
			if (methodReturn == null)
				throw new NotSupportedException();

			IConnection connection = state as IConnection;
			if (connection == null)
				throw new NotSupportedException();

			// return stream for writing response
			return connection.GetResponseStream(methodReturn, responseHeaders);
		}
开发者ID:Orvid,项目名称:NAntUniversalTasks,代码行数:17,代码来源:ServerTransportSink.cs


注:本文中的IServerResponseChannelSinkStack类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。