Logo
~Sockets~
~Examples~
~Contact~


ClientSocket Class Reference

#include <ClientSocket.h>

List of all members.


Public Member Functions

 ClientSocket (ISocketHandler &, const std::string &)
 ~ClientSocket ()
void OnConnect ()
void OnLine (const std::string &)

Private Attributes

std::string m_cmd

Detailed Description

Definition at line 8 of file ClientSocket.h.


Constructor & Destructor Documentation

ClientSocket::ClientSocket ( ISocketHandler &  ,
const std::string &   
)

Definition at line 8 of file ClientSocket.cpp.

00009 :TcpSocket(h)
00010 ,m_cmd(cmd)
00011 {
00012         SetLineProtocol();
00013 }

ClientSocket::~ClientSocket (  ) 

Definition at line 16 of file ClientSocket.cpp.

00017 {
00018 }


Member Function Documentation

void ClientSocket::OnConnect (  ) 

Definition at line 21 of file ClientSocket.cpp.

References m_cmd.

00022 {
00023         Send(m_cmd + "\n");
00024 }

void ClientSocket::OnLine ( const std::string &   ) 

Definition at line 27 of file ClientSocket.cpp.

00028 {
00029         printf("Reply from server: '%s'\n",line.c_str());
00030         if (line.size())
00031         {
00032         }
00033         else
00034         {
00035                 SetCloseAndDelete();
00036         }
00037 }


Member Data Documentation

std::string ClientSocket::m_cmd [private]

Definition at line 18 of file ClientSocket.h.

Referenced by OnConnect().


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