gingerBill
f9fd8f0c25
Merge pull request #3439 from andreas-jonsson/netbsd
...
NetBSD support
2024-05-15 10:33:52 +01:00
gingerBill
6dc0ee3877
Fix #3577
2024-05-13 12:54:01 +01:00
Andreas T Jonsson
9a008d10f3
Merge branch 'master' into netbsd
2024-04-25 22:04:40 +02:00
Rickard Andersson
68f663ea85
fix(net): fix return type for send_tcp
...
Was `.Connection_Closed` but this is only inferrable if our return type
is not a sub-union of another.
2024-04-19 15:39:04 +03:00
Rickard Andersson
efc84cd390
docs(net): add comment about EPIPE -> Connection_Closed
2024-04-19 15:37:20 +03:00
Rickard Andersson
7b95562827
feat(net): turn EPIPE into Connection_Closed
2024-04-19 15:29:28 +03:00
Rickard Andersson
c44f618b7d
fix(net): add NOSIGNAL to send options
...
This is a better default than not having it, since it turns errors that
would be signals into error values instead. We could take these as
options but given that we currently don't I think this at the very least
improves on the status quo.
2024-04-19 15:17:21 +03:00
Andreas T Jonsson
dd95a8d11d
More std lib fixes
...
Just selecting the same codepath as other BSD's for the most part.
2024-04-19 10:42:09 +02:00
blob1807
2d1260bec9
uniformity change
...
small change to check things uniform
2024-04-13 00:47:49 +10:00
blob1807
c753711d86
Added support for URL fragments
...
Added support for a URL's fragment/anchor to `split_url` & `join_url` in `core:net` plus 4 new tests to cover it.
2024-04-13 00:39:32 +10:00
Laytan Laats
3a0df80066
correct newly found vets
2024-04-03 00:52:58 +02:00
Tetralux
d74ddb2d91
fixup
2024-02-22 15:01:55 +00:00
Tetralux
ec0831da70
[net] Better error code for binding a privileged port without root access on Darwin
...
This condition results in os.EACCESS, which we were translating to Broadcast_Disabled.
This was the case because binding to the broadcast address on a UDP port, without setting the BROADCAST flag, also results in this error.
Given the fact that reserved ports also produce this error, we now check for this condition in net.bind() and translate it to a custom, clearer error:
Privileged_Port_Without_Root.
2024-02-22 14:55:27 +00:00
gingerBill
3e7e779abf
Replace core:* to base:* where appropriate
2024-01-28 22:18:51 +00:00
flysand7
ff0e976ff3
[net]: Fix passing the wrong socket to on linux
2023-11-24 23:57:53 +11:00
Jeroen van Rijn
bb6d73953c
Merge pull request #2972 from flysand7/net-socket-any
...
[net]: Add send_any, recv_any variants to proc groups for Any_Socket
2023-11-24 13:42:48 +01:00
flysand7
8063569cdd
[net]: Add send_any, recv_any variants to proc groups for Any_Socket
2023-11-24 23:27:12 +11:00
Jeroen van Rijn
3b5d28f0ee
Merge pull request #2948 from flysand7/fix-do
...
[core]: Remove `do` keyword from the core library
2023-11-11 13:16:12 +01:00
flysand7
270348b112
[core]: Remove do keyword from the core library
2023-11-11 20:36:38 +11:00
Jeroen van Rijn
761a079789
Fix net.split_url
...
Resolves issue #2924
2023-11-09 16:56:54 +01:00
Divan Burger
c20839c461
Fix use of unitialized socket in socket_linux.odin#_dial_tcp_from_endpoint
2023-11-06 23:19:12 +02:00
flysand7
4d65b1ab9c
Implement new sys/unix package
2023-10-27 10:51:21 +11:00
simon
e7adfff9bf
bugfix: darwin net flags
2023-10-06 16:41:13 +01:00
simon
98f9f7d42e
darwin _enumerate_interfaces
2023-09-30 20:09:29 +01:00
gingerBill
14adcb9db8
Use or_break and or_continue where appropriate in the core library
2023-09-30 15:34:39 +01:00
Tetralux
e51915a529
[net] Assorted cleanup
...
- Remove some old comments
- Fix some doc comments
- Improve some doc comments
- Unify name of the errors related to UDP packet sizes
(i.e: recv buffer too small, and message too big to send)
2023-08-26 11:47:03 +00:00
gingerBill
cd74cdfdaf
Remove switch in in favour of switch _ in
2023-08-08 14:57:25 +01:00
gingerBill
0de7df9eab
Improve //+vet; remove using in many places; add //+vet !using-stmt where necessary
2023-07-31 11:37:14 +01:00
Rickard Andersson
454709559b
fix(dns): don't exit early on no hosts in hosts file
...
If we don't have any hosts specified we'll still not generate any
overrides which is fine, but we'll continue onto actually trying to
resolve the hostname we came into the function for initially.
2023-06-12 13:38:12 +03:00
James Duran
fed0c2ea26
Fix Timeval for darwin and linux
2023-06-07 21:55:08 -07:00
Laytan Laats
2b31d85cd4
implement non blocking sockets for darwin
2023-05-27 22:40:05 +02:00
Jeroen van Rijn
b358641e7d
Merge pull request #2547 from laytan/parse-address-can-return-nil
...
fix parse_address can return nil
2023-05-19 19:28:24 +02:00
Laytan Laats
ff745e0ad8
fix parse_address can return nil
2023-05-19 19:14:25 +02:00
Jeroen van Rijn
1896ae5d15
Merge pull request #2533 from laytan/add-hex-and-expand-percent-decoding
...
add encoding/hex and use it to expand the percent decoding chars
2023-05-15 19:25:31 +02:00
Yoshihiro Tanaka
418a0132d0
Join URL queries with &
2023-05-14 12:15:20 +09:00
Laytan Laats
a381846034
add encoding/hex and use it to expand the percent decoding chars
2023-05-14 03:23:24 +02:00
Laytan Laats
f2d5e4b995
fix leak in url_parse
2023-05-09 21:05:16 +02:00
Jeroen van Rijn
9a982cc5b5
Fix #2471
2023-04-21 08:35:21 +02:00
Jeroen van Rijn
fa42a788c8
Preserve port when calling net.resolve with hostname:port.
2023-04-18 18:24:27 +02:00
Jeroen van Rijn
243a3f5006
Fix #2386
2023-03-16 12:35:05 +01:00
Sokus
1ecab2fcbc
Add set_blocking for network sockets
2023-03-08 13:30:12 +01:00
Jeroen van Rijn
ee597fc9b8
Add .None to Linux & Darwin, too.
2023-03-04 11:12:11 +01:00
Jeroen van Rijn
e254581a1b
Apply #shared_nil to Network_Error
2023-03-04 10:39:20 +01:00
Jeroen van Rijn
38ea140b3f
Update addr.odin
...
Fix comment
2023-03-04 10:04:55 +01:00
Jeroen van Rijn
d939d6079a
Don't try to check core:net on the BSDs.
2023-03-03 18:24:26 +01:00
Jeroen van Rijn
f6134422e6
Fix one last review comment.
2023-03-03 17:50:49 +01:00
Jeroen van Rijn
5c05038af0
Finish cleaning up core_net.
2023-03-03 17:26:44 +01:00
Jeroen van Rijn
5da5ebff13
More coalescing.
2023-03-03 17:12:21 +01:00
Jeroen van Rijn
798932523e
Coalesce socket_windows
2023-03-03 15:21:40 +01:00
Jeroen van Rijn
5267a864db
Coalesce more.
2023-03-03 14:15:15 +01:00