日期:2014-05-17 浏览次数:20828 次
InstanceContext instanceContext = new InstanceContext(new PushManageCallBack());
NetTcpBinding binding = new NetTcpBinding();
EndpointAddress address = new EndpointAddress(new Uri("net.tcp://127.0.0.1:9999/PushManage"));
using (DuplexChannelFactory<IPushManage> channelFactory = new DuplexChannelFactory<IPushManage>(instanceContext, binding, address))
{
var v = channelFactory.CreateChannel();
v.Login("");
}