00001 // ===================================================================== 00028 // ===================================================================== 00029 #ifndef CLDAQ__TOBJECTSOCKET_HH 00030 #define CLDAQ__TOBJECTSOCKET_HH 00031 00032 #include "Tglobals.h" 00033 00034 00054 class TObjectSocket 00055 { 00056 00057 protected: 00058 enum { tDefaultPortNumber = 18150 }; 00059 00060 protected: 00061 Tint theServerDescriptor; 00062 Tint thePortNumber; 00063 struct sockaddr_in theAddress; 00064 00065 public: 00066 TObjectSocket( Tint portnumber ); 00067 00068 protected: 00069 virtual ~TObjectSocket(); 00070 00071 public: 00072 Tint GetServerDescriptor() const; 00073 Tint GetPortNumber() const; 00074 00075 public: 00076 Tint OpenServer(); 00077 Tint CloseServer(); 00078 00079 #ifdef __CLDAQ_ROOT_DLL 00080 ClassDef(TObjectSocket,0) 00081 #endif 00082 00083 }; 00084 00085 inline Tint TObjectSocket::GetServerDescriptor() const 00086 { 00087 return theServerDescriptor; 00088 } 00089 00090 inline Tint TObjectSocket::GetPortNumber() const 00091 { 00092 return thePortNumber; 00093 } 00094 00095 #endif