diff options
| author | PePerRoNii <wachiraphol.yin@gmail.com> | 2025-06-15 11:17:49 +0700 |
|---|---|---|
| committer | PePerRoNii <wachiraphol.yin@gmail.com> | 2025-06-15 11:17:49 +0700 |
| commit | 42aa8ac383e5b5020ba12fab44193eca8a244ad8 (patch) | |
| tree | 4e36a515124441ce0c1fa1e95c6dac785cd03c11 /core/net/errors_darwin.odin | |
| parent | f49bf1abd262a708886d7babf13100e7f1152de0 (diff) | |
Implemented _socket_info_error on peer_endpoint and bound_endpoint
Diffstat (limited to 'core/net/errors_darwin.odin')
| -rw-r--r-- | core/net/errors_darwin.odin | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/core/net/errors_darwin.odin b/core/net/errors_darwin.odin index 7aaa220e9..255bd351f 100644 --- a/core/net/errors_darwin.odin +++ b/core/net/errors_darwin.odin @@ -226,6 +226,23 @@ _shutdown_error :: proc() -> Shutdown_Error { } } +_socket_info_error :: proc() -> Socket_Info_Error { + #partial switch posix.errno() { + case .EBADF, .ENOTSOCK: + return .Invalid_Argument + case .ENOTCONN: + return .Network_Unreachable + case .EOPNOTSUPP: + return .Unsupported_Socket + case .EINVAL: + return .Connection_Closed + case .ENOBUFS: + return .Insufficient_Resources + case: + return .Unknown + } +} + _socket_option_error :: proc() -> Socket_Option_Error { #partial switch posix.errno() { case .ENOBUFS: |