Index: third_party/grpc/src/node/performance/worker.js |
diff --git a/third_party/WebKit/Source/modules/filesystem/DirectoryReaderSync.idl b/third_party/grpc/src/node/performance/worker.js |
similarity index 64% |
copy from third_party/WebKit/Source/modules/filesystem/DirectoryReaderSync.idl |
copy to third_party/grpc/src/node/performance/worker.js |
index e6fd4eeeda6cc54ee661af057ad073ed38e9aab6..7c8ab00026538ae03182a3ec03042036f876bf40 100644 |
--- a/third_party/WebKit/Source/modules/filesystem/DirectoryReaderSync.idl |
+++ b/third_party/grpc/src/node/performance/worker.js |
@@ -1,5 +1,7 @@ |
/* |
- * Copyright (C) 2010 Google Inc. All rights reserved. |
+ * |
+ * Copyright 2015-2016, Google Inc. |
+ * All rights reserved. |
* |
* Redistribution and use in source and binary forms, with or without |
* modification, are permitted provided that the following conditions are |
@@ -26,10 +28,36 @@ |
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
+ * |
*/ |
-[ |
- NoInterfaceObject, |
-] interface DirectoryReaderSync { |
- [RaisesException] EntrySync[] readEntries(); |
-}; |
+'use strict'; |
+ |
+var worker_service_impl = require('./worker_service_impl'); |
+ |
+var grpc = require('../../../'); |
+var serviceProto = grpc.load({ |
+ root: __dirname + '/../../..', |
+ file: 'src/proto/grpc/testing/services.proto'}).grpc.testing; |
+ |
+function runServer(port) { |
+ var server_creds = grpc.ServerCredentials.createInsecure(); |
+ var server = new grpc.Server(); |
+ server.addProtoService(serviceProto.WorkerService.service, |
+ worker_service_impl); |
+ var address = '0.0.0.0:' + port; |
+ server.bind(address, server_creds); |
+ server.start(); |
+ return server; |
+} |
+ |
+if (require.main === module) { |
+ Error.stackTraceLimit = Infinity; |
+ var parseArgs = require('minimist'); |
+ var argv = parseArgs(process.argv, { |
+ string: ['driver_port'] |
+ }); |
+ runServer(argv.driver_port); |
+} |
+ |
+exports.runServer = runServer; |