mirror of
https://github.com/v2fly/v2ray-core.git
synced 2024-12-22 01:57:12 -05:00
print error
This commit is contained in:
parent
5baf839fcf
commit
7c9c66601e
@ -2,7 +2,10 @@
|
||||
|
||||
package buf
|
||||
|
||||
import "syscall"
|
||||
import (
|
||||
"fmt"
|
||||
"syscall"
|
||||
)
|
||||
|
||||
type windowsReader struct {
|
||||
bufs []syscall.WSABuf
|
||||
@ -29,6 +32,7 @@ func (r *windowsReader) Read(fd uintptr) int32 {
|
||||
var flags uint32
|
||||
err := syscall.WSARecv(syscall.Handle(fd), &r.bufs[0], uint32(len(r.bufs)), &nBytes, &flags, nil, nil)
|
||||
if err != nil {
|
||||
fmt.Println("Err=", err)
|
||||
return -1
|
||||
}
|
||||
return int32(nBytes)
|
||||
|
Loading…
Reference in New Issue
Block a user