aboutsummaryrefslogtreecommitdiff
path: root/core/net/socket.odin
Commit message (Collapse)AuthorAgeFilesLines
* net: implement OpenBSD and NetBSD support & add stubs for other targets & ↵Laytan Laats2026-01-111-1/+29
| | | | cleanup
* net(docs): recv of 0 bytes with no error is a graceful closeLaytan Laats2025-12-211-2/+17
|
* Change Odin's LICENSE to zlib from BSD 3-clausegingerBill2025-10-281-1/+1
| | | | This change was made in order to allow things produced with Odin and using Odin's core library, to not require the LICENSE to also be distributed alongside the binary form.
* Changed TCP_Recv_Err to Socket_Info_Err and tested on darwin_arm64PePerRoNii2025-06-151-1/+1
|
* Implemented _socket_info_error on peer_endpoint and bound_endpointPePerRoNii2025-06-151-1/+1
|
* Add entry point in core:net as peer_endpointPePerRoNii2025-06-111-0/+7
|
* Replace default_tcp_options with constant (#5056)Jeroen van Rijn2025-04-191-7/+7
| | | Replace `default_tcp_options` with constant
* net: rework errors to be cross-platformLaytan Laats2025-04-051-13/+44
|
* Add net.dial_tcp_from_host{_or_endpoint} and unify themChristiano Haesbaert2025-01-121-22/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The main motivation for this is to have sinergy with flags parsing, currently flags for a sockaddr returns a net.Host_Or_Endpoint, but we can't just dial from it since there isn't a variant. Consider the following: ``` Options :: struct { target: net.Host_Or_Endpoint `args:"pos=0,required" usage:"host:port"`, } before :: proc() -> (sock: net.TCP_Socket, err: net.Network_Error) { opt: Options flags.parse_or_exit(&opt, os.args) switch t in opt.target { case net.Host: sock, err = net.dial_tcp(t.hostname, t.port) case net.Endpoint: sock, err = net.dial_tcp(t) } return } after :: proc() -> (sock: net.TCP_Socket, err: net.Network_Error) { opt: Options flags.parse_or_exit(&opt, os.args) sock, err = net.dial_tcp(opt.target) return } ``` For completion, add dial_tcp_from_host() and define the upper functions in terms of the newly added ones, cuts one repeated block, now: from_hostname_and_port_string is parse + from_host_or_endpoint from_hostname_with_port_override is parse + override + from_host_or_endpoint from_host is to_endpoint + from_endpoint from_host_or_endpoint is from_endpoint or from_host
* Merge pull request #4261 from laytan/net-bound-endpointgingerBill2024-09-191-0/+7
|\ | | | | net: add `bound_endpoint` procedure
| * net: add `bound_endpoint` procedureLaytan Laats2024-09-171-0/+7
| |
* | Moved all packages in core, base, vendor, tests and examples to use new #+ ↵Karl Zylinski2024-09-141-1/+1
|/ | | | file tag syntax.
* Add new contribution notes to `core:net`Feoramund2024-08-051-0/+2
|
* Port `core:net` to FreeBSDFeoramund2024-06-261-1/+1
|
* correct newly found vetsLaytan Laats2024-04-031-4/+3
|
* [net]: Add send_any, recv_any variants to proc groups for Any_Socketflysand72023-11-241-3/+38
|
* Implement new sys/unix packageflysand72023-10-271-1/+1
|
* Fix #2386Jeroen van Rijn2023-03-161-0/+3
|
* Add `set_blocking` for network socketsSokus2023-03-081-0/+4
|
* Don't try to check core:net on the BSDs.Jeroen van Rijn2023-03-031-6/+8
|
* Coalesce socket_windowsJeroen van Rijn2023-03-031-10/+100
|
* Update commentsJeroen van Rijn2023-03-021-3/+0
|
* manually start merging core_netColin Davidson2023-03-011-0/+87