Skip to content

Kaezon/go-chat

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

go-chat

A basic TCP chat server in Go

This is a basic chat server implementation written in Go. It's not exactly minimalist, but it is a good starting point for something more feature filled.

The server listens on a TCP port and runs all client connections in goroutines.

In the future, a basic client implementation will be added.

Usage

import "fmt"
import "github.com/kaezon/go-chat/server"
import log "github.com/sirupsen/logrus"

logger := log.New()

server := server.New(logger)

log.Info("Starting server...")
err := server.Start(":8081")
if err != nil {
	log.Error("[ERROR] ", err)
	return
}

time.Sleep(10 * time.Second)

log.Info("Stopping server...")
server.Shutdown(60)

log.Info("--Done--")

About

An experimental chat server witten in Go

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages