i want a client server application for sending simple message in C++. i don't need the code i'll work on it just need direction to focus my effort on right direction.
suppose i have method message on server and want to invoke from client to see the messages, what files do i need to have
1 2 3 4 5 6 7
void message{
cout<<"hello world"<<endl;
}
int main(){
message();
}
i want to invoke function message from client.
my question, which files do i need to have
client,server,socket just file i'll work down my own
Typically, the server listens for incomming connections. When a client want's something from the server it connects to it, sends a request and receives a reply.
The actual details of the exchange is what we call 'the protocol'. You'll end up with one either way, but it's best to think about the request/reply as part of your design.