/* $Id: ServerSocket.h,v 1.6 1999/10/22 20:06:58 v2kea318 Exp $

$Log: ServerSocket.h,v $
 * Revision 1.6  1999/10/22  20:06:58  v2kea318
 * Undo revision 1.4.  There is no need for any value other than INADDR_ANY.
 *
 * Revision 1.5  1999/09/21  19:55:07  v2kea318
 * Added an optional bool flag to the accept method, controlling whether the
 * client socket is built thread-safe.
 *
 * Revision 1.4  1999/07/09  18:26:29  v2kea318
 * Added an optional parameter to the constructor which specifies the address
 * to which the socket is bound.  This parameter defaults to INADDR_ANY.
 *
 * Revision 1.3  1999/04/28  19:02:09  v2kea318
 * Changed the constructor to only accept a port.  The host name will always
 * be the local host name.
 *
 * Revision 1.2  1999/04/23  20:12:05  v2kea318
 * *** empty log message ***
 *
 * Revision 1.1  1999/04/23  18:55:16  v2kea318
 * Initial revision
 *
***************************************************************************

Define a class to represent a server socket, i.e., a socket which
accepts connections and creates new sockets.  The socket host name
is taken to be the local host name.

***************************************************************************/

#ifndef SERVER_SOCKET_MYLIBS_H
#define SERVER_SOCKET_MYLIBS_H

#include "SocketBase.h"
#include "Socket.h"
#include "pointer.h"

class ServerSocket : public SocketBase {
public:
  // constructor.
  ServerSocket(int p = 0);
  
public:
  /* Accept a connection.  The tsafe parameter controls whether the Pointer
     object is to be created in a thread-safe way or not.  It will default
     to false. */
  Pointer<Socket> accept(bool tsafe = false);
};

#endif

