Created
July 12, 2020 03:40
-
-
Save dipeshdulal/323a083956c84ac33c82210203f9564c to your computer and use it in GitHub Desktop.
Server Listening code.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
lis, err := net.Listen("tcp", "localhost:5400") | |
if err != nil { | |
log.Fatalf("Failed to listen: %v", err) | |
} | |
var opts []grpc.ServerOption | |
grpcServer := grpc.NewServer(opts...) | |
chatpb.RegisterChatServiceServer(grpcServer, &chatServiceServer{ | |
channel: make(map[string][] chan *chatpb.Message), | |
} | |
grpcServer.Serve(lis) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment