head	1.2;
access;
symbols
	tonic_4:1.2
	tonic_3:1.2
	tonic_2:1.2
	demo:1.2.0.2
	design_report:1.2;
locks; strict;
comment	@ * @;


1.2
date	95.12.07.09.24.02;	author hartmans;	state Exp;
branches;
next	1.1;

1.1
date	95.12.05.10.45.32;	author hartmans;	state Exp;
branches;
next	;


desc
@@


1.2
log
@random changes I made and forgot about
@
text
@#ifndef _SERVER_H
#define _SERVER_H

#include "sockstream.h"

class server {
    // abstract: A server encapsulates a network endpoint that accepts
    //    multiple connections from clients (concurrently or otherwise).
    //    Every time it accepts a connection, a new socket is created
    //    to handle the connection.

public:
    server(int port);
    // checks   A socket can be created on the given port.
    // effects  Creates a server that listens on the given port.

    int accept();
    // effects  Blocks until a connection is established with a client.
    //          Returns an sockstream for the new connection.

    void close();
    // modifies "this"
    // effects  No more connection can be accepted.

    int file_descriptor();
    // Return the UNIX file descriptor on which server listens for connections

private:
    server();
    server(server &);
    operator=(server &);
	// disallow operations

    int s;    // the original socket on which server listens for connections
};

#endif /* _SERVER_H */
@


1.1
log
@Include files they forgot
@
text
@d17 1
a17 1
    sockstream accept();
@
