mirror of
https://github.com/wiidev/usbloadergx.git
synced 2024-11-15 16:05:10 +01:00
0e7d37b18b
*Fixed freeze in theme menu when its empty *Optimized the game list loading on fat/ntfs/ext. This should speed up the loading process. *Added cache of game titles. This will speed up the startup after the cache file is written (in other words on second start of this rev). A TitlesCache.bin will be created in the same path as the wiitdb.xml for this. This should especial speed up the startup of fat/ntfs/ext partitions by a lot if no sub folders with the game titles are used, like GAMEID.wbfs only. That must have been painfully slow before on a lot of games. Should be at about the same speed as with sub folders now. I would still recommend to use sub folders. *Removed wiilight (disc slot) blinking when switching USB port on Hermes cIOSes (thanks rodries) *Added the ehcmodule sources from rodries to the branches *Updated language files
33 lines
823 B
C
33 lines
823 B
C
#ifndef _HTTP_H_
|
|
#define _HTTP_H_
|
|
|
|
#include <gctypes.h>
|
|
#define TCP_CONNECT_TIMEOUT 10000
|
|
#define TCP_BLOCK_SIZE (8 * 1024)
|
|
#define TCP_BLOCK_RECV_TIMEOUT 10000
|
|
#define TCP_BLOCK_SEND_TIMEOUT 10000
|
|
|
|
s32 tcp_socket (void);
|
|
s32 tcp_connect (char *host, const u16 port);
|
|
|
|
char * tcp_readln (const s32 s, const u16 max_length, const u64 start_time, const u32 timeout);
|
|
bool tcp_read (const s32 s, u8 **buffer, const u32 length);
|
|
bool tcp_write (const s32 s, const u8 *buffer, const u32 length);
|
|
|
|
#define HTTP_TIMEOUT 300000
|
|
|
|
typedef enum {
|
|
HTTPR_OK,
|
|
HTTPR_ERR_CONNECT,
|
|
HTTPR_ERR_REQUEST,
|
|
HTTPR_ERR_STATUS,
|
|
HTTPR_ERR_TOOBIG,
|
|
HTTPR_ERR_RECEIVE
|
|
} http_res;
|
|
|
|
bool http_request (const char *url, const u32 max_size);
|
|
bool http_get_result (u32 *http_status, u8 **content, u32 *length);
|
|
|
|
#endif
|
|
|