| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 // File-level comment to appease parser. Eventually this will not be necessary. | 5 // File-level comment to appease parser. Eventually this will not be necessary. |
| 6 | 6 |
| 7 namespace experimental.socket { | 7 namespace socket { |
| 8 enum SocketType { | 8 enum SocketType { |
| 9 tcp, | 9 tcp, |
| 10 udp | 10 udp |
| 11 }; | 11 }; |
| 12 | 12 |
| 13 // The socket options. | 13 // The socket options. |
| 14 dictionary CreateOptions { | 14 dictionary CreateOptions { |
| 15 // The schema generator does not support dictionaries without any fields. | |
| 16 // Ignore this field. | |
| 17 [nodoc] long? dummyValue; | |
| 18 }; | 15 }; |
| 19 | 16 |
| 20 dictionary CreateInfo { | 17 dictionary CreateInfo { |
| 21 // The id of the newly created socket. | 18 // The id of the newly created socket. |
| 22 long socketId; | 19 long socketId; |
| 23 }; | 20 }; |
| 24 | 21 |
| 25 callback CreateCallback = void (CreateInfo createInfo); | 22 callback CreateCallback = void (CreateInfo createInfo); |
| 26 | 23 |
| 27 callback ConnectCallback = void (long result); | 24 callback ConnectCallback = void (long result); |
| (...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 158 // Enable/disable Nagle algorithm. | 155 // Enable/disable Nagle algorithm. |
| 159 // |socketId| : The socketId. | 156 // |socketId| : The socketId. |
| 160 // |noDelay| : If true, disable Nagle algorithm. | 157 // |noDelay| : If true, disable Nagle algorithm. |
| 161 // |callback| : Called when the setNoDelay attempt is complete. | 158 // |callback| : Called when the setNoDelay attempt is complete. |
| 162 static void setNoDelay(long socketId, | 159 static void setNoDelay(long socketId, |
| 163 boolean noDelay, | 160 boolean noDelay, |
| 164 SetNoDelayCallback callback); | 161 SetNoDelayCallback callback); |
| 165 }; | 162 }; |
| 166 | 163 |
| 167 }; | 164 }; |
| OLD | NEW |