func (transport *Websocket) HandleRequest(writer http.ResponseWriter, request *http.Request) {
	defer transport.unlock()

	upgrader := websocket.Upgrader{
		ReadBufferSize:    transport.readBufferSize,
		WriteBufferSize:   transport.writeBufferSize,
		EnableCompression: transport.enableCompression,
		CheckOrigin:       transport.originCheck,
	}

	socket, err := upgrader.Upgrade(writer, request, nil)

	if err != nil {
		logger.Error("Websocket upgrade failed: ", err)
		return
	}

	transport.socket = socket
	transport.running = true
}
// HandleRequest handles initial websocket upgrade request
HandleRequest handles initial websocket upgrade request
// HandleRequest handles initial websocket upgrade request
func (transport *Websocket) HandleRequest(writer http.ResponseWriter, request *http.Request) {
	defer transport.unlock()
	upgrader := websocket.Upgrader{
		ReadBufferSize:    transport.readBufferSize,
		WriteBufferSize:   transport.writeBufferSize,
		EnableCompression: transport.enableCompression,
		CheckOrigin:       transport.originCheck,
	}
	socket, err := upgrader.Upgrade(writer, request, nil)
	if err != nil {
		logger.Error("Websocket upgrade failed: ", err)
		return
	}
	transport.socket = socket
	transport.running = true
}
func ( transport * Websocket ) HandleRequest ( writer http . ResponseWriter , request * http . Request ) { defer transport . unlock ( ) upgrader := websocket . Upgrader { ReadBufferSize : transport . readBufferSize , WriteBufferSize : transport . writeBufferSize , EnableCompression : transport . enableCompression , CheckOrigin : transport . originCheck , } socket , err := upgrader . Upgrade ( writer , request , nil ) if err != nil { logger . Error ( " " , err ) return } transport . socket = socket transport . running = true }
HandleRequest handles initial websocket upgrade request
HandleRequest handles initial websocket upgrade request