Dennis Korpel
7433715cf6
Fix reference to 'samples' folder
2025-01-13 23:53:54 +01:00
Geod24
9aa794ca15
Fix Bugzilla Issue 17416 - Add REUSEPORT to std.socket
...
The issue also mentions the Druntime bindings, which have been added a few years ago,
however this was missing from std.socket. This implementation provides SO_REUSEPORT on
Windows as well, despite it being equivalent to SO_REUSEADDR, to simplify client code.
Co-authored-by: Elias Batek <desisma@heidel.beer>
2024-11-04 05:09:48 +01:00
Nicholas Wilson
44296a1a9b
remove classinfo
uses, rebases part of #7445 ( #9061 )
2024-10-21 10:05:32 +03:00
dokutoku
9a8325ca5f
Fix some invalid links ( #8994 )
...
Co-authored-by: dokutoku <3729541-dokutoku@users.noreply.gitlab.com>
2024-04-29 22:08:10 +08:00
Nick Treleaven
03c368158e
[std.socket] Fix cast assign to getaddrinfoPointer
...
See https://github.com/dlang/dmd/pull/16315
With that pull, using a type qualifier cast is not @safe to use as an
lvalue.
2024-03-16 22:52:59 +01:00
Jeremy
80747a9c9b
Improve documentation in std.socket
2023-09-10 17:05:45 +12:00
Walter Bright
866da8b8f4
std.socket - tired of heisenbug failures in test suite
2023-02-11 22:29:44 -08:00
Adam D. Ruppe
f710b083fd
fix #23507 sockets are blocking by default, this needs to reflect that
2022-11-25 04:07:27 +01:00
Adam D. Ruppe
87ebb09b16
add Socket.release method to allow transitioning the handle from the object's ownership to outsdie control, so the destructor won't close it anymore
2022-11-24 00:50:37 +01:00
Lucian Danescu
322fed7bf7
add local imports
2022-11-12 19:29:28 +02:00
Lucian Danescu
8293310cd8
rename variables
2022-11-09 23:28:55 +02:00
Lucian Danescu
452b1def78
same name fix
2022-11-07 19:20:19 +02:00
Walter Bright
49da0ece0a
std.socket: add scope to close
2022-09-02 22:03:51 +02:00
Vladimir Panteleev
3121a99e19
std.socket: Always compile slow unit tests
2022-05-08 08:25:36 +00:00
Steven Schveighoffer
f712d16b0a
Add scope decorations to std.socket ( #8438 )
2022-05-07 20:28:19 +08:00
MoonlightSentinel
362e81830c
Fix 13541 - Replace usages of sysErrorString` with a helper function
...
`sysErrorString` throws an exception for unknown error codes (e.g. from
libraries using `SetLastError`) and hence could hide the actual error
that caused the call to `sysErrorString`.
The new helper function wraps the error code lookup and returns `Error X`
on failure.
2022-03-28 01:01:25 +02:00
Walter Bright
1a3e80ec25
fix Issue 22791 - std\socket.d(790) Heisenbug random failure ( #8388 )
2022-02-20 15:42:09 +08:00
Paul Backus
b7ef267ab4
Replace FieldProxy with @property ref functions
...
This simplifies the code and removes the need for a separate
version (StdDdoc) block.
2021-10-03 08:15:39 +00:00
RazvanN7
3d54a964fa
Annotate unittest with @safe
2021-09-13 16:00:38 +03:00
RazvanN7
6eb14972ad
Fix Issue 22301 - Only use from if a packet was actually received
2021-09-13 14:02:55 +03:00
Sebastien Alaiwan
6ee8dc52fe
Only use 'from' if a packet was actually received
...
This fixes a systematic assertion error when trying to receiveFrom a
non-blocking UDP socket. In this case, 'from.addressFamily' is equal to UNSPEC,
eventually failing the comparison and crashing the program.
This adds the corresponding unit test.
2021-09-13 14:00:41 +03:00
nordlow
6ce97eb9ff
Annotate std/socket.d to please dlang/dmd#12520
2021-05-17 21:50:31 +02:00
Boris Carvajal
5dd42968e3
Rename the initial value of some enums from init to _init
2021-05-12 10:56:46 +08:00
Geod24
33a713ec65
Change Socket constructor to accept its parameter by const scope
...
This is the only occurence in Phobos where 'in' would get 'ref' applied.
Changing this ensures that users can use '-preview=in' in their code.
2020-08-16 11:12:40 +02:00
Vladimir Panteleev
83ceb907f3
Apply suggestions from code review
...
Fix cast style.
Co-authored-by: Sebastian Wilzbach <seb@wilzba.ch>
2020-08-05 10:21:59 +00:00
Vladimir Panteleev
6760a3bca1
std.socket: Add a notice on how to test this module at the top of the file
2020-08-05 09:27:06 +00:00
Vladimir Panteleev
c7a9857b53
std.socket: Remove redundant copy of the Boost Software License
...
- There is already a copy of the full license text in
../LICENSE_1_0.txt.
- There is already a standard "License" DDoc header.
2020-08-05 09:27:06 +00:00
Vladimir Panteleev
44288e7fe7
std.socket: Fix bitrotted disabled unittests
2020-08-05 09:27:06 +00:00
Vladimir Panteleev
6e76625186
std.socket: Replace version=SlowTests with debug=std_socket
...
Have a single switch to control whether to test std.socket "in full"
or not.
2020-08-05 09:27:06 +00:00
Vladimir Panteleev
0a09280594
std.socket: fix Issue 21114: Hide details of "soft" unittests unless built with -debug=std_socket
...
Reduce noise and false alarms in CI logs.
Also improve the printed message on failure, to make it clear that it
is likely a random failure, and that the ignored test failure is not
what's causing the entire test suite run to fail.
2020-08-05 09:27:05 +00:00
The Dlang Bot
ffa63b6204
Merge pull request #7434 from CyberShadow/pull-20200330-230002
...
std.socket: Improve 16514 unittest to guard against inherited attributes
merged-on-behalf-of: Nicholas Wilson <thewilsonator@users.noreply.github.com>
2020-05-24 08:55:16 +02:00
Geod24
04f3979317
Replace 'Issue XXX' with Bugzilla links
...
Make the links clickable, as was done in the DMD repository.
Also avoids any ambiguity w.r.t. where the issue is stored.
2020-04-13 16:28:09 +09:00
Vladimir Panteleev
ca56784e20
std.socket: Improve 16514 unittest to guard against inherited attributes
2020-03-30 23:14:08 +00:00
Jacob Carlborg
75190aac72
Fix socket test for iOS derived platforms
...
Reduce the length of the Unix socket file path.
2020-03-24 20:28:24 +01:00
Jacob Carlborg
b817b59004
Fix failing unit test for std.socket
on iOS derived platforms
...
iOS derived platforms don't allow as many open sockets.
2020-03-03 12:51:08 +01:00
Jacob Carlborg
60f892724e
Fix exception "Path too long" when creating Unix socket
...
The max length of a Unix socket path on Apple's ARM platform is 104.
Due the long temp directory path on these platforms the limit is
pretty easy to hit. The solution for the unit test is shortening some
parts of the filename of the Unix socket.
2020-03-03 12:51:08 +01:00
Geod24
ce7003dcb1
std.socket: Move const to the RHS
2020-02-04 10:07:07 +09:00
Adam D. Ruppe
7e3ac1d24c
Fix Issue 20544 - socket.remoteAddress throws out of memory error with unix domain socket peer
2020-01-30 08:38:11 -05:00
Alexandru Militaru
bb62aaca3d
Replaced version (unittest) with version (StdUnittest) to avoid unnecessary overhead when compiling with -unittest
2020-01-19 14:05:17 +02:00
Bernhard Seckinger
43276247b5
Fix Issue 20259 - [Function Socket.bind] Doesn't inform what Exception
...
it throws
2019-12-28 09:48:05 +01:00
Adam D. Ruppe
4c59d7f73b
Fix Issue 20313 - test timeout error condition
2019-10-25 13:55:55 -04:00
Adam D. Ruppe
648b13b500
handle timeout on Windows the same as on Linux - no other way in current thing without dropping down to Win32 functions
2019-10-23 16:50:29 -04:00
RazvanN7
68cd5d1168
Fix enum type in std.socket to match the receiver type
2019-06-27 16:14:40 +03:00
Flying-Toast
40ba89b7f4
add messages to some asserts in std/socket.d
2019-05-25 09:50:32 -04:00
Walter Bright
218e9c1d5f
std.socket: -dip1000
2019-03-18 20:07:46 -07:00
Nathan Sashihara
6ffd4e7f28
Replace imports of core.sys.windows.windows to speed up compilation
2018-12-17 21:03:31 -05:00
Iain Buclaw
f8e19a134f
posix.mak: Enforce no whitespace after opening parenthesis for version conditions
2018-09-23 17:38:58 +02:00
Iain Buclaw
fd5facfe04
posix.mak: Enforce whitespace before opening parenthesis for version conditions
2018-09-22 16:57:24 +02:00
Walter Bright
ec16c4e6a2
socket: use scope
2018-06-08 20:28:21 -07:00
Sebastian Wilzbach
c324714fde
Remove a few cases of underscore escaping
2018-06-04 13:05:01 +02:00