这篇教程C++ socket_destroy函数代码示例写得很实用,希望能帮到您。
本文整理汇总了C++中socket_destroy函数的典型用法代码示例。如果您正苦于以下问题:C++ socket_destroy函数的具体用法?C++ socket_destroy怎么用?C++ socket_destroy使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。 在下文中一共展示了socket_destroy函数的26个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。 示例1: web_server_stopvoid web_server_stop(struct web_server_t* ws) { mutex_lock(ws->mutex); if (ws->is_running) { ws->is_running = false; if (ws->socket_ipv4 != NULL) { socket_destroy(ws->socket_ipv4); ws->socket_ipv4 = NULL; } if (ws->socket_ipv6 != NULL) { socket_destroy(ws->socket_ipv6); ws->socket_ipv6 = NULL; } while (ws->connection_count > 0) { mutex_unlock(ws->mutex); socket_destroy(ws->connections[0].socket); web_server_connection_destroy(ws->connections[0].web_connection); mutex_lock(ws->mutex); } log_message(LOG_INFO, "Server stopped"); } else log_message(LOG_ERROR, "Cannot stop: Server is not running"); mutex_unlock(ws->mutex);}
开发者ID:Boozekashi,项目名称:libairfloat,代码行数:32,
|