/***************************************************************
* PrServerSocket.h
*
* This class provides Socket Server methods.
*
****************************************************************/

/*
* modification history
*----------------------
*
* 02/12/98: K.C. Chang: created.
*/

#ifndef _PrServerSocket_h
#define _PrServerSocket_h

#include "PrGlobalDefn.h"

#define PR_SERVERSOCKET_OK    1
#define PR_SERVERSOCKET_ERROR 0

class PrSocket;

class PrServerSocket
{
public:
   PrServerSocket(int portNum);
   ~PrServerSocket();

   int flag() { return flag_; }

   PrSocket *accept();
   void close();

private:
   int flag_;
   int socketFD_;
   PrSocket *socket_;

   int Init(int portNum);

   // copy is not allowed
   PrServerSocket(const PrServerSocket &) {}
};

#endif // _PrServerSocket_h



