![]() |
CTcpSocket Class ReferenceTcpSocket implementation with manual encrypt/decrypt.
More...
|
Public Member Functions | |
CTcpSocket (ISocketHandler &) | |
~CTcpSocket () | |
void | Init () |
CTcpSocket uses this to create its ICrypt member variable. | |
virtual ICrypt * | AllocateCrypt ()=0 |
std::string | encrypt (unsigned char *, const std::string &) |
bool | decrypt (unsigned char *, const std::string &, std::string &) |
Protected Member Functions | |
CTcpSocket (const CTcpSocket &s) | |
Private Member Functions | |
CTcpSocket & | operator= (const CTcpSocket &) |
Private Attributes | |
ICrypt * | m_crypt |
Definition at line 44 of file CTcpSocket.h.
CTcpSocket::CTcpSocket | ( | ISocketHandler & | ) |
CTcpSocket::~CTcpSocket | ( | ) |
CTcpSocket::CTcpSocket | ( | const CTcpSocket & | s | ) | [inline, protected] |
void CTcpSocket::Init | ( | ) | [virtual] |
CTcpSocket uses this to create its ICrypt member variable.
The ICrypt member variable is created by a virtual method, therefore it can't be called directly from the CTcpSocket constructor. Also used to determine if incoming HTTP connection is normal (port 80) or ssl (port 443).
Reimplemented from Socket.
Definition at line 53 of file CTcpSocket.cpp.
References AllocateCrypt(), and m_crypt.
00054 { 00055 m_crypt = AllocateCrypt(); 00056 }
std::string CTcpSocket::encrypt | ( | unsigned char * | , | |
const std::string & | ||||
) |
Definition at line 59 of file CTcpSocket.cpp.
References m_crypt.
Referenced by MinionSocket::OnLine(), MinionSocket::OnVerifiedLine(), and MinionSocket::SendHello().
bool CTcpSocket::decrypt | ( | unsigned char * | , | |
const std::string & | , | |||
std::string & | ||||
) |
Definition at line 65 of file CTcpSocket.cpp.
References m_crypt.
Referenced by MinionSocket::OnLine().
CTcpSocket& CTcpSocket::operator= | ( | const CTcpSocket & | ) | [inline, private] |
ICrypt* CTcpSocket::m_crypt [private] |
Definition at line 61 of file CTcpSocket.h.
Referenced by decrypt(), encrypt(), Init(), and ~CTcpSocket().