| OLD | NEW |
| 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 patch class RawServerSocket { | 5 patch class RawServerSocket { |
| 6 /* patch */ static Future<RawServerSocket> bind(address, | 6 /* patch */ static Future<RawServerSocket> bind(address, |
| 7 int port, | 7 int port, |
| 8 {int backlog: 0, | 8 {int backlog: 0, |
| 9 bool v6Only: false}) { | 9 bool v6Only: false}) { |
| 10 return _RawServerSocket.bind(address, port, backlog, v6Only); | 10 return _RawServerSocket.bind(address, port, backlog, v6Only); |
| (...skipping 1452 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1463 bool cancelOnError}) { | 1463 bool cancelOnError}) { |
| 1464 return _controller.stream.listen( | 1464 return _controller.stream.listen( |
| 1465 onData, | 1465 onData, |
| 1466 onError: onError, | 1466 onError: onError, |
| 1467 onDone: onDone, | 1467 onDone: onDone, |
| 1468 cancelOnError: cancelOnError); | 1468 cancelOnError: cancelOnError); |
| 1469 } | 1469 } |
| 1470 | 1470 |
| 1471 Future close() => _socket.close().then((_) => this); | 1471 Future close() => _socket.close().then((_) => this); |
| 1472 | 1472 |
| 1473 int send(List<data> buffer, InternetAddress address, int port) => | 1473 int send(List<int> buffer, InternetAddress address, int port) => |
| 1474 _socket.send(buffer, 0, buffer.length, address, port); | 1474 _socket.send(buffer, 0, buffer.length, address, port); |
| 1475 | 1475 |
| 1476 Datagram receive() { | 1476 Datagram receive() { |
| 1477 return _socket.receive(); | 1477 return _socket.receive(); |
| 1478 } | 1478 } |
| 1479 | 1479 |
| 1480 void joinMulticast(InternetAddress group, [NetworkInterface interface]) { | 1480 void joinMulticast(InternetAddress group, [NetworkInterface interface]) { |
| 1481 _socket.joinMulticast(group, interface); | 1481 _socket.joinMulticast(group, interface); |
| 1482 } | 1482 } |
| 1483 | 1483 |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1555 String address, | 1555 String address, |
| 1556 List<int> sockaddr_storage, | 1556 List<int> sockaddr_storage, |
| 1557 int port) { | 1557 int port) { |
| 1558 var addressType = | 1558 var addressType = |
| 1559 ipV6 ? InternetAddressType.IP_V6 : InternetAddressType.IP_V4; | 1559 ipV6 ? InternetAddressType.IP_V6 : InternetAddressType.IP_V4; |
| 1560 return new Datagram( | 1560 return new Datagram( |
| 1561 data, | 1561 data, |
| 1562 new _InternetAddress(addressType, address, null, sockaddr_storage), | 1562 new _InternetAddress(addressType, address, null, sockaddr_storage), |
| 1563 port); | 1563 port); |
| 1564 } | 1564 } |
| OLD | NEW |