Redirecting stdout via Zeromq
===

I am using the zeromq client server model. 

My client takes options from the command line and sends them to the server. The server reads each option and produces output to stdout (it has been adapted from a simple command line tool). 

What is the best way to redirect the stdout back to the client?

If I can direct stdout to a string I could then copy this to zmq_msg_data for transmission.

Cheers!