summaryrefslogtreecommitdiff
path: root/i/simulotron/src/socket/test_socket.cc
diff options
context:
space:
mode:
authorhaller2005-12-03 17:21:26 +0000
committerhaller2005-12-03 17:21:26 +0000
commit6e48eaad66126f83480729a38dca1897f2066c11 (patch)
treef1b57ae0d85fc45a22b4fcf1aaad17a3f8eb5113 /i/simulotron/src/socket/test_socket.cc
parent8becc9cd13865719346d029a263e9ad4143915c6 (diff)
* Ajout de autoheader dans le autogen
* Splittage de Socket
Diffstat (limited to 'i/simulotron/src/socket/test_socket.cc')
-rw-r--r--i/simulotron/src/socket/test_socket.cc9
1 files changed, 5 insertions, 4 deletions
diff --git a/i/simulotron/src/socket/test_socket.cc b/i/simulotron/src/socket/test_socket.cc
index 4a44e6e..66ad30f 100644
--- a/i/simulotron/src/socket/test_socket.cc
+++ b/i/simulotron/src/socket/test_socket.cc
@@ -1,5 +1,6 @@
-#include "socket/socket.hh"
#include "socket/address.hh"
+#include "socket/socket_server.hh"
+#include "socket/socket_client.hh"
#include "utils/errno_exception.hh"
#include <iostream>
@@ -50,11 +51,11 @@ void * testSockServ(void * CaSertARien)
try
{
// Création de la socket serveur;
- Socket sockServ(Address(4242));
+ SocketServer sockServ(Address(4242));
// Mise en écoute du socket serveur
sockServ.listen(12);
// Acceptation d'une connection
- Socket sockFork = sockServ.accept(adr2);
+ SocketClient sockFork(sockServ);
// Reception d'un message
strDest = sockFork.read();
if(strDepart != strDest)
@@ -92,7 +93,7 @@ void * testSockClient(void * CaSertARien)
try
{
// Création de la socket client
- Socket sockClient(adr);
+ SocketClient sockClient(adr);
// Demande de connection
sockClient.connect(Address(std::string("localhost"), 4242));
// Ecriture du client dans le serveur