下载此文档

remoting 获取客户端ip地址(远程获取客户端ip地址).doc


文档分类:IT计算机 | 页数:约23页 举报非法文档有奖
1/23
下载提示
  • 1.该资料是网友上传的,本站提供全文预览,预览什么样,下载就什么样。
  • 2.下载该文档所得收入归上传者、原创者。
  • 3.下载的文档,不会出现我们的网址水印。
1/23 下载此文档
文档列表 文档介绍
remoting 获取客户端ip地址(远程获取客户端IP地址)
A big copy of work article is really false, in order to solve the problem of obtaining the client IP in Remoting, Google, Baidu a lot of articles,
Are all the same, really mad. But when debugging, the code contribution:
Using Sink, and as to what the Sink is, I don't understand, and I think it's sort of like the Filter pipeline, anyway,
First copy right, can use again.
The following code, in the Remoting server side, do not make changes directly copy, for simple, put the 2 classes are placed in a inside.
/////////////////////////////////////////////////////////////////////////////////
// Begin
Using System;
Using ;
Using ;
Using ;
Using ;
Using ;
Using ;
Using ;
Namespace IServer
{
Public class ClientIPServerSinkProvider: IServerChannelSinkProvider
{
Private IServerChannelSinkProvider next = null;
Public ClientIPServerSinkProvider ()
{
}
Public ClientIPServerSinkProvider (IDictionary properties, ICollection providerData)
{
}
Public void GetChannelData (IChannelDataStore channelData)
{
}
Public IServerChannelSink CreateSink (IChannelReceiver channel)
{
IServerChannelSink nextSink = null;
If (next = = null)
{
NextSink = (channel);
}
Return new ClientIPServerSink (nextSink);
}
Public IServerChannelSinkProvider Next
{
Get {return next}
Set {next = value;}
}
}
Public class ClientIPServerSink: BaseChannelObjectWithProperties, IServerChannelSink, IChannelSinkBase
{
Private IServerChannelSink _next;
Public ClientIPServerSink (IServerChannelSink next)
{
_next = next;
}
Public void AsyncProcessResponse (IServerResponseChannelSinkStack sinkStack, Object state, IMessage MSG, ITransportHeaders headers, Stream stream)
{
}
Public Stream GetResponseStream (IServerResponseChannelSinkStack sinkStack, Object state, IMessage MSG, ITransportHea

remoting 获取客户端ip地址(远程获取客户端ip地址) 来自淘豆网m.daumloan.com转载请标明出处.

非法内容举报中心
文档信息
  • 页数23
  • 收藏数0 收藏
  • 顶次数0
  • 上传人xinsheng2008
  • 文件大小23 KB
  • 时间2018-09-17