Thanks, brewbuck.
Libraries - I've heard of these used with regards to linking, so that makes sense - cheers, gives me something to look up.
Tell me - how would I then go about using that libary within another project? Just by including it in -lserver.a ? Or some other syntax? (As the only library I'm really familiar with is -lpthreads - so perhaps the syntax is different from user-defined libraries).
Also - how do I solve the problem that the server somehow has to have (2-way) communication with the rest of the program? What would the interfaces be there, or do I simply have to create an interim object and communicate between them, like:
Code:
class Server
{
//....
public: void SetClient(ClientObject * client){...}
private: void ReceivedData()
{
m_ClientObject->SendData(data);
ClientObject * m_ClientObject;
}
//...
};
And then - upon creating an instance of Server - set the client for 2-way communication?
Cheers