Skip to content

A very fast TCP and RDMA communication framework.

Notifications You must be signed in to change notification settings

XinShuoWang/Dijiang

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

关于“帝江”

“帝江”是一个通信框架,底层可以使用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端

性能测试

带宽测试

时延测试

名称来源

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

帝江