mirror of
https://github.com/fastfetch-cli/fastfetch.git
synced 2026-09-13 02:42:09 +02:00
29 lines
653 B
C
29 lines
653 B
C
#pragma once
|
|
|
|
#include "common/thread.h"
|
|
#include "util/FFstrbuf.h"
|
|
|
|
#ifdef _WIN32
|
|
#include <minwindef.h>
|
|
#endif
|
|
|
|
typedef struct FFNetworkingState {
|
|
#ifdef _WIN32
|
|
uintptr_t sockfd;
|
|
OVERLAPPED overlapped;
|
|
#else
|
|
int sockfd;
|
|
FFstrbuf host;
|
|
FFstrbuf command;
|
|
|
|
#ifdef FF_HAVE_THREADS
|
|
FFThreadType thread;
|
|
#endif
|
|
#endif
|
|
|
|
uint32_t timeout;
|
|
} FFNetworkingState;
|
|
|
|
const char* ffNetworkingSendHttpRequest(FFNetworkingState* state, const char* host, const char* path, const char* headers);
|
|
const char* ffNetworkingRecvHttpResponse(FFNetworkingState* state, FFstrbuf* buffer);
|