Skip to content

heavenshell/socket.io-go-emitter

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

socket.io-go-emitter

Build Status

A Golang implementation of socket.io-emitter

This project uses redis. Make sure your environment has redis.

Install and development

To install in your golang project.

$ go get github.com/yosuke-furukawa/socket.io-go-emitter

Usage

Example:

  emitter, _ := SocketIO.NewEmitter(&SocketIO.EmitterOpts{
    Host:"localhost",
    Port:6379,
  })
  emitter.Emit("message", "I love you!!")

Broadcasting and other flags

Possible flags

  • json
  • volatile
  • broadcast
  emitter, _ := SocketIO.NewEmitter(&SocketIO.EmitterOpts{
    Host:"localhost",
    Port:6379,
  })
  emitter.Volatile().Emit("message", "I love you!!")

** Binary Support

  emitter, _ := SocketIO.NewEmitter(&SocketIO.EmitterOpts{
    Host:"localhost",
    Port:6379,
  })
  val := bytes.NewBufferString("I love you!!")
  emitter.EmitBinary("message", val)

Packages

No packages published

Languages

  • Go 91.6%
  • JavaScript 8.4%