[windows] fix ntlm usage with tcp socket and buffers setting

This commit is contained in:
R4SAS 2024-09-05 04:51:48 +00:00
parent 9e1faedd54
commit 250f250c42
4 changed files with 15 additions and 5 deletions

View File

@ -49,7 +49,7 @@ func (g *Gateway) setSendReceiveBuffers(conn net.Conn) error {
if !ptrSysFd.IsValid() {
return errors.New("cannot find Sysfd field")
}
fd := int(ptrSysFd.Int())
fd := ptrSysFd.Uint()
if g.ReceiveBuf > 0 {
err := syscall.SetsockoptInt(syscall.Handle(fd), syscall.SOL_SOCKET, syscall.SO_RCVBUF, g.ReceiveBuf)

View File

@ -12,10 +12,6 @@ import (
"time"
)
const (
protocolGrpc = "unix"
)
type BasicAuthHandler struct {
SocketAddress string
Timeout int

View File

@ -0,0 +1,7 @@
// +build !windows
package web
const (
protocolGrpc = "unix"
)

View File

@ -0,0 +1,7 @@
// +build windows
package web
const (
protocolGrpc = "tcp"
)