|
UFO: Alien Invasion
|
cURL header More...
#include "../common/http.h"

Go to the source code of this file.
Functions | |
| void | CL_CancelHTTPDownloads (bool permKill) |
| Cancel all downloads and nuke the queue. | |
| bool | 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. | |
| bool | 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) |
| bool | CL_CheckOrDownloadFile (const char *filenamefilename) |
| void | HTTP_InitStartup (void) |
cURL header
Definition in file cl_http.h.
| void CL_CancelHTTPDownloads | ( | bool | permKill | ) |
Cancel all downloads and nuke the queue.
Definition at line 250 of file cl_http.cpp.
References abortDownloads, CL_CancelHTTPDownloads(), cls, DLQ_STATE_DONE, DLQ_STATE_NOT_STARTED, client_static_t::downloadQueue, client_static_t::downloadServer, handleCount, HTTPDL_ABORT_HARD, HTTPDL_ABORT_SOFT, dlqueue_t::next, and pendingCount.
Referenced by CL_CancelHTTPDownloads(), CL_FinishHTTPDownload(), and CL_RunHTTPDownloads().
| bool CL_CheckOrDownloadFile | ( | const char * | filename | ) |
Definition at line 341 of file cl_http.cpp.
References CL_CheckOrDownloadFile(), CL_QueueHTTPDownload(), Com_Printf(), FS_LoadFile(), MAX_OSPATH, Q_streq, Q_strncpyz(), and Q_strnull().
Referenced by CL_CheckAndQueueDownload(), CL_CheckOrDownloadFile(), CL_DownloadMap(), and CL_DownloadUMPMap().
UFO is exiting or we're changing servers. Clean up.
Definition at line 533 of file cl_http.cpp.
References CL_HTTP_Cleanup(), cls, dlhandle_t::curl, dlhandle_t::file, dlhandle_t::filePath, client_static_t::HTTPHandles, i, Mem_Free, multi, dlhandle_t::queueEntry, Sys_Remove(), and dlhandle_t::tempBuffer.
Referenced by CL_HTTP_Cleanup(), CL_SetHTTPServer(), and CL_Shutdown().
| bool 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 328 of file cl_http.cpp.
References CL_PendingHTTPDownloads(), cls, client_static_t::downloadServer, handleCount, and pendingCount.
Referenced by CL_CanMultiplayerStart(), CL_FinishHTTPDownload(), and CL_PendingHTTPDownloads().
| bool CL_QueueHTTPDownload | ( | const char * | ufoPath | ) |
Called from the precache check to queue a download.
Definition at line 286 of file cl_http.cpp.
References abortDownloads, BASEDIRNAME, cl_http_downloads, cl_http_filelists, CL_QueueHTTPDownload(), cls, Com_GetExtension(), Com_sprintf(), DLQ_STATE_NOT_STARTED, client_static_t::downloadQueue, client_static_t::downloadServer, cvar_t::integer, len, MAX_OSPATH, Mem_AllocType, dlqueue_t::next, pendingCount, Q_strcasecmp, Q_streq, Q_strncpyz(), dlqueue_t::state, and dlqueue_t::ufoPath.
Referenced by CL_CheckAndQueueDownload(), CL_CheckOrDownloadFile(), and CL_QueueHTTPDownload().
Definition at line 602 of file cl_main.cpp.
References ca_connected, cl, CL_CanMultiplayerStart(), CL_Milliseconds(), CL_RequestNextDownload(), CL_ViewLoadMedia(), clc_stringcmd, cls, Com_Printf(), Com_ServerState(), clientBattleScape_t::mapData, clientBattleScape_t::mapTiles, NET_STATE_BEGIN, NET_WriteByte(), NET_WriteMsg(), NET_WriteString(), client_static_t::netStream, S_MumbleLink(), client_static_t::state, SV_GetMapData(), SV_GetMapTiles(), and client_static_t::waitingForStart.
Referenced by CL_FinishHTTPDownload(), CL_Precache_f(), and CL_RequestNextDownload().
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 753 of file cl_http.cpp.
References abortDownloads, CL_CancelHTTPDownloads(), CL_FinishHTTPDownload(), CL_RunHTTPDownloads(), CL_StartNextHTTPDownload(), cls, Com_Printf(), downloadingPK3, client_static_t::downloadServer, handleCount, HTTPDL_ABORT_NONE, multi, and pendingCount.
Referenced by CL_Frame(), and CL_RunHTTPDownloads().
| 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.cpp.
References abortDownloads, CL_HTTP_Cleanup(), CL_SetHTTPServer(), cls, Com_Error(), client_static_t::downloadQueue, client_static_t::downloadServer, ERR_DROP, handleCount, HTTPDL_ABORT_NONE, Mem_Free, multi, dlqueue_t::next, pendingCount, and Q_strncpyz().
Referenced by CL_ConnectionlessPacket(), and CL_SetHTTPServer().
Definition at line 789 of file cl_http.cpp.
References cl_http_downloads, cl_http_filelists, cl_http_max_connections, Cvar_Get(), and HTTP_InitStartup().
Referenced by CL_InitLocal(), and HTTP_InitStartup().