cURL header More...
#include "../common/http.h"
Go to the source code of this file.
Functions | |
void | CL_CancelHTTPDownloads (qboolean permKill) |
Cancel all downloads and nuke the queue. | |
qboolean | CL_QueueHTTPDownload (const char *ufoPath) |
Called from the precache check to queue a download. | |
void | CL_RunHTTPDownloads (void) |
This calls curl_multi_perform do actually do stuff. Called every frame while connecting to minimise latency. Also starts new downloads if we're not doing the maximum already. | |
qboolean | CL_PendingHTTPDownloads (void) |
See if we're still busy with some downloads. Called by precacher just before it loads the map since we could be downloading the map. If we're busy still, it'll wait and CL_FinishHTTPDownload will pick up from where it left. | |
void | CL_SetHTTPServer (const char *URL) |
A new server is specified, so we nuke all our state. | |
void | CL_HTTP_Cleanup (void) |
UFO is exiting or we're changing servers. Clean up. | |
void | CL_RequestNextDownload (void) |
qboolean | CL_CheckOrDownloadFile (const char *filename) |
void | HTTP_InitStartup (void) |
cURL header
Definition in file cl_http.h.
void CL_CancelHTTPDownloads | ( | qboolean | permKill | ) |
Cancel all downloads and nuke the queue.
Definition at line 265 of file cl_http.c.
References abortDownloads, cls, DLQ_STATE_DONE, DLQ_STATE_NOT_STARTED, client_static_s::downloadQueue, client_static_s::downloadServer, handleCount, HTTPDL_ABORT_HARD, HTTPDL_ABORT_SOFT, dlqueue_s::next, pendingCount, and dlqueue_s::state.
Referenced by CL_FinishHTTPDownload(), and CL_RunHTTPDownloads().
qboolean CL_CheckOrDownloadFile | ( | const char * | filename | ) |
Definition at line 369 of file cl_http.c.
References CL_QueueHTTPDownload(), Com_Printf(), FS_LoadFile(), MAX_OSPATH, Q_strncpyz(), qfalse, and qtrue.
Referenced by CL_CheckAndQueueDownload(), CL_DownloadMap(), and CL_DownloadUMPMap().
void CL_HTTP_Cleanup | ( | void | ) |
UFO is exiting or we're changing servers. Clean up.
Definition at line 565 of file cl_http.c.
References cls, dlhandle_s::curl, dlhandle_s::file, dlhandle_s::filePath, client_static_s::HTTPHandles, i, Mem_Free, multi, and dlhandle_s::tempBuffer.
Referenced by CL_SetHTTPServer(), and CL_Shutdown().
qboolean CL_PendingHTTPDownloads | ( | void | ) |
See if we're still busy with some downloads. Called by precacher just before it loads the map since we could be downloading the map. If we're busy still, it'll wait and CL_FinishHTTPDownload will pick up from where it left.
Definition at line 356 of file cl_http.c.
References cls, client_static_s::downloadServer, handleCount, pendingCount, and qfalse.
Referenced by CL_CanMultiplayerStart(), and CL_FinishHTTPDownload().
qboolean CL_QueueHTTPDownload | ( | const char * | ufoPath | ) |
Called from the precache check to queue a download.
Definition at line 308 of file cl_http.c.
References abortDownloads, BASEDIRNAME, CL_QueueHTTPDownload(), cls, Com_GetExtension(), Com_sprintf(), DLQ_STATE_NOT_STARTED, client_static_s::downloadQueue, client_static_s::downloadServer, cvar_s::integer, len, MAX_OSPATH, Mem_Alloc, dlqueue_s::next, pendingCount, Q_strcasecmp, Q_strncpyz(), qfalse, qtrue, dlqueue_s::state, and dlqueue_s::ufoPath.
Referenced by CL_CheckAndQueueDownload(), CL_CheckOrDownloadFile(), and CL_QueueHTTPDownload().
void CL_RequestNextDownload | ( | void | ) |
Definition at line 561 of file cl_main.c.
References ca_connected, cl, CL_CanMultiplayerStart(), CL_Milliseconds(), CL_ViewLoadMedia(), clc_stringcmd, Com_Printf(), Com_ServerState(), NET_WriteByte(), NET_WriteMsg(), NET_WriteString(), client_static_s::netStream, new_dbuffer(), client_static_s::state, SV_GetMapData(), SV_GetMapTiles(), and client_static_s::waitingForStart.
Referenced by CL_FinishHTTPDownload(), and CL_Precache_f().
void CL_RunHTTPDownloads | ( | void | ) |
This calls curl_multi_perform do actually do stuff. Called every frame while connecting to minimise latency. Also starts new downloads if we're not doing the maximum already.
Definition at line 793 of file cl_http.c.
References abortDownloads, CL_CancelHTTPDownloads(), CL_FinishHTTPDownload(), CL_StartNextHTTPDownload(), cls, Com_Printf(), downloadingPK3, client_static_s::downloadServer, handleCount, HTTPDL_ABORT_NONE, multi, pendingCount, and qtrue.
Referenced by CL_Frame().
void CL_SetHTTPServer | ( | const char * | URL | ) |
A new server is specified, so we nuke all our state.
Definition at line 225 of file cl_http.c.
References abortDownloads, CL_HTTP_Cleanup(), cls, Com_Error(), client_static_s::downloadQueue, client_static_s::downloadServer, ERR_DROP, handleCount, HTTPDL_ABORT_NONE, Mem_Free, multi, dlqueue_s::next, pendingCount, and Q_strncpyz().
Referenced by CL_ConnectionlessPacket().
void HTTP_InitStartup | ( | void | ) |