Git Product home page Git Product logo

dijiang's Introduction

关于“帝江”

“帝江”是一个通信框架,底层可以使用TCP方式或者RDMA方式。

使用方式

Server端

SAY("Server");
auto socket = std::make_shared<RdmaServerSocket>(port, threadNum, messageBufferSize);
auto handler = [](char *buffer, int size)
{
    std::string str(buffer, size);
    fprintf(stdout, "dijinag -> size is: %d, content is: %s, \n", size, str.c_str());
};
socket->RegisterHandler(handler);
socket->Loop();

Client端

SAY("Client");
int timeout = 500;
auto socket = std::make_shared<RdmaClientSocket>(ip, port, threadNum, messageBufferSize, timeout);
char data[] = "hello,world";
int size = strlen(data);
socket->Write(data, size);

使用截图

server端

client端

性能测试

带宽测试

时延测试

名称来源

帝江,《山海经》中的神兽,人面鸟身,背有四张肉翅,胸前、腹部、双腿六爪;善速度,四翅一扇二十八万里。

帝江

dijiang's People

Contributors

xinshuowang 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.