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) { bool CubeNetwork::openConnection(const char* ipAddr, unsigned int port) {
connectionEstablished = false; connectionEstablished = false;
printf("Try to open the connection\n"); printf("Try to open the connection\n");
std::string ipAddr_str(reinterpret_cast<const char*>(ipAddr)); //std::string ipAddr_str(reinterpret_cast<const char*>(ipAddr));
Poco::UInt16 portNr = port; //Poco::UInt16 portNr = port;
try { 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(); msgOpenFrameStream();
streamMode = 1; streamMode = 1;