Versions in this module Expand all Collapse all v1 v1.0.2 Jan 1, 2019 Changes in this version + func AddUser(userId string, http *HttpConn) + func CallDealRequest(w http.ResponseWriter, r *http.Request) (bool, net.Conn, string) + func CallNewConn(user HttpUser) bool + func DeleteUser(userId string, http *HttpConn) + func GetMessageCache(userId string) []*message.Message + func IsMessgeCache(userId string, message *message.Message) bool + type CallDealRequestFunc func(http.ResponseWriter, *http.Request) (bool, net.Conn, string) + type CallNewConnFunc func(HttpUser) bool + type HttpConn struct + Deadline int + HttpConnFlush HttpConnFlushFunc + HttpConnWrite HttpConnWriteFunc + func (hc *HttpConn) Add() + func (hc *HttpConn) Close(userId string) error + func (hc *HttpConn) Flush() + func (hc *HttpConn) IsBreak() bool + func (hc *HttpConn) IsTimeOut() bool + func (hc *HttpConn) SendMessage(msg *message.Message) (int, error) + func (hc *HttpConn) SendMessages(msgs []*message.Message) (int, error) + type HttpConnFlushFunc func() + type HttpConnWriteFunc func(data []byte) (int, error) + type HttpUser interface + Flush func() + GetUserId func() string + IsBreak func() bool + SendMessages func([]*message.Message) (int, error) + Start func(int, int, string, CallNewConnFunc)