Jump to content

How to DllCall "setsockopt" to disable "TCP_NODELAY"


 Share

Go to solution Solved by funkey,

Recommended Posts

Hi,

this isnt apparently the way todo this

DllCall($__net_hWs2_32, "int", "setsockopt", "uint", $hSocket, "int", "IPPROTO_TCP", "int", "TCP_NODELAY", "int", 0, "int", 1)

I mean the highlighted strings.

i found the socket UDF by funkey at

And he has alot of Constants in his UDF where for example "$IPPROTO_TCP" is 6. And i wonder how he knows that.

https://docs.microsoft.com/en-us/windows/win32/api/winsock/nf-winsock-setsockopt

Doesnt list any numbers and i seemingly dont find any article on the web that tells me what "IPPROTO_TCP" and "TCP_NODELAY" in the DllCall need to be, because im sure that im not supposed to pass the strings of them but integers.

 

I tried to find any article that desribes the definitions of these values so far and wasnt successfull.

So what needs to be in the highlighted spots of the DllCall ?

Edited by Rurorita
Link to comment
Share on other sites

  • Solution

Hi,

i just google for the values like this:

'#define IPPROTO_TCP'

Then the results show me header files defining the values.

Programming today is a race between software engineers striving to
build bigger and better idiot-proof programs, and the Universe
trying to produce bigger and better idiots.
So far, the Universe is winning.

Link to comment
Share on other sites

1 hour ago, funkey said:

Hi,

i just google for the values like this:

'#define IPPROTO_TCP'

Then the results show me header files defining the values.

Thanks funkey ! i replaced IPPROTO_TCP with TCP_DELAY in the search field and then came across this https://sites.uclouvain.be/SystInfo/usr/include/netinet/tcp.h.html

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...