GoChat is simplified web socket chat server with client.
Public channel chat
Administrator support
Private channel chat
-
/? or /help // You can find help
-
/list // Get all online user list
-
/kick "username" // kick user(Administrator only)
-
/join "channel name" // join channel
-
/leave "channel name" // leave channel
-
/change "channel name" // change used channel
-
/ver // get goChat version
-
/who "username" //check user status
-
@"username" "message"//send direct message to user
Chat box
Send Message
Minimize chat box
Send chinese words to chat box
Normal User
<html>
<link href="static/css/chat.css" rel="stylesheet">
<body>
<div id="message_box"></div>
</body>
<script src="static/js/chat.js"></script>
<script src="static/js/util.js"></script>
<script>
var chat = new Chat("message_box","username");
chat.Connect("ws://127.0.0.1:8080/socket");
</script>
</html>
Administrator
<html>
<link href="static/css/chat.css" rel="stylesheet">
<body>
<div id="message_box"></div>
</body>
<script src="static/js/chat.js"></script>
<script src="static/js/util.js"></script>
<script>
var chat = new Chat("message_box","username","authtoken");
chat.Connect("ws://127.0.0.1:8080/socket");
</script>
</html>
go get https://github.com/matishsiao/gochat/
cd $GOPATH/github.com/matishsiao/gochat/
go build
./gochat
Browser
Normal User
```
http://127.0.0.1:8080/
```
Administrator
```
http://127.0.0.1:8080/admin.html
```
{
"debug":false,
"mode":"chat", // gochat mode: chat(public chat), TODO:service(for customer service)
"authtoken":"authtoken", // Administrator authorization token
"http":"127.0.0.1:8080", // http listen host with port
"https":"127.0.0.1:4443",// https listen host with port
"ssl":{ //https ssl key and crt file settting
"key":"ssl/test.key",
"crt":"ssl/test.crt"
},
"timeout":120,// no used. todo
"connection_limit":100//no used. todo
}