mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-02 20:58:15 +00:00
net: add bound_endpoint procedure
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user