An example chat server in golang.
Ви не можете вибрати більше 25 тем
Теми мають розпочинатися з літери або цифри, можуть містити дефіси (-) і не повинні перевищувати 35 символів.
|
|
|
# chat.go
|
|
|
|
|
|
|
|
Rudimentary go chat server as a fun project.
|
|
|
|
|
|
|
|
# Install
|
|
|
|
|
|
|
|
```bash
|
|
|
|
git clone https://git.coolaj86.com/coolaj86/chat.go.git
|
|
|
|
go get gopkg.in/yaml.v2
|
|
|
|
```
|
|
|
|
|
|
|
|
# Usage
|
|
|
|
|
|
|
|
**Start the server**
|
|
|
|
|
|
|
|
```bash
|
|
|
|
go run chatserver.go -conf ./config.yml
|
|
|
|
```
|
|
|
|
|
|
|
|
See sample config file at `config.sample.yml`.
|
|
|
|
|
|
|
|
**Connect clients**
|
|
|
|
|
|
|
|
You can connect multiple clients.
|
|
|
|
|
|
|
|
```bash
|
|
|
|
telnet localhost 4080
|
|
|
|
```
|