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/socket_linux.odin | |
| parent | f49bf1abd262a708886d7babf13100e7f1152de0 (diff) | |
Implemented _socket_info_error on peer_endpoint and bound_endpoint
Diffstat (limited to 'core/net/socket_linux.odin')
| -rw-r--r-- | core/net/socket_linux.odin | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/core/net/socket_linux.odin b/core/net/socket_linux.odin index b176fb848..bdb48fce8 100644 --- a/core/net/socket_linux.odin +++ b/core/net/socket_linux.odin @@ -218,11 +218,11 @@ _listen_tcp :: proc(endpoint: Endpoint, backlog := 1000) -> (socket: TCP_Socket, } @(private) -_bound_endpoint :: proc(sock: Any_Socket) -> (ep: Endpoint, err: Listen_Error) { +_bound_endpoint :: proc(sock: Any_Socket) -> (ep: Endpoint, err: Socket_Info_Error) { addr: linux.Sock_Addr_Any errno := linux.getsockname(_unwrap_os_socket(sock), &addr) if errno != .NONE { - err = _listen_error(errno) + err = _socket_info_error(errno) return } @@ -231,11 +231,11 @@ _bound_endpoint :: proc(sock: Any_Socket) -> (ep: Endpoint, err: Listen_Error) { } @(private) -_peer_endpoint :: proc(sock: Any_Socket) -> (ep: Endpoint, err: TCP_Recv_Error) { +_peer_endpoint :: proc(sock: Any_Socket) -> (ep: Endpoint, err: Socket_Info_Error) { addr: linux.Sock_Addr_Any errno := linux.getpeername(_unwrap_os_socket(sock), &addr) if errno != .NONE { - err = _tcp_recv_error(errno) + err = _socket_info_error(errno) return } |