summaryrefslogtreecommitdiff
path: root/util/sock.h
diff options
context:
space:
mode:
Diffstat (limited to 'util/sock.h')
-rw-r--r--util/sock.h16
1 files changed, 8 insertions, 8 deletions
diff --git a/util/sock.h b/util/sock.h
index 1e101b619ac..58913027fcd 100644
--- a/util/sock.h
+++ b/util/sock.h
@@ -58,11 +58,11 @@ inline void disableNagle(int sock) {
#endif
if( setsockopt(sock, level, TCP_NODELAY, (char *) &x, sizeof(x)) )
- cout << "ERROR: disableNagle failed" << endl;
+ log() << "ERROR: disableNagle failed" << endl;
}
inline void prebindOptions( int sock ){
- cout << "doing prebind option" << endl;
+ DEV log() << "doing prebind option" << endl;
int x = 1;
if ( setsockopt( sock , SOL_SOCKET, SO_REUSEADDR, &x, sizeof(x)) < 0 )
cout << "Failed to set socket opt, SO_REUSEADDR" << endl;
@@ -71,12 +71,12 @@ inline void prebindOptions( int sock ){
#endif
-// .empty() if err
-inline string hostbyname_nonreentrant(const char *hostname) {
- struct hostent *h;
- h = gethostbyname(hostname);
- if( h == 0 ) return "";
- return inet_ntoa( *((struct in_addr *)(h->h_addr)) );
+// .empty() if err
+inline string hostbyname_nonreentrant(const char *hostname) {
+ struct hostent *h;
+ h = gethostbyname(hostname);
+ if( h == 0 ) return "";
+ return inet_ntoa( *((struct in_addr *)(h->h_addr)) );
}
struct SockAddr {