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
Hi,
can you write what is the correct syntax for reading a binn object from a socket?
what i am trying is: sending: binn * obj = binn_object();
binn_object_set_int32(obj, (char*)"dst_enclave", 306768318); int socket = clSockFd; if (send(socket, binn_ptr(obj), binn_size(obj), 0) != binn_size(obj)) { printf("SENDER -- failed to send msg1 to dest\n"); abort(); } binn_free(obj);
reading:
binn * obj = binn_object(); if (recv(servSockFd, binn_ptr(obj), binn_size(obj), 0) < 0) { printf("LISTENER -- failed to read msg1 from src\n"); abort(); } int test = binn_object_int32(obj, (char*)"dst_enclave");
but i am getting 0 in test.
The text was updated successfully, but these errors were encountered:
Just use read() as you are used to, reading the data to a buffer.
read()
Then read the binn from the buffer, like this:
int test = binn_object_int32(buf, "dst_enclave");
Sorry, something went wrong.
No branches or pull requests
Hi,
can you write what is the correct syntax for reading a binn object from a socket?
what i am trying is:
sending:
binn * obj = binn_object();
reading:
but i am getting 0 in test.
The text was updated successfully, but these errors were encountered: