Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Serializing data in C

Please tell me how to serialize data (like binary files) in C. And, how can i send this serialized data over sockets, so that it can be successfully received by the corresponding Java client.

Actually i want to convert this binary file into byte array so that it can be send over the sockets.

Thanks in advance.

like image 744
user268758 Avatar asked Apr 25 '26 02:04

user268758


1 Answers

For interoperating between C and Java, you could use Google's Protocol Buffers (the Google reference implementation supports C++ and Java, and there's third party implementations for plain C).

like image 50
caf Avatar answered Apr 27 '26 18:04

caf



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!