(三)c#整合zeroIce
来源:互联网 发布:局域网未识别的网络 编辑:程序博客网 时间:2024/06/06 23:58
vs版本: vs2015
.net: 4.5.2
语言: c#
整合参考 :https://github.com/zeroc-ice/ice-demos (或安装icegrid,通过“Source Code on GitHub”指引找到)
下载IceBuilders for visualStudio :https://zeroc.com/downloads/builders
整合后代码地址:http://download.csdn.net/download/yeness/10010388
1、Ice Builders for visual studio
- 双击安装IceBuilder.vsix
- 项目右键 -> Add Ice Builder To Project
- 项目右键 -> 属性 -> Ice Builder -> Referenced Assemblies: ->勾选 Ice、IceBox 、IceSSL
2、Server端配置
*使用 iceBox,可通过配置文件启动,同时配置文件需将属性改为始终复制。
*同时复制demo中icebox/hello 下的iceboxnet.exe到项目
- config.admin
## Proxy to the IceBox ServiceManager:#IceBoxAdmin.ServiceManager.Proxy=DemoIceBox/admin -f IceBox.ServiceManager:tcp -p 9996 -h localhost
- config.icebox
## The IceBox ServiceManager object is provided as a facet of the Ice.Admin object.### Enable Ice.Admin object:#Ice.Admin.Endpoints=tcp -p 9996 -h localhostIce.Admin.InstanceName=DemoIceBox## The hello service##IceBox.Service.Hello=helloservice.dll:HelloServiceI --Ice.Config=config.serviceIceBox.Service.Printer=com.company.test.Server:PrinterServiceI --Ice.Config=config.service## Warn about connection exceptions#Ice.Warn.Connections=1## Network Tracing## 0 = no network tracing# 1 = trace connection establishment and closure# 2 = like 1, but more detailed# 3 = like 2, but also trace data transfer##Ice.Trace.Network=1## Protocol Tracing## 0 = no protocol tracing# 1 = trace protocol messages##Ice.Trace.Protocol=1
- config.service
## The server creates one single object adapter with the name of the# service. The following line sets the endpoints for this adapter.# 这里注释掉ssl#Printer.Endpoints=tcp -p 10000 -h localhost:udp -p 10000 -h localhost:ssl -p 10001 -h localhostPrinter.Endpoints=tcp -p 10000 -h localhost## Warn about connection exceptions#Ice.Warn.Connections=1## Network Tracing## 0 = no network tracing# 1 = trace connection establishment and closure# 2 = like 1, but more detailed# 3 = like 2, but also trace data transfer##Ice.Trace.Network=1## Protocol Tracing## 0 = no protocol tracing# 1 = trace protocol messages##Ice.Trace.Protocol=1## SSL plug-in configuration##Ice.Plugin.IceSSL="IceSSL,Version=3.7.0.0":IceSSL.PluginFactory#IceSSL.DefaultDir=./certs#IceSSL.CAs=cacert.pem#IceSSL.CertFile=server.p12#IceSSL.Password=password
3、Client端
config.client
## The client reads this property to create the reference to the# "hello" object in the server.##Printer.Proxy=hello:tcp -h localhost -p 10000:udp -h localhost -p 10000:ssl -h localhost -p 10001Printer.Proxy=printer:tcp -p 10000 -h localhost## Warn about connection exceptions#Ice.Warn.Connections=1## Network Tracing## 0 = no network tracing# 1 = trace connection establishment and closure# 2 = like 1, but more detailed# 3 = like 2, but also trace data transfer##Ice.Trace.Network=1## Protocol Tracing## 0 = no protocol tracing# 1 = trace protocol messages##Ice.Trace.Protocol=1## SSL plug-in configuration##Ice.Plugin.IceSSL=IceSSL:IceSSL.PluginFactory#IceSSL.DefaultDir=../../../certs#IceSSL.CAs=cacert.pem#IceSSL.CertFile=client.p12#IceSSL.Password=password
client -> Programs.cs
string strCmdText;strCmdText = "/C iceboxnet --Ice.Config=config.icebox";System.Diagnostics.Process.Start("CMD.exe", strCmdText);
阅读全文
0 0
- (三)c#整合zeroIce
- (一)c#整合zeroIce
- (二)c#整合zeroIce
- 14.2 zeroice Grid 实例2
- 【框架整合】三、整合mybatis
- SSH整合三
- jetty eclipse 整合三
- 三大框架整合
- 三大框架整合
- 如何整合S1SH(三)
- 如何整合S2SH(三)
- spring整合JMS(三)
- 三大框架整合
- ssh三框架整合
- freemarker+servlet整合(三)
- ZeroICE 3.5.1绑定地址错误
- 6 zeroice 的同步和异步调用
- 1.1.1 centos 下安装 zeroice
- stringBuffer和string的区别
- 归并排序
- com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in your SQL syntax
- MD5&Application In PassWord
- POJ 2686 Traveling by Stagecoach 笔记
- (三)c#整合zeroIce
- Java的基础字符串的一些方法
- Java API操作Hive
- Gym 100206B Fire station building(三分)
- el表达式的内置对象
- Java设计模式之模板设计模式
- POJ 1523 SPF (割点)
- python_lintcode_697Check Sum of Square Numbers_114不同的路径
- 第三周-项目1-顺序表的基本运算