mirror of
https://github.com/fastfetch-cli/fastfetch.git
synced 2026-11-06 06:54:21 +01:00
1b7a2c2ed5
MSYS2 version was built for smooth transition from POSIX api to Win32 api. It has almost identical output as Windows native version, except requiring msys runtime dll and being a bit slower.
23 lines
704 B
C
23 lines
704 B
C
#pragma once
|
|
|
|
#ifndef FF_INCLUDED_common_networking
|
|
#define FF_INCLUDED_common_networking
|
|
|
|
#include "util/FFstrbuf.h"
|
|
|
|
#ifdef _WIN32
|
|
typedef uintptr_t FFSockType; //SOCKET, unsigned
|
|
#ifndef INVALID_SOCKET //Don't conflict with <winsock2.h>
|
|
#define INVALID_SOCKET ((uintptr_t)~0)
|
|
#endif
|
|
#else
|
|
typedef int FFSockType; // signed
|
|
#define INVALID_SOCKET (-1)
|
|
#endif
|
|
|
|
FFSockType ffNetworkingSendHttpRequest(const char* host, const char* path, const char* headers, uint32_t timeout);
|
|
bool ffNetworkingRecvHttpResponse(FFSockType sockfd, FFstrbuf* buffer);
|
|
bool ffNetworkingGetHttp(const char* host, const char* path, uint32_t timeout, const char* headers, FFstrbuf* buffer);
|
|
|
|
#endif
|