Commit graph

180 commits

Author SHA1 Message Date
k-hara
01df2f60be Remove redundant parenthesis for getters, and use assignment syntax for setters 2012-11-23 15:07:17 +09:00
jmdavis
f73ec02fc3 Remove parens from some @property calls. 2012-11-17 16:44:55 -08:00
jmdavis
cf22dc636a Uncomment unwanted overload of Socket.select.
_No_ D function in druntime or Phobos should be taking time values as
naked integral values. I thought that we'd caught them all, but
Socket.select still has such an overload unfortunately. Given that we're
trying not to break anything right now and deprecated still triggers
errors rather than warnings, I simply uncommented that overload for now.
That way, new code won't use it. We may or may not actually deprecate it
later.

I'm not particularly enthused about the TimeVal type existing in
std.socket either, since it's just duplicating core.time.Duration's
functionality, but I'm not going to try and get rid of it right now.
However, I _did_ move select's Duration overload so that it was first
with the idea that that would increase the odds of people using that
one instead. No functionality should have changed in this commit.
2012-11-16 22:58:25 -08:00
jmdavis
35e83863c2 Added @property to some functions in std.socket which are clearly properties. 2012-11-13 02:34:15 -08:00
jmdavis
6451af6281 Make std.socket.formatSocketError public.
If it's private, it's impossible to throw a SocketOSException outside of
std.socket, because it uses it as a default argument in its
constructors.
2012-11-11 01:31:42 -08:00
jmdavis
eba2b94fb4 Fixed the constructors for std.socket's exceptions.
They didn't even include the file and line number. Now they follow the
standard pattern for exception constructors with the exception-specific
parameters included in the appropriate places.
2012-11-05 02:13:09 -08:00
Vladimir Panteleev
fde0998dea Fix various problems in DDoc, identified from compiler warnings. 2012-10-19 19:09:47 +03:00
jmdavis
3d92608c47 Added more deprecation messages. 2012-10-15 21:40:36 -07:00
kai
3632a5ba96 Add required cast for 64 bit. 2012-09-02 20:36:03 +02:00
jmdavis
28781bfb9f Old deprecations which were not properly taken care of previously. 2012-07-07 02:03:49 -07:00
Damian Ziemba
067088b278 Allow use of UnixAddress on Unix-like platforms.
In current state static if check fails even if platform is
Linux, FreeBSD etc. As we noticed with CyberShadow the check for
struct existance should have form of is(StructName).
2012-03-09 16:34:15 +01:00
Vladimir Panteleev
635400bcec std.socket: Improve parseAddress example
Make it clear that parseAddress can be used to validate IP addresses,
and fix incorrect toHostNameString usage (it returns null when the
reverse was not found, and not throw an exception).

http://stackoverflow.com/q/9403297/21501
2012-03-08 22:51:04 -08:00
Vladimir Panteleev
bd913cc535 std.socket: SocketSet.max should be a @property 2012-03-08 22:51:04 -08:00
Vladimir Panteleev
3443cc8670 std.socket: Explicitly mark body-less methods in abstract class as abstract
I recall someone was having linker errors while trying to subclass
Address. This chance turns it into a compiler error.
2012-03-08 22:51:04 -08:00
jmdavis
610d4ee032 Revert "Add a function for reconnect in TcpSocket, used by server high performance socket programming."
This reverts commit d6d72e1b3a.

Reverted per David Nadlinger's recommendation:

4eb8621864 (commitcomment-892944)
2012-01-23 12:16:44 -08:00
jmdavis
c0b464fae2 Revert "Changes required for Win64 support by MinGW64"
This reverts commit 6caa328cfb.

This broke all existing 64-bit builds.
2012-01-22 17:17:32 -08:00
Andrei Alexandrescu
4eb8621864 Merge pull request #373 from raojm/patch-1
Add a function for reconnect in TcpSocket, used by server high performance socket programming
2012-01-22 13:27:20 -08:00
Andrei Alexandrescu
93a2827d53 Merge pull request #390 from venix1/Win64
Changes required for Win64 support by MinGW64
2012-01-22 13:22:47 -08:00
Daniel Green
58f4356ca2 Change version( Win32 ) to version( Windows ) when Win64 would be supported as well. 2012-01-16 22:10:18 -05:00
Daniel Green
6caa328cfb Changes required for Win64 support by MinGW64 2012-01-16 17:26:59 -05:00
raojm
d6d72e1b3a Add a function for reconnect in TcpSocket, used by server high performance socket programming. 2011-12-17 00:41:36 +08:00
k-hara
7f67f8d932 Fix for 4251 - assumeUnique cannot receive in char[] 2011-12-15 17:34:10 +09:00
David Nadlinger
e312f9898b Strict @property syntax compliance.
This enables the test suite to build with the -property switch enabled.

