]> git.llucax.com Git - z.facultad/75.42/plaqui.git/blobdiff - Server/tests/client_test.cpp
- Se agrega una funcion templateada to() para convertir de un tipo de dato
[z.facultad/75.42/plaqui.git] / Server / tests / client_test.cpp
index c5fc75f556f9c80d36eea4081eddf7716675eba7..88027e16442410bf37b1a72546f2733151c13d37 100644 (file)
@@ -28,7 +28,6 @@
 #include "plaqui/server/controlclient.h"
 #include "plaqui/server/string.h"
 #include <iostream>
 #include "plaqui/server/controlclient.h"
 #include "plaqui/server/string.h"
 #include <iostream>
-#include <sstream>
 #include <exception>
 #include <vector>
 
 #include <exception>
 #include <vector>
 
@@ -76,11 +75,10 @@ int main(int argc, char* argv[]) {
                // Obtengo host.
                host = argv[1];
        }
                // Obtengo host.
                host = argv[1];
        }
+       // Obtengo puerto.
        Connection::Port port = 7522;
        if (argc > 2) {
        Connection::Port port = 7522;
        if (argc > 2) {
-               // Obtengo puerto.
-               stringstream str(argv[2]);
-               str >> port;
+               to(argv[2], port);
        }
 
        // Inicializa threads.
        }
 
        // Inicializa threads.