Advertisement
rowers

clisercpp

Dec 11th, 2014
165
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.51 KB | None | 0 0
  1. #include <iostream>
  2. #include <string>
  3. #include "cliser.h"
  4.  
  5. using namespace std;
  6.  
  7. void Client::send(string msg_snd_)
  8. {
  9.     this->ser->receive(this, msg_snd_);
  10. }
  11.  
  12. void Client::receive(string msg_from_server)
  13. {
  14.     this->msg_rec = msg_from_server;
  15.     cout << this->ser->name << ": " << msg_rec << endl;
  16. }
  17.  
  18. void Server::receive(Client *cli, string msg_from_client)
  19. {
  20.     this->msg_rec=msg_from_client;
  21.     cout << cli->cli_name << ": " << msg_rec << endl;
  22.     cli->receive("Wiadomosc odebrana");
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement