Changeset 230 in flair-src for trunk/lib/FlairCore
- Timestamp:
- Mar 12, 2018, 4:32:00 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/lib/FlairCore/src/TcpSocket.cpp
r213 r230 139 139 // now block with a timeout 140 140 struct timeval tv; 141 if (timeout != 0) { 142 tv.tv_sec = timeout / 1000; // timeout is in ms 143 tv.tv_usec = (timeout % 1000) * 1000; 141 if (timeout != 0) {// timeout is in ns 142 tv.tv_sec = timeout /((Time)1000000000); 143 tv.tv_usec = (timeout%((Time)1000000000))/1000; 144 Printf("%i %i\n",tv.tv_sec,tv.tv_usec); 144 145 } 145 146 fd_set wset; … … 190 191 if (!success) { 191 192 close(socket); 192 // Info("Debug: Connect to %s:%d failed\n", distantAddress.c_str(), 193 // distantPort); 193 //Info("Debug: Connect to %s:%d failed\n", distantAddress.c_str(), distantPort); 194 194 return false; 195 195 } else { … … 197 197 this->distantPort = distantPort; 198 198 this->distantAddress = distantAddress; 199 // Info("Debug: Connect to %s:%d succeeded\n", distantAddress.c_str(), 200 // distantPort); 199 //Info("Debug: Connect to %s:%d succeeded\n", distantAddress.c_str(), distantPort); 201 200 return true; 202 201 }
Note:
See TracChangeset
for help on using the changeset viewer.