Code Monkey home page Code Monkey logo

gophertalk's Introduction

GopherTalk

GopherTalk is a multi-user chat powered by GO to explore its standard library and features like sockets, goroutines, channels and sync package.


The Project

The project was two binaries, the server located in {project-dir}/cmd/server.go and the client in {project-dir}/cmd/client.go

Alt Text

Server

The server is responsible to maintain the channels with your clients open, and, redirect the messages to them.

The traffic between client-server-client is done by payloads in JSON formats established in the package internal / dto

Was use pure Socket channel to accept new clients. No specific protocol was used for communication.

Client

The client just connect in the server (informed when start) and login with an uniq username, there is no authentication. If the username was exists in the server, its reject and asked to reconnect.

The client can talk with all people in the server or a specific user defined by command

Commands:

  • /help : to show the help message
  • /users : for list connected users
  • /to {user} : to define the user to send the message
  • /all : to define all people to send the message

Run

Build the project

>make build

Run the server at port 8080:

>make run-server

Run client:

>make run-client

Enjoy!

Contribute

Pull Requests are welcome. For important changes, open an 'issue' first to discuss what you would like to change. Be sure to update tests as appropriate.

Developer

Guilherme Biff Zarelli

gophertalk's People

Contributors

gbzarelli avatar

Stargazers

 avatar

Watchers

 avatar  avatar  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.