Skip to content

Commit

Permalink
fix Android
Browse files Browse the repository at this point in the history
  • Loading branch information
GuckTubeYT authored Apr 26, 2023
1 parent 61b1093 commit 2363f65
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions httpService.c
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#include <stdio.h>
#include <stdlib.h>
#include <sys/types.h>
#include <unistd.h>
#ifdef _WIN32
#include <winsock2.h>
#define socklen_t int
Expand Down Expand Up @@ -129,7 +128,7 @@ struct HTTPInfo HTTPSClient(const char* website) {
tls_consume_stream(context, client_message, read_size, NULL);
send_pending(sockfd, context);
if (tls_established(context)) {
const char *request = "POST /growtopia/server_data.php HTTP/1.1\r\nUser-Agent: UbiServices_SDK_2019.Release.27_PC64_unicode_static\r\nHost: www.growtopia1.com\r\nAccept: */*\r\nConnection: close\r\ncontent-length: 0\r\n\r\n";
const char *request = "POST /growtopia/server_data.php HTTP/1.1\r\nAccept-Encoding: gzip, deflate, br\r\nAccept: */*\r\nUser-Agent: UbiServices_SDK_2019.Release.27_PC64_unicode_static\r\nHost: www.growtopia1.com\r\nConnection: close\r\nContent-Length: 0\r\n\r\n";
if (!tls_make_ktls(context, sockfd)) send(sockfd, request, strlen(request), 0);
else {
tls_write(context, (unsigned char *)request, strlen(request));
Expand All @@ -145,7 +144,7 @@ struct HTTPInfo HTTPSClient(const char* website) {
return info;
}

void HTTPSServer(void* unused) {
void* HTTPSServer(void* unused) {
int socket_desc, client_sock;
socklen_t c;
struct sockaddr_in server, client;
Expand Down

0 comments on commit 2363f65

Please sign in to comment.