Changes in benchmark/io/http/socket.cfa [c4b10e2:86c12d65]
- File:
-
- 1 edited
-
benchmark/io/http/socket.cfa (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
benchmark/io/http/socket.cfa
rc4b10e2 r86c12d65 31 31 } 32 32 33 int value = 1; 34 if (setsockopt(sockfd, SOL_SOCKET, SO_REUSEADDR, &value, sizeof(int)) < 0) 35 abort( "setsockopt error: (%d) %s\n", (int)errno, strerror(errno) ); 33 if(options.socket.onereuse || options.socket.manyreuse) { 34 int value = 1; 35 // if (setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, (const void*)&on, sizeof(on))) 36 // abort( "setsockopt SO_REUSEADDR error: (%d) %s\n", (int)errno, strerror(errno) ); 37 if (setsockopt(sockfd, SOL_SOCKET, SO_REUSEPORT, &value, sizeof(int)) < 0) 38 abort( "setsockopt SO_REUSEPORT error: (%d) %s\n", (int)errno, strerror(errno) ); 39 } 36 40 37 41 int ret = 0;
Note:
See TracChangeset
for help on using the changeset viewer.