ajohnsen@google.com
55963a1a6d
Add new InternetAddress class with a static lookup function (including IPv6
...
results).
Reapply of https://codereview.chromium.org/13880029/ with fixes.
BUG=
Review URL: https://codereview.chromium.org//14469002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@21934 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-24 09:26:58 +00:00
ajohnsen@google.com
60946b53fc
Revert "Add new InternetAddress class with a static lookup function (including IPv6 results)."
...
Revert "Attempt to fix strict align issue."
Revert "Trying another fix."
BUG=
Review URL: https://codereview.chromium.org//14036017
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@21928 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-24 08:10:00 +00:00
ajohnsen@google.com
20d1f5ddda
Add new InternetAddress class with a static lookup function (including IPv6 results).
...
Reapply of https://codereview.chromium.org/14083007/ with fixes.
BUG=
Review URL: https://codereview.chromium.org//13880029
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@21923 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-24 07:12:05 +00:00
sgjesse@google.com
afcb3ce69e
Revert "Add new InternetAddress class with a static lookup function (including IPv6 results)"
...
TBR=ajohnsen@google.com
Review URL: https://codereview.chromium.org//14081024
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@21865 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-23 10:07:03 +00:00
ajohnsen@google.com
b33d142414
Add new InternetAddress class with a static lookup function (including IPv6 results).
...
Socket.connect/ServerSocket.bind now accepts IPv6 host names. If a new ServerSocket is connected to an IPv6 interface, it will (if possible) support incoming IPv4 connections as well.
BUG=
Review URL: https://codereview.chromium.org//14083007
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@21862 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-23 09:36:18 +00:00
sgjesse@google.com
efcd056ebe
Support upgrading sockets to secure sockets
...
This build on the support for upgrading raw sockets to raw secure sockets.
R=ajohnsen@google.com
BUG=https://code.google.com/p/dart/issues/detail?id=8789
Review URL: https://codereview.chromium.org//14034012
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@21859 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-23 06:50:59 +00:00
sgjesse@google.com
e1aa202b58
Add the ability to secure an already established raw socket connection
...
The static methods secure and secureServer can be used to start
TLS handshake as eihter client or server.
This CL only implement the securing of RawSocket.
This also changes the semantics of cancelling a subscription on a
RawSocket from closing the socket to just pausing.
R=ager@google.com
BUG=https://code.google.com/p/dart/issues/detail?id=8789
Review URL: https://codereview.chromium.org//13502004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@21719 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-19 07:37:37 +00:00
floitsch@google.com
466d6670c1
Refactor Future constructors.
...
BUG=
Review URL: https://codereview.chromium.org//14070010
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@21517 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-15 21:24:27 +00:00
floitsch@google.com
5431a5af54
Remove AsyncError with Expando.
...
Review URL: https://codereview.chromium.org//14251006
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@21498 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-15 18:58:32 +00:00
floitsch@google.com
f553392322
Change StreamController constructor.
...
Review URL: https://codereview.chromium.org//14196003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@21472 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-15 16:34:26 +00:00
floitsch@google.com
e2ee353940
Rename unsubscribeOnError to cancelOnError.
...
Review URL: https://codereview.chromium.org//14251013
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@21469 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-15 16:07:36 +00:00
ajohnsen@google.com
b4eacbf8aa
Rename RandomAccessFile.readList and RandomAccessFile.writeList to RandomAccessFile.readInto and RandomAccessFile.writeFrom.
...
BUG=
Review URL: https://codereview.chromium.org//14018007
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@21466 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-15 15:44:41 +00:00
ajohnsen@google.com
67650cb16e
Remove .writeStream, .consume and rewrite IOSink to correctly implement a (sane) well-defined behaviour of the .done future.
...
BUG=
Review URL: https://codereview.chromium.org//14028017
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@21416 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-15 07:35:45 +00:00
floitsch@google.com
285849c801
Change hasSubscribers to hasListener.
...
Review URL: https://codereview.chromium.org//14103010
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@21337 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-12 09:30:05 +00:00
floitsch@google.com
134302aa48
Remove second generic argument of StreamConsumer.
...
Review URL: https://codereview.chromium.org//14172013
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@21303 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-11 18:11:40 +00:00
ajohnsen@google.com
dcaf52732e
Remove StreamSink(replaced by EventSink) and make IOSink extend EventSink.
...
With this change 'writeBytes' was renamed to 'add'.
BUG=
Review URL: https://codereview.chromium.org//14150002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@21275 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-11 12:54:19 +00:00
ajohnsen@google.com
140409a05a
Wrap stdout/stderr/stdin to only expose the relevant methods.
...
BUG=https://code.google.com/p/dart/issues/detail?id=9439,https://code.google.com/p/dart/issues/detail?id=9593
Review URL: https://codereview.chromium.org//13787003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@21063 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-08 12:13:03 +00:00
floitsch@google.com
e72250e49b
StreamConsumer has an addStream and a close functions.
...
The 'consume' function will be removed.
Review URL: https://codereview.chromium.org//13680002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@20979 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-05 16:22:11 +00:00
floitsch@google.com
f85fa4feff
Make argument to StringSink.writeln optional.
...
BUG= http://dartbug.com/9102
Review URL: https://codereview.chromium.org//12870003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@20074 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-15 12:45:40 +00:00
ajohnsen@google.com
fb53f40e65
Add setOption method on Socket/RawSocket.
...
This will allow the user to enable TCP_NODELAY on the native sockets.
BUG=
Review URL: https://codereview.chromium.org//12614014
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@20014 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-14 12:46:54 +00:00
sgjesse@google.com
a429f3aa83
Fix checked mode error on socket IOSink
...
The set encoding method on a Sockets IOSink implementation failed in
checked mode. Added a test calling all IOSink methods on a socket.
BUG=https://code.google.com/p/dart/issues/detail?id=9020
R=ajohnsen@google.com
Review URL: https://codereview.chromium.org//12408004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19803 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-11 16:15:56 +00:00
lrn@google.com
bead146749
Renamed StreamSink to EventSink. Renamed signalError to addError.
...
Review URL: https://codereview.chromium.org//12610006
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19683 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-08 11:31:19 +00:00
sgjesse@google.com
b6096848b1
Make IOSink implement StringSink
...
Besides adding the StringSink methods I also added writeBytes and
deprecated both add and addString.
To handle the encoding of strings the IOSike has an encoding
property. This property is mutable in situation when it makes sense to
change encoding of what is written. The exception here is for HTTP
where the encoding is determined from the header and the encoding
cannot be changed.
R=ajohnsen@google.com , ager@google.com , nweiz@google.com
BUG=
Review URL: https://codereview.chromium.org//12504006
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19676 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-08 10:06:28 +00:00
whesse@google.com
8929d6c037
dart:io | Fix a crash when read was called on a closed socket on Windows.
...
BUG=dartbug.com/8798
Review URL: https://codereview.chromium.org//12395017
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19396 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-04 16:16:18 +00:00
ajohnsen@google.com
ba01a8ecfc
Fix socket so we stop the consumer before we close the socket - this makes sure we socket-close future don't result in a socket write.
...
BUG=https://code.google.com/p/dart/issues/detail?id=8874
Review URL: https://codereview.chromium.org//12393010
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19316 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-01 14:20:38 +00:00
sgjesse@google.com
7d6ddd4ae9
Remove wrong type annotation
...
nativeCreateConnect returns either a bool (only true) or an OSError.
TBR=ajohnsen@google.com
BUG=
Review URL: https://codereview.chromium.org//12383043
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19276 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-01 07:53:11 +00:00
ajohnsen@google.com
b6f9a3e395
Correctly close done future with an error, before a normal complete can happen.
...
BUG=
Review URL: https://codereview.chromium.org//12387014
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19229 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-28 14:16:05 +00:00
ajohnsen@google.com
f5ade02146
Make sure the socket unsubscribes on error, so we don't get race conditions between an error and an immidiately following close event.
...
This makes sure we always see the expected errors.
BUG=
Review URL: https://codereview.chromium.org//12314148
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19117 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-27 09:27:01 +00:00
lrn@google.com
6b4f4b1bab
Change new List(n) to return fixed length list.
...
Deprecate List.fixedLength, add List.filled.
Make Iterable.toList and List.from take "growable" argument,
defaulting to false.
Review URL: https://codereview.chromium.org//12328104
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19112 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-27 08:45:04 +00:00
ajohnsen@google.com
7912f3f1bd
Rewrite the Future-pipeline from the Socket to the HttpClientRequest/HttpResponse.
...
Before we had two future, HttpClientRequest/HttpResponse.done and
Socket.addStream's return valud(stored as _writeDoneFuture in
http_impl). Many issues in our code was based on the futures not
being the same, that the user will get a done event, while the socket is
still writing data on the socket.
Immidiate calls to HttpServer/HttpClient.close, after e.g. pipe, would
then destroy the socket while still having data in dart buffers.
The new approach makes sure that there is a direct future link between
the socket and the user.
BUG=
Review URL: https://codereview.chromium.org//12328114
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19111 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-27 08:27:12 +00:00
whesse@google.com
77a1a0c56a
dart:io | Fix writing to a Socket while and after calling destroy() on it.
...
BUG=dartbug.com/8681
TEST=standalone/io/http_client_request_test
Review URL: https://codereview.chromium.org//12330109
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18969 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-25 14:52:39 +00:00
ajohnsen@google.com
167394115a
Don't send null data events on a Socket stream.
...
BUG=
Review URL: https://codereview.chromium.org//12334035
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18877 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-22 11:24:35 +00:00
sgjesse@google.com
488b016a2f
Merge IO v2 branch to bleeding edge
...
R=ager@google.com , ajohnsen@google.com , whesse@google.com
BUG=
Review URL: https://codereview.chromium.org//12316036
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18820 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-21 11:58:11 +00:00
floitsch@google.com
4a7dfd2da3
Big merge from experimental to bleeding edge.
...
Review URL: https://codereview.chromium.org//11783009
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16687 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-07 11:23:16 +00:00
sgjesse@google.com
606bfd5e96
Reapply "Fixes to eventhandler and HTTP""
...
This reapplies r16252 with a number of fixes.
R=ager@google.com
BUG=
Review URL: https://codereview.chromium.org//11606020
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16306 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-19 08:11:51 +00:00
whesse@google.com
7bc0bbd284
Add built-in root certificates to dart:io SecureSocket.
...
Add flag that allows them to disabled at runtime.
BUG=
Review URL: https://codereview.chromium.org//11308271
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15634 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-03 13:15:51 +00:00
whesse@google.com
49d23f1c0a
Add onError to dart:io SecureSocket. Allow onConnect and outputStream to coexist on Socket and SecureSocket.
...
BUG=
Review URL: https://codereview.chromium.org//11280162
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15378 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-27 10:09:35 +00:00
whesse@google.com
0807c2662b
Implement input and output streams for secure network sockets.
...
BUG=dart:6701
Review URL: https://codereview.chromium.org//11416108
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15267 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-22 16:37:10 +00:00
hausner@google.com
65bf9cbb2a
Remove abstract from class members in dart libraries
...
Add VM flag to produce compile error for explicitly
defined abstract class members.
Review URL: https://codereview.chromium.org//11299121
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15210 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-21 17:23:35 +00:00
floitsch@google.com
8e6f238f86
a === b -> identical(a, b)
...
Replace === null with == null.
BUG=http://dartbug.com/6380
Review URL: https://codereview.chromium.org//11361190
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14794 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-12 17:19:58 +00:00
lrn@google.com
7e6ae8ea09
Renaming IndexOutOfRangeException to RangeError.
...
It now extends ArgumentError.
Review URL: https://codereview.chromium.org//11275042
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14405 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-01 13:46:30 +00:00
sgjesse@google.com
27adbdd138
Start reading data from sockets directly into external byte arrays
...
This adds a new read function to Dart sockets which delivers data in a
system allocated buffer. For now just use that for socket input
streams.
The IOBuffer class does not do much at the moment, but the idea of
adding it is to be able to centralize the management of the IO
buffers. One thing I am considering here is to keep a cache of free
buffers which can be reused without freeing and re-allocating.
R=ager@google.com , ajhonsen@google.com
BUG=
Review URL: https://codereview.chromium.org//11338037
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14321 260f80e4-7a28-3924-810f-c04153c831b5
2012-10-31 09:56:50 +00:00
ager@google.com
aac030e777
Use patching for dart:io.
...
This allows the tools such as dartdoc to operate on dart:io
in the same way as it does with other code and allows the
implemenation of parts of dart:io for dart2js if we ever
want to do that.
The current patching is very VM specific. I have only moved
stuff to patch files when they actually need to be. For
Process and Socket everything has to be moved because they
use native fields. For the rest, only the individual native
calls have been put in patch files.
R=sgjesse@google.com ,ajohnsen@google.com
BUG=
Review URL: https://codereview.chromium.org//11337019
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14259 260f80e4-7a28-3924-810f-c04153c831b5
2012-10-30 10:32:30 +00:00