add AddressFamilyNotSupported to SendError
parent
5c60558796
commit
5f7b97e84c
|
@ -698,6 +698,7 @@ pub const File = struct {
|
||||||
error.FastOpenAlreadyInProgress,
|
error.FastOpenAlreadyInProgress,
|
||||||
error.MessageTooBig,
|
error.MessageTooBig,
|
||||||
error.FileDescriptorNotASocket,
|
error.FileDescriptorNotASocket,
|
||||||
|
error.AddressFamilyNotSupported,
|
||||||
=> return self.writeFileAllUnseekable(in_file, args),
|
=> return self.writeFileAllUnseekable(in_file, args),
|
||||||
|
|
||||||
else => |e| return e,
|
else => |e| return e,
|
||||||
|
|
|
@ -2711,7 +2711,6 @@ pub const ShutdownError = error{
|
||||||
|
|
||||||
/// Connection was reset by peer, application should close socket as it is no longer usable.
|
/// Connection was reset by peer, application should close socket as it is no longer usable.
|
||||||
ConnectionResetByPeer,
|
ConnectionResetByPeer,
|
||||||
|
|
||||||
BlockingOperationInProgress,
|
BlockingOperationInProgress,
|
||||||
|
|
||||||
/// The network subsystem has failed.
|
/// The network subsystem has failed.
|
||||||
|
@ -2719,8 +2718,7 @@ pub const ShutdownError = error{
|
||||||
|
|
||||||
/// The socket is not connected (connection-oriented sockets only).
|
/// The socket is not connected (connection-oriented sockets only).
|
||||||
SocketNotConnected,
|
SocketNotConnected,
|
||||||
|
SystemResources,
|
||||||
SystemResources
|
|
||||||
} || UnexpectedError;
|
} || UnexpectedError;
|
||||||
|
|
||||||
pub const ShutdownHow = enum { recv, send, both };
|
pub const ShutdownHow = enum { recv, send, both };
|
||||||
|
@ -4776,6 +4774,7 @@ pub const SendError = error{
|
||||||
BrokenPipe,
|
BrokenPipe,
|
||||||
|
|
||||||
FileDescriptorNotASocket,
|
FileDescriptorNotASocket,
|
||||||
|
AddressFamilyNotSupported,
|
||||||
} || UnexpectedError;
|
} || UnexpectedError;
|
||||||
|
|
||||||
/// Transmit a message to another socket.
|
/// Transmit a message to another socket.
|
||||||
|
@ -4822,6 +4821,7 @@ pub fn sendto(
|
||||||
.WSAEMSGSIZE => return error.MessageTooBig,
|
.WSAEMSGSIZE => return error.MessageTooBig,
|
||||||
.WSAENOBUFS => return error.SystemResources,
|
.WSAENOBUFS => return error.SystemResources,
|
||||||
.WSAENOTSOCK => return error.FileDescriptorNotASocket,
|
.WSAENOTSOCK => return error.FileDescriptorNotASocket,
|
||||||
|
.WSAEAFNOSUPPORT => return error.AddressFamilyNotSupported,
|
||||||
// TODO: handle more errors
|
// TODO: handle more errors
|
||||||
else => |err| return windows.unexpectedWSAError(err),
|
else => |err| return windows.unexpectedWSAError(err),
|
||||||
}
|
}
|
||||||
|
@ -4849,6 +4849,7 @@ pub fn sendto(
|
||||||
ENOTSOCK => unreachable, // The file descriptor sockfd does not refer to a socket.
|
ENOTSOCK => unreachable, // The file descriptor sockfd does not refer to a socket.
|
||||||
EOPNOTSUPP => unreachable, // Some bit in the flags argument is inappropriate for the socket type.
|
EOPNOTSUPP => unreachable, // Some bit in the flags argument is inappropriate for the socket type.
|
||||||
EPIPE => return error.BrokenPipe,
|
EPIPE => return error.BrokenPipe,
|
||||||
|
EAFNOSUPPORT => return error.AddressFamilyNotSupported,
|
||||||
else => |err| return unexpectedErrno(err),
|
else => |err| return unexpectedErrno(err),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue