00001 // ===================================================================== 00002 // $Id: TObjectSocket.hh,v 1.2 2003/07/30 16:19:31 goiwai Exp $ 00003 // $Name: CLDAQ-1-08-02 $ 00004 // 00005 // $Log: TObjectSocket.hh,v $ 00006 // Revision 1.2 2003/07/30 16:19:31 goiwai 00007 // ファイルにコミットログをつけることにしました. 00008 // 00009 // ===================================================================== 00010 #ifndef __TOBJECTSOCKET_HH 00011 #define __TOBJECTSOCKET_HH 00012 00013 #include "Tglobals.h" 00014 00015 class TObjectSocket 00016 { 00017 00018 protected: 00019 enum { tDefaultPortNumber = 18150 }; 00020 00021 protected: 00022 Tint theServerDescriptor; 00023 Tint thePortNumber; 00024 struct sockaddr_in theAddress; 00025 00026 public: 00027 TObjectSocket( Tint portnumber ); 00028 00029 protected: 00030 virtual ~TObjectSocket(); 00031 00032 public: 00033 Tint GetServerDescriptor() const; 00034 Tint GetPortNumber() const; 00035 00036 public: 00037 Tint OpenServer(); 00038 Tint CloseServer(); 00039 00040 }; 00041 00042 inline Tint TObjectSocket::GetServerDescriptor() const 00043 { 00044 return( theServerDescriptor ); 00045 } 00046 00047 inline Tint TObjectSocket::GetPortNumber() const 00048 { 00049 return( thePortNumber ); 00050 } 00051 00052 #endif