node.js - grpc, two clients connect to the server at one time return error -


i wrote simple chat room demo grpc lib, 1 client can connect server @ 1 time, weird. here code, can give advise on it?

full code link github

client:

const chat_proto = grpc.load(__dirname + '/chat.proto').demo; const client = new chat_proto.chat('localhost:50051'); 

server:

let chatserver = getservice(); chatserver.bind('localhost:50051'); chatserver.listen(); 

chat.proto:

syntax = "proto3"; package demo; service chat {   rpc sayhi(username) returns (welmessage) {}    rpc chatwith(stream chatnote) returns (stream chatnote) {}  } message username {   string name = 1; } message welmessage {   string message = 1; }  message chatnote {   string message = 1; } 

error:

  • client return error @ /users/chopper/webstormprojects/grpcexamples/node_modules/grpc/src/client.js:461:23 means response.status.code !== grpc.status.ok
  • server return segmentation fault: 11


Comments

Popular posts from this blog

toolbar - How to add link to user registration inside toobar in admin joomla 3 custom component -

linux - disk space limitation when creating war file -

How to provide Authorization & Authentication using Asp.net, C#? -