| 72 | // ---------------------------------------------------------------------------------------- |
| 73 | |
| 74 | void server:: |
| 75 | set_max_connections ( |
| 76 | int max |
| 77 | ) |
| 78 | { |
| 79 | // make sure requires clause is not broken |
| 80 | DLIB_CASSERT( |
| 81 | max >= 0 , |
| 82 | "\tvoid server::set_max_connections" |
| 83 | << "\n\tmax == " << max |
| 84 | << "\n\tthis: " << this |
| 85 | ); |
| 86 | |
| 87 | max_connections_mutex.lock(); |
| 88 | max_connections = max; |
| 89 | max_connections_mutex.unlock(); |
| 90 | } |
| 91 | |
| 92 | // ---------------------------------------------------------------------------------------- |
| 93 | |