aboutsummaryrefslogtreecommitdiff
path: root/core/net/socket.odin
diff options
context:
space:
mode:
Diffstat (limited to 'core/net/socket.odin')
-rw-r--r--core/net/socket.odin7
1 files changed, 7 insertions, 0 deletions
diff --git a/core/net/socket.odin b/core/net/socket.odin
index e36c67d21..0468ead00 100644
--- a/core/net/socket.odin
+++ b/core/net/socket.odin
@@ -134,6 +134,13 @@ listen_tcp :: proc(interface_endpoint: Endpoint, backlog := 1000) -> (socket: TC
return _listen_tcp(interface_endpoint, backlog)
}
+/*
+ Returns the endpoint that the given socket is listening / bound on.
+*/
+bound_endpoint :: proc(socket: Any_Socket) -> (endpoint: Endpoint, err: Network_Error) {
+ return _bound_endpoint(socket)
+}
+
accept_tcp :: proc(socket: TCP_Socket, options := default_tcp_options) -> (client: TCP_Socket, source: Endpoint, err: Network_Error) {
return _accept_tcp(socket, options)
}