#include <Socket.h>
Inheritance diagram for Socket:
Public Member Functions | |
Socket () | |
Constructeur vide. | |
Socket (int socket) | |
Constructeur par recopie. | |
Socket (unsigned int port) throw (SocketException) | |
Construit une socket écoutant toutes les adresses locales sur port (Virtuel) Typiquement utilisé par un serveur. | |
Socket (string ad, unsigned int port) throw (SocketException) | |
Construit une socket se "connectant" à l'adresse ad sur port (Virtuel) Typiquement utilisé par un client. | |
Socket (Socket *s) | |
Constructeur par recopie à partir d'un Socket*. | |
Socket (const Socket &s) | |
Constructeur par recopie. | |
void | operator= (const Socket &s) |
Surcharge de = (Contructeur par recopie). | |
virtual | ~Socket () |
Destructeur (Virtuel). | |
virtual Socket * | Accept ()=0 throw (SocketException) |
Cette méthode attend une connexion (TCP UNIQUEMENT!) de la part d'un client et retourne un pointeur sur Socket (Virtuel). | |
virtual void | Envoyer (string msg) const=0 throw (SocketException) |
Envoie le message msg à l'extrèmité de la socket (Virtuel). | |
virtual string | Ecouter ()=0 throw (SocketException) |
Attend et renvoit le message reçu de l'extrémité de la socket (Virtuel). | |
Protected Member Functions | |
void | SetCryptage () |
Configure le pointeur sur la classe Cryptage [Design Pattern Stratégie] => Pour changer la politique de cryptage de la socket, simplement changer l'héritage. | |
Protected Attributes | |
int | mSocket |
Descripteur de la socket. | |
Cryptage * | mCryptage |
Pointeur sur la classe gérant le cryptage des communications. |
Definition at line 49 of file Socket.h.
Socket::Socket | ( | ) | [inline] |
Constructeur vide.
Definition at line 55 of file Socket.h.
References SetCryptage().
00055 { SetCryptage(); }
Here is the call graph for this function:
Socket::Socket | ( | int | socket | ) | [inline] |
Constructeur par recopie.
(Virtuel)
socket | Attention l'entier doit être une socket... |
Definition at line 62 of file Socket.h.
References SetCryptage().
00062 { SetCryptage(); }
Here is the call graph for this function:
Socket::Socket | ( | unsigned int | port | ) | throw (SocketException) [inline] |
Construit une socket écoutant toutes les adresses locales sur port (Virtuel) Typiquement utilisé par un serveur.
..[Bind + Listen (en TCP seulement)]
port |
Definition at line 70 of file Socket.h.
References SetCryptage().
00070 { SetCryptage(); }
Here is the call graph for this function:
Socket::Socket | ( | string | ad, | |
unsigned int | port | |||
) | throw (SocketException) [inline] |
Construit une socket se "connectant" à l'adresse ad sur port (Virtuel) Typiquement utilisé par un client.
..
ad | ||
port |
Definition at line 79 of file Socket.h.
References SetCryptage().
00079 { SetCryptage(); }
Here is the call graph for this function:
Socket::Socket | ( | Socket * | s | ) | [inline] |
Socket::Socket | ( | const Socket & | s | ) | [inline] |
virtual Socket::~Socket | ( | ) | [inline, virtual] |
void Socket::operator= | ( | const Socket & | s | ) | [inline] |
virtual Socket* Socket::Accept | ( | ) | throw (SocketException) [pure virtual] |
Cette méthode attend une connexion (TCP UNIQUEMENT!) de la part d'un client et retourne un pointeur sur Socket (Virtuel).
Implemented in SocketTCP, and SocketUDP.
Referenced by ServeurPrincipal::AttendreClient(), ServeurJeu::AttendreClient(), and Test::ServeurTCP().
virtual void Socket::Envoyer | ( | string | msg | ) | const throw (SocketException) [pure virtual] |
Envoie le message msg à l'extrèmité de la socket (Virtuel).
msg |
Implemented in SocketTCP, and SocketUDP.
Referenced by TraitementClient::Authentification(), ClientSP::ChoisirPartie(), Test::ClientTCP(), Test::ClientUDP(), ClientSP::CreationPartie(), TraitementClient::CreerOuRejoindrePartie(), TraitementClient::EnvoyerListePartie(), TraitementClient::EnvoyerListeScore(), TraitementComServeurPrincipal::HandShake(), TraitementComServeurPrincipal::IndiquerAttenteJoueurs(), TraitementComServeurPrincipal::IndiquerConnexions(), TraitementComServeurPrincipal::IndiquerDebutPartie(), TraitementComServeurPrincipal::IndiquerFinPartie(), TraitementComServeurPrincipal::IndiquerStatusPartie(), ClientSP::ListerPartie(), ClientSP::ListerScore(), ClientSP::RegLogin(), ClientSP::RejoindrePartie(), ClientSP::SendHello(), ClientSJ::SendHello(), ClientSP::SendLogin(), ClientSJ::SendLogin(), ClientSJ::SendRole(), Test::ServeurTCP(), Test::ServeurUDP(), TraitementComServeurJeu::Traitement(), TraitementClient::Traitement(), AffichageGrille::Traitement(), TraitementJoueur::TraitementDeplacement(), ClientSJ::TraitementDeplacement(), TraitementComServeurJeu::TraiterAttenteJoueur(), TraitementComServeurJeu::TraiterHello(), TraitementComServeurJeu::TraiterReceptionStatus(), TraitementComServeurJeu::TraiterServeurJeuPret(), TraitementJoueur::WaitForHello(), TraitementClient::WaitForHello(), TraitementJoueur::WaitForLogin(), TraitementJoueur::WaitForPlayers(), and TraitementJoueur::WaitForRole().
virtual string Socket::Ecouter | ( | ) | throw (SocketException) [pure virtual] |
Attend et renvoit le message reçu de l'extrémité de la socket (Virtuel).
Implemented in SocketTCP, and SocketUDP.
Referenced by TraitementClient::Authentification(), ClientSP::ChoisirPartie(), Test::ClientTCP(), Test::ClientUDP(), ClientSP::CreationPartie(), TraitementClient::CreerOuRejoindrePartie(), TraitementComServeurPrincipal::HandShake(), TraitementComServeurPrincipal::IndiquerAttenteJoueurs(), TraitementComServeurPrincipal::IndiquerDebutPartie(), ClientSP::ListerPartie(), ClientSP::ListerScore(), ClientSP::RegLogin(), ClientSP::RejoindrePartie(), ClientSP::SendHello(), ClientSJ::SendHello(), ClientSP::SendLogin(), ClientSJ::SendLogin(), ClientSJ::SendRole(), Test::ServeurTCP(), Test::ServeurUDP(), TraitementComServeurJeu::Traitement(), TraitementClient::Traitement(), AffichageGrille::Traitement(), TraitementJoueur::TraitementDeplacement(), ClientSJ::TraitementDeplacement(), TraitementJoueur::WaitForHello(), TraitementClient::WaitForHello(), TraitementJoueur::WaitForLogin(), and TraitementJoueur::WaitForRole().
void Socket::SetCryptage | ( | ) | [inline, protected] |
Configure le pointeur sur la classe Cryptage [Design Pattern Stratégie] => Pour changer la politique de cryptage de la socket, simplement changer l'héritage.
..
Definition at line 151 of file Socket.h.
References mCryptage, and Cryptage::SetCle().
Referenced by Socket().
00151 { 00152 //mCryptage=new EnClair(); 00153 mCryptage=new Vigenere(); 00154 mCryptage->SetCle("dbzUICSibsFCssqE349Dcs1P5zs491674c6z4c8zHVedz"); 00155 }
Here is the call graph for this function:
int Socket::mSocket [protected] |
Descripteur de la socket.
Definition at line 141 of file Socket.h.
Referenced by SocketTCP::Accept(), SocketUDP::Ecouter(), SocketTCP::Ecouter(), SocketUDP::operator=(), SocketTCP::operator=(), operator=(), Socket(), SocketTCP::SocketTCP(), SocketUDP::SocketUDP(), SocketTCP::~SocketTCP(), and SocketUDP::~SocketUDP().
Cryptage* Socket::mCryptage [protected] |
Pointeur sur la classe gérant le cryptage des communications.
Definition at line 146 of file Socket.h.
Referenced by SocketUDP::Ecouter(), SocketTCP::Ecouter(), SocketTCP::operator=(), operator=(), SetCryptage(), Socket(), SocketTCP::SocketTCP(), and ~Socket().