Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2106)

Unified Diff: examples/dart/netcat/lib/main.dart

Issue 1964193002: Dart: Refactors Proxies (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Address comments Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « examples/dart/hello_world/hello/lib/main.dart ('k') | examples/dart/wget/lib/main.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: examples/dart/netcat/lib/main.dart
diff --git a/examples/dart/netcat/lib/main.dart b/examples/dart/netcat/lib/main.dart
index e12e3c59ca545dfdf431b5adc81b9d9e5da142ee..9ae28454abe3f276698423be7beb47b5c83ad6d9 100644
--- a/examples/dart/netcat/lib/main.dart
+++ b/examples/dart/netcat/lib/main.dart
@@ -65,7 +65,7 @@ class Connector {
NetAddress local_address = makeIPv4NetAddress([0, 0, 0, 0], 0);
var boundSocket = new TcpBoundSocketProxy.unbound();
- await networkService.ptr.createTcpBoundSocket(local_address, boundSocket);
+ await networkService.createTcpBoundSocket(local_address, boundSocket);
await networkService.close();
var sendDataPipe = new MojoDataPipe();
@@ -73,7 +73,7 @@ class Connector {
var receiveDataPipe = new MojoDataPipe();
_socketReceiver = receiveDataPipe.consumer;
_socket = new TcpConnectedSocketProxy.unbound();
- await boundSocket.ptr.connect(remote_address, sendDataPipe.consumer,
+ await boundSocket.connect(remote_address, sendDataPipe.consumer,
receiveDataPipe.producer, _socket);
await boundSocket.close();
@@ -91,7 +91,7 @@ class Connector {
void _startReadingFromTerminal() {
// TODO(vtl): Do we have to do something on error?
- _terminal.ptr
+ _terminal
.read(_writeBuffer.lengthInBytes, 0, files.Whence.fromCurrent)
.then(_onReadFromTerminal)
.catchError((e) {
@@ -129,7 +129,7 @@ class Connector {
var numBytesRead = _socketReceiver.read(_readBuffer);
if (_socketReceiver.status == MojoResult.kOk) {
assert(numBytesRead > 0);
- _terminal.ptr
+ _terminal
.write(_readBuffer.buffer.asUint8List(0, numBytesRead), 0,
files.Whence.fromCurrent)
.catchError((e) {
@@ -188,7 +188,7 @@ class TerminalClientImpl implements TerminalClient {
remote_address = _getNetAddressFromUrl(url);
} catch (e) {
fputs(
- terminal.ptr,
+ terminal,
'HALP: Add a query: ?host=<host>&port=<port>\n'
'(<host> must be "localhost" or n1.n2.n3.n4)\n\n'
'Got query parameters:\n' +
@@ -199,7 +199,7 @@ class TerminalClientImpl implements TerminalClient {
// TODO(vtl): Currently, we only do IPv4, so this should work.
fputs(
- terminal.ptr,
+ terminal,
'Connecting to: ' +
remote_address.ipv4.addr.join('.') +
':' +
« no previous file with comments | « examples/dart/hello_world/hello/lib/main.dart ('k') | examples/dart/wget/lib/main.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698