func NewWebsocketServerWs(connect func(*websocket.Conn, *http.Request) (Tunnel, error)) *WebsocketServer {
	return &WebsocketServer{
		connectWs: connect,
	}
}
NewWebsocketServerWs creates a new server with a connect method that takes a websocket.
package guac
import (
	"bytes"
	"io"
	"net/http"
	"github.com/gorilla/websocket"
	"github.com/sirupsen/logrus"
)
type WebsocketServer struct {
	connect   func(*http.Request) (Tunnel, error)
	connectWs func(*websocket.Conn, *http.Request) (Tunnel, error)
	OnConnect func(string, *http.Request)
	OnDisconnect func(string, *http.Request, Tunnel)
	OnConnectWs func(string, *websocket.Conn, *http.Request)
	OnDisconnectWs func(string, *websocket.Conn, *http.Request, Tunnel)
}
func NewWebsocketServer(connect func(*http.Request) (Tunnel, error)) *WebsocketServer {
	return &WebsocketServer{
		connect: connect,
	}
}