BUG Fix: return proper net.OpError's for Read/Write operations

Need to return the same error structure/content as regular Go for
net.Conn Read/Write operations.  Found/fixed when testing deadlines
on Read/Write operations.
This commit is contained in:
Scott Feldman
2023-04-16 09:48:09 -07:00
committed by deadprogram
parent ad745d61ae
commit 7898c5e946
5 changed files with 97 additions and 130 deletions
+2 -2
View File
@@ -45,8 +45,8 @@ type netdever interface {
Connect(sockfd int, host string, ip IP, port int) error
Listen(sockfd int, backlog int) error
Accept(sockfd int, ip IP, port int) (int, error)
Send(sockfd int, buf []byte, flags int, timeout time.Duration) (int, error)
Recv(sockfd int, buf []byte, flags int, timeout time.Duration) (int, error)
Send(sockfd int, buf []byte, flags int, deadline time.Time) (int, error)
Recv(sockfd int, buf []byte, flags int, deadline time.Time) (int, error)
Close(sockfd int) error
SetSockOpt(sockfd int, level int, opt int, value interface{}) error
}