Logo
~Sockets~
~Examples~
~Contact~


DChatMinionSocket Class Reference

#include <DChatMinionSocket.h>

List of all members.


Public Member Functions

 DChatMinionSocket (ISocketHandler &)
 DChatMinionSocket (ISocketHandler &, const std::string &, ipaddr_t, port_t)
 ~DChatMinionSocket ()
ICrypt * AllocateCrypt ()
int GetMaxConnections ()
unsigned char * GetKey_m2minion ()
void Notify (const std::string &str)
bool OnVerifiedLine (const std::string &cmd, Parse &pa)

Detailed Description

File ......... DChatMinionSocket.h Published .... 2004-04-19 Author ....... grymse@alhem.net

Definition at line 31 of file DChatMinionSocket.h.


Constructor & Destructor Documentation

DChatMinionSocket::DChatMinionSocket ( ISocketHandler &   ) 

Definition at line 31 of file DChatMinionSocket.cpp.

00032 :MinionSocket(h)
00033 {
00034 }

DChatMinionSocket::DChatMinionSocket ( ISocketHandler &  ,
const std::string &  ,
ipaddr_t  ,
port_t   
)

Definition at line 37 of file DChatMinionSocket.cpp.

00038 :MinionSocket(h,s,a,p)
00039 {
00040 }

DChatMinionSocket::~DChatMinionSocket (  ) 

Definition at line 43 of file DChatMinionSocket.cpp.

00044 {
00045 }


Member Function Documentation

ICrypt* DChatMinionSocket::AllocateCrypt (  )  [inline]

Definition at line 38 of file DChatMinionSocket.h.

00038 { return new NullCrypt; }

int DChatMinionSocket::GetMaxConnections (  )  [inline]

Definition at line 39 of file DChatMinionSocket.h.

00039 { return 3; }

unsigned char* DChatMinionSocket::GetKey_m2minion (  )  [inline]

Definition at line 40 of file DChatMinionSocket.h.

References k1.

00040 { return k1; }

void DChatMinionSocket::Notify ( const std::string &  str  )  [inline]

Definition at line 42 of file DChatMinionSocket.h.

00042 { printf("%s\n",str.c_str()); }

bool DChatMinionSocket::OnVerifiedLine ( const std::string &  cmd,
Parse &  pa 
)

Definition at line 48 of file DChatMinionSocket.cpp.

00049 {
00050         if (cmd == "who")
00051         {
00052                 static_cast<DChatHandler&>(Handler()).SendWho();
00053         }
00054         else
00055         if (cmd == "talk")
00056         {
00057                 std::string who = Utility::base64d(pa.getword());
00058                 std::string prat = pa.getrest();
00059                 static_cast<DChatHandler&>(Handler()).SendTalk(who,prat);
00060         }
00061         else
00062         if (cmd == "online")
00063         {
00064                 std::string who = Utility::base64d(pa.getword());
00065                 static_cast<DChatHandler&>(Handler()).ShowWho(who);
00066         }
00067         else
00068         {
00069                 return MinionSocket::OnVerifiedLine(cmd, pa);
00070         }
00071         return true;
00072 }


The documentation for this class was generated from the following files:
Page, code, and content Copyright (C) 2006 by Anders Hedström
Generated on Mon Aug 29 20:21:47 2005 for C++ Sockets by  doxygen 1.4.4