Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Disable Nagling
#1
Okay, me and verrigan had a talk a few days back. I'll post the code I got and where to put it, But I dont think it works. Since the idea is that the ping will decrease once its disabled, since I have 2 buffers working if I dont turn it on.

Client Side

Under:
Code:
With frmMirage.Socket
        .Close
        .Connect
    End With
Add:
Code:
Call setsockopt(frmMirage.Socket.SocketHandle, IPPROTO_TCP, TCP_NODELAY, 1, 4)

Add this in a module:
Code:
Public Const TCP_NODELAY = &H1&
Public Const IPPROTO_TCP = 6
Public Declare Function setsockopt Lib "WSOCK32.DLL" (ByVal s As Long, ByVal Level As Long, ByVal optname As Long, optval As Any, ByVal optlen As Long) As Long

Thats pretty much what I got. if you have any ideas how to fix this, please post.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)