summaryrefslogtreecommitdiff
path: root/i/simulotron/src/socket/test_socket.cc
diff options
context:
space:
mode:
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