// =====================================================================
//  $Id: TObjectSocket.hh,v 1.1.1.1 2003/06/27 02:56:41 goiwai Exp $
//  $Name: CLDAQ-1-06-02 $
// =====================================================================
#ifndef __TOBJECTSOCKET_HH
#define __TOBJECTSOCKET_HH

#include "Tglobals.h"

class TObjectSocket
{

  protected:
    enum { tDefaultPortNumber = 18150 };

  protected:
    Tint theServerDescriptor;
    Tint thePortNumber;
    struct sockaddr_in theAddress;

  public:
    TObjectSocket( Tint portnumber );

  protected:
    virtual ~TObjectSocket();

  public:
    Tint GetServerDescriptor() const;
    Tint GetPortNumber() const;

  public:
    Tint OpenServer();
    Tint CloseServer();

};

inline Tint TObjectSocket::GetServerDescriptor() const
{
  return( theServerDescriptor );
}

inline Tint TObjectSocket::GetPortNumber() const
{
  return( thePortNumber );
}

#endif
