chat-service

command module
v0.0.0-...-b30106d Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 6, 2020 License: BSD-3-Clause Imports: 9 Imported by: 0

README

chat-service

Author: Innocent Abdullahi deewai48@gmail.com, github: https://hithub.com/Deewai

This is a prototype of a chat service implemented using websockets in Go

It makes use of the power of concurrency in Go, using buffered channels(for non-blocking code) for sending messages to different clients.

The chat is currently implemented to only send message received from a client to all other clients in a pool.

Note: This prototype does not include implementation of external services like databases

Running Application

Application can be run with docker and docker-compose by simply running the below

SOCKET_PORT={port_to_listen_on} docker-compose up

The command above defaults to port 8080

The application can also be run without docker by executing the following commands

go build
SOCKET_PORT={port_to_listen_on} ./chat-service 

When a client connects he immediately receives a UUID generated ID that identifies him (No use case for the ID in this prototype tho)

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL