ex

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Sep 20, 2023 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewClient

func NewClient(context *core.Context, re *http.Request, liveTime int) *client

Types

type HttpMessage

type HttpMessage struct {
	From   string
	Body   string
	MsgId  uint32
	ExData map[string]string
}

type Server

type Server struct {
	core.IHttpServer
	// contains filtered or unexported fields
}

func NewServer

func NewServer() *Server

func (*Server) Init

func (server *Server) Init(context *core.Context)

func (*Server) Name

func (server *Server) Name() string

func (*Server) Start

func (server *Server) Start() error

type Store

type Store struct {
	// contains filtered or unexported fields
}

func NewStore

func NewStore() *Store

func (*Store) Delete

func (s *Store) Delete(username string)

func (*Store) LoadOrStore

func (s *Store) LoadOrStore(c *client) (*client, bool)

func (*Store) RangeClient

func (s *Store) RangeClient(f func(c *client))

type User

type User struct {
	user.IUser
	// contains filtered or unexported fields
}

func NewUser

func NewUser(username string, queue *util.Queue, writer http.ResponseWriter, re *http.Request) *User

func (*User) Close

func (u *User) Close()

func (*User) CreateTime

func (u *User) CreateTime() *time.Time

func (*User) GetGroupIds

func (u *User) GetGroupIds() []string

func (*User) GetId

func (u *User) GetId() string

func (*User) GetRemoteAddress

func (u *User) GetRemoteAddress() string

func (*User) GetUsername

func (u *User) GetUsername() string

func (*User) LastLiveTime

func (u *User) LastLiveTime() *time.Time

func (*User) SetUsername

func (u *User) SetUsername(username string)

func (*User) WriteMessage

func (u *User) WriteMessage(iMessage message.IMessage, writeFunc user.WriteCallBackFunc)

Jump to

Keyboard shortcuts

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