mirror of
https://github.com/workinghard/Cube4Fun.git
synced 2025-12-13 20:32:09 +00:00
Update CubeNetwork.cpp
This commit is contained in:
@@ -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;
|
||||||
|
|||||||
Reference in New Issue
Block a user