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

Unified Diff: runtime/bin/socket_impl.dart

Issue 9963053: Add remotePort getter to Socket. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 9 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 | « runtime/bin/socket.dart ('k') | runtime/bin/socket_linux.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/bin/socket_impl.dart
===================================================================
--- runtime/bin/socket_impl.dart (revision 6086)
+++ runtime/bin/socket_impl.dart (working copy)
@@ -549,6 +549,15 @@
}
}
+ int get remotePort() {
+ if (_remotePort === null) {
+ _remotePort = _getRemotePort();
+ }
+ return _remotePort;
+ }
+
+ int _getRemotePort() native "Socket_GetRemotePort";
+
static SendPort _newServicePort() native "Socket_NewServicePort";
static void _ensureSocketService() {
@@ -563,5 +572,6 @@
Function _clientWriteHandler;
SocketInputStream _inputStream;
SocketOutputStream _outputStream;
+ int _remotePort;
static SendPort _socketService;
}
« no previous file with comments | « runtime/bin/socket.dart ('k') | runtime/bin/socket_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698