Changeset 86c12d65 for benchmark/io/http/socket.cfa
- Timestamp:
- Jun 6, 2022, 9:04:31 PM (10 months ago)
- Branches:
- master, pthread-emulation, qualifiedEnum
- Children:
- b6e0b61
- Parents:
- ac1aba4b
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
benchmark/io/http/socket.cfa
rac1aba4b 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.