Google
Web alhem.net
Main Page | Alphabetical List | Class List | File List | Class Members | File Members

ChatHandler Class Reference

#include <ChatHandler.h>

List of all members.

Public Member Functions

 ChatHandler ()
 ~ChatHandler ()
void Talk (const std::string &, const std::string &)
void Who (ChatSocket *)


Constructor & Destructor Documentation

ChatHandler::ChatHandler  ) 
 

Definition at line 28 of file ChatHandler.cpp.

00029 :SocketHandler() 00030 { 00031 }

ChatHandler::~ChatHandler  ) 
 

Definition at line 34 of file ChatHandler.cpp.

00035 { 00036 }


Member Function Documentation

void ChatHandler::Talk const std::string &  ,
const std::string & 
 

Definition at line 39 of file ChatHandler.cpp.

References Talk().

Referenced by Talk().

00040 { 00041 std::string str = "\n"; 00042 str += name + " says '" + line + "'\n"; 00043 00044 for (socket_m::iterator it = m_sockets.begin(); it != m_sockets.end(); it++) 00045 { 00046 // SOCKET s = (*it).first; 00047 Socket *p0 = (*it).second; 00048 ChatSocket *p = dynamic_cast<ChatSocket *>(p0); 00049 if (p) 00050 { 00051 p -> Send(str); 00052 } 00053 } 00054 }

void ChatHandler::Who ChatSocket  ) 
 

Definition at line 57 of file ChatHandler.cpp.

References Who().

Referenced by Who().

00058 { 00059 for (socket_m::iterator it = m_sockets.begin(); it != m_sockets.end(); it++) 00060 { 00061 // SOCKET s = (*it).first; 00062 Socket *p0 = (*it).second; 00063 ChatSocket *p = dynamic_cast<ChatSocket *>(p0); 00064 if (p) 00065 { 00066 p2 -> Send(p -> GetName() + "\n"); 00067 } 00068 } 00069 }


The documentation for this class was generated from the following files:
Generated for C++ Sockets by doxygen 1.3.6

www.TV-friendship.com
The matchmaking service with an all new twist.

Quantum 'Teleportation'
Some thoughts
Page, code, and content Copyright (C) 2004 by Anders Hedström