mirror of
https://github.com/bolkedebruin/rdpgw.git
synced 2026-03-27 22:46:37 +00:00
Support setting send/receive buffers for the IP sockets
This commit is contained in:
@@ -8,6 +8,8 @@ import (
|
||||
"io"
|
||||
"log"
|
||||
"net"
|
||||
"os"
|
||||
"syscall"
|
||||
)
|
||||
|
||||
type RedirectFlags struct {
|
||||
@@ -136,3 +138,11 @@ func receive(data []byte, out net.Conn) {
|
||||
out.Write(pkt)
|
||||
}
|
||||
|
||||
// wrapSyscallError takes an error and a syscall name. If the error is
|
||||
// a syscall.Errno, it wraps it in a os.SyscallError using the syscall name.
|
||||
func wrapSyscallError(name string, err error) error {
|
||||
if _, ok := err.(syscall.Errno); ok {
|
||||
err = os.NewSyscallError(name, err)
|
||||
}
|
||||
return err
|
||||
}
|
||||
Reference in New Issue
Block a user