From 48814f7b64a815d5b2d58b3cb14248f3e000c2b3 Mon Sep 17 00:00:00 2001 From: workinghard Date: Mon, 29 Jun 2015 13:37:13 -0700 Subject: [PATCH] Update CubeNetwork.cpp --- Cube4Fun/src/CubeNetwork.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Cube4Fun/src/CubeNetwork.cpp b/Cube4Fun/src/CubeNetwork.cpp index 219a2ff..4f562be 100644 --- a/Cube4Fun/src/CubeNetwork.cpp +++ b/Cube4Fun/src/CubeNetwork.cpp @@ -302,10 +302,12 @@ void CubeNetwork::updateFrame(const unsigned char * frameSequence, unsigned int bool CubeNetwork::openConnection(const char* ipAddr, unsigned int port) { connectionEstablished = false; printf("Try to open the connection\n"); - std::string ipAddr_str(reinterpret_cast(ipAddr)); - Poco::UInt16 portNr = port; + //std::string ipAddr_str(reinterpret_cast(ipAddr)); + //Poco::UInt16 portNr = port; try { - ds.connect(SocketAddress(ipAddr_str, portNr), Poco::Timespan(10, 0)); + connector = new TCPConnector(); + stream = connector->connect(ipAddr, port, 10); //Connect with 10 seconds timout + //ds.connect(SocketAddress(ipAddr_str, portNr), Poco::Timespan(10, 0)); msgOpenFrameStream(); streamMode = 1;