Søren Gjesse
65872873d2
Remove server socket references
...
The use of server socket references was deprecated in 1.9 and marked
for removal in 1.10.
R=kustermann@google.com
BUG=http://dartbug.com/22187
Review URL: https://codereview.chromium.org/1072783003 .
2015-10-05 12:25:20 +02: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
kustermann@google.com
615d1a01ac
Reland "Introduce optional 'bool shared' parameter to ServerSocket.bind() ..."
...
R=sgjesse@google.com
Review URL: https://codereview.chromium.org//913753002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43678 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-11 10:01: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
kustermann@google.com
1d6231bacd
Revert "Introduce optional 'bool shared' parameter to ServerSocket.bind() ..."
...
Review URL: https://codereview.chromium.org//896213002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43476 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-04 16:00:21 +00:00
kustermann@google.com
3c6c29fee9
Introduce optional 'bool shared' parameter to ServerSocket.bind() ...
...
R=sgjesse@google.com , wibling@google.com
Review URL: https://codereview.chromium.org//879353003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43467 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-04 13:41:41 +00:00
ajohnsen@google.com
1e731cf3e5
Don't create unused OSError in Socket_Available.
...
BUG=
R=iposva@google.com
Review URL: https://codereview.chromium.org//638303002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41005 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-09 06:21:21 +00:00
iposva@google.com
14ecdbd66a
- Separate the thread implementation used in bin/ and vm/
...
to allow us to make VM specific changes.
R=asiva@google.com
Review URL: https://codereview.chromium.org//463993002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39172 260f80e4-7a28-3924-810f-c04153c831b5
2014-08-12 23:19:53 +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
ajohnsen@google.com
c7a15b7c2b
Add support for cloning server-sockets.
...
BUG=
R=lrn@google.com , sgjesse@google.com
Review URL: https://codereview.chromium.org//250513002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@35818 260f80e4-7a28-3924-810f-c04153c831b5
2014-05-06 19:09:44 +00:00
iposva@google.com
e1ec7a2c5f
- Update status file to mark crashing test while investigating.
...
- Remove unused fields from socket code.
R=asiva@google.com
Review URL: https://codereview.chromium.org//257433002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@35346 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-24 00:37:55 +00:00
ajohnsen@google.com
9635777fe0
Don't try to call read, if len i 0.
...
Also fix a Socket_Read to handle -1 from read.
BUG=
R=sgjesse@google.com
Review URL: https://codereview.chromium.org//173633002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@32849 260f80e4-7a28-3924-810f-c04153c831b5
2014-02-20 12:23:20 +00:00
ajohnsen@google.com
e3372e72e9
Remove SocketData and now only pass the dart port to epoll.
...
This avoids keeping extra data alive.
BUG=
R=sgjesse@google.com
Review URL: https://codereview.chromium.org//171503009
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@32846 260f80e4-7a28-3924-810f-c04153c831b5
2014-02-20 08:56:54 +00:00
ajohnsen@google.com
140fddd06e
Make event-handlers edge-triggered and move socket-state to Dart.
...
This eliminates to pause/resume calls made in the previous one-shot based model.
BUG=
R=sgjesse@google.com
Review URL: https://codereview.chromium.org//169383003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@32780 260f80e4-7a28-3924-810f-c04153c831b5
2014-02-19 09:44:26 +00:00
iposva@google.com
781f737c6a
First round of http://dartbug.com/15922 :
...
- Address warnings about 64-bit to 32-bit conversions.
- Remove heap profiler.
R=asiva@google.com
Review URL: https://codereview.chromium.org//139043003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@31867 260f80e4-7a28-3924-810f-c04153c831b5
2014-01-16 05:05:35 +00:00
sgjesse@google.com
4ca4f0db07
Only store the address bytes for an internet address in Dart
...
We used to store the full C "struct sockaddr_storage" in the Dart
internet address. Changed this to be only the bytes for the
address. This removes opaque platform specific binary data from Dart
(e.g. on Mac OS the "struct sockaddr" has an initial length byte).
R=ajohnsen@google.com
BUG=
Review URL: https://codereview.chromium.org//113923004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@31191 260f80e4-7a28-3924-810f-c04153c831b5
2013-12-17 15:35:11 +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
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
5ec3f666c0
Add the index information to network interface
...
R=ajohnsen@google.com
BUG=
Review URL: https://codereview.chromium.org//95183002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@30776 260f80e4-7a28-3924-810f-c04153c831b5
2013-11-29 11:18:30 +00:00
sgjesse@google.com
b99d27ec86
Simplify some argument checking for socket calls
...
Ensure valid range in the C++ code. Leave any argument checking with
"user-friendly" error messaged to the Dart code.
R=ajohnsen@google.com
BUG=
Review URL: https://codereview.chromium.org//91043003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@30713 260f80e4-7a28-3924-810f-c04153c831b5
2013-11-27 12:12:08 +00:00
sgjesse@google.com
7254b45183
More cleanup in the socket C++ code
...
R=ajohnsen@google.com
BUG=
Review URL: https://codereview.chromium.org//78393005
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@30564 260f80e4-7a28-3924-810f-c04153c831b5
2013-11-22 08:02:20 +00:00
sgjesse@google.com
72d2ca28c9
Cleanup the getting and setting of the socket file descriptor
...
R=ajohnsen@google.com
Review URL: https://codereview.chromium.org//81013002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@30524 260f80e4-7a28-3924-810f-c04153c831b5
2013-11-21 15:22:35 +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
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
a347038cd7
Merge services into a shared IOService in dart:io, and use a native port.
...
BUG=
R=sgjesse@google.com
Review URL: https://codereview.chromium.org//24395013
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27883 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-25 15:03:24 +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
sgjesse@google.com
264611807f
Get rid of some downcasts
...
R=whesse@google.com
BUG=
Review URL: https://codereview.chromium.org//23540002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26697 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-27 09:13:21 +00:00
asiva@google.com
b4d9e0d620
Auto create ApiLocalScope before calling native functions, this ensures that
...
native functions do not have to call Dart_EnterScope/Dart_ExitScope
when they callback into the VM.
Remove Dart_EnterScope/Dart_ExitScope calls around native functions in 'bin'
directory.
R=regis@google.com , srdjan@google.com
Review URL: https://codereview.chromium.org//22303002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@25827 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-06 19:27:48 +00:00
ajohnsen@google.com
856df98a8f
Remove old code for dealing with non-typed buffers in Socket.write.
...
BUG=
R=whesse@google.com
Review URL: https://codereview.chromium.org//18608005
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24722 260f80e4-7a28-3924-810f-c04153c831b5
2013-07-03 11:43:02 +00:00
ajohnsen@google.com
5dcd8f20e0
Extract the correct os-error on Socket.write, and report correctly in IOSink.
...
BUG=
R=whesse@google.com
Review URL: https://codereview.chromium.org//18324006
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24623 260f80e4-7a28-3924-810f-c04153c831b5
2013-07-01 11:23:17 +00:00
ajohnsen@google.com
900dba8e03
Remove static mutexes/monitors from dart:io.
...
BUG=
R=whesse@google.com
Review URL: https://codereview.chromium.org//18080010
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24576 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-28 08:44:15 +00:00
sgjesse@google.com
8a2a138ed2
Detect EOF when reading stdio from terminal on Mac OS
...
R=ajohnsen@google.com
BUG=http://dartbug.com/453
patch from issue 17381012
Review URL: https://codereview.chromium.org//17463003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24397 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-25 11:47:55 +00:00
sgjesse@google.com
d550b05ca2
Remove dead code and re-enable short socket read
...
The native function Socket_ReadList have not been used for some time now.
Unfortunately the replacement function Socket_Read did not apply
short socket reads for testing. This is now in place again.
R=ajohnsen@google.com
BUG=
Review URL: https://codereview.chromium.org//17611010
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24394 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-25 11:32:39 +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
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
iposva@google.com
1836035266
- Modify dart_api.h to be a proper C API.
...
- Verify that dart_api.h can be used from C
by changing the test_extension to be a pure C file.
R=asiva@google.com
Review URL: https://codereview.chromium.org//15689013
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@23476 260f80e4-7a28-3924-810f-c04153c831b5
2013-05-31 16:36:27 +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
sgjesse@google.com
6c486c72cd
Add static getters for common internet addresses
...
R=whesse@google.com
BUG=
Review URL: https://codereview.chromium.org//14619008
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@22174 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-30 11:30:05 +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
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
asiva@google.com
f930e3856b
Add typed data interface to Dart API, this only changes the C++ API as dicussed in a previous email. The dart code in the library has not been changed yet.
...
Review URL: https://codereview.chromium.org//12255018
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18846 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-21 18:43:44 +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
ager@google.com
e006d7f4df
Fix Socket_WriteList to use the offset for external byte arrays.
...
R=sgjesse@google.com
BUG=
Review URL: https://codereview.chromium.org//12087088
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@17852 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-30 16:16:54 +00:00
sgjesse@google.com
800b4b6c37
Add function for finding what a InputStream or OutputStream is attached to
...
For the dart:io types InputStream and OutputStream the top level
function stdioType will return whether the stream is attached to a
terminal, pipe, file or something else.
BUG=dart:2789
R=ager@google.com
Review URL: https://codereview.chromium.org//11773041
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16839 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-09 09:17:07 +00:00