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

Side by Side Diff: runtime/bin/socket.h

Issue 10917064: Throw an error if the ServerSocket host argument is invalid. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Use in_addr_t as s_addr type. Created 8 years, 3 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 | « no previous file | runtime/bin/socket.cc » ('j') | tests/standalone/io/socket_exception_test.dart » ('J')
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 #ifndef BIN_SOCKET_H_ 5 #ifndef BIN_SOCKET_H_
6 #define BIN_SOCKET_H_ 6 #define BIN_SOCKET_H_
7 7
8 #include "bin/builtin.h" 8 #include "bin/builtin.h"
9 #include "bin/utils.h" 9 #include "bin/utils.h"
10 10
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 DISALLOW_ALLOCATION(); 55 DISALLOW_ALLOCATION();
56 DISALLOW_IMPLICIT_CONSTRUCTORS(Socket); 56 DISALLOW_IMPLICIT_CONSTRUCTORS(Socket);
57 }; 57 };
58 58
59 59
60 class ServerSocket { 60 class ServerSocket {
61 public: 61 public:
62 static const intptr_t kTemporaryFailure = -2; 62 static const intptr_t kTemporaryFailure = -2;
63 63
64 static intptr_t Accept(intptr_t fd); 64 static intptr_t Accept(intptr_t fd);
65
66 // Returns a positive integer if the call is successful. In case of failure
67 // it returns:
68 //
69 // -1: system error (errno set)
70 // -5: invalid bindAddress
65 static intptr_t CreateBindListen(const char* bindAddress, 71 static intptr_t CreateBindListen(const char* bindAddress,
66 intptr_t port, 72 intptr_t port,
67 intptr_t backlog); 73 intptr_t backlog);
68 74
69 DISALLOW_ALLOCATION(); 75 DISALLOW_ALLOCATION();
70 DISALLOW_IMPLICIT_CONSTRUCTORS(ServerSocket); 76 DISALLOW_IMPLICIT_CONSTRUCTORS(ServerSocket);
71 }; 77 };
72 78
73 #endif // BIN_SOCKET_H_ 79 #endif // BIN_SOCKET_H_
OLDNEW
« no previous file with comments | « no previous file | runtime/bin/socket.cc » ('j') | tests/standalone/io/socket_exception_test.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698