You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/* * * Copyright 2015 gRPC authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */varPROTO_PATH=__dirname+'/grpc/helloworld.proto';vargrpc=require('grpc');varprotoLoader=require('@grpc/proto-loader');varpackageDefinition=protoLoader.loadSync(PROTO_PATH,{keepCase: true,longs: String,enums: String,defaults: true,oneofs: true});varhello_proto=grpc.loadPackageDefinition(packageDefinition).helloworld;/** * Implements the SayHello RPC method. */functionsayHello(call,callback){callback(null,{message: 'Hello Node Server - '+call.request.name});}/** * Starts an RPC server that receives requests for the Greeter service at the * sample server port */functionmain(){varserver=newgrpc.Server();server.addService(hello_proto.Greeter.service,{sayHello: sayHello});server.bind('0.0.0.0:9502',grpc.ServerCredentials.createInsecure());server.start();}main();
Swoole版本4.5.2
启动example/grpc/greater_client.php, 调用官方node grpc server,无响应,卡死。node server未进入响应逻辑。
@huanghantao
node
php
The text was updated successfully, but these errors were encountered: