Documentation ¶
Index ¶
Constants ¶
View Source
const ( ChatMessagePIDString = "2.0.7.2" JoinRoomPIDString = "2.0.7.3" LeaveRoomPIDString = "2.0.7.4" )
View Source
const (
RoomBufSize = 1000
)
Variables ¶
View Source
var ( ChatMessagePID = bw.FromDotForm("2.0.7.2") JoinRoomPID = bw.FromDotForm("2.0.7.3") LeaveRoomPID = bw.FromDotForm("2.0.7.4") )
Functions ¶
This section is empty.
Types ¶
type ChatMessage ¶
func WrapError ¶
func WrapError(err error) *ChatMessage
func (ChatMessage) ToBW ¶
func (msg ChatMessage) ToBW() bw.PayloadObject
type JoinRoom ¶
type JoinRoom struct { // the name you will be known by in the chatroom Alias string }
func (JoinRoom) ToBW ¶
func (msg JoinRoom) ToBW() bw.PayloadObject
type LeaveRoom ¶
type LeaveRoom struct { // why you left the chatroom. Will be sent to all members in the room Reason string }
func (LeaveRoom) ToBW ¶
func (msg LeaveRoom) ToBW() bw.PayloadObject
type OrdoCore ¶
type OrdoCore struct { // log of actions taken Log chan string // your name Alias string // handlers ReceivedJoin func(msg JoinRoom) ReceivedLeave func(msg LeaveRoom) ReceivedChat func(msg ChatMessage) // contains filtered or unexported fields }
func NewOrdoCore ¶
type Room ¶
type Room struct { // URI of the room URI string // name of room derived from URI Name string // your name in the room Alias string // whether or not the room can be used Alive bool // contains filtered or unexported fields }
represents an Ordo chat room
func (*Room) Join ¶
join the room. Sends a JoinMessage to all subscribers and subscribes to the room
func (*Room) SetStateUpdateCallback ¶
function to be invoked when the room's state changes
Click to show internal directories.
Click to hide internal directories.