I'd eventually learn about threads when get a bit of free time.
Meanwhile can I do the following with a buffer without running into pitfalls ?
Suppose an object of a class Device wants to send some packets of data to another such object.
If they were running simultaneously, then one would send and the other would wait for the packets, until receiving them.
What I'm doing now , is keeping a std::deque of packets maps (containing a packet and the address of another device) as a member of the class Device.
When all the required packets are in the buffer, a static function bool connect();
connects the two devices(which it takes as arguments), i.e..it iterates over the buffer of the sender and passes all the packets mapped to the receiver's address to the receiver's receive buffer .
Am I taking the right approach?