| 737 | } |
| 738 | |
| 739 | static void http_send_too_busy_reply(int fd) |
| 740 | { |
| 741 | char buffer[300]; |
| 742 | int len = snprintf(buffer, sizeof(buffer), |
| 743 | "HTTP/1.0 200 Server too busy\r\n" |
| 744 | "Content-type: text/html\r\n" |
| 745 | "\r\n" |
| 746 | "<html><head><title>Too busy</title></head><body>\r\n" |
| 747 | "<p>The server is too busy to serve your request at this time.</p>\r\n" |
| 748 | "<p>The number of current connections is %d, and this exceeds the limit of %d.</p>\r\n" |
| 749 | "</body></html>\r\n", |
| 750 | nb_connections, nb_max_connections); |
| 751 | send(fd, buffer, len, 0); |
| 752 | } |
| 753 | |
| 754 | |
| 755 | static void new_connection(int server_fd, int is_rtsp) |