/* 
    TowBowlTactics: Strategy game for X11

    Copyright (C) 2002 Pascal Bourut (toweld@rocketmail.com)

    Network part from grrrreg (greg@doodoo.darktech.org)

    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program; if not, write to the Free Software
    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/

#ifndef NET_SERVER_H
#define NET_SERVER_H

#include "Network.h"

class NetServer : public Network {

 public:
  NetServer(void); // Constructeur qui créé la conn avec un port par défaut
  NetServer(Uint16); // Constructeur qui créé la conn avec le port spécifié
  ~NetServer(void);
  //Network::send_msg;
  //Network::rcv_msg;
  int open(void); // Ouverture SERVER, sur le port par défaut. Retourne 0 si raté, 1 si réussi
  int open(Uint16); // Ouverture SERVER, on donne le port d'écoute. Retourne 0 si raté, 1 si réussi
  int wait_client(); // On attend que le client se connecte. Renvoie 1 si oui.
  int close(void); // Pas implémenté
  bool is_client_connected(void);
  bool is_opened(void);
 private:
	 bool client_connected;
	bool opened;
};


#endif