std.cpuid: vendor()/processor() have not been converted to properties in accordance to core.cpuid.
std.xml: Element.text() cannot be a property due to the optional parameter.
2011-12-04 09:56:14 +01:00
David Nadlinger
0c15936c23 Build fix for OS X (fixes IPPROTO_RAW, … std.socket ambiguity errors).
Fixes the socket symbol ambiguities by importing the same symbols from std.c.osx.socket as done on Linux from std.c.linux.socket.

Test suite still not green due to std.regex/FReD breakage.
2011-11-07 22:44:42 +01:00
Vladimir Panteleev
89461b1e7f std.socket: There is no such thing as IN6ADDR_NONE. 2011-09-20 01:56:27 +02:00
Vladimir Panteleev
2fc2a1bd1f std.socket: Fix build failure on POSIX
More weird constness compiler behavior...
2011-09-20 01:55:06 +02:00
Vladimir Panteleev
3cd801bf33 Merge branch 'master' into new-std-socket
Conflicts:
	std/socket.d
2011-09-20 02:29:15 +03:00
Vladimir Panteleev
d7c771a35d std.socket: Remove redundant string duplication 2011-09-17 18:09:42 +03:00
Vladimir Panteleev
d6d2cebd43 std.socket: Use "in char[]" instead of string arguments 2011-09-17 18:05:17 +03:00
Vladimir Panteleev
9a86fb72b8 std.socket: Remove user-facing socket-specific numeric address types. 2011-09-16 02:15:44 +03:00
Vladimir Panteleev
89feff70e2 std.socket: Add unittest for WINSOCK_TIMEOUT_SKEW 2011-09-14 17:17:01 +03:00
Vladimir Panteleev
5fac9e2b5d std.socket: Failed reverse lookups return null, not throw 2011-09-14 17:01:46 +03:00
Vladimir Panteleev
34e4346cf2 std.socket: Fix failing unittests 2011-09-14 16:51:07 +03:00
Vladimir Panteleev
2fbb7d6287 std.socket: Avoid reallocating address in Socket.receiveFrom 2011-09-12 23:40:00 +03:00
Vladimir Panteleev
d21e98e1b9 std.socket: Enumeration clean-up, documentation, completion 2011-09-12 06:39:25 +03:00
Vladimir Panteleev
7dab11c389 std.socket: Add UnixAddress 2011-09-11 20:48:05 +03:00
Vladimir Panteleev
e9744791dd std.socket: Add IPV6_V6ONLY SocketOption 2011-09-09 00:43:47 +03:00
Vladimir Panteleev
72490a5d12 std.socket: Add Socket.setKeepAlive for Windows and Linux 2011-09-08 23:57:16 +03:00
Vladimir Panteleev
fc402b1897 std.socket: Add static InternetAddress.toString method 2011-09-08 16:16:48 +03:00
Vladimir Panteleev
0ed0372834 std.socket: POSIX fixes 2011-09-08 15:49:58 +03:00
Vladimir Panteleev
afc14edade std.socket, .socketstream: Remove ws2_32 notice, a pragma(lib) exists 2011-09-08 14:49:51 +03:00
Vladimir Panteleev
f64c68be1d std.socket: Add examples for DNS functions/classes, DDoc fixes 2011-09-08 14:48:21 +03:00
Vladimir Panteleev
af32eda6a7 std.socket: Socket.send*/receive* DDoc 2011-09-08 03:38:23 +03:00
Vladimir Panteleev
c4514e9d10 std.socket: Drop printf, add and use softUnittest 2011-09-08 03:12:40 +03:00
Vladimir Panteleev
00affa3cc1 std.socket: Recommend new functions instead of IPv4-only classes 2011-09-08 02:44:27 +03:00
Vladimir Panteleev
e22af4c8fe std.socket: Add parseAddress function 2011-09-08 02:40:27 +03:00
Vladimir Panteleev
d5b6117af1 std.socket: Disambiguate usage of "address" term in DDoc 2011-09-08 02:10:40 +03:00
Vladimir Panteleev
28540d07b6 std.socket: Add AF_INET6 support to Socket.createAddress 2011-09-08 01:19:07 +03:00
Vladimir Panteleev
6d710ccc4a std.socket: Throw appropriate exception in local/remoteAddress 2011-09-08 01:19:05 +03:00
Vladimir Panteleev
4698949399 std.socket: Replace Socket.newFamilyObject with createAddress
Socket.newFamilyObject was a private method which simply called
createAddress().
2011-09-08 01:19:03 +03:00