Code Monkey home page Code Monkey logo

rest_rpc's Introduction

在此特别感谢社区的朋友刘丹将rest_rpc的中文说明翻译为英文。

#chinese wiki

##Contributer

江南(qicosmos)IndignantAngel

##Contact us [email protected]


rest_rpc v0.91 release note

新增特性

1.业务函数的参数可以有connection_ptr,也可以没有,取决于你的需要,使用更灵活。

server.register_handler("add_with_conn", []
    (timax::rpc::connection_ptr conn, int a, int b)
{
    auto result = a + b;
    if (result < 1)
        conn->close();
    return result;
});

2.客户端添加private接口,拥有更高的权限和更多的流程控制

3.server端的pub提供了一个纯转发的重载实现

4.提供管理多个endpoint的工具

auto endpoints = timax::rpc::get_tcp_endpoints("127.0.0.1:5001|127.0.0.1:5002");
for(auto const& endpoint : endpoints)
{
    std::cout << endpoint << std::endl;
}

5.客户端pub接口的,将会把转发协议的name当做topic,广播给所有监听这个topic的客户端,而不需要再服务器上注册handler;

6.服务器注册handler,将使用hash值代替字符串

Bug修复

  1. rpc超时后异步调用链断开
  2. 客户端和服务器read大块消息时,因使用boost::bind,而发生了意外地拷贝,招致读取到不正确的地址
  3. 支持更低版本的编译器

rest_rpc's People

Contributors

madokakaroto avatar qicosmos avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.