Okay i have some code hopefully someone can help me with.
It's going like this, i can connect to Insim (port 29999), setup Outgauge on port 30000 (if it's on 29999, Insim captures it all with red warning writing).
I'm farily sure it seems to be working. It's just i'm not sure how to recieve UDP properly? and check that it's an OutgaugePack packet.
(what seems to happen is i treat everything as an outgaugepack, it sends something weird, then i'm trying to print something stupid on screen.)
here's the part that causes problems.
RecvAddr.sin_port = htons(30000);
bind(RecvSocket, (SOCKADDR *) &RecvAddr, sizeof(RecvAddr));
while ( quit==false){
printf("Settingmem...\n");
memset(&outgauge, 0, sizeof(struct OutGaugePack));
printf("Recieving...\n");
recvfrom(RecvSocket, (char *)&outgauge, sizeof(struct OutGaugePack), 0, (SOCKADDR *)&SenderAddr, &SenderAddrSize);
printf("Recieving2...\n");
if(outgauge.Speed!=NULL){
//TODO:if quit bail
printf("Speed: %n \n",outgauge.Speed);
}
i get recieving2 printed then caplunk

. it happens the exact same way without my hacky null check.