diff options
| author | Jeroen van Rijn <Kelimion@users.noreply.github.com> | 2023-03-03 15:21:40 +0100 |
|---|---|---|
| committer | Jeroen van Rijn <Kelimion@users.noreply.github.com> | 2023-03-03 15:21:40 +0100 |
| commit | 798932523e5bc63e473a6a768a47cff6e920cdff (patch) | |
| tree | fdd7e3786f435f6334ada978d3c4d21b9938656d /core/net/socket_linux.odin | |
| parent | 5267a864db5717d61465d6bb73ee8005f3568c9f (diff) | |
Coalesce socket_windows
Diffstat (limited to 'core/net/socket_linux.odin')
| -rw-r--r-- | core/net/socket_linux.odin | 24 |
1 files changed, 0 insertions, 24 deletions
diff --git a/core/net/socket_linux.odin b/core/net/socket_linux.odin index cc8113d15..dbe8b1a19 100644 --- a/core/net/socket_linux.odin +++ b/core/net/socket_linux.odin @@ -94,30 +94,6 @@ bind :: proc(skt: Any_Socket, ep: Endpoint) -> (err: Network_Error) { return } - -// This type of socket becomes bound when you try to send data. -// This is likely what you want if you want to send data unsolicited. -// -// This is like a client TCP socket, except that it can send data to any remote endpoint without needing to establish a connection first. -make_unbound_udp_socket :: proc(family: Address_Family) -> (skt: UDP_Socket, err: Network_Error) { - sock := create_socket(family, .UDP) or_return - skt = sock.(UDP_Socket) - return -} - -// This type of socket is bound immediately, which enables it to receive data on the port. -// Since it's UDP, it's also able to send data without receiving any first. -// -// This is like a listening TCP socket, except that data packets can be sent and received without needing to establish a connection first. -// -// The bound_address is the address of the network interface that you want to use, or a loopback address if you don't care which to use. -make_bound_udp_socket :: proc(bound_address: Address, port: int) -> (skt: UDP_Socket, err: Network_Error) { - skt = make_unbound_udp_socket(family_from_address(bound_address)) or_return - bind(skt, {bound_address, port}) or_return - return -} - - listen_tcp :: proc(interface_endpoint: Endpoint, backlog := 1000) -> (skt: TCP_Socket, err: Network_Error) { assert(backlog > 0 && i32(backlog) < max(i32)) |