Giter Site home page Giter Site logo

gochat's Introduction

gochat

GoChat is simplified web socket chat server with client.

Version: 0.0.1

Features

Public channel chat

Administrator support

Private channel chat

Support Command

  1. /? or /help // You can find help

  2. /list // Get all online user list

  3. /kick "username" // kick user(Administrator only)

  4. /join "channel name" // join channel

  5. /leave "channel name" // leave channel

  6. /change "channel name" // change used channel

  7. /ver // get goChat version

  8. /who "username" //check user status

  9. @"username" "message"//send direct message to user

Screenshot

Chat box

Chat Box

Send Message

Send Message

Minimize chat box

Chat Box Minimize

Send chinese words to chat box

Chat Box for Chinese

Example

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>

Build

go get https://github.com/matishsiao/gochat/
cd $GOPATH/github.com/matishsiao/gochat/
go build

Run

./gochat

Browser

Normal User

```
  http://127.0.0.1:8080/
```

Administrator

```
  http://127.0.0.1:8080/admin.html
```

Configuration

{
  "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
}

gochat's People

Contributors

matishsiao avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

deleepa visrs

gochat's Issues

Failed dependancy

go get https://github.com/matishsiao/gochat/

doesnt exist, so either we need to update the docs to get another websocket library or put back the repo.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.