| ... | @@ -5933,6 +5933,8 @@ pub fn sendmsg( | ... | @@ -5933,6 +5933,8 @@ pub fn sendmsg( |
| 5933 | pub const SendToError = SendMsgError || error{ | 5933 | pub const SendToError = SendMsgError || error{ |
| 5934 | /// The destination address is not reachable by the bound address. | 5934 | /// The destination address is not reachable by the bound address. |
| 5935 | UnreachableAddress, | 5935 | UnreachableAddress, |
| | 5936 | /// The destination address is not listening. |
| | 5937 | ConnectionRefused, |
| 5936 | }; | 5938 | }; |
| 5937 | | 5939 | |
| 5938 | /// Transmit a message to another socket. | 5940 | /// Transmit a message to another socket. |
| ... | @@ -6005,6 +6007,7 @@ pub fn sendto( | ... | @@ -6005,6 +6007,7 @@ pub fn sendto( |
| 6005 | .AGAIN => return error.WouldBlock, | 6007 | .AGAIN => return error.WouldBlock, |
| 6006 | .ALREADY => return error.FastOpenAlreadyInProgress, | 6008 | .ALREADY => return error.FastOpenAlreadyInProgress, |
| 6007 | .BADF => unreachable, // always a race condition | 6009 | .BADF => unreachable, // always a race condition |
| | 6010 | .CONNREFUSED => return error.ConnectionRefused, |
| 6008 | .CONNRESET => return error.ConnectionResetByPeer, | 6011 | .CONNRESET => return error.ConnectionResetByPeer, |
| 6009 | .DESTADDRREQ => unreachable, // The socket is not connection-mode, and no peer address is set. | 6012 | .DESTADDRREQ => unreachable, // The socket is not connection-mode, and no peer address is set. |
| 6010 | .FAULT => unreachable, // An invalid user space address was specified for an argument. | 6013 | .FAULT => unreachable, // An invalid user space address was specified for an argument. |
| ... | @@ -6066,6 +6069,7 @@ pub fn send( | ... | @@ -6066,6 +6069,7 @@ pub fn send( |
| 6066 | error.AddressNotAvailable => unreachable, | 6069 | error.AddressNotAvailable => unreachable, |
| 6067 | error.SocketNotConnected => unreachable, | 6070 | error.SocketNotConnected => unreachable, |
| 6068 | error.UnreachableAddress => unreachable, | 6071 | error.UnreachableAddress => unreachable, |
| | 6072 | error.ConnectionRefused => unreachable, |
| 6069 | else => |e| return e, | 6073 | else => |e| return e, |
| 6070 | }; | 6074 | }; |
| 6071 | } | 6075 | } |