Code Monkey home page Code Monkey logo

gochat's Introduction

golang匿名聊天室 支持@定向消息

本实例基于websocket和jQuery开发。 websocket jQuery

本实例特点如下:

  1. 支持浏览器客户端和命令行客户端两种方式。
  2. 支持私聊。

运行实例

实例运行运行在go环境中,安装go环境请参照(http://golang.org/doc/install)

启动服务器。

$ go get github.com/gorilla/websocket
$ git clone [email protected]:innger/gochat.git
$ cd server
$ go run *.go

运行命令行客户端

$ cd client
$ go run *.go

运行浏览器客户端 http://127.0.0.1/

登录聊天室:

访问即登录,随机分配用户名,即可开始聊天

跟某人私聊输入:

@dengyanlu 私聊信息

后端 goroutine + chan 支持高并发

gochat's People

Contributors

innger avatar

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.