confusion in connect function
-
Hello ,
I am trying to create an socket client and server program . but i am not using QT predefined functions . I am using Windows header files to develop this program . My problem is there is a function name (connect) in TCP socket that comes under <Winsock2.h> header file similarly there is a connect function in QT TCP . I want to make the program use the windows call instead of QT predefined call?
-
Hello ,
I am trying to create an socket client and server program . but i am not using QT predefined functions . I am using Windows header files to develop this program . My problem is there is a function name (connect) in TCP socket that comes under <Winsock2.h> header file similarly there is a connect function in QT TCP . I want to make the program use the windows call instead of QT predefined call?
@ManiRon
Hi
But you can just do it ?
Make sure to link the right DLLS for the function you use or they be
undefined linker errors.like for the connect function
https://docs.microsoft.com/en-us/windows/desktop/api/winsock2/nf-winsock2-connectit shows that
so you must link to that ws2_32.dll via the pro file.
-
To use the connect from the global namespace you can use
::connect(...)