NewHandler returns a new http.Handler that upgrades connections and calls handler.
Upon return from the handler function, the connection is automatically closed.
NewServer starts and returns a new Server.
Handler must respond to websocket upgrade requests.
The caller should call Close when finished, to shut it down.