Receiver/Receiver.cpp
void Receiver::start() {
	ClientHandler ch(rcvrQ);
	size_t port = stoi(localUrl.substr(localUrl.find(":") + 1, 4));
	SocketSystem ss;
	SocketListener sl(port, Socket::IP6);
	sl.start(ch);
	while (true)
		{
			HttpMessage msg = rcvrQ.deQ();
			std::cout << "\n\n  " + msg.findValue("toAddr") + " recvd message contents:\n  "
				+ msg.bodyString() + "\n  from " + msg.findValue("fromAddr");
			if (msg.bodyString() == "closeServer") break;
		}
}
// -------------< establish client handler and start receiving messages >--------------
< establish client handler and start receiving messages >
< establish client handler and start receiving messages >
void Receiver::start() {
	ClientHandler ch(rcvrQ);
	size_t port = stoi(localUrl.substr(localUrl.find(":") + 1, 4));
	SocketSystem ss;
	SocketListener sl(port, Socket::IP6);
	sl.start(ch);
	while (true)
		{
			HttpMessage msg = rcvrQ.deQ();
			std::cout << "\n\n  " + msg.findValue("toAddr") + " recvd message contents:\n  "
				+ msg.bodyString() + "\n  from " + msg.findValue("fromAddr");
			if (msg.bodyString() == "closeServer") break;
		}
}
void Receiver :: start ( ) { ClientHandler ch ( rcvrQ ) ; size_t port = stoi ( localUrl . substr ( localUrl . find ( " " ) + 1 , 4 ) ) ; SocketSystem ss ; SocketListener sl ( port , Socket :: IP6 ) ; sl . start ( ch ) ; while ( true ) { HttpMessage msg = rcvrQ . deQ ( ) ; std :: cout << " \n \n " + msg . findValue ( " " ) + " \n " + msg . bodyString ( ) + " \n " + msg . findValue ( " " ) ; if ( msg . bodyString ( ) == " " ) break ; } }
< establish client handler and start receiving messages >
< establish client handler and start receiving messages >