you have to: - create a zmq msg with sufficient size - copy the struct into the msg buffer This means, that you need a func, that knows the struct and copies the data of the inner pointers etc. In short: you need to write a serialization function for your struct.
^5 Sven =================== sent by the iPhone Am 03.03.2011 um 08:30 schrieb Rakesh Kumar Jha <[email protected]>: > > struct msg1 > { > int header; > char data[5]; > }msg1; > > > int main(int argc, char *argv[]) > { > void *context = zmq_init(1); > struct msg1 s2; > > ....................... > ........................ > and s_send(sender,s2); > > > ................. > .............. > create a error > > > > so please is there any way to send msg which supports structure sending over > a socket... > > -- > Thanks & Regards, > Rakesh Kumar Jha > _______________________________________________ > zeromq-dev mailing list > [email protected] > http://lists.zeromq.org/mailman/listinfo/zeromq-dev
_______________________________________________ zeromq-dev mailing list [email protected] http://lists.zeromq.org/mailman/listinfo/zeromq-dev
