00001 // ===================================================================== 00024 // ===================================================================== 00025 #ifndef CLDAQ__TOBJECTSOCKET_HH 00026 #define CLDAQ__TOBJECTSOCKET_HH 00027 00028 #include "Tglobals.h" 00029 00030 00050 class TObjectSocket 00051 { 00052 00053 protected: 00054 enum { tDefaultPortNumber = 18150 }; 00055 00056 protected: 00057 Tint theServerDescriptor; 00058 Tint thePortNumber; 00059 struct sockaddr_in theAddress; 00060 00061 public: 00062 TObjectSocket( Tint portnumber ); 00063 00064 protected: 00065 virtual ~TObjectSocket(); 00066 00067 public: 00068 Tint GetServerDescriptor() const; 00069 Tint GetPortNumber() const; 00070 00071 public: 00072 Tint OpenServer(); 00073 Tint CloseServer(); 00074 00075 }; 00076 00077 inline Tint TObjectSocket::GetServerDescriptor() const 00078 { 00079 return theServerDescriptor; 00080 } 00081 00082 inline Tint TObjectSocket::GetPortNumber() const 00083 { 00084 return thePortNumber; 00085 } 00086 00087 #endif