| Index: chrome/common/extensions/api/experimental_socket.idl
|
| diff --git a/chrome/common/extensions/api/experimental_socket.idl b/chrome/common/extensions/api/experimental_socket.idl
|
| index bb17d763ca27f4ffc83d182dadbbe306a2d3c973..adc548544fa0da4f308f5c7f1d7bdce9bafea37a 100644
|
| --- a/chrome/common/extensions/api/experimental_socket.idl
|
| +++ b/chrome/common/extensions/api/experimental_socket.idl
|
| @@ -7,7 +7,8 @@
|
| namespace experimental.socket {
|
| enum SocketType {
|
| tcp,
|
| - udp
|
| + udp,
|
| + ssl
|
| };
|
|
|
| // The socket options.
|
| @@ -26,6 +27,8 @@ namespace experimental.socket {
|
|
|
| callback ConnectCallback = void (long result);
|
|
|
| + callback HandshakeCallback = void (long result);
|
| +
|
| callback BindCallback = void (long result);
|
|
|
| dictionary ReadInfo {
|
| @@ -86,6 +89,19 @@ namespace experimental.socket {
|
| long port,
|
| ConnectCallback callback);
|
|
|
| + // Performs an SSL handshake. While a handshake is in flight, calls to
|
| + // read and write using the socket will fail.
|
| + // |socketId| : The socketId of an SSL socket.
|
| + // |hostname| : The hostname to check against the name(s) in the server's
|
| + // certificate during the SSL handshake.
|
| + // |port| : The port to check during the SSL handshake.
|
| + // |callback| : Called when the connection attempt is complete.
|
| + // Zero signifies success. Non-'ssl' sockets always pass -1.
|
| + static void handshake(long socketId,
|
| + DOMString hostname,
|
| + long port,
|
| + HandshakeCallback callback);
|
| +
|
| // Binds the local address for socket. Currently, it does not support
|
| // TCP socket.
|
| // |socketId| : The socketId.
|
| @@ -147,6 +163,7 @@ namespace experimental.socket {
|
| SendToCallback callback);
|
|
|
| // Enable/disable keep-alive functionality for a TCP connection.
|
| + // Invalid on SSL sockets after the handshake has completed.
|
| // |socketId| : The socketId.
|
| // |enable| : If true, enable keep-alive functionality.
|
| // |delay| : Set the delay seconds between the last data packet received
|
| @@ -157,7 +174,8 @@ namespace experimental.socket {
|
| optional long delay,
|
| SetKeepAliveCallback callback);
|
|
|
| - // Enable/disable Nagle algorithm.
|
| + // Enable/disable Nagle algorithm. Invalid on SSL sockets after the
|
| + // handshake has completed.
|
| // |socketId| : The socketId.
|
| // |noDelay| : If true, disable Nagle algorithm.
|
| // |callback| : Called when the setNoDelay attempt is complete.
|
|
|