SQC-15_online #1

Merged
memartel_loc merged 349 commits from SQC-15_online into master 2023-12-10 17:41:26 -05:00
3 changed files with 7 additions and 2 deletions
Showing only changes of commit aab3301234 - Show all commits

View File

@ -46,6 +46,8 @@ typedef uint64_t Timestamp;
#include <cstdio>
#include <ctime>
#define ioctl ioctlsocket
#define O_NONBLOCK FIONBIO
#define strcpy strcpy_s
#define addrlen_t int
#define popen _popen
@ -57,10 +59,12 @@ typedef uint64_t Timestamp;
#include <time.h>
#include <stdio.h>
#include <sys/socket.h>
#include <sys/ioctl.h>
#include <arpa/inet.h>
#include <netinet/in.h>
#include <cstring>
#define addrlen_t unsigned int
#define SOCKET int
#define INVALID_SOCKET -1

View File

@ -50,7 +50,8 @@ add_executable(SQCSim-client
"../textureatlas.cpp"
"../tool.cpp"
"../vertexbuffer.cpp"
"../worldrenderer.cpp"
"../renderer.cpp"
"../remoteplayer.cpp"
"../main.cpp"
)

View File

@ -57,7 +57,7 @@ int Connector::Connect(const char* srv_addr, std::string name) {
return 2;
}
if (ioctlsocket(m_sock_tcp, FIONBIO, nullptr) < 0) {
if (ioctl(m_sock_tcp, SOCK_NONBLOCK, nullptr) < 0) {
std::cout << "Impossible de mettre le socket en mode non-bloquant." << std::endl;
return 3;
}