Documentation ¶
Index ¶
- type Session
- func (s *Session) GetAddrStr() *string
- func (s *Session) GetID() []byte
- func (s *Session) GetLastReadTime() time.Time
- func (s *Session) GetPubKey() []byte
- func (s *Session) GetSessionId() string
- func (s *Session) IsClient() bool
- func (s *Session) IsTlsClient() bool
- func (s *Session) Ping() error
- func (s *Session) Send(msgType int, data []byte) error
- func (s *Session) SendBinary(data []byte) error
- func (s *Session) SendText(data []byte) error
- func (s *Session) SetClient(chordID, pubKey []byte, addrStr *string, isTls bool)
- func (s *Session) SetSessionId(sessionId string)
- func (s *Session) UpdateLastReadTime()
- type SessionList
- func (sl *SessionList) ChangeSessionToClient(sessionId, clientId string) (*Session, error)
- func (sl *SessionList) CloseSession(session *Session) error
- func (sl *SessionList) ForEachClient(visit func(*Session))
- func (sl *SessionList) ForEachSession(visit func(*Session))
- func (sl *SessionList) GetSessionCount() int
- func (sl *SessionList) GetSessionsById(sSessionId string) []*Session
- func (sl *SessionList) NewSession(wsConn *websocket.Conn) (*Session, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Session ¶
func (*Session) GetAddrStr ¶
func (*Session) GetLastReadTime ¶
func (*Session) GetSessionId ¶
func (*Session) IsTlsClient ¶
func (*Session) SendBinary ¶
func (*Session) SetSessionId ¶
func (*Session) UpdateLastReadTime ¶
func (s *Session) UpdateLastReadTime()
type SessionList ¶
func NewSessionList ¶
func NewSessionList() *SessionList
func (*SessionList) ChangeSessionToClient ¶
func (sl *SessionList) ChangeSessionToClient(sessionId, clientId string) (*Session, error)
func (*SessionList) CloseSession ¶
func (sl *SessionList) CloseSession(session *Session) error
func (*SessionList) ForEachClient ¶
func (sl *SessionList) ForEachClient(visit func(*Session))
func (*SessionList) ForEachSession ¶
func (sl *SessionList) ForEachSession(visit func(*Session))
func (*SessionList) GetSessionCount ¶
func (sl *SessionList) GetSessionCount() int
func (*SessionList) GetSessionsById ¶
func (sl *SessionList) GetSessionsById(sSessionId string) []*Session
func (*SessionList) NewSession ¶
func (sl *SessionList) NewSession(wsConn *websocket.Conn) (*Session, error)
Click to show internal directories.
Click to hide internal directories.