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

Side by Side Diff: runtime/bin/socket.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, 8 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « runtime/bin/socket.cc ('k') | runtime/bin/socket_impl.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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 interface ServerSocket default _ServerSocket { 5 interface ServerSocket default _ServerSocket {
6 /** 6 /**
7 * Constructs a new server socket, binds it to a given address and port, 7 * Constructs a new server socket, binds it to a given address and port,
8 * and listens on it. 8 * and listens on it.
9 */ 9 */
10 ServerSocket(String bindAddress, int port, int backlog); 10 ServerSocket(String bindAddress, int port, int backlog);
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 * Returns output stream of the socket. 100 * Returns output stream of the socket.
101 */ 101 */
102 OutputStream get outputStream(); 102 OutputStream get outputStream();
103 103
104 /** 104 /**
105 * Returns the port used by this socket. 105 * Returns the port used by this socket.
106 */ 106 */
107 int get port(); 107 int get port();
108 108
109 /** 109 /**
110 * Returns the remote port connected to by this socket.
111 */
112 int get remotePort();
113
114 /**
110 * Closes the socket. Calling [close] will never throw an exception 115 * Closes the socket. Calling [close] will never throw an exception
111 * and calling it several times is supported. If [halfClose] is true 116 * and calling it several times is supported. If [halfClose] is true
112 * the socket will only be closed for writing and it might still be 117 * the socket will only be closed for writing and it might still be
113 * possible to read data. Calling [close] will not trigger a call to 118 * possible to read data. Calling [close] will not trigger a call to
114 * [onClosed]. 119 * [onClosed].
115 */ 120 */
116 void close([bool halfClose]); 121 void close([bool halfClose]);
117 122
118 /** 123 /**
119 * Socket is hashable. 124 * Socket is hashable.
(...skipping 14 matching lines...) Expand all
134 sb.add(" ($osError)"); 139 sb.add(" ($osError)");
135 } 140 }
136 } else if (osError != null) { 141 } else if (osError != null) {
137 sb.add(": $osError"); 142 sb.add(": $osError");
138 } 143 }
139 return sb.toString(); 144 return sb.toString();
140 } 145 }
141 final String message; 146 final String message;
142 final OSError osError; 147 final OSError osError;
143 } 148 }
OLDNEW
« no previous file with comments | « runtime/bin/socket.cc ('k') | runtime/bin/socket_impl.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698