Git Product home page Git Product logo

grpc-chat-server's Introduction

gRPC Chat Server

This is a simple gRPC chat server implemented in Go. It uses the gRPC framework for handling real-time communication between clients. It is one-to-one chat server, meaning that a client can send messages to another client by specifying the receiver's username.

Features

Real-time communication: The server can handle multiple clients and facilitate real-time communication between them.

Message confirmation: The server sends a confirmation message back to the sender after successfully forwarding the message to the receiver.

Connection handling: The server handles client disconnections gracefully by removing the client from the active clients list.

How it works

The server maintains a map of active clients. Each client is identified by a unique username. When a client sends a message, the server forwards the message to the intended receiver and sends a confirmation back to the sender. If the receiver is not found in the active clients list, the server simply ignores the message.

Usage

To run the server, simply execute the main.go file:

go run main.go

The server will start and listen for incoming connections on port 8080.

Screenshots

Screenshot from 2024-04-12 12-23-21 Screenshot from 2024-04-12 12-23-32 Screenshot from 2024-04-12 12-23-41

grpc-chat-server's People

Contributors

rohandoshi21 avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.