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

OutSocket Class Reference

#include <OutSocket.h>

Collaboration diagram for OutSocket:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 OutSocket (SocketHandler &h)
 ~OutSocket ()
void SetRemote (InSocket *p)
void OnDelete ()
void OnRawData (const char *, size_t)
void OnConnect ()

Private Attributes

InSocketm_remote

Detailed Description

Definition at line 27 of file OutSocket.h.


Constructor & Destructor Documentation

OutSocket::OutSocket SocketHandler &  h  ) 
 

Definition at line 28 of file OutSocket.cpp.

00029 :TcpSocket(h, 32000, 32000)
00030 ,m_remote(NULL)
00031 {
00032 }

OutSocket::~OutSocket  ) 
 

Definition at line 35 of file OutSocket.cpp.

00036 {
00037 }


Member Function Documentation

void OutSocket::OnConnect  ) 
 

Definition at line 62 of file OutSocket.cpp.

References m_remote.

00063 {
00064         if (Handler().Valid(m_remote))
00065         {
00066                 if (m_remote -> tmpl)
00067                 {
00068                         printf("Sending %d early bytes\n",m_remote -> tmpl);
00069                         SendBuf(m_remote -> tmps, m_remote -> tmpl);
00070                         m_remote -> tmpl = 0;
00071                 }
00072         }
00073 }

void OutSocket::OnDelete  ) 
 

Definition at line 40 of file OutSocket.cpp.

References m_remote.

00041 {
00042         if (Handler().Valid(m_remote))
00043         {
00044                 m_remote -> SetCloseAndDelete();
00045         }
00046 }

void OutSocket::OnRawData const char *  ,
size_t 
 

Definition at line 49 of file OutSocket.cpp.

References m_remote.

00050 {
00051         if (Handler().Valid(m_remote))
00052         {
00053                 m_remote -> SendBuf(p, l);
00054         }
00055         else
00056         {
00057                 Handler().LogError(this, "OnRawData", 0, "m_remote not valid");
00058         }
00059 }

void OutSocket::SetRemote InSocket p  )  [inline]
 

Definition at line 33 of file OutSocket.h.

References m_remote.

00033 { m_remote = p; }


Member Data Documentation

InSocket* OutSocket::m_remote [private]
 

Definition at line 41 of file OutSocket.h.

Referenced by OnConnect(), OnDelete(), OnRawData(), and SetRemote().


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