Update CubeNetwork.cpp

This commit is contained in:
workinghard
2015-06-29 13:37:13 -07:00
parent dc5ab9bf99
commit 48814f7b64

View File

@@ -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<const char*>(ipAddr));
Poco::UInt16 portNr = port;
//std::string ipAddr_str(reinterpret_cast<const char*>(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;