websocket

package
v0.0.0-...-0990355 Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2016 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Session

type Session interface {
	Close() error
	Write(msg []byte) (n int, err error)
	Request() *http.Request
	R() *Conn
}

type WebSocketSession

type WebSocketSession struct {
	*Conn
}

func (*WebSocketSession) R

func (this *WebSocketSession) R() *Conn

type WebsocketServer

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

func AWebsocketServer

func AWebsocketServer(SessionHandler func(*WebSocketSession)) *WebsocketServer

func (*WebsocketServer) Handler

func (this *WebsocketServer) Handler(req Request, res Response) (bool, Request, Response)

type WebsocketServerAsync

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

func AWebsocketServerAsync

func AWebsocketServerAsync(paraList ...int) *WebsocketServerAsync

func (*WebsocketServerAsync) Handler

func (this *WebsocketServerAsync) Handler(req Request, res Response) (bool, Request, Response)

func (*WebsocketServerAsync) OnConnect

func (this *WebsocketServerAsync) OnConnect(f func(Session)) *WebsocketServerAsync

func (*WebsocketServerAsync) OnDisconnect

func (this *WebsocketServerAsync) OnDisconnect(f func(Session)) *WebsocketServerAsync

func (*WebsocketServerAsync) OnError

func (this *WebsocketServerAsync) OnError(f func(Session, error)) *WebsocketServerAsync

func (*WebsocketServerAsync) OnMessage

func (this *WebsocketServerAsync) OnMessage(f func(Session, []byte, error)) *WebsocketServerAsync

Jump to

Keyboard shortcuts

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