Networking Reference
In-Depth Information
zmsg_t* msg = zmsg_recv(request);
FILE* file = fopen("server.txt", "w");
zmsg_save(msg, file);
fclose(file);
zmsg_destroy(&msg);
zsocket_destroy(context, request);
zctx_destroy(&context);
return 0;
}
zfile_mkdir
As we have said earlier, zfile_mkdir creates a directory if and only if it is one level
deep. Therefore, it will create a test folder, but will not create a test/test2 folder.
Here it is in action:
/*
Request - Reply
Working with zfile_mkdir
*/
#include <stdio.h>
#include "czmq.h"
int main (int argc, char const *argv[]) {
zctx_t* context = zctx_new();
void* request = zsocket_new(context, ZMQ_REQ);
printf("Starting client...\n");
 
Search MirCeyron ::




Custom Search