diff --git a/cmd/rdpgw/protocol/gateway_windows.go b/cmd/rdpgw/protocol/gateway_windows.go index 3b72b2c..eed61f7 100644 --- a/cmd/rdpgw/protocol/gateway_windows.go +++ b/cmd/rdpgw/protocol/gateway_windows.go @@ -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) diff --git a/cmd/rdpgw/web/basic.go b/cmd/rdpgw/web/basic.go index b852634..58d2a63 100644 --- a/cmd/rdpgw/web/basic.go +++ b/cmd/rdpgw/web/basic.go @@ -12,10 +12,6 @@ import ( "time" ) -const ( - protocolGrpc = "unix" -) - type BasicAuthHandler struct { SocketAddress string Timeout int diff --git a/cmd/rdpgw/web/basic_unix.go b/cmd/rdpgw/web/basic_unix.go new file mode 100644 index 0000000..947f64e --- /dev/null +++ b/cmd/rdpgw/web/basic_unix.go @@ -0,0 +1,7 @@ +// +build !windows + +package web + +const ( + protocolGrpc = "unix" +) diff --git a/cmd/rdpgw/web/basic_windows.go b/cmd/rdpgw/web/basic_windows.go new file mode 100644 index 0000000..eab3474 --- /dev/null +++ b/cmd/rdpgw/web/basic_windows.go @@ -0,0 +1,7 @@ +// +build windows + +package web + +const ( + protocolGrpc = "tcp" +)