Playing audio from a socket with buffering

Hello,

I'm coming from a more scripted background and now trying to move one of my applications to C++. I could just use to be pointed in the right direction so I have proper thinking when it comes to mapping out how to write my current program in C++.

I just need to write a program that

1) Connects to one socket and sends JSON data.
2) Connects to another socket and receives encoded audio data.
3) Decodes and buffers said audio data.
4) Plays the data continually when a certain percent of the buffer is full.
5) Keep track of all of this stuff in MySQL.

I've had my eye on the Boost::Asio for the sockets, but I've been struggling trying to figure out how much of this code should be done in separate threads. In the Node.js program, I have the socket receiving, buffering, and functions all running in asynchronous queues. In C++, obviously this structure should be different.

Any help to bend my mind to the new coding flow would be helpful. Any open source projects or any code that I can parse through that may implement something similar to what I'm doing would also be super helpful.

Thanks in advance!
Topic archived. No new replies allowed.