An example chat server in golang.
25'ten fazla konu seçemezsiniz Konular bir harf veya rakamla başlamalı, kısa çizgiler ('-') içerebilir ve en fazla 35 karakter uzunluğunda olabilir.
 
 
AJ ONeal d84d2e63e6 feature complete!! (for the time spend I have for now) 6 yıl önce
public feature complete!! (for the time spend I have for now) 6 yıl önce
.gitignore Initial commit 6 yıl önce
LICENSE Initial commit 6 yıl önce
README.md feature complete!! (for the time spend I have for now) 6 yıl önce
chatserver.go feature complete!! (for the time spend I have for now) 6 yıl önce
config.sample.yml go go restful static server, mighty restful static server! 6 yıl önce

README.md

chat.go

Rudimentary go chat server as a fun project.

Install

git clone https://git.coolaj86.com/coolaj86/chat.go.git

go get gopkg.in/yaml.v2
go get github.com/emicklei/go-restful

Note: I also copied some code directly from https://github.com/polvi/sni/blob/master/sni.go

Usage

Start the server

go run -race chatserver.go -conf ./config.yml

See sample config file at config.sample.yml.

Connect clients

You can connect multiple clients.

telnet localhost 4080

You can also use HTTP. The API docs and examples can be seen at http://localhost:4080

curl http://localhost:4080

Implemented

  • Awesome telnet server (would
  • HTTP API (no UI for the sake of time)
  • Multiplex the same port (because I wanted to learn)
  • E-mail "magic link" authentication (minus the link since it's localhost)

Not Implemented

  • Write to log file (just go run ./chatserver.go > /path/to/log
  • Rooms