We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I run your code, and it works fine.
I modify your code and want the client to send something to the server. But I failed. The code in client:
#include "rdma_socket.hpp" #include <unistd.h> int main(int argc, char* argv[]) { rdma_socket client(RDMA_PS_TCP); client.resolve("12.7.14.35", 8000); client.create_qp(); char* mem = new char[4096]; client.post_recv(mem, 4096); client.connect(); struct ibv_wc wc = client.recv_comp(); printf("%s\n", reinterpret_cast<char*>(wc.wr_id)); char* data = new char[4096]; std::memcpy(data, "Hello serve!", 13); client.post_send(data, 4096); printf("ttt\n"); sleep(1); printf("rrr\n"); wc = client.send_comp(); printf("xxx\n"); return 0; }
The server code:
#include "rdma_socket.hpp" #include <unistd.h> int main(int argc, char* argv[]) { rdma_socket server(RDMA_PS_TCP); server.bind("12.7.14.35", 8000); server.listen(); rdma_socket rclient = server.accept(); char* data = new char[4096]; char* datax = new char[4096]; std::memcpy(data, "Hello World!", 13); // std::memcpy(datax, "Hello World!", 13); rclient.post_send(data, 4096); rclient.post_recv(datax, 4096); std::cout << "yyy" << std::endl; struct ibv_wc wc = rclient.send_comp(); printf("zzz\n"); wc = rclient.recv_comp(); printf("%s\n", reinterpret_cast<char*>(wc.wr_id)); return 0; }
When I run the code, both sides are stuck. The zzz didn't show up on the server's side. And on the client's side, the xxx didn't show up.
zzz
xxx
How can I make the code work?
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I run your code, and it works fine.
I modify your code and want the client to send something to the server. But I failed.
The code in client:
The server code:
When I run the code, both sides are stuck. The
zzz
didn't show up on the server's side. And on the client's side, thexxx
didn't show up.How can I make the code work?
The text was updated successfully, but these errors were encountered: