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 try to send a std::string from client to server. I modify the code in the rpc.cpp
I modify the struct Message,
struct Message { uint64_t count; uint64_t timestamp; uint8_t *data; std::string code; };
function callback(),
bool callback(const shm::memory::Memblock &req, shm::memory::Memblock *resp) { auto *msg = reinterpret_cast<Message *>(req.ptr); auto lag = shm::current_time() - msg->timestamp; std::cout << current_count << ", " << msg->count <<" "<<msg->code << "\n"; .... }
and function client_loop().
void client_loop(int seconds, int vector_size) { ... auto *rawptr = malloc(vector_size); std::memset(rawptr, 255, vector_size); Message *msg = reinterpret_cast<Message *>(rawptr); msg->count = 0; msg->code = "hello world!"; ... }
But it got a segmentation fault error when I std::cout the msg->code.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I try to send a std::string from client to server. I modify the code in the rpc.cpp
I modify the struct Message,
function callback(),
and function client_loop().
But it got a segmentation fault error when I std::cout the msg->code.
The text was updated successfully, but these errors were encountered: