| 144 | } |
| 145 | |
| 146 | void http_client::on_destroy(http_stream* conn) |
| 147 | { |
| 148 | printf("http_stream will be deleted!\r\n"); |
| 149 | delete conn; |
| 150 | __destroy++; |
| 151 | |
| 152 | if (--__aio_refer == 0) { |
| 153 | printf("%s: stop aio engine now!\r\n", __FUNCTION__); |
| 154 | handle_.stop(); |
| 155 | } |
| 156 | |
| 157 | if (--refered_ == 0) { |
| 158 | printf("============== delete http_client =============\r\n"); |
| 159 | delete this; |
| 160 | } |
| 161 | } |
| 162 | |
| 163 | void http_client::on_connect(http_stream& conn) |
| 164 | { |