sgjesse@google.com
b40b0690c6
Fix Android build
...
R=whesse@google.com
BUG=
Review URL: https://codereview.chromium.org//922693002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43728 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-12 15:13:35 +00:00
sgjesse@google.com
3fe2af43d1
Reafctor to use 'const RawAddr&' or 'RawAddr*' in the eventhandler code
...
Also pass the port as part of RawAddr instead of in a separate argument
when both addr and port are passed.
R=kustermann@google.com
BUG=
Review URL: https://codereview.chromium.org//910183003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43722 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-12 11:39:20 +00:00
sgjesse@google.com
7b7ac3620a
Add support to specify the source address for socket connect
...
BUG=http://dartbug.com/22253
R=kustermann@google.com , lrn@google.com
Review URL: https://codereview.chromium.org//908873002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43638 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-10 11:56:51 +00:00
sgjesse@google.com
91e7a32eb5
Remove SetNonBlocking/SetBlocking methods from Socket and add missing close-on-exec
...
The methods SetNonBlocking/SetBlocking on Sockets where not implemented on Linux
and not used on Windwsm. Removed and call directly to FDUtils when needed.
In Socket::Accept setting close on exec was missing on OS X and Android.
R=kustermann@google.com
BUG=
Review URL: https://codereview.chromium.org//907883002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43627 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-10 07:29:36 +00:00
ajohnsen@google.com
343ee141f2
Don't print errors to stderr in socket_*.
...
BUG=https://code.google.com/p/dart/issues/detail?id=20070
R=ricow@google.com
Review URL: https://codereview.chromium.org//426833004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38660 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-29 07:13:58 +00:00
ajohnsen@google.com
d481c8b61c
Start accepting incoming sockets earlier on Windows, to associate a at AcceptEx error to 'ServerSocket.bind'.
...
Note that I have not been able to reproduce the error, thus no test is added for this case.
BUG=http://code.google.com/p/dart/issues/detail?id=19815
R=whesse@google.com
Review URL: https://codereview.chromium.org//426613002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38606 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-28 11:36:35 +00:00
iposva@google.com
1d2085e773
- Fix truncation in Socket calls.
...
R=asiva@google.com
Review URL: https://codereview.chromium.org//312343002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@37037 260f80e4-7a28-3924-810f-c04153c831b5
2014-06-05 17:33:52 +00:00
zra@google.com
47d03a04a0
Adds AI_ADDRCONFIG back to address lookup on Android.
...
R=ajohnsen@google.com
Review URL: https://codereview.chromium.org//257613002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@35425 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-25 14:45:34 +00:00
zra@google.com
37baacb116
Small fixes for Android.
...
R=johnmccutchan@google.com
Review URL: https://codereview.chromium.org//254383003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@35342 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-23 23:20:24 +00:00
ajohnsen@google.com
0c157cd31e
Move signal_blocker to platform and use it by default in TEMP_FAILURE_RETRY.
...
BUG=http://code.google.com/p/dart/issues/detail?id=16927
R=johnmccutchan@google.com , sgjesse@google.com
Review URL: https://codereview.chromium.org//165723007
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@33745 260f80e4-7a28-3924-810f-c04153c831b5
2014-03-17 13:51:11 +00:00
sgjesse@google.com
1e3e88769f
Socket I/O statistics for Observatory
...
This is the first part of adding I/O statistics to the observatory.
R=ajohnsen@google.com , johnmccutchan@google.com
Review URL: https://codereview.chromium.org//163903002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@33366 260f80e4-7a28-3924-810f-c04153c831b5
2014-03-06 11:12:08 +00:00
ajohnsen@google.com
4b35c1e387
Fix host lookup on linux, to skip IPv6 if there are no global IPv6 addresses.
...
BUG=https://code.google.com/p/dart/issues/detail?id=16742
R=sgjesse@google.com
Review URL: https://codereview.chromium.org//168943002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@32716 260f80e4-7a28-3924-810f-c04153c831b5
2014-02-17 10:08:34 +00:00
ajohnsen@google.com
0f52be7f63
Make std* blocking file-descriptors.
...
This will most likely be a performance regression when piping, that
we'll have to look into in the future (copying data through
message-passing).
BUG=
R=sgjesse@google.com
Review URL: https://codereview.chromium.org//154273003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@32715 260f80e4-7a28-3924-810f-c04153c831b5
2014-02-17 10:06:35 +00:00
johnmccutchan@google.com
919dc2d6eb
* Introduce ThreadInterrupter which calls a TLS set callback when thread is interrupted.
...
* Threads can only register and unregister themselves with ThreadInterrupter.
* Profiler is no longer involved in interrupting threads. It's just a callback and the buffer.
* Profiler operates lock free using an atomic operation to reserve sample in sample buffer.
* Linux, Mac, and Windows done.
R=asiva@google.com
Review URL: https://codereview.chromium.org//109803002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@31170 260f80e4-7a28-3924-810f-c04153c831b5
2013-12-16 18:52:15 +00:00
zra@google.com
ae1d431b10
Fixes build of socket_android.cc
...
Review URL: https://codereview.chromium.org//114303002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@31107 260f80e4-7a28-3924-810f-c04153c831b5
2013-12-12 19:32:40 +00:00
sgjesse@google.com
8b5d54123e
Fix building on Mac OS
...
Use VOID_TEMP_FAILURE_RETRY macro on Linux and Android as well when
the return value is not used..
TBR=ajohnsen@google.com
Fix analyzer errors in UDP test and update comment in status file
TBR=ajohnsen@google.com
BUG=
Review URL: https://codereview.chromium.org//112593003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@31101 260f80e4-7a28-3924-810f-c04153c831b5
2013-12-12 16:20:13 +00:00
sgjesse@google.com
7b70c2c267
Add UDP support to dart:io
...
Initial implementation of UDP support in dart:io
Added a RawDatagramSocket which gets the same events as a RawSocket
except that READ_CLOSED is never received.
The receive from a RawDatagramSocket returns a Datagram object where
the senders address and port is presten together with the data.
The send on a RawDatagramSocket takes data and the address and port of
the destination.
Extended the number of socket options to support UDP.
Added getting the socket options.
R=ajohnsen@google.com
BUG=http://dartbug.com/1975
Review URL: https://codereview.chromium.org//85993002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@31098 260f80e4-7a28-3924-810f-c04153c831b5
2013-12-12 15:45:25 +00:00
sgjesse@google.com
32e6279482
Update InternetAddress
...
Add InternetAddress constructor for numeric addresses. An
InternetAddress can now be constructed without using DNS resolving.
Add hash code calculated from the bytes of the address.
Add equality operator comparing the bytes of the address.
Added check for multicast addresses.
R=ajohnsen@google.com
Review URL: https://codereview.chromium.org//76383002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@30449 260f80e4-7a28-3924-810f-c04153c831b5
2013-11-20 10:01:22 +00:00
ajohnsen@google.com
545455cccb
Undo some of the large-file changes on Android, as only some of them are implemented.
...
BUG=
R=zra@google.com
Review URL: https://codereview.chromium.org//76413003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@30415 260f80e4-7a28-3924-810f-c04153c831b5
2013-11-19 16:24:10 +00:00
ajohnsen@google.com
7fef1ff77a
Add support for working with large files on unix systems, in dart:io.
...
BUG=
R=sgjesse@google.com
Review URL: https://codereview.chromium.org//63363010
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@30399 260f80e4-7a28-3924-810f-c04153c831b5
2013-11-19 11:38:20 +00:00
ajohnsen@google.com
57d8b90fe1
Rename remoteHost to remoteAddress on *Socket.
...
BUG=
R=sgjesse@google.com
Review URL: https://codereview.chromium.org//59213003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29904 260f80e4-7a28-3924-810f-c04153c831b5
2013-11-05 13:24:49 +00:00
ajohnsen@google.com
33c74ee3d7
Remove usage of legacy inet_ntop from dart:io.
...
BUG=https://code.google.com/p/dart/issues/detail?id=13577
R=sgjesse@google.com
Review URL: https://codereview.chromium.org//25411003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28090 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-01 11:27:46 +00:00
ajohnsen@google.com
d11df78618
Make stdout and stderr async.
...
This required some minor changes to the Windows eventhandler, as we now spawn a new thread for writes (just like we do for reads).
BUG=https://code.google.com/p/dart/issues/detail?id=7218
R=sgjesse@google.com
Review URL: https://codereview.chromium.org//23609060
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27811 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-24 11:47:53 +00:00
whesse@google.com
8b24dd1bcf
Fix socket_android.cc to agree with socket_linux.cc and compile.
...
BUG=
R=iposva@google.com
Review URL: https://codereview.chromium.org//24165006
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27803 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-24 09:34:10 +00:00
sgjesse@google.com
d1037c4493
Fix bugs in SocketAddress
...
The formatting of IPv6 strings was wrong on Linux and Mac OS - used
the IPv4 structure.
The fixed socket addresses for any and loopback for IPv6 was mixed up.
R=whesse@google.com
BUG=
Review URL: https://codereview.chromium.org//24269017
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27703 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-20 12:46:50 +00:00
ajohnsen@google.com
38bae0af02
Add FileSystemWatcher class to dart:io.
...
BUG=
R=sgjesse@google.com
Review URL: https://codereview.chromium.org//19263003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27048 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-03 12:43:08 +00:00
cbracken@google.com
a6ace331f3
Replaced strerror() calls with threadsafe strerror_r().
...
Mac/Android use the XSI-compliant definition of strerror_r() which stores the message in the passed-in buffer.
Linux uses the GNU-specific definition of strerror_r() which takes a buffer and returns the message in a char* (which may or may not be the passed-in buffer).
BUG=
R=iposva@google.com
Review URL: https://codereview.chromium.org//22634003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@25943 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-08 20:24:05 +00:00
iposva@google.com
2229450865
- Use TCP_NODELAY when using the coverage tool and ddbg.
...
- Use IPPROTO_TCP instead of SOL_TCP for increased portability.
R=asiva@google.com , hausner@google.com
Review URL: https://codereview.chromium.org//18829003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24865 260f80e4-7a28-3924-810f-c04153c831b5
2013-07-09 21:14:31 +00:00
ajohnsen@google.com
6005ff6a18
Fix comment from earlier commit.
...
BUG=
R=iposva@google.com
Review URL: https://codereview.chromium.org//18087003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24526 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-27 16:45:40 +00:00
whesse@google.com
6aa0fafa00
Fix runtime build for Android
...
BUG=
R=sgjesse@google.com
Review URL: https://codereview.chromium.org//17860002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24510 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-27 08:31:17 +00:00
iposva@google.com
2d2f1bf4ea
- Use VOID_TEMP_FAILURE_RETRY where needed
...
Review URL: https://codereview.chromium.org//17840009
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24505 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-27 01:14:12 +00:00
ajohnsen@google.com
7aa0222b5b
Avoid picking port 65535 for ServerSockets, when any is requested.
...
Some browsers block requests to 65535.
BUG=
R=sgjesse@google.com
Review URL: https://codereview.chromium.org//17842003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24471 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-26 15:12:56 +00:00
ajohnsen@google.com
3ad9779be6
Add reverse dns lookup as a method on InternetAddress.
...
BUG=
R=sgjesse@google.com
Review URL: https://codereview.chromium.org//17640008
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24393 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-25 11:27:48 +00:00
ajohnsen@google.com
63e62f6806
Update mac and android Socket::LookupAddress.
...
BUG=
Review URL: https://codereview.chromium.org//17341008
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24269 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-21 08:13:42 +00:00
ajohnsen@google.com
4624420914
Add NetworkAdaptor to dart:io.
...
NetworkAdaptor contains a static method, list, that will query the
underlaying system for active network adaptors.
BUG=
R=sgjesse@google.com
Review URL: https://codereview.chromium.org//16514010
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24267 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-21 07:58:48 +00:00
johnmccutchan@google.com
9d264aaee5
Add support for loading scripts from http
...
R=iposva@google.com
Review URL: https://codereview.chromium.org//15966002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@23351 260f80e4-7a28-3924-810f-c04153c831b5
2013-05-29 14:34:15 +00:00
whesse@google.com
a76b78a26e
dart:io | Fix a few bugs in the Android port of dart:io.
...
BUG=
R=sgjesse@google.com
Review URL: https://codereview.chromium.org//15894004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@23260 260f80e4-7a28-3924-810f-c04153c831b5
2013-05-28 12:58:30 +00:00
ajohnsen@google.com
6a78c0c0b8
Add v6Only named argument to ServerSocket and etc.
...
BUG=
R=sgjesse@google.com
Review URL: https://codereview.chromium.org//14766003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@22309 260f80e4-7a28-3924-810f-c04153c831b5
2013-05-02 11:23:40 +00:00
smok@google.com
ebbc2020a2
Put everything in runtime/bin into '::dart::bin' namespace.
...
Review URL: https://codereview.chromium.org//14341015
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@22032 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-25 14:22:30 +00:00
sgjesse@google.com
d27309942c
Fix broken Mac OS socket code
...
The order of the fields in the sockaddr structures on Mac OS was different and we where relying on the Linux/Windows order of fields. This should now be platform independent.
TBR=ajohnsen@google.com
BUG=
Review URL: https://codereview.chromium.org//14139032
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@21940 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-24 11:51:56 +00:00
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
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
tball@google.com
ca8b23183b
Added Socket::SetBlocking() and Socket::SetNonBlocking().
...
Review URL: https://codereview.chromium.org//12380032
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19334 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-01 18:33:17 +00:00
iposva@google.com
9046a44a37
Prepare for removal of source_filter.gypi:
...
- Guard OS-dependent source files with #if TARGET_OS_* in a similar
fashion to the architecture dependent sources.
Review URL: https://codereview.chromium.org//12282051
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18786 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-20 21:17:38 +00:00
tball@google.com
898ec7731f
Added Socket::Close() function.
...
Review URL: https://codereview.chromium.org//12209047
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18199 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-07 00:44:55 +00:00
gram@google.com
3601944836
Revised CL for customisable logging (replacing printfs).
...
Review URL: https://codereview.chromium.org//11312242
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15096 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-19 17:38:15 +00:00