using System; using System.Collections.Generic; using System.Linq; using System.Runtime.Serialization; using System.ServiceModel; using System.Text; using QM.Exchange.Interface; namespace QM.Exchange.Core { // 注意: 使用“重构”菜单上的“重命名”命令,可以同时更改代码和配置文件中的接口名“IDuplexMessageService”。 [ServiceContract(Namespace = "http://www.artech.com/", CallbackContract = typeof(ICallBackService))] public interface IDuplexMessageService { /// /// 向服务端请求 /// /// [OperationContract(IsOneWay = true)] void RequestServer(CommonMessage message); } /// /// 通讯回调接口 /// public interface ICallBackService { /// /// 服务端向客户端发送信息(异步) /// /// [OperationContract(IsOneWay = true)] void SendMessageToClient(CommonMessage message); } }