Changeset 241 in flair-src
- Timestamp:
- May 15, 2018, 5:50:30 PM (7 years ago)
- Location:
- trunk/lib/FlairCore/src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/lib/FlairCore/src/TcpSocket.cpp
r238 r241 136 136 sockaddr_in serv_addr; 137 137 serv_addr.sin_family = AF_INET; 138 serv_addr.sin_port = htons(short( distantPort));139 if (inet_pton(AF_INET, distantAddress.c_str(), &serv_addr.sin_addr) <= 0) {140 printf("incorrect network address.");138 serv_addr.sin_port = htons(short(_distantPort)); 139 if (inet_pton(AF_INET, _distantAddress.c_str(), &serv_addr.sin_addr) <= 0) { 140 Warn("incorrect network address.\n"); 141 141 close(socket); 142 142 socket=0; … … 144 144 } 145 145 memset(&(serv_addr.sin_zero), '\0', 8); 146 distantPort=_distantPort; 147 distantAddress=_distantAddress; 146 148 147 149 // go non blocking -
trunk/lib/FlairCore/src/UdtSocket.cpp
r15 r241 95 95 serv_addr.sin_port = htons(short(port)); 96 96 if (inet_pton(AF_INET, distantAddress.c_str(), &serv_addr.sin_addr) <= 0) { 97 printf("incorrect network address.");97 Warn("incorrect network address.\n"); 98 98 success = false; 99 99 }
Note:
See TracChangeset
for help on using the changeset viewer.