chat

package
v1.0.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 27, 2022 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// Services is All services in chat server
	Services = &component.Components{}
)

Functions

func OnSessionClosed

func OnSessionClosed(s *session.Session)

Types

type RoomService

type RoomService struct {
	component.Base
	// contains filtered or unexported fields
}

func (*RoomService) JoinRoom

func (rs *RoomService) JoinRoom(s *session.Session, msg *protocol.JoinRoomRequest) error

func (*RoomService) SyncMessage

func (rs *RoomService) SyncMessage(s *session.Session, msg *SyncMessage) error

type SyncMessage

type SyncMessage struct {
	Name    string `json:"name"`
	Content string `json:"content"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL