Skip to content

Commit 3617e66

Browse files
author
fenglala
committed
SO_REUSEPORT
1 parent 07d9898 commit 3617e66

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

DogcomSocket.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,10 +98,12 @@ void DogcomSocket::init(){
9898
throw DogcomSocketException(DogcomError::SET_SOCK_OPT_REUSE,r);
9999
}
100100

101+
#ifdef SO_REUSEPORT
101102
if ((r = setsockopt(sockfd, SOL_SOCKET, SO_REUSEPORT, (char *) &optval, sizeof(optval))) < 0) {
102103
throw DogcomSocketException(DogcomError::SET_SOCK_OPT_REUSE,r);
103104
}
104105
#endif
106+
#endif
105107
}
106108

107109
int DogcomSocket::write(const char *buf, int len) {

0 commit comments

Comments
 (0)