Hey guys,
Pretty much all the details in the title, I've no errors from the client side, but this is the server side code:
SERVER
void Application::Init_Winsock()
{
WSAStartup(MAKEWORD(2,2), &Winsock);
if(LOBYTE(Winsock.wVersion) !=2 || HIBYTE(Winsock.wVersion) !=2) //Check Version
{
WSACleanup(); //Cleanup and end if not version 2
return;
}
//Create Socket
Socket = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP);
//Input Reciever Information
ZeroMemory(&RemoteAddress, sizeof(RemoteAddress)); //Clear Struct
RemoteAddress.sin_family = AF_INET; //Set the Family Address
RemoteAddress.sin_port = SERVER_PORT; //Set Port
bind(Socket, (sockaddr*)&RemoteAddress, sizeof(RemoteAddress));
//Start the recieve thread
CreateThread(NULL, 0, RecvThread, NULL, 0, NULL);
}
DWORD WINAPI Application::RecvThread(LPVOID knock)
{
while(true)
{
PLAYER Recv;
recvfrom(Socket, (char*)&Recv, sizeof(PLAYER), 0, (sockaddr*)&RemoteAddress, &SizeInt);
Player = Recv;
}
}
And heres the error:
Im clueless guys, from the tutorial Im using this should work?