Documentation ¶
Index ¶
Constants ¶
View Source
const (
WebSocketReadDeadline int = 15 //秒
)
Variables ¶
Functions ¶
This section is empty.
Types ¶
type AgentService ¶
type AgentService struct { SessDieChan chan int64 Sessions map[string]*Session // contains filtered or unexported fields }
func NewAgentService ¶
func NewAgentService(gameServerClient pb.GameServiceClient, logger log.Logger) AgentService
func (AgentService) WebSocketServer ¶
func (a AgentService) WebSocketServer(w http.ResponseWriter, r *http.Request)
type Session ¶
type Session struct {
// contains filtered or unexported fields
}
func NewSession ¶
func NewSession(id string, conn *websocket.Conn, stream pb.GameService_StreamClient, service *AgentService, logger log.Logger) *Session
func (*Session) ForwardToClient ¶
func (*Session) HandleClient ¶
func (s *Session) HandleClient()
Click to show internal directories.
Click to hide internal directories.