Эх сурвалжийг харах

Merge pull request #5658 from murgatroid99/ghpages_node_0.13

Update Node generated docs to 0.13
Stanley Cheung 9 жил өмнө
parent
commit
8e3c7f72a2

+ 104 - 17
node/global.html

@@ -140,7 +140,7 @@
     
     
     <dt class="tag-source">Source:</dt>
     <dt class="tag-source">Source:</dt>
     <dd class="tag-source"><ul class="dummy"><li>
     <dd class="tag-source"><ul class="dummy"><li>
-        <a href="index.js.html">index.js</a>, <a href="index.js.html#line127">line 127</a>
+        <a href="index.js.html">index.js</a>, <a href="index.js.html#line145">line 145</a>
     </li></ul></dd>
     </li></ul></dd>
     
     
 
 
@@ -202,7 +202,7 @@
     
     
     <dt class="tag-source">Source:</dt>
     <dt class="tag-source">Source:</dt>
     <dd class="tag-source"><ul class="dummy"><li>
     <dd class="tag-source"><ul class="dummy"><li>
-        <a href="index.js.html">index.js</a>, <a href="index.js.html#line137">line 137</a>
+        <a href="index.js.html">index.js</a>, <a href="index.js.html#line155">line 155</a>
     </li></ul></dd>
     </li></ul></dd>
     
     
 
 
@@ -260,7 +260,7 @@
     
     
     <dt class="tag-source">Source:</dt>
     <dt class="tag-source">Source:</dt>
     <dd class="tag-source"><ul class="dummy"><li>
     <dd class="tag-source"><ul class="dummy"><li>
-        <a href="index.js.html">index.js</a>, <a href="index.js.html#line152">line 152</a>
+        <a href="index.js.html">index.js</a>, <a href="index.js.html#line170">line 170</a>
     </li></ul></dd>
     </li></ul></dd>
     
     
 
 
@@ -325,7 +325,7 @@
     
     
     <dt class="tag-source">Source:</dt>
     <dt class="tag-source">Source:</dt>
     <dd class="tag-source"><ul class="dummy"><li>
     <dd class="tag-source"><ul class="dummy"><li>
-        <a href="index.js.html">index.js</a>, <a href="index.js.html#line147">line 147</a>
+        <a href="index.js.html">index.js</a>, <a href="index.js.html#line165">line 165</a>
     </li></ul></dd>
     </li></ul></dd>
     
     
 
 
@@ -390,7 +390,7 @@
     
     
     <dt class="tag-source">Source:</dt>
     <dt class="tag-source">Source:</dt>
     <dd class="tag-source"><ul class="dummy"><li>
     <dd class="tag-source"><ul class="dummy"><li>
-        <a href="index.js.html">index.js</a>, <a href="index.js.html#line112">line 112</a>
+        <a href="index.js.html">index.js</a>, <a href="index.js.html#line130">line 130</a>
     </li></ul></dd>
     </li></ul></dd>
     
     
 
 
@@ -459,7 +459,7 @@
     
     
     <dt class="tag-source">Source:</dt>
     <dt class="tag-source">Source:</dt>
     <dd class="tag-source"><ul class="dummy"><li>
     <dd class="tag-source"><ul class="dummy"><li>
-        <a href="index.js.html">index.js</a>, <a href="index.js.html#line122">line 122</a>
+        <a href="index.js.html">index.js</a>, <a href="index.js.html#line140">line 140</a>
     </li></ul></dd>
     </li></ul></dd>
     
     
 
 
@@ -517,7 +517,7 @@
     
     
     <dt class="tag-source">Source:</dt>
     <dt class="tag-source">Source:</dt>
     <dd class="tag-source"><ul class="dummy"><li>
     <dd class="tag-source"><ul class="dummy"><li>
-        <a href="index.js.html">index.js</a>, <a href="index.js.html#line107">line 107</a>
+        <a href="index.js.html">index.js</a>, <a href="index.js.html#line125">line 125</a>
     </li></ul></dd>
     </li></ul></dd>
     
     
 
 
@@ -586,7 +586,7 @@
     
     
     <dt class="tag-source">Source:</dt>
     <dt class="tag-source">Source:</dt>
     <dd class="tag-source"><ul class="dummy"><li>
     <dd class="tag-source"><ul class="dummy"><li>
-        <a href="index.js.html">index.js</a>, <a href="index.js.html#line142">line 142</a>
+        <a href="index.js.html">index.js</a>, <a href="index.js.html#line160">line 160</a>
     </li></ul></dd>
     </li></ul></dd>
     
     
 
 
@@ -648,7 +648,7 @@
     
     
     <dt class="tag-source">Source:</dt>
     <dt class="tag-source">Source:</dt>
     <dd class="tag-source"><ul class="dummy"><li>
     <dd class="tag-source"><ul class="dummy"><li>
-        <a href="index.js.html">index.js</a>, <a href="index.js.html#line117">line 117</a>
+        <a href="index.js.html">index.js</a>, <a href="index.js.html#line135">line 135</a>
     </li></ul></dd>
     </li></ul></dd>
     
     
 
 
@@ -706,7 +706,7 @@
     
     
     <dt class="tag-source">Source:</dt>
     <dt class="tag-source">Source:</dt>
     <dd class="tag-source"><ul class="dummy"><li>
     <dd class="tag-source"><ul class="dummy"><li>
-        <a href="index.js.html">index.js</a>, <a href="index.js.html#line157">line 157</a>
+        <a href="index.js.html">index.js</a>, <a href="index.js.html#line175">line 175</a>
     </li></ul></dd>
     </li></ul></dd>
     
     
 
 
@@ -775,7 +775,7 @@
     
     
     <dt class="tag-source">Source:</dt>
     <dt class="tag-source">Source:</dt>
     <dd class="tag-source"><ul class="dummy"><li>
     <dd class="tag-source"><ul class="dummy"><li>
-        <a href="index.js.html">index.js</a>, <a href="index.js.html#line132">line 132</a>
+        <a href="index.js.html">index.js</a>, <a href="index.js.html#line150">line 150</a>
     </li></ul></dd>
     </li></ul></dd>
     
     
 
 
@@ -802,14 +802,22 @@
 
 
     
     
 
 
-    <h4 class="name" id="load"><span class="type-signature"></span>load<span class="signature">(filename, format<span class="signature-attributes">opt</span>)</span><span class="type-signature"> &rarr; {Object.&lt;string, *>}</span></h4>
+    <h4 class="name" id="load"><span class="type-signature"></span>load<span class="signature">(filename, format<span class="signature-attributes">opt</span>, options<span class="signature-attributes">opt</span>)</span><span class="type-signature"> &rarr; {Object.&lt;string, *>}</span></h4>
 
 
     
     
 
 
 
 
 
 
 <div class="description">
 <div class="description">
-    Load a gRPC object from a .proto file.
+    Load a gRPC object from a .proto file. The options object can provide the
+following options:
+- convertFieldsToCamelCase: Loads this file with that option on protobuf.js
+  set as specified. See
+  https://github.com/dcodeIO/protobuf.js/wiki/Advanced-options for details
+- binaryAsBase64: deserialize bytes values as base64 strings instead of
+  Buffers. Defaults to false
+- longsAsStrings: deserialize long values as strings instead of objects.
+  Defaults to true
 </div>
 </div>
 
 
 
 
