All Projects → zhouhui8915 → Go Socket.io Client

zhouhui8915 / Go Socket.io Client

Licence: bsd-3-clause
socket.io client for golang

Programming Languages

go
31211 projects - #10 most used programming language
golang
3204 projects

Labels

Projects that are alternatives of or similar to Go Socket.io Client

Vuex Socketio Plugin
Vuex plugin to integrate socket.io client
Stars: ✭ 34 (-45.16%)
Mutual labels:  socket-io
Phaser3template
heroku deployable webpacked phaser3 template with socket.io for multi or single player games
Stars: ✭ 44 (-29.03%)
Mutual labels:  socket-io
Chatter
A chatting app using socket.io
Stars: ✭ 53 (-14.52%)
Mutual labels:  socket-io
Express Security
nodejs + express security and performance boilerplate.
Stars: ✭ 37 (-40.32%)
Mutual labels:  socket-io
Ihealth app
App front-end of iHealth project ( a medical WebApp based on mui )
Stars: ✭ 41 (-33.87%)
Mutual labels:  socket-io
Node Chat One To One
Node.js socket-io based one to one chat engine
Stars: ✭ 47 (-24.19%)
Mutual labels:  socket-io
Socket Click Example
Node + Express + Socket.io button click example
Stars: ✭ 28 (-54.84%)
Mutual labels:  socket-io
Tyloo Chat
vue + nestjs IM即时通讯聊天室(仿wechat)
Stars: ✭ 54 (-12.9%)
Mutual labels:  socket-io
Chat Buy React
Client for beginners to learn, built with React / Redux / Node
Stars: ✭ 1,026 (+1554.84%)
Mutual labels:  socket-io
Beaver
💨 A real time messaging system to build a scalable in-app notifications, multiplayer games, chat apps in web and mobile apps.
Stars: ✭ 1,056 (+1603.23%)
Mutual labels:  socket-io
Socket Io
基于Hyperf微服务协程框架开发的sokcet-io分布式系统
Stars: ✭ 38 (-38.71%)
Mutual labels:  socket-io
Trycode
Open-source realtime collaborative code editor on Babel, NodeJS, AngularJS, Socket.io, ACE - http://trycode.pw
Stars: ✭ 38 (-38.71%)
Mutual labels:  socket-io
Clicker
📺 a web remote control for the players out there
Stars: ✭ 47 (-24.19%)
Mutual labels:  socket-io
Doom Lgs
A multiplayer Node.js light gun shooter inspired on Doom
Stars: ✭ 36 (-41.94%)
Mutual labels:  socket-io
Vynchronize
Watch videos with friends online with the new real time video synchronization platform
Stars: ✭ 1,072 (+1629.03%)
Mutual labels:  socket-io
Realtime Newsapi
Financial News Aggregator - Real Time & Query API for Financial News
Stars: ✭ 34 (-45.16%)
Mutual labels:  socket-io
Nodejs Socketio Chat App
MEAN Stack & Socket.IO Real-time Chat App | A MEAN stack based Real Time chat application
Stars: ✭ 45 (-27.42%)
Mutual labels:  socket-io
Genal Chat
🐱‍🏍阿童木聊天室 nestjs+vue全栈聊天室 前后端分离 typescript一把梭
Stars: ✭ 1,105 (+1682.26%)
Mutual labels:  socket-io
Bombanauts
Bombanauts, inspired by the original Bomberman game, is a 3D multiplayer online battle arena (MOBA) game where players can throw bombs at each other, make boxes explode, and even other players!
Stars: ✭ 54 (-12.9%)
Mutual labels:  socket-io
Speedy Im
基于uni-app与uni-socket.io的即时通讯项目。
Stars: ✭ 49 (-20.97%)
Mutual labels:  socket-io

go-socket.io-client

go-socket.io-client is an client implementation of socket.io in golang, which is a realtime application framework.

It is compatible with latest implementation of socket.io in node.js, and supports namespace.

Install

Install the package with:

go get github.com/zhouhui8915/go-socket.io-client

Import it with:

import "github.com/zhouhui8915/go-socket.io-client"

and use socketio_client as the package name inside the code.

Example

Please check the example folder for details.

package main

import (
	"bufio"
	"github.com/zhouhui8915/go-socket.io-client"
	"log"
	"os"
)

func main() {

	opts := &socketio_client.Options{
		Transport: "websocket",
		Query:     make(map[string]string),
	}
	opts.Query["user"] = "user"
	opts.Query["pwd"] = "pass"
	uri := "http://192.168.1.70:9090/socket.io/"

	client, err := socketio_client.NewClient(uri, opts)
	if err != nil {
		log.Printf("NewClient error:%v\n", err)
		return
	}

	client.On("error", func() {
		log.Printf("on error\n")
	})
	client.On("connection", func() {
		log.Printf("on connect\n")
	})
	client.On("message", func(msg string) {
		log.Printf("on message:%v\n", msg)
	})
	client.On("disconnection", func() {
		log.Printf("on disconnect\n")
	})

	reader := bufio.NewReader(os.Stdin)
	for {
		data, _, _ := reader.ReadLine()
		command := string(data)
		client.Emit("message", command)
		log.Printf("send message:%v\n", command)
	}
}

License

The 3-clause BSD License - see LICENSE for more details

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].