1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2024-12-21 17:46:58 -05:00

print error

This commit is contained in:
Darien Raymond 2018-08-25 22:41:36 +02:00
parent 5baf839fcf
commit 7c9c66601e
No known key found for this signature in database
GPG Key ID: 7251FFA14BB18169

View File

@ -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)