@@ -854,6 +862,9 @@
             
             
                 
                 
 <span class="param-type">string</span>
 <span class="param-type">string</span>
+|
+
+<span class="param-type">Object</span>
 
 
 
 
             
             
@@ -909,6 +920,39 @@
         </tr>
         </tr>
 
 
     
     
+
+        <tr>
+            
+                <td class="name"><code>options</code></td>
+            
+
+            <td class="type">
+            
+                
+<span class="param-type">Object</span>
+
+
+            
+            </td>
+
+            
+                <td class="attributes">
+                
+                    &lt;optional><br>
+                
+
+                
+
+                
+                </td>
+            
+
+            
+
+            <td class="description last">Options to apply to the loaded file</td>
+        </tr>
+
+    
     </tbody>
     </tbody>
 </table>
 </table>
 
 
@@ -946,7 +990,7 @@
     
     
     <dt class="tag-source">Source:</dt>
     <dt class="tag-source">Source:</dt>
     <dd class="tag-source"><ul class="dummy"><li>
     <dd class="tag-source"><ul class="dummy"><li>
-        <a href="index.js.html">index.js</a>, <a href="index.js.html#line86">line 86</a>
+        <a href="index.js.html">index.js</a>, <a href="index.js.html#line96">line 96</a>
     </li></ul></dd>
     </li></ul></dd>
     
     
 
 
@@ -999,7 +1043,7 @@
 
 
     
     
 
 
-    <h4 class="name" id="loadObject"><span class="type-signature"></span>loadObject<span class="signature">(value)</span><span class="type-signature"> &rarr; {Object.&lt;string, *>}</span></h4>
+    <h4 class="name" id="loadObject"><span class="type-signature"></span>loadObject<span class="signature">(value, options<span class="signature-attributes">opt</span>)</span><span class="type-signature"> &rarr; {Object.&lt;string, *>}</span></h4>
 
 
     
     
 
 
@@ -1030,6 +1074,8 @@
         <th>Type</th>
         <th>Type</th>
 
 
         
         
+        <th>Attributes</th>
+        
 
 
         
         
 
 
@@ -1055,6 +1101,14 @@
             </td>
             </td>
 
 
             
             
+                <td class="attributes">
+                
+
+                
+
+                
+                </td>
+            
 
 
             
             
 
 
@@ -1062,6 +1116,39 @@
         </tr>
         </tr>
 
 
     
     
+
+        <tr>
+            
+                <td class="name"><code>options</code></td>
+            
+
+            <td class="type">
+            
+                
+<span class="param-type">Object</span>
+
+
+            
+            </td>
+
+            
+                <td class="attributes">
+                
+                    &lt;optional><br>
+                
+
+                
+
+                
+                </td>
+            
+
+            
+
+            <td class="description last">Options to apply to the loaded object</td>
+        </tr>
+
+    
     </tbody>
     </tbody>
 </table>
 </table>
 
 
@@ -1099,7 +1186,7 @@
     
     
     <dt class="tag-source">Source:</dt>
     <dt class="tag-source">Source:</dt>
     <dd class="tag-source"><ul class="dummy"><li>
     <dd class="tag-source"><ul class="dummy"><li>
-        <a href="index.js.html">index.js</a>, <a href="index.js.html#line61">line 61</a>
+        <a href="index.js.html">index.js</a>, <a href="index.js.html#line62">line 62</a>
     </li></ul></dd>
     </li></ul></dd>
     
     
 
 
@@ -1169,7 +1256,7 @@
 <br class="clear">
 <br class="clear">
 
 
 <footer>
 <footer>
-    Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.4.0</a> on Thu Jan 14 2016 16:17:15 GMT-0800 (PST)
+    Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.4.0</a> on Tue Mar 08 2016 10:29:45 GMT-0800 (PST)
 </footer>
 </footer>
 
 
 <script> prettyPrint(); </script>
 <script> prettyPrint(); </script>

+ 2 - 2
node/index.html

@@ -26,7 +26,7 @@
     
     
 
 
 
 
-    <h3>grpc 0.12.0</h3>
+    <h3>grpc 0.13.1-pre1</h3>
 
 
 
 
 
 
@@ -86,7 +86,7 @@
 <br class="clear">
 <br class="clear">
 
 
 <footer>
 <footer>
-    Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.4.0</a> on Thu Jan 14 2016 16:17:15 GMT-0800 (PST)
+    Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.4.0</a> on Tue Mar 08 2016 10:29:45 GMT-0800 (PST)
 </footer>
 </footer>
 
 
 <script> prettyPrint(); </script>
 <script> prettyPrint(); </script>

+ 37 - 19
node/index.js.html

@@ -28,7 +28,7 @@
         <article>
         <article>
             <pre class="prettyprint source linenums"><code>/*
             <pre class="prettyprint source linenums"><code>/*
  *
  *
- * Copyright 2015, Google Inc.
+ * Copyright 2015-2016, Google Inc.
  * All rights reserved.
  * All rights reserved.
  *
  *
  * Redistribution and use in source and binary forms, with or without
  * Redistribution and use in source and binary forms, with or without
@@ -79,22 +79,23 @@ var server = require('./src/server.js');
 
 
 var Metadata = require('./src/metadata.js');
 var Metadata = require('./src/metadata.js');
 
 
-var grpc = require('bindings')('grpc_node');
+var grpc = require('./src/grpc_extension');
 
 
 /**
 /**
  * Load a gRPC object from an existing ProtoBuf.Reflect object.
  * Load a gRPC object from an existing ProtoBuf.Reflect object.
  * @param {ProtoBuf.Reflect.Namespace} value The ProtoBuf object to load.
  * @param {ProtoBuf.Reflect.Namespace} value The ProtoBuf object to load.
+ * @param {Object=} options Options to apply to the loaded object
  * @return {Object&lt;string, *>} The resulting gRPC object
  * @return {Object&lt;string, *>} The resulting gRPC object
  */
  */
-exports.loadObject = function loadObject(value) {
+exports.loadObject = function loadObject(value, options) {
   var result = {};
   var result = {};
   if (value.className === 'Namespace') {
   if (value.className === 'Namespace') {
     _.each(value.children, function(child) {
     _.each(value.children, function(child) {
-      result[child.name] = loadObject(child);
+      result[child.name] = loadObject(child, options);
     });
     });
     return result;
     return result;
   } else if (value.className === 'Service') {
   } else if (value.className === 'Service') {
-    return client.makeProtobufClientConstructor(value);
+    return client.makeProtobufClientConstructor(value, options);
   } else if (value.className === 'Message' || value.className === 'Enum') {
   } else if (value.className === 'Message' || value.className === 'Enum') {
     return value.build();
     return value.build();
   } else {
   } else {
@@ -105,28 +106,45 @@ exports.loadObject = function loadObject(value) {
 var loadObject = exports.loadObject;
 var loadObject = exports.loadObject;
 
 
 /**
 /**
- * Load a gRPC object from a .proto file.
- * @param {string} filename The file to load
+ * Load a gRPC object from a .proto file. The options object can provide the
+ * following options:
+ * - convertFieldsToCamelCase: Loads this file with that option on protobuf.js
+ *   set as specified. See
+ *   https://github.com/dcodeIO/protobuf.js/wiki/Advanced-options for details
+ * - binaryAsBase64: deserialize bytes values as base64 strings instead of
+ *   Buffers. Defaults to false
+ * - longsAsStrings: deserialize long values as strings instead of objects.
+ *   Defaults to true
+ * @param {string|{root: string, file: string}} filename The file to load
  * @param {string=} format The file format to expect. Must be either 'proto' or
  * @param {string=} format The file format to expect. Must be either 'proto' or
  *     'json'. Defaults to 'proto'
  *     'json'. Defaults to 'proto'
+ * @param {Object=} options Options to apply to the loaded file
  * @return {Object&lt;string, *>} The resulting gRPC object
  * @return {Object&lt;string, *>} The resulting gRPC object
  */
  */
-exports.load = function load(filename, format) {
+exports.load = function load(filename, format, options) {
   if (!format) {
   if (!format) {
     format = 'proto';
     format = 'proto';
   }
   }
+  var convertFieldsToCamelCaseOriginal = ProtoBuf.convertFieldsToCamelCase;
+  if(options &amp;&amp; options.hasOwnProperty('convertFieldsToCamelCase')) {
+    ProtoBuf.convertFieldsToCamelCase = options.convertFieldsToCamelCase;
+  }
   var builder;
   var builder;
-  switch(format) {
-    case 'proto':
-    builder = ProtoBuf.loadProtoFile(filename);
-    break;
-    case 'json':
-    builder = ProtoBuf.loadJsonFile(filename);
-    break;
-    default:
-    throw new Error('Unrecognized format "' + format + '"');
+  try {
+    switch(format) {
+      case 'proto':
+      builder = ProtoBuf.loadProtoFile(filename);
+      break;
+      case 'json':
+      builder = ProtoBuf.loadJsonFile(filename);
+      break;
+      default:
+      throw new Error('Unrecognized format "' + format + '"');
+    }
+  } finally {
+    ProtoBuf.convertFieldsToCamelCase = convertFieldsToCamelCaseOriginal;
   }
   }
-  return loadObject(builder.ns);
+  return loadObject(builder.ns, options);
 };
 };
 
 
 /**
 /**
@@ -199,7 +217,7 @@ exports.waitForClientReady = client.waitForClientReady;
 <br class="clear">
 <br class="clear">
 
 
 <footer>
 <footer>
-    Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.4.0</a> on Thu Jan 14 2016 16:17:15 GMT-0800 (PST)
+    Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.4.0</a> on Tue Mar 08 2016 10:29:45 GMT-0800 (PST)
 </footer>
 </footer>
 
 
 <script> prettyPrint(); </script>
 <script> prettyPrint(); </script>

+ 1 - 1
node/module-src_client-ClientDuplexStream.html

@@ -251,7 +251,7 @@ duplex streaming.
 <br class="clear">
 <br class="clear">
 
 
 <footer>
 <footer>
-    Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.4.0</a> on Thu Jan 14 2016 16:17:15 GMT-0800 (PST)
+    Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.4.0</a> on Tue Mar 08 2016 10:29:45 GMT-0800 (PST)
 </footer>
 </footer>
 
 
 <script> prettyPrint(); </script>
 <script> prettyPrint(); </script>

+ 1 - 1
node/module-src_client-ClientReadableStream.html

@@ -227,7 +227,7 @@ from the server side.
 <br class="clear">
 <br class="clear">
 
 
 <footer>
 <footer>
-    Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.4.0</a> on Thu Jan 14 2016 16:17:15 GMT-0800 (PST)
+    Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.4.0</a> on Tue Mar 08 2016 10:29:45 GMT-0800 (PST)
 </footer>
 </footer>
 
 
 <script> prettyPrint(); </script>
 <script> prettyPrint(); </script>

+ 1 - 1
node/module-src_client-ClientWritableStream.html

@@ -227,7 +227,7 @@ the client side.
 <br class="clear">
 <br class="clear">
 
 
 <footer>
 <footer>
-    Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.4.0</a> on Thu Jan 14 2016 16:17:15 GMT-0800 (PST)
+    Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.4.0</a> on Tue Mar 08 2016 10:29:45 GMT-0800 (PST)
 </footer>
 </footer>
 
 
 <script> prettyPrint(); </script>
 <script> prettyPrint(); </script>

+ 48 - 5
node/module-src_client.html

@@ -199,7 +199,7 @@ var call = client.unaryMethod(arguments, callback);</div>
     
     
     <dt class="tag-source">Source:</dt>
     <dt class="tag-source">Source:</dt>
     <dd class="tag-source"><ul class="dummy"><li>
     <dd class="tag-source"><ul class="dummy"><li>
-        <a href="src_client.js.html">src/client.js</a>, <a href="src_client.js.html#line719">line 719</a>
+        <a href="src_client.js.html">src/client.js</a>, <a href="src_client.js.html#line722">line 722</a>
     </li></ul></dd>
     </li></ul></dd>
     
     
 
 
@@ -261,7 +261,7 @@ var call = client.unaryMethod(arguments, callback);</div>
     
     
     <dt class="tag-source">Source:</dt>
     <dt class="tag-source">Source:</dt>
     <dd class="tag-source"><ul class="dummy"><li>
     <dd class="tag-source"><ul class="dummy"><li>
-        <a href="src_client.js.html">src/client.js</a>, <a href="src_client.js.html#line714">line 714</a>
+        <a href="src_client.js.html">src/client.js</a>, <a href="src_client.js.html#line717">line 717</a>
     </li></ul></dd>
     </li></ul></dd>
     
     
 
 
@@ -687,7 +687,7 @@ responseDeserialize: function to deserialize response objects
 
 
     
     
 
 
-    <h4 class="name" id=".makeProtobufClientConstructor"><span class="type-signature">(static) </span>makeProtobufClientConstructor<span class="signature">(service)</span><span class="type-signature"> &rarr; {function}</span></h4>
+    <h4 class="name" id=".makeProtobufClientConstructor"><span class="type-signature">(static) </span>makeProtobufClientConstructor<span class="signature">(service, options<span class="signature-attributes">opt</span>)</span><span class="type-signature"> &rarr; {function}</span></h4>
 
 
     
     
 
 
@@ -718,6 +718,8 @@ responseDeserialize: function to deserialize response objects
         <th>Type</th>
         <th>Type</th>
 
 
         
         
+        <th>Attributes</th>
+        
 
 
         
         
 
 
@@ -743,6 +745,14 @@ responseDeserialize: function to deserialize response objects
             </td>
             </td>
 
 
             
             
+                <td class="attributes">
+                
+
+                
+
+                
+                </td>
+            
 
 
             
             
 
 
@@ -751,6 +761,39 @@ responseDeserialize: function to deserialize response objects
         </tr>
         </tr>
 
 
     
     
+
+        <tr>
+            
+                <td class="name"><code>options</code></td>
+            
+
+            <td class="type">
+            
+                
+<span class="param-type">Object</span>
+
+
+            
+            </td>
+
+            
+                <td class="attributes">
+                
+                    &lt;optional><br>
+                
+
+                
+
+                
+                </td>
+            
+
+            
+
+            <td class="description last">Options to apply to the client</td>
+        </tr>
+
+    
     </tbody>
     </tbody>
 </table>
 </table>
 
 
@@ -788,7 +831,7 @@ responseDeserialize: function to deserialize response objects
     
     
     <dt class="tag-source">Source:</dt>
     <dt class="tag-source">Source:</dt>
     <dd class="tag-source"><ul class="dummy"><li>
     <dd class="tag-source"><ul class="dummy"><li>
-        <a href="src_client.js.html">src/client.js</a>, <a href="src_client.js.html#line703">line 703</a>
+        <a href="src_client.js.html">src/client.js</a>, <a href="src_client.js.html#line704">line 704</a>
     </li></ul></dd>
     </li></ul></dd>
     
     
 
 
@@ -2164,7 +2207,7 @@ method.
 <br class="clear">
 <br class="clear">
 
 
 <footer>
 <footer>
-    Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.4.0</a> on Thu Jan 14 2016 16:17:15 GMT-0800 (PST)
+    Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.4.0</a> on Tue Mar 08 2016 10:29:45 GMT-0800 (PST)
 </footer>
 </footer>
 
 
 <script> prettyPrint(); </script>
 <script> prettyPrint(); </script>

+ 1 - 1
node/module-src_client.makeClientConstructor-Client.html

@@ -250,7 +250,7 @@
 <br class="clear">
 <br class="clear">
 
 
 <footer>
 <footer>
-    Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.4.0</a> on Thu Jan 14 2016 16:17:15 GMT-0800 (PST)
+    Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.4.0</a> on Tue Mar 08 2016 10:29:45 GMT-0800 (PST)
 </footer>
 </footer>
 
 
 <script> prettyPrint(); </script>
 <script> prettyPrint(); </script>

+ 129 - 8
node/module-src_common.html

@@ -138,7 +138,7 @@ code. None of them should be used directly by gRPC users.</div>
 
 
     
     
 
 
-    <h4 class="name" id=".deserializeCls"><span class="type-signature">(static) </span>deserializeCls<span class="signature">(cls)</span><span class="type-signature"> &rarr; {function}</span></h4>
+    <h4 class="name" id=".deserializeCls"><span class="type-signature">(static) </span>deserializeCls<span class="signature">(cls, binaryAsBase64<span class="signature-attributes">opt</span>, longsAsStrings<span class="signature-attributes">opt</span>)</span><span class="type-signature"> &rarr; {function}</span></h4>
 
 
     
     
 
 
@@ -169,6 +169,8 @@ code. None of them should be used directly by gRPC users.</div>
         <th>Type</th>
         <th>Type</th>
 
 
         
         
+        <th>Attributes</th>
+        
 
 
         
         
 
 
@@ -194,6 +196,14 @@ code. None of them should be used directly by gRPC users.</div>
             </td>
             </td>
 
 
             
             
+                <td class="attributes">
+                
+
+                
+
+                
+                </td>
+            
 
 
             
             
 
 
@@ -201,6 +211,74 @@ code. None of them should be used directly by gRPC users.</div>
         </tr>
         </tr>
 
 
     
     
+
+        <tr>
+            
+                <td class="name"><code>binaryAsBase64</code></td>
+            
+
+            <td class="type">
+            
+                
+<span class="param-type">bool</span>
+
+
+            
+            </td>
+
+            
+                <td class="attributes">
+                
+                    &lt;optional><br>
+                
+
+                
+
+                
+                </td>
+            
+
+            
+
+            <td class="description last">Deserialize bytes fields as base64 strings
+    instead of Buffers. Defaults to false</td>
+        </tr>
+
+    
+
+        <tr>
+            
+                <td class="name"><code>longsAsStrings</code></td>
+            
+
+            <td class="type">
+            
+                
+<span class="param-type">bool</span>
+
+
+            
+            </td>
+
+            
+                <td class="attributes">
+                
+                    &lt;optional><br>
+                
+
+                
+
+                
+                </td>
+            
+
+            
+
+            <td class="description last">Deserialize long values as strings instead of
+    objects. Defaults to true</td>
+        </tr>
+
+    
     </tbody>
     </tbody>
 </table>
 </table>
 
 
@@ -238,7 +316,7 @@ code. None of them should be used directly by gRPC users.</div>
     
     
     <dt class="tag-source">Source:</dt>
     <dt class="tag-source">Source:</dt>
     <dd class="tag-source"><ul class="dummy"><li>
     <dd class="tag-source"><ul class="dummy"><li>
-        <a href="src_common.js.html">src/common.js</a>, <a href="src_common.js.html#line49">line 49</a>
+        <a href="src_common.js.html">src/common.js</a>, <a href="src_common.js.html#line53">line 53</a>
     </li></ul></dd>
     </li></ul></dd>
     
     
 
 
@@ -391,7 +469,7 @@ code. None of them should be used directly by gRPC users.</div>
     
     
     <dt class="tag-source">Source:</dt>
     <dt class="tag-source">Source:</dt>
     <dd class="tag-source"><ul class="dummy"><li>
     <dd class="tag-source"><ul class="dummy"><li>
-        <a href="src_common.js.html">src/common.js</a>, <a href="src_common.js.html#line87">line 87</a>
+        <a href="src_common.js.html">src/common.js</a>, <a href="src_common.js.html#line98">line 98</a>
     </li></ul></dd>
     </li></ul></dd>
     
     
 
 
@@ -444,7 +522,7 @@ code. None of them should be used directly by gRPC users.</div>
 
 
     
     
 
 
-    <h4 class="name" id=".getProtobufServiceAttrs"><span class="type-signature">(static) </span>getProtobufServiceAttrs<span class="signature">(service)</span><span class="type-signature"> &rarr; {Object}</span></h4>
+    <h4 class="name" id=".getProtobufServiceAttrs"><span class="type-signature">(static) </span>getProtobufServiceAttrs<span class="signature">(service, options<span class="signature-attributes">opt</span>)</span><span class="type-signature"> &rarr; {Object}</span></h4>
 
 
     
     
 
 
@@ -475,6 +553,8 @@ code. None of them should be used directly by gRPC users.</div>
         <th>Type</th>
         <th>Type</th>
 
 
         
         
+        <th>Attributes</th>
+        
 
 
         
         
 
 
@@ -500,6 +580,14 @@ code. None of them should be used directly by gRPC users.</div>
             </td>
             </td>
 
 
             
             
+                <td class="attributes">
+                
+
+                
+
+                
+                </td>
+            
 
 
             
             
 
 
@@ -507,6 +595,39 @@ code. None of them should be used directly by gRPC users.</div>
         </tr>
         </tr>
 
 
     
     
+
+        <tr>
+            
+                <td class="name"><code>options</code></td>
+            
+
+            <td class="type">
+            
+                
+<span class="param-type">Object</span>
+
+
+            
+            </td>
+
+            
+                <td class="attributes">
+                
+                    &lt;optional><br>
+                
+
+                
+
+                
+                </td>
+            
+
+            
+
+            <td class="description last">Options to apply to these attributes</td>
+        </tr>
+
+    
     </tbody>
     </tbody>
 </table>
 </table>
 
 
@@ -544,7 +665,7 @@ code. None of them should be used directly by gRPC users.</div>
     
     
     <dt class="tag-source">Source:</dt>
     <dt class="tag-source">Source:</dt>
     <dd class="tag-source"><ul class="dummy"><li>
     <dd class="tag-source"><ul class="dummy"><li>
-        <a href="src_common.js.html">src/common.js</a>, <a href="src_common.js.html#line124">line 124</a>
+        <a href="src_common.js.html">src/common.js</a>, <a href="src_common.js.html#line136">line 136</a>
     </li></ul></dd>
     </li></ul></dd>
     
     
 
 
@@ -697,7 +818,7 @@ code. None of them should be used directly by gRPC users.</div>
     
     
     <dt class="tag-source">Source:</dt>
     <dt class="tag-source">Source:</dt>
     <dd class="tag-source"><ul class="dummy"><li>
     <dd class="tag-source"><ul class="dummy"><li>
-        <a href="src_common.js.html">src/common.js</a>, <a href="src_common.js.html#line69">line 69</a>
+        <a href="src_common.js.html">src/common.js</a>, <a href="src_common.js.html#line80">line 80</a>
     </li></ul></dd>
     </li></ul></dd>
     
     
 
 
@@ -863,7 +984,7 @@ function is given, just uses the identity;
     
     
     <dt class="tag-source">Source:</dt>
     <dt class="tag-source">Source:</dt>
     <dd class="tag-source"><ul class="dummy"><li>
     <dd class="tag-source"><ul class="dummy"><li>
-        <a href="src_common.js.html">src/common.js</a>, <a href="src_common.js.html#line107">line 107</a>
+        <a href="src_common.js.html">src/common.js</a>, <a href="src_common.js.html#line118">line 118</a>
     </li></ul></dd>
     </li></ul></dd>
     
     
 
 
@@ -933,7 +1054,7 @@ function is given, just uses the identity;
 <br class="clear">
 <br class="clear">
 
 
 <footer>
 <footer>
-    Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.4.0</a> on Thu Jan 14 2016 16:17:15 GMT-0800 (PST)
+    Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.4.0</a> on Tue Mar 08 2016 10:29:45 GMT-0800 (PST)
 </footer>
 </footer>
 
 
 <script> prettyPrint(); </script>
 <script> prettyPrint(); </script>

+ 5 - 5
node/module-src_credentials.html

@@ -199,7 +199,7 @@ does not use SSL. This cannot be composed with anything.
     
     
     <dt class="tag-source">Source:</dt>
     <dt class="tag-source">Source:</dt>
     <dd class="tag-source"><ul class="dummy"><li>
     <dd class="tag-source"><ul class="dummy"><li>
-        <a href="src_credentials.js.html">src/credentials.js</a>, <a href="src_credentials.js.html#line167">line 167</a>
+        <a href="src_credentials.js.html">src/credentials.js</a>, <a href="src_credentials.js.html#line172">line 172</a>
     </li></ul></dd>
     </li></ul></dd>
     
     
 
 
@@ -401,7 +401,7 @@ the second and third arguments must be passed.
     
     
     <dt class="tag-source">Source:</dt>
     <dt class="tag-source">Source:</dt>
     <dd class="tag-source"><ul class="dummy"><li>
     <dd class="tag-source"><ul class="dummy"><li>
-        <a href="src_credentials.js.html">src/credentials.js</a>, <a href="src_credentials.js.html#line154">line 154</a>
+        <a href="src_credentials.js.html">src/credentials.js</a>, <a href="src_credentials.js.html#line159">line 159</a>
     </li></ul></dd>
     </li></ul></dd>
     
     
 
 
@@ -588,7 +588,7 @@ ChannelCredentials object.
     
     
     <dt class="tag-source">Source:</dt>
     <dt class="tag-source">Source:</dt>
     <dd class="tag-source"><ul class="dummy"><li>
     <dd class="tag-source"><ul class="dummy"><li>
-        <a href="src_credentials.js.html">src/credentials.js</a>, <a href="src_credentials.js.html#line140">line 140</a>
+        <a href="src_credentials.js.html">src/credentials.js</a>, <a href="src_credentials.js.html#line145">line 145</a>
     </li></ul></dd>
     </li></ul></dd>
     
     
 
 
@@ -730,7 +730,7 @@ ChannelCredentials object.
     
     
     <dt class="tag-source">Source:</dt>
     <dt class="tag-source">Source:</dt>
     <dd class="tag-source"><ul class="dummy"><li>
     <dd class="tag-source"><ul class="dummy"><li>
-        <a href="src_credentials.js.html">src/credentials.js</a>, <a href="src_credentials.js.html#line116">line 116</a>
+        <a href="src_credentials.js.html">src/credentials.js</a>, <a href="src_credentials.js.html#line118">line 118</a>
     </li></ul></dd>
     </li></ul></dd>
     
     
 
 
@@ -957,7 +957,7 @@ which corresponds to a status code that this library uses.
 <br class="clear">
 <br class="clear">
 
 
 <footer>
 <footer>
-    Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.4.0</a> on Thu Jan 14 2016 16:17:15 GMT-0800 (PST)
+    Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.4.0</a> on Tue Mar 08 2016 10:29:45 GMT-0800 (PST)
 </footer>
 </footer>
 
 
 <script> prettyPrint(); </script>
 <script> prettyPrint(); </script>

+ 7 - 7
node/module-src_metadata-Metadata.html

@@ -268,7 +268,7 @@
     
     
     <dt class="tag-source">Source:</dt>
     <dt class="tag-source">Source:</dt>
     <dd class="tag-source"><ul class="dummy"><li>
     <dd class="tag-source"><ul class="dummy"><li>
-        <a href="src_metadata.js.html">src/metadata.js</a>, <a href="src_metadata.js.html#line106">line 106</a>
+        <a href="src_metadata.js.html">src/metadata.js</a>, <a href="src_metadata.js.html#line107">line 107</a>
     </li></ul></dd>
     </li></ul></dd>
     
     
 
 
@@ -350,7 +350,7 @@
     
     
     <dt class="tag-source">Source:</dt>
     <dt class="tag-source">Source:</dt>
     <dd class="tag-source"><ul class="dummy"><li>
     <dd class="tag-source"><ul class="dummy"><li>
-        <a href="src_metadata.js.html">src/metadata.js</a>, <a href="src_metadata.js.html#line159">line 159</a>
+        <a href="src_metadata.js.html">src/metadata.js</a>, <a href="src_metadata.js.html#line160">line 160</a>
     </li></ul></dd>
     </li></ul></dd>
     
     
 
 
@@ -503,7 +503,7 @@
     
     
     <dt class="tag-source">Source:</dt>
     <dt class="tag-source">Source:</dt>
     <dd class="tag-source"><ul class="dummy"><li>
     <dd class="tag-source"><ul class="dummy"><li>
-        <a href="src_metadata.js.html">src/metadata.js</a>, <a href="src_metadata.js.html#line131">line 131</a>
+        <a href="src_metadata.js.html">src/metadata.js</a>, <a href="src_metadata.js.html#line132">line 132</a>
     </li></ul></dd>
     </li></ul></dd>
     
     
 
 
@@ -608,7 +608,7 @@ common way that people will want to see metadata.
     
     
     <dt class="tag-source">Source:</dt>
     <dt class="tag-source">Source:</dt>
     <dd class="tag-source"><ul class="dummy"><li>
     <dd class="tag-source"><ul class="dummy"><li>
-        <a href="src_metadata.js.html">src/metadata.js</a>, <a href="src_metadata.js.html#line145">line 145</a>
+        <a href="src_metadata.js.html">src/metadata.js</a>, <a href="src_metadata.js.html#line146">line 146</a>
     </li></ul></dd>
     </li></ul></dd>
     
     
 
 
@@ -761,7 +761,7 @@ common way that people will want to see metadata.
     
     
     <dt class="tag-source">Source:</dt>
     <dt class="tag-source">Source:</dt>
     <dd class="tag-source"><ul class="dummy"><li>
     <dd class="tag-source"><ul class="dummy"><li>
-        <a href="src_metadata.js.html">src/metadata.js</a>, <a href="src_metadata.js.html#line119">line 119</a>
+        <a href="src_metadata.js.html">src/metadata.js</a>, <a href="src_metadata.js.html#line120">line 120</a>
     </li></ul></dd>
     </li></ul></dd>
     
     
 
 
@@ -920,7 +920,7 @@ with that key. Normalizes the key.
     
     
     <dt class="tag-source">Source:</dt>
     <dt class="tag-source">Source:</dt>
     <dd class="tag-source"><ul class="dummy"><li>
     <dd class="tag-source"><ul class="dummy"><li>
-        <a href="src_metadata.js.html">src/metadata.js</a>, <a href="src_metadata.js.html#line94">line 94</a>
+        <a href="src_metadata.js.html">src/metadata.js</a>, <a href="src_metadata.js.html#line95">line 95</a>
     </li></ul></dd>
     </li></ul></dd>
     
     
 
 
@@ -968,7 +968,7 @@ with that key. Normalizes the key.
 <br class="clear">
 <br class="clear">
 
 
 <footer>
 <footer>
-    Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.4.0</a> on Thu Jan 14 2016 16:17:15 GMT-0800 (PST)
+    Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.4.0</a> on Tue Mar 08 2016 10:29:45 GMT-0800 (PST)
 </footer>
 </footer>
 
 
 <script> prettyPrint(); </script>
 <script> prettyPrint(); </script>

+ 1 - 1
node/module-src_metadata.html

@@ -165,7 +165,7 @@ metadata.get('key1') // returns ['value1', 'value2']</div>
 <br class="clear">
 <br class="clear">
 
 
 <footer>
 <footer>
-    Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.4.0</a> on Thu Jan 14 2016 16:17:15 GMT-0800 (PST)
+    Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.4.0</a> on Tue Mar 08 2016 10:29:45 GMT-0800 (PST)
 </footer>
 </footer>
 
 
 <script> prettyPrint(); </script>
 <script> prettyPrint(); </script>

+ 2 - 2
node/module-src_server-Server.html

@@ -662,7 +662,7 @@ addProtoService.
     
     
     <dt class="tag-source">Source:</dt>
     <dt class="tag-source">Source:</dt>
     <dd class="tag-source"><ul class="dummy"><li>
     <dd class="tag-source"><ul class="dummy"><li>
-        <a href="src_server.js.html">src/server.js</a>, <a href="src_server.js.html#line750">line 750</a>
+        <a href="src_server.js.html">src/server.js</a>, <a href="src_server.js.html#line755">line 755</a>
     </li></ul></dd>
     </li></ul></dd>
     
     
 
 
@@ -1263,7 +1263,7 @@ is idempotent with itself and forceShutdown.
 <br class="clear">
 <br class="clear">
 
 
 <footer>
 <footer>
-    Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.4.0</a> on Thu Jan 14 2016 16:17:15 GMT-0800 (PST)
+    Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.4.0</a> on Tue Mar 08 2016 10:29:45 GMT-0800 (PST)
 </footer>
 </footer>
 
 
 <script> prettyPrint(); </script>
 <script> prettyPrint(); </script>

+ 1 - 1
node/module-src_server-ServerDuplexStream.html

@@ -251,7 +251,7 @@ duplex streaming.
 <br class="clear">
 <br class="clear">
 
 
 <footer>
 <footer>
-    Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.4.0</a> on Thu Jan 14 2016 16:17:15 GMT-0800 (PST)
+    Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.4.0</a> on Tue Mar 08 2016 10:29:45 GMT-0800 (PST)
 </footer>
 </footer>
 
 
 <script> prettyPrint(); </script>
 <script> prettyPrint(); </script>

+ 1 - 1
node/module-src_server-ServerReadableStream.html

@@ -227,7 +227,7 @@ from the client side.
 <br class="clear">
 <br class="clear">
 
 
 <footer>
 <footer>
-    Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.4.0</a> on Thu Jan 14 2016 16:17:15 GMT-0800 (PST)
+    Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.4.0</a> on Tue Mar 08 2016 10:29:45 GMT-0800 (PST)
 </footer>
 </footer>
 
 
 <script> prettyPrint(); </script>
 <script> prettyPrint(); </script>

+ 1 - 1
node/module-src_server-ServerWritableStream.html

@@ -227,7 +227,7 @@ the server side.
 <br class="clear">
 <br class="clear">
 
 
 <footer>
 <footer>
-    Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.4.0</a> on Thu Jan 14 2016 16:17:15 GMT-0800 (PST)
+    Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.4.0</a> on Tue Mar 08 2016 10:29:45 GMT-0800 (PST)
 </footer>
 </footer>
 
 
 <script> prettyPrint(); </script>
 <script> prettyPrint(); </script>

+ 2 - 2
node/module-src_server.html

@@ -198,7 +198,7 @@ server.start();</div>
     
     
     <dt class="tag-source">Source:</dt>
     <dt class="tag-source">Source:</dt>
     <dd class="tag-source"><ul class="dummy"><li>
     <dd class="tag-source"><ul class="dummy"><li>
-        <a href="src_server.js.html">src/server.js</a>, <a href="src_server.js.html#line760">line 760</a>
+        <a href="src_server.js.html">src/server.js</a>, <a href="src_server.js.html#line765">line 765</a>
     </li></ul></dd>
     </li></ul></dd>
     
     
 
 
@@ -567,7 +567,7 @@ cancelled.
 <br class="clear">
 <br class="clear">
 
 
 <footer>
 <footer>
-    Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.4.0</a> on Thu Jan 14 2016 16:17:15 GMT-0800 (PST)
+    Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.4.0</a> on Tue Mar 08 2016 10:29:45 GMT-0800 (PST)
 </footer>
 </footer>
 
 
 <script> prettyPrint(); </script>
 <script> prettyPrint(); </script>

+ 11 - 8
node/src_client.js.html

@@ -28,7 +28,7 @@
         <article>
         <article>
             <pre class="prettyprint source linenums"><code>/*
             <pre class="prettyprint source linenums"><code>/*
  *
  *
- * Copyright 2015, Google Inc.
+ * Copyright 2015-2016, Google Inc.
  * All rights reserved.
  * All rights reserved.
  *
  *
  * Redistribution and use in source and binary forms, with or without
  * Redistribution and use in source and binary forms, with or without
@@ -79,7 +79,7 @@
 
 
 var _ = require('lodash');
 var _ = require('lodash');
 
 
-var grpc = require('bindings')('grpc_node');
+var grpc = require('./grpc_extension');
 
 
 var common = require('./common');
 var common = require('./common');
 
 
@@ -364,7 +364,7 @@ function makeUnaryRequestFunction(method, serialize, deserialize) {
         }
         }
       }
       }
       if (status.code !== grpc.status.OK) {
       if (status.code !== grpc.status.OK) {
-        error = new Error(response.status.details);
+        error = new Error(status.details);
         error.code = status.code;
         error.code = status.code;
         error.metadata = status.metadata;
         error.metadata = status.metadata;
         callback(error);
         callback(error);
@@ -676,8 +676,8 @@ exports.makeClientConstructor = function(methods, serviceName) {
     var deserialize = attrs.responseDeserialize;
     var deserialize = attrs.responseDeserialize;
     Client.prototype[name] = requester_makers[method_type](
     Client.prototype[name] = requester_makers[method_type](
         attrs.path, serialize, deserialize);
         attrs.path, serialize, deserialize);
-    Client.prototype[name].serialize = serialize;
-    Client.prototype[name].deserialize = deserialize;
+    // Associate all provided attributes with the method
+    _.assign(Client.prototype[name], attrs);
   });
   });
 
 
   return Client;
   return Client;
@@ -726,13 +726,16 @@ exports.waitForClientReady = function(client, deadline, callback) {
  * Creates a constructor for clients for the given service
  * Creates a constructor for clients for the given service
  * @param {ProtoBuf.Reflect.Service} service The service to generate a client
  * @param {ProtoBuf.Reflect.Service} service The service to generate a client
  *     for
  *     for
+ * @param {Object=} options Options to apply to the client
  * @return {function(string, Object)} New client constructor
  * @return {function(string, Object)} New client constructor
  */
  */
-exports.makeProtobufClientConstructor =  function(service) {
-  var method_attrs = common.getProtobufServiceAttrs(service, service.name);
+exports.makeProtobufClientConstructor =  function(service, options) {
+  var method_attrs = common.getProtobufServiceAttrs(service, service.name,
+                                                    options);
   var Client = exports.makeClientConstructor(
   var Client = exports.makeClientConstructor(
       method_attrs, common.fullyQualifiedName(service));
       method_attrs, common.fullyQualifiedName(service));
   Client.service = service;
   Client.service = service;
+  Client.service.grpc_options = options;
   return Client;
   return Client;
 };
 };
 
 
@@ -761,7 +764,7 @@ exports.callError = grpc.callError;
 <br class="clear">
 <br class="clear">
 
 
 <footer>
 <footer>
-    Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.4.0</a> on Thu Jan 14 2016 16:17:15 GMT-0800 (PST)
+    Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.4.0</a> on Tue Mar 08 2016 10:29:45 GMT-0800 (PST)
 </footer>
 </footer>
 
 
 <script> prettyPrint(); </script>
 <script> prettyPrint(); </script>

+ 30 - 8
node/src_common.js.html

@@ -28,7 +28,7 @@
         <article>
         <article>
             <pre class="prettyprint source linenums"><code>/*
             <pre class="prettyprint source linenums"><code>/*
  *
  *
- * Copyright 2015, Google Inc.
+ * Copyright 2015-2016, Google Inc.
  * All rights reserved.
  * All rights reserved.
  *
  *
  * Redistribution and use in source and binary forms, with or without
  * Redistribution and use in source and binary forms, with or without
@@ -72,9 +72,20 @@ var _ = require('lodash');
 /**
 /**
  * Get a function that deserializes a specific type of protobuf.
  * Get a function that deserializes a specific type of protobuf.
  * @param {function()} cls The constructor of the message type to deserialize
  * @param {function()} cls The constructor of the message type to deserialize
+ * @param {bool=} binaryAsBase64 Deserialize bytes fields as base64 strings
+ *     instead of Buffers. Defaults to false
+ * @param {bool=} longsAsStrings Deserialize long values as strings instead of
+ *     objects. Defaults to true
  * @return {function(Buffer):cls} The deserialization function
  * @return {function(Buffer):cls} The deserialization function
  */
  */
-exports.deserializeCls = function deserializeCls(cls) {
+exports.deserializeCls = function deserializeCls(cls, binaryAsBase64,
+                                                 longsAsStrings) {
+  if (binaryAsBase64 === undefined || binaryAsBase64 === null) {
+    binaryAsBase64 = false;
+  }
+  if (longsAsStrings === undefined || longsAsStrings === null) {
+    longsAsStrings = true;
+  }
   /**
   /**
    * Deserialize a buffer to a message object
    * Deserialize a buffer to a message object
    * @param {Buffer} arg_buf The buffer to deserialize
    * @param {Buffer} arg_buf The buffer to deserialize
@@ -83,7 +94,7 @@ exports.deserializeCls = function deserializeCls(cls) {
   return function deserialize(arg_buf) {
   return function deserialize(arg_buf) {
     // Convert to a native object with binary fields as Buffers (first argument)
     // Convert to a native object with binary fields as Buffers (first argument)
     // and longs as strings (second argument)
     // and longs as strings (second argument)
-    return cls.decode(arg_buf).toRaw(false, true);
+    return cls.decode(arg_buf).toRaw(binaryAsBase64, longsAsStrings);
   };
   };
 };
 };
 
 
@@ -147,19 +158,30 @@ exports.wrapIgnoreNull = function wrapIgnoreNull(func) {
 /**
 /**
  * Return a map from method names to method attributes for the service.
  * Return a map from method names to method attributes for the service.
  * @param {ProtoBuf.Reflect.Service} service The service to get attributes for
  * @param {ProtoBuf.Reflect.Service} service The service to get attributes for
+ * @param {Object=} options Options to apply to these attributes
  * @return {Object} The attributes map
  * @return {Object} The attributes map
  */
  */
-exports.getProtobufServiceAttrs = function getProtobufServiceAttrs(service) {
+exports.getProtobufServiceAttrs = function getProtobufServiceAttrs(service,
+                                                                   options) {
   var prefix = '/' + fullyQualifiedName(service) + '/';
   var prefix = '/' + fullyQualifiedName(service) + '/';
+  var binaryAsBase64, longsAsStrings;
+  if (options) {
+    binaryAsBase64 = options.binaryAsBase64;
+    longsAsStrings = options.longsAsStrings;
+  }
   return _.object(_.map(service.children, function(method) {
   return _.object(_.map(service.children, function(method) {
     return [_.camelCase(method.name), {
     return [_.camelCase(method.name), {
-      path: prefix + _.capitalize(method.name),
+      path: prefix + method.name,
       requestStream: method.requestStream,
       requestStream: method.requestStream,
       responseStream: method.responseStream,
       responseStream: method.responseStream,
+      requestType: method.resolvedRequestType,
+      responseType: method.resolvedResponseType,
       requestSerialize: serializeCls(method.resolvedRequestType.build()),
       requestSerialize: serializeCls(method.resolvedRequestType.build()),
-      requestDeserialize: deserializeCls(method.resolvedRequestType.build()),
+      requestDeserialize: deserializeCls(method.resolvedRequestType.build(),
+                                     binaryAsBase64, longsAsStrings),
       responseSerialize: serializeCls(method.resolvedResponseType.build()),
       responseSerialize: serializeCls(method.resolvedResponseType.build()),
-      responseDeserialize: deserializeCls(method.resolvedResponseType.build())
+      responseDeserialize: deserializeCls(method.resolvedResponseType.build(),
+                                     binaryAsBase64, longsAsStrings)
     }];
     }];
   }));
   }));
 };
 };
@@ -179,7 +201,7 @@ exports.getProtobufServiceAttrs = function getProtobufServiceAttrs(service) {
 <br class="clear">
 <br class="clear">
 
 
 <footer>
 <footer>
-    Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.4.0</a> on Thu Jan 14 2016 16:17:15 GMT-0800 (PST)
+    Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.4.0</a> on Tue Mar 08 2016 10:29:45 GMT-0800 (PST)
 </footer>
 </footer>
 
 
 <script> prettyPrint(); </script>
 <script> prettyPrint(); </script>

+ 8 - 3
node/src_credentials.js.html

@@ -28,7 +28,7 @@
         <article>
         <article>
             <pre class="prettyprint source linenums"><code>/*
             <pre class="prettyprint source linenums"><code>/*
  *
  *
- * Copyright 2015, Google Inc.
+ * Copyright 2015-2016, Google Inc.
  * All rights reserved.
  * All rights reserved.
  *
  *
  * Redistribution and use in source and binary forms, with or without
  * Redistribution and use in source and binary forms, with or without
@@ -89,7 +89,7 @@
 
 
 'use strict';
 'use strict';
 
 
-var grpc = require('bindings')('grpc_node.node');
+var grpc = require('./grpc_extension');
 
 
 var CallCredentials = grpc.CallCredentials;
 var CallCredentials = grpc.CallCredentials;
 
 
@@ -126,6 +126,8 @@ exports.createFromMetadataGenerator = function(metadata_generator) {
         message = error.message;
         message = error.message;
         if (error.hasOwnProperty('code')) {
         if (error.hasOwnProperty('code')) {
           code = error.code;
           code = error.code;
+        } else {
+          code = grpc.status.UNAUTHENTICATED;
         }
         }
         if (!metadata) {
         if (!metadata) {
           metadata = new Metadata();
           metadata = new Metadata();
@@ -144,13 +146,16 @@ exports.createFromMetadataGenerator = function(metadata_generator) {
 exports.createFromGoogleCredential = function(google_credential) {
 exports.createFromGoogleCredential = function(google_credential) {
   return exports.createFromMetadataGenerator(function(auth_context, callback) {
   return exports.createFromMetadataGenerator(function(auth_context, callback) {
     var service_url = auth_context.service_url;
     var service_url = auth_context.service_url;
+    console.log('Service URL:', service_url);
     google_credential.getRequestMetadata(service_url, function(err, header) {
     google_credential.getRequestMetadata(service_url, function(err, header) {
       if (err) {
       if (err) {
+        console.log('Auth error:', err);
         callback(err);
         callback(err);
         return;
         return;
       }
       }
       var metadata = new Metadata();
       var metadata = new Metadata();
       metadata.add('authorization', header.Authorization);
       metadata.add('authorization', header.Authorization);
+      console.log(header.Authorization);
       callback(null, metadata);
       callback(null, metadata);
     });
     });
   });
   });
@@ -209,7 +214,7 @@ exports.createInsecure = ChannelCredentials.createInsecure;
 <br class="clear">
 <br class="clear">
 
 
 <footer>
 <footer>
-    Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.4.0</a> on Thu Jan 14 2016 16:17:15 GMT-0800 (PST)
+    Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.4.0</a> on Tue Mar 08 2016 10:29:45 GMT-0800 (PST)
 </footer>
 </footer>
 
 
 <script> prettyPrint(); </script>
 <script> prettyPrint(); </script>

+ 5 - 4
node/src_metadata.js.html

@@ -77,7 +77,7 @@
 
 
 var _ = require('lodash');
 var _ = require('lodash');
 
 
-var grpc = require('bindings')('grpc_node');
+var grpc = require('./grpc_extension');
 
 
 /**
 /**
  * Class for storing metadata. Keys are normalized to lowercase ASCII.
  * Class for storing metadata. Keys are normalized to lowercase ASCII.
@@ -92,7 +92,7 @@ function normalizeKey(key) {
   if (grpc.metadataKeyIsLegal(key)) {
   if (grpc.metadataKeyIsLegal(key)) {
     return key;
     return key;
   } else {
   } else {
-    throw new Error('Metadata key contains illegal characters');
+    throw new Error('Metadata key"' + key + '" contains illegal characters');
   }
   }
 }
 }
 
 
@@ -107,7 +107,8 @@ function validate(key, value) {
           'keys that don\'t end with \'-bin\' must have String values');
           'keys that don\'t end with \'-bin\' must have String values');
     }
     }
     if (!grpc.metadataNonbinValueIsLegal(value)) {
     if (!grpc.metadataNonbinValueIsLegal(value)) {
-      throw new Error('Metadata string value contains illegal characters');
+      throw new Error('Metadata string value "' + value +
+                      '" contains illegal characters');
     }
     }
   }
   }
 }
 }
@@ -236,7 +237,7 @@ module.exports = Metadata;
 <br class="clear">
 <br class="clear">
 
 
 <footer>
 <footer>
-    Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.4.0</a> on Thu Jan 14 2016 16:17:15 GMT-0800 (PST)
+    Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.4.0</a> on Tue Mar 08 2016 10:29:45 GMT-0800 (PST)
 </footer>
 </footer>
 
 
 <script> prettyPrint(); </script>
 <script> prettyPrint(); </script>

+ 9 - 4
node/src_server.js.html

@@ -28,7 +28,7 @@
         <article>
         <article>
             <pre class="prettyprint source linenums"><code>/*
             <pre class="prettyprint source linenums"><code>/*
  *
  *
- * Copyright 2015, Google Inc.
+ * Copyright 2015-2016, Google Inc.
  * All rights reserved.
  * All rights reserved.
  *
  *
  * Redistribution and use in source and binary forms, with or without
  * Redistribution and use in source and binary forms, with or without
@@ -79,7 +79,7 @@
 
 
 var _ = require('lodash');
 var _ = require('lodash');
 
 
-var grpc = require('bindings')('grpc_node');
+var grpc = require('./grpc_extension');
 
 
 var common = require('./common');
 var common = require('./common');
 
 
@@ -765,7 +765,12 @@ Server.prototype.addService = function(service, implementation) {
  *     method implementation for the provided service.
  *     method implementation for the provided service.
  */
  */
 Server.prototype.addProtoService = function(service, implementation) {
 Server.prototype.addProtoService = function(service, implementation) {
-  this.addService(common.getProtobufServiceAttrs(service), implementation);
+  var options;
+  if (service.grpc_options) {
+    options = service.grpc_options;
+  }
+  this.addService(common.getProtobufServiceAttrs(service, options),
+                  implementation);
 };
 };
 
 
 /**
 /**
@@ -802,7 +807,7 @@ exports.Server = Server;
 <br class="clear">
 <br class="clear">
 
 
 <footer>
 <footer>
-    Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.4.0</a> on Thu Jan 14 2016 16:17:15 GMT-0800 (PST)
+    Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.4.0</a> on Tue Mar 08 2016 10:29:45 GMT-0800 (PST)
 </footer>
 </footer>
 
 
 <script> prettyPrint(); </script>
 <script> prettyPrint(); </script>