forked from mhssamadani/Autolykos2_AMD_Miner
-
Notifications
You must be signed in to change notification settings - Fork 0
/
request.h
executable file
·58 lines (46 loc) · 1.06 KB
/
request.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
#ifndef REQUEST_H
#define REQUEST_H
/*******************************************************************************
REQUEST -- Http requests handling
*******************************************************************************/
#include "definitions.h"
#include "jsmn.h"
#include <curl/curl.h>
#include <atomic>
#include <mutex>
// write function for CURL http GET
size_t WriteFunc(
void * ptr,
size_t size,
size_t nmemb,
json_t * request
);
// lowercase letters convert to uppercase
int ToUppercase(char * str);
// CURL log error
void CurlLogError(CURLcode curl_status);
// Parse GET request data
int ParseRequest(
json_t * oldreq ,
json_t * newreq,
info_t *info,
int checkPubKey,
long http_code
);
// CURL http GET request
int GetLatestBlock(
const char * from,
json_t * oldreq,
info_t * info,
int checkPubKey
);
// CURL http POST request
int PostPuzzleSolution(
const char * to,
const uint8_t * nonce
);
// CURL http notification, Completed job
int JobCompleted(
const char * to
);
#endif // REQUEST_H