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

FwdSocket Class Reference

#include <FwdSocket.h>

Collaboration diagram for FwdSocket:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 FwdSocket (SocketHandler &)
 ~FwdSocket ()
void OnLine (const std::string &)
void OnDelete ()
void SetRemote (SMTPSocket *p)

Private Attributes

SMTPSocketm_remote

Constructor & Destructor Documentation

FwdSocket::FwdSocket SocketHandler &   ) 
 

Definition at line 52 of file FwdSocket.cpp.

References FwdSocket().

Referenced by FwdSocket().

00053 :TcpSocket(h) 00054 ,m_remote(NULL) 00055 { 00056 SetLineProtocol(); 00057 }

FwdSocket::~FwdSocket  ) 
 

Definition at line 60 of file FwdSocket.cpp.

References m_remote.

00061 { 00062 if (m_remote && Handler().Valid(m_remote) ) 00063 { 00064 // m_remote -> SetCloseAndDelete(); 00065 } 00066 }


Member Function Documentation

void FwdSocket::OnDelete  ) 
 

Definition at line 94 of file FwdSocket.cpp.

References m_remote.

00095 { 00096 if (m_remote && Handler().Valid(m_remote) ) 00097 { 00098 // m_remote -> SetCloseAndDelete(); 00099 } 00100 }

void FwdSocket::OnLine const std::string &   ) 
 

Definition at line 69 of file FwdSocket.cpp.

References m_remote, and OnLine().

Referenced by OnLine().

00070 { 00071 Parse pa(line,"-"); 00072 long status = pa.getvalue(); 00073 if (status == 550) 00074 { 00075 if (m_remote && Handler().Valid(m_remote) ) 00076 { 00077 m_remote -> SetFake(); 00078 } 00079 m_remote -> Send("250 Ok\r\n"); 00080 SetCloseAndDelete(); 00081 } 00082 else 00083 if (status != 250) 00084 { 00085 printf("<%s\n",line.c_str()); 00086 } 00087 if (m_remote && Handler().Valid(m_remote) ) 00088 { 00089 m_remote -> Send(line + "\r\n"); 00090 } 00091 }

void FwdSocket::SetRemote SMTPSocket p  )  [inline]
 

Definition at line 37 of file FwdSocket.h.

References m_remote, and SetRemote().

Referenced by SetRemote().

00037 { m_remote = p; }


Member Data Documentation

SMTPSocket* FwdSocket::m_remote [private]
 

Definition at line 40 of file FwdSocket.h.

Referenced by OnDelete(), OnLine(), SetRemote(), and ~FwdSocket().


The documentation for this class was generated from the following files:
Generated for C++ Sockets library example: SMTP Proxy 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