Exemple #1
0
        protected void Send(MyMethodDefinition method, IMessage message)
        {
            MyRpcRequest req = new MyRpcRequest();

            req.RequestId   = 0;
            req.MethodId    = method.MethodId;
            req.ServiceId   = this.ServiceId;
            req.PayloadData = message.ToByteString();
            m_Canal.Send(req);
        }
Exemple #2
0
 protected void AddMethod(MyMethodDefinition method)
 {
     m_Methods.Add(method.MethodId, method);
 }
Exemple #3
0
 public MySearchService() : base("search_service")
 {
     this.AddMethod(MyMethodDefinition <SearchRequest, SearchResponse> .Create("search", Search));
 }
 public void AddMethod(MyMethodDefinition method)
 {
     m_Methods.Add(method.MethodId, method);
 }
Exemple #5
0
 public MySearchClient(SimpleClient canal) : base("search_service", canal)
 {
     AddMethod(MyMethodDefinition <SearchRequest, SearchResponse> .Create("search"));
     this.Start();
 }