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

Unified Diff: runtime/bin/socket_impl.dart

Issue 8776001: Fix HTTP sample implementation to actually wait for connections before attempting to write. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address comments. Created 9 years, 1 month 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/eventhandler_linux.cc ('k') | samples/chat/http.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/bin/socket_impl.dart
diff --git a/runtime/bin/socket_impl.dart b/runtime/bin/socket_impl.dart
index 9d70302eeb45f19d1a91c60788e26cc8e9d5f73d..c269a88f8f7415af18c4126c45a93fe79c97e46d 100644
--- a/runtime/bin/socket_impl.dart
+++ b/runtime/bin/socket_impl.dart
@@ -223,18 +223,6 @@ class _ServerSocket extends _SocketBase implements ServerSocket {
_ServerSocket._internal();
- Socket accept() {
- if (_id >= 0) {
- _Socket socket = new _Socket._internal();
- if (_accept(socket)) {
- return socket;
- }
- return null;
- }
- throw new
- SocketIOException("Error: accept failed - invalid socket handle");
- }
-
bool _accept(Socket socket) native "ServerSocket_Accept";
bool _createBindListen(String bindAddress, int port, int backlog)
@@ -368,6 +356,8 @@ class _Socket extends _SocketBase implements Socket {
}
void set connectHandler(void callback()) {
+ // TODO(ager): Make sure that write handler and connect handler do
+ // not compete for the out events.
_setHandler(_OUT_EVENT, callback);
}
« no previous file with comments | « runtime/bin/eventhandler_linux.cc ('k') | samples/chat/http.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698