Categorygithub.com/skyhop-tech/go-socket.io
modulepackage
0.0.0-20240908225457-aa5fafe64cfe
Repository: https://github.com/skyhop-tech/go-socket.io.git
Documentation: pkg.go.dev

# README

go-socket.io

GoDoc Build Status Go Report Card

go-socket.io is library an implementation of Socket.IO in Golang, which is a realtime application framework.

Current this library supports 1.4 version of the Socket.IO client. It supports room, namespaces and broadcast at now.

Help wanted This project is looking for contributors to help fix bugs and implement new features. Please check Issue 192. All help is much appreciated.

Contents

Install

Install the package with:

go get github.com/googollee/go-socket.io

Import it with:

import "github.com/googollee/go-socket.io"

and use socketio as the package name inside the code.

Example

Please check more examples into folder in project for details. Examples

FAQ

It is some popular questions about this repository:

  • Is this library supported socket.io version 2?
    • No, but if you wanna you can help to do it. Join us in community chat Telegram
  • How to use go-socket.io with CORS?
  • What is minimal version Golang support for this library?
    • We required Go 1.9 or upper!
  • How to user?
    • Go-socket.io compatibility with Socket.IO 0.9.x, please use branch 0.9.x * or tag [email protected]

Community

Telegram chat: @go_socketio

Engineio

This project contains a sub-package called engineio. This used to be a separate package under https://github.com/googollee/go-engine.io.

It contains the engine.io analog implementation of the original node-package. https://github.com/socketio/engine.io It can be used without the socket.io-implementation. Please check the README.md in engineio/.

License

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

# Packages

No description provided by the author
No description provided by the author

# Functions

NewServer returns a server.

# Constants

Represents a normal chat message intended to be broadcasted to all connections in the given chat room.
Publish this type of message to tell other instances to clear the given rooms.
Broadcased when a connection joins a room.
Publish this type of message to tell other instances to join the give room via callback.

# Structs

RedisAdapterOptions is configuration to create new adapter.
Server is a go-socket.io server.

# Interfaces

Broadcast is the adaptor to handle broadcasts & rooms for socket.io server API.
Conn is a connection in go-socket.io.
Namespace describes a communication channel that allows you to split the logic of your application over a single shared connection.

# Type aliases

EachFunc typed for each callback function.
No description provided by the author