Vladimir Panteleev
8fee67f4ca
std.socket: add getErrorText() to Socket
2011-08-25 07:14:22 +03:00
Vladimir Panteleev
aec1d8ed79
Issue 3484 - std.socket.Address hierarchy not const-safe
2011-08-24 08:47:09 +03:00
Vladimir Panteleev
65e6bbea31
Merge branch 'std-socket-chris' into new-std-socket
...
Conflicts:
std/socket.d
2011-08-24 08:01:08 +03:00
Chris Miller
8e743ade60
std.socket updates and boost license
...
Committed on behalf of Christopher Miller by Vladimir Panteleev <thecybershadow@gmail.com>
2011-08-24 06:41:26 +03:00
Vladimir Panteleev
1f2cc3ac74
std.socket: Add support for variable set sizes on Windows
2011-08-22 07:30:41 +03:00
Vladimir Panteleev
956decdba7
std.socket: re-enabled Windows getProtocolByType test (works for me)
2011-08-22 05:54:30 +03:00
Vladimir Panteleev
9b5aa12891
std.socket: replace version(BsdSockets) with version(Posix)
2011-08-22 05:50:06 +03:00
Vladimir Panteleev
1963269deb
std.socket: add wouldHaveBlocked function
2011-08-22 05:33:31 +03:00
Vladimir Panteleev
0ac3b8cd39
std.socket: Add support for error message formatting on Windows
2011-08-22 05:31:05 +03:00
Vladimir Panteleev
4dfe306463
std.socket: Refactor error message retrieval to own function, add lastSocketError
2011-08-22 05:22:56 +03:00
Vladimir Panteleev
6ecc85b8e4
std.socket: Ddoc formatting and minor improvements
2011-08-22 05:13:18 +03:00
Vladimir Panteleev
d3493b9b6f
std.socket: Add SocketOSException and SocketParameterException classes
2011-08-22 05:12:09 +03:00
Vladimir Panteleev
5c95c81d9a
Uncrustify std.socket
2011-08-15 03:00:02 +03:00
dsimcha
4f7f6c8e52
Fix trivial build breakage on Windows.
2011-08-14 11:30:24 -04:00
Daniel Green
dcbfae3364
Merge GDC Win64 changes.
2011-08-14 00:52:10 -04:00
Daniel Murphy
48403470da
Unbreak the build - Ignore the fact that MSG_NOSIGNAL is not a member of SocketFlags.
2011-07-09 10:06:19 +10:00
David Nadlinger
5ae54cbf5d
Disable SIGPIPE on send()ing to a Socket on OS X.
...
Previously, std.socket code assumed that MSG_NOSIGNAL existed on all platforms, which is not the case – std.c.osx.socket actually has a comment saying »Not defined in OS X, but we'll use them anyway«. This lead to Socket.send() raising SIGPIPE on OS X if the peer had already closed the connection.
With this commit, std.socket sets the SO_NOSIGPIPE socket option on systems that support it for the same effect as MSG_NOSIGNAL on Linux.
Strictly speaking, removing the NOSIGNAL SocketFlag is a breaking API change, but I do not think there is any code actually using it, as it has always been set implicitly by std.socket anyway.
2011-07-05 15:33:07 +02:00
Daniel Murphy
fd8797a84d
Stop using read-modify-write operations on enums in std.socket
2011-06-30 08:12:54 +10:00
David Nadlinger
364bcc872b
Fixed c_long->int issue in std.socket – the code was probably written back when D on x86_64 was a faint dream.
...
Actually, the timeval struct could be removed altogether as it isn't used anywhere in std.socket (I didn't realize that I wasn't using the C standard library one), but this would be still a breaking API change, so I refrained from it.
2011-06-15 21:48:45 +02:00
David Nadlinger
375e9d1212
Fixed x86_64 issue in Socket timeout code.
2011-06-15 21:37:45 +02:00
David Nadlinger
955b112d71
Added InternetAddress.toHostNameString() for looking up the host name.
...
I am not particularly fond of the method name, but it follows the existing scheme.
2011-06-15 19:51:33 +02:00
David Nadlinger
e5f81404a7
Use new core.sys.posix.netdb.
2011-06-15 19:51:33 +02:00
David Nadlinger
d5b4ceb3b4
Added send/receive timeout socket options.
...
The strange timeout behavior on Windows (effective timeout = value + ~500ms) has been confirmed on Windows 7, Windows Server 2008 R2 and Windows XP.
2011-06-15 19:51:33 +02:00
David Nadlinger
b34b8bc595
Added cleaned up std.socket.socketPair() unittest as example.
2011-06-15 19:51:33 +02:00
k-hara
a6b4ae4937
More conversions.
2011-06-08 19:57:38 +09:00
k-hara
f833634c03
Change struct const member variables to manifest constants.
2011-06-08 03:03:34 +09:00
David Nadlinger
9b68336a07
Added std.socket.socketPair() which returns a pair of connected sockets.
2011-06-03 01:48:15 +02:00
Walter Bright
046e1b36db
add source links
2011-02-06 15:46:50 -08:00
Don Clugston
ed5e3167f0
Don't throw non-Throwables
2011-01-14 08:01:49 +00:00
Steven Schveighoffer
6fb30a1b5e
Fixed static destructor so sockets aren't closed on every thread exit in windows. (see bug 4344 and 4951)
...
Fixed unlisted bug, there could be a race condition on linux with gethostbyname and gethostbyaddr, now synchronizing entire processing of hostent struct.
2010-10-19 13:15:30 +00:00
Shin Fujishiro
50fb1511ed
Mark std.socket unittests broken because they succeed or fail depending on running environment.
2010-09-29 04:54:25 +00:00
Shin Fujishiro
1c0cc7c128
Hook a strange HostException failure in win32 unittest.
...
For some reason std.socket unittest fails with HostException on win32 AutoTester. It used to succeed before; it also succeeds on my environment (FreeBSD, Gentoo and Wine).
2010-09-29 03:36:55 +00:00
David Simcha
9525e76cc5
Fix mysterious compiler crashes when building dfl.socket. The underlying problem is in DMD, though I don't know how to reproduce it. This is just a workaround.
2010-09-15 01:00:30 +00:00
Walter Bright
b8ce58ccd1
detab sources
2010-08-23 02:14:45 +00:00
Andrei Alexandrescu
3f2b8c12ea
64-bit compatibility work
2010-08-22 20:55:22 +00:00
Andrei Alexandrescu
908a8c9366
Fixed failing unittest
2010-07-28 08:08:06 +00:00
Shin Fujishiro
f6b833c8ed
Fixed bugzilla 2835: std.socket.TcpSocket doesn't actually connect.
...
Thanks to Unknown W. Brackets and Alexey Ivanov for the patch!
sockaddr_in.sin_family is auto-initialized with AF_INET only on Windows
(compare std.c.windows.winsock & core.sys.posix.netinet.in_). TcpSocket
should explicitly set sin_family to AF_INET.
2010-05-23 08:09:59 +00:00
Shin Fujishiro
4e2d8f30fd
Added FreeBSD code.
2010-05-17 03:02:16 +00:00
Don Clugston
3a1aec52a6
Fixed the workaround.
2010-03-16 07:52:19 +00:00
Walter Bright
cf7c817ca7
socket unittest failure workaround
2010-03-15 21:37:54 +00:00
Sean Kelly
9be950356b
Converted "static this" to "shared static this" where appropriate.
2010-03-09 03:54:06 +00:00
Andrei Alexandrescu
02243ab1f3
minor
2009-04-23 09:03:47 +00:00
Walter Bright
a68aeb595b
more socket unittest problems
2009-04-19 17:43:10 +00:00
Walter Bright
b47db76c31
epmap on Windows
2009-04-19 17:38:38 +00:00
Andrei Alexandrescu
29480d7df6
minor
2009-04-06 20:45:10 +00:00
Andrei Alexandrescu
6f1c06c040
minor
2009-04-06 17:42:59 +00:00
Sean Kelly
035f8f39c1
Resolved differences between Posix and Windows declarations for BSD socket routines by standardizing on the Posix declaration (which is likely the correct one). This required reverting some changes to std.socket and changing the type of SOCKET from uint to int, which shoudl be fine since they're both 4 bytes anyway.
2009-03-26 18:04:44 +00:00
Sean Kelly
0b1bf3b1d5
2009-03-26 15:13:53 +00:00
Sean Kelly
e108928d21
* Modified all std modules to use core.sys.posix in place of std.c.linux.
...
* Transformed std.c.linux.* into wrappers around core.sys.posix modules where appropriate.
* Added std.c.osx as the OSX equivalent of std.c.linux.
* Added std.c.osx.socket for OSX-specific socket declarations not covered by the Posix spec.
* Altered all makefiles to zip, etc, the new std.c.osx package.
2009-03-26 03:02:32 +00:00
Sean Kelly
c4a3aab657
The std.c modules now simply wrap the corresponding core.stdc modules to expose standard C declarations. std.c.os remains unchanged thus far, but will likely be altered as well. This unfortunately eliminates the auto doc generation for the std.c modules, since the modules are now largely empty. If the user wants to know what they contain, how the functions work, etc, I suggest for now simply referring to a C library spec--the core.stdc modules conform almost exactly to the C99 library definition.
2009-03-20 18:52:45 +00:00