Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type WebSocketConn ¶
func NewWebSocketConn ¶
func NewWebSocketConn(socket *websocket.Conn) *WebSocketConn
func (*WebSocketConn) ReadMessage ¶
func (conn *WebSocketConn) ReadMessage()
func (*WebSocketConn) Send ¶
func (conn *WebSocketConn) Send(message string) error
* Send |message| to the connection.
type WebSocketServer ¶
type WebSocketServer struct {
// contains filtered or unexported fields
}
func NewWebSocketServer ¶
func NewWebSocketServer( wsHandler func(ws *WebSocketConn, request *http.Request), turnServerHandler func(writer http.ResponseWriter, request *http.Request)) *WebSocketServer
func (*WebSocketServer) Bind ¶
func (server *WebSocketServer) Bind(cfg WebSocketServerConfig)
Bind .
type WebSocketServerConfig ¶
type WebSocketServerConfig struct { Host string Port int CertFile string KeyFile string HTMLRoot string WebSocketPath string TurnServerPath string }
func DefaultConfig ¶
func DefaultConfig() WebSocketServerConfig
Click to show internal directories.
Click to hide internal directories.