00001 // ===================================================================== 00002 // $Id: TObjectSocket.hh,v 1.1.1.1 2003/06/27 02:56:41 goiwai Exp $ 00003 // $Name: CLDAQ-1-06-00 $ 00004 // ===================================================================== 00005 #ifndef __TOBJECTSOCKET_HH 00006 #define __TOBJECTSOCKET_HH 00007 00008 #include "Tglobals.h" 00009 00010 class TObjectSocket 00011 { 00012 00013 protected: 00014 enum { tDefaultPortNumber = 18150 }; 00015 00016 protected: 00017 Tint theServerDescriptor; 00018 Tint thePortNumber; 00019 struct sockaddr_in theAddress; 00020 00021 public: 00022 TObjectSocket( Tint portnumber ); 00023 00024 protected: 00025 virtual ~TObjectSocket(); 00026 00027 public: 00028 Tint GetServerDescriptor() const; 00029 Tint GetPortNumber() const; 00030 00031 public: 00032 Tint OpenServer(); 00033 Tint CloseServer(); 00034 00035 }; 00036 00037 inline Tint TObjectSocket::GetServerDescriptor() const 00038 { 00039 return( theServerDescriptor ); 00040 } 00041 00042 inline Tint TObjectSocket::GetPortNumber() const 00043 { 00044 return( thePortNumber ); 00045 } 00046 00047 #endif