MCPcopy Create free account
hub / github.com/ClassiCube/ClassiCube / HttpConnection_Close

Function HttpConnection_Close

src/Http_Worker.c:156–167  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

154};
155
156static void HttpConnection_Close(struct HttpConnection* conn) {
157 if (conn->sslCtx) {
158 SSL_Free(conn->sslCtx);
159 conn->sslCtx = NULL;
160 }
161
162 if (conn->socket != -1) {
163 Socket_Close(conn->socket);
164 conn->socket = -1;
165 }
166 conn->valid = false;
167}
168
169static void ExtractHostPort(const struct HttpUrl* url, cc_string* host, cc_string* port) {
170 /* address can have the form of either "host" or "host:port" */

Callers 3

HttpConnection_OpenFunction · 0.85
ConnectionPool_OpenFunction · 0.85

Calls 2

SSL_FreeFunction · 0.85
Socket_CloseFunction · 0.70

Tested by

no test coverage detected