Hauptseite | Klassenhierarchie | Alphabetische Liste | Auflistung der Klassen | Auflistung der Dateien | Klassen-Elemente

TCPIPCommSend.h

00001 //***************************************************************************** 00002 // project : ANALYTICA Class Library 00003 // part : Communication class for simple TCP/IP 00004 // file name : TCPIPCommSend.h 00005 // version : $Revision: 1.3 $ 00006 // author : Udo Weber 00007 // platform : MS VC++ 6.0 00008 // 00009 //----------------------------------------------------------------------------- 00010 // Description: 00011 // ============= 00012 // implementation of the class CTCPIPComm to encapsulate simple TCP/IP 00013 // communications 00014 // Part : Sending of messages 00015 // 00016 //----------------------------------------------------------------------------- 00017 // Revisionhistory: 00018 // $Log: TCPIPCommSend.h,v $ 00019 // Revision 1.3 2001/07/12 14:36:00 AxelSchmidt 00020 // virtuelle Basis-Klasse CTraceObject hinzugefügt 00021 // 00022 // 03.07.2001 ASc Function InitializeClass added 00023 // 20.07.1998 UWe Some bug fixes 00024 // 20.04.1998 UWe first version 00025 //***************************************************************************** 00026 00027 #ifndef _TCPIPCommSend_h 00028 #define _TCPIPCommSend_h 00029 00030 //---- includes --------------------------------------------------------------- 00031 00032 #include <winsock.h> 00033 #include "TraceObject.h" 00034 00035 00036 //---- defines/const ---------------------------------------------------------- 00037 00038 00039 //---- enums ------------------------------------------------------------------ 00040 00041 00042 //---- structs ---------------------------------------------------------------- 00043 00044 00045 //---- classes ---------------------------------------------------------------- 00046 00052 class CTCPIPCommSend : virtual public CTraceObject 00053 { 00054 // public part 00055 public: 00056 00062 CTCPIPCommSend( const long MaxSendBufferLen = 8192 ); 00063 00065 virtual ~CTCPIPCommSend(); 00066 00067 00068 // 00069 // public operations 00070 // 00071 00077 void Initialize( const SOCKET Socket ); 00078 00079 00086 bool Send( const void *pData, 00087 const long DataLen ); 00088 00094 int GetLastSocketError( void ) const; 00095 00101 bool Terminating( void ) const; 00102 00108 void Terminating( bool Terminating ); 00109 00110 00111 00112 // protected part 00113 protected: 00114 00115 // 00116 // virtual callback functions 00117 // 00118 00124 virtual void SendDisInd( void ) = 0; 00125 00130 void InitializeClass( const long MaxSendBufferLen ); 00131 00132 00133 // private part 00134 private: 00135 00136 // 00137 // static member functions 00138 // 00144 static void SendThread( CTCPIPCommSend *pClass ); 00145 00146 00147 00148 // member definition 00149 SOCKET m_Socket; 00150 int m_LastSocketError; 00151 00152 DWORD m_ThreadID; 00153 00154 HANDLE m_hReadPipe; 00155 HANDLE m_hWritePipe; 00156 HANDLE m_ThreadHandle; 00157 HANDLE m_hEventTerminate; 00158 HANDLE m_hEventTerminateFinished; 00159 HANDLE m_hEventStartReceiving; 00160 00161 void *m_pSendBuffer; 00162 long m_MaxSendBufferLen; 00163 00164 bool m_Terminating; 00165 00166 int m_SendCnt; 00167 }; 00168 00169 00170 // 00171 // inline operations 00172 // 00173 00174 // get last socket error 00175 inline int CTCPIPCommSend::GetLastSocketError( void ) const 00176 { 00177 return m_LastSocketError; 00178 } 00179 00180 00181 inline bool CTCPIPCommSend::Terminating( void ) const 00182 { 00183 return m_Terminating; 00184 } 00185 00186 00187 inline void CTCPIPCommSend::Terminating( bool Terminating ) 00188 { 00189 m_Terminating = Terminating; 00190 } 00191 00192 00193 00194 #endif // _TCPIPCommSend_h

Erzeugt am Tue Mar 11 14:25:16 2008 für SchunkFPS von doxygen 1.3.7