What's new

C/C++ New dash updating timeout issue

GFX

GFX

Build: 7A176x
Messages
530
Reaction score
127
Points
95
Sin$
0
I'm currently working on the new 17489 update for my server. Just wondering if it would be a better idea to use a DWORD rather than an unsigned int?

What I am doing with this: Trying to create a timeout so clients don't get stuck at boot logo., but want it to be initialized as fast as possible for no delays.


My current issue interface:
Code:
/*// Timeout strts!   
 DWORD timeout=2500;
    if(NetDll_setsockopt(XNCALLER_SYSAPP, hSocket, SOL_SOCKET, SO_RCVTIMEO, (PCSTR)&timeout, sizeof(DWORD)) != 0) {
        lastSocketError = WSAGetLastError();
        DbgPrint("InitCommand: SO_RCVTIMEO error %d", lastSocketError);
        return E_FAIL;
    }
    timeout=2500;
    if(NetDll_setsockopt(XNCALLER_SYSAPP, hSocket, SOL_SOCKET, SO_SNDTIMEO, (PCSTR)&timeout, sizeof(DWORD)) != 0) {
        lastSocketError = WSAGetLastError();
        DbgPrint("InitCommand: SO_SNDTIMEO error %d", lastSocketError);
        return E_FAIL;
    }*/
 
A

Auschwitz Guard

Banned
Messages
195
Reaction score
123
Points
85
Sin$
0
A DWORD is a double word, the same data size as an integer. It's declaration is unsigned long, which in C a long is pretty much the same as an int, in both usage and data size. So what you're asking is pointless seeing that both suggestions would have the same result
 
GFX

GFX

Build: 7A176x
Messages
530
Reaction score
127
Points
95
Sin$
0
A DWORD is a double word, the same data size as an integer. It's declaration is unsigned long, which in C a long is pretty much the same as an int, in both usage and data size. So what you're asking is pointless seeing that both suggestions would have the same result
Ive updated the server by now, its all good. And no, you are wrong.
 
Last edited:
Top Bottom
Login
Register