Skip to content
/ gosock Public
forked from deven96/gosock

A foray into sockets using golang

Notifications You must be signed in to change notification settings

bisohns/gosock

 
 

Repository files navigation

GoSOCK

This is a basic implementation of a chatroom using websockets. Embedded in this project is also a custom logging library

Build Status Docker Pulls

Overview GoDoc

Install

    go get github.com/deven96/gosock

Usage

To use the logging library, call this snippet preferably in the init

    import (
        "github.com/deven96/gosock/pkg/custlog"
    )
    
    func init() {
        // name the log file "test.log" and write to it in append mode
        def_writers := custlog.DefaultWriters("test.log", true)
        custlog.LogInit(def_writers)
    }

    func main(){
        custlog.Info.Println("This is just information")
        custlog.Warning.Println("This is just a warning")
        custlog.Error.Println("This is just an error")
    }

To run the project,

    cd $GOPATH/github.com/deven96/gosock

    # run the project in develop mode
    go run *.go

    # generate executable for current os
    go build github.com/deven96/gosock

    # run the executable
    ./gosock

For using the binaries only, read Binaries usage

Example Interaction

Example interaction

TODO

  • Incorporate a standard Golang ORM
  • Include User and Message models
  • Extend chat interface to include login and signup
  • Include face avatar on every message
  • Create a Rudeness API that can detect how unsensitive a statement is
  • Kick avatar out after every 3 overly rude messages
  • Deploy on Linode server
  • Linode deploy should be linked to Travis pipeline

License (MIT)

This project is opened under the MIT 2.0 License which allows very broad use for both academic and commercial purposes.

About

A foray into sockets using golang

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Go 63.8%
  • JavaScript 13.7%
  • CSS 10.8%
  • Dockerfile 5.6%
  • HTML 5.1%
  • Shell 1.0%