complete the marshal/unmarshal of events using the new pool enabled tag codecs

This commit is contained in:
2025-08-22 14:29:55 +01:00
parent 8add32bb78
commit bf178eae4e
25 changed files with 1547 additions and 44 deletions

View File

@@ -1,29 +1,9 @@
package app
import (
"net/http"
"lol.mleku.dev/log"
"next.orly.dev/app/config"
"github.com/coder/websocket"
)
type Listener struct {
mux *http.ServeMux
Config *config.C
}
func (l *Listener) ServeHTTP(w http.ResponseWriter, r *http.Request) {
log.I.F("path %v header %v", r.URL, r.Header)
if r.Header.Get("Upgrade") == "websocket" {
l.HandleWebsocket(w, r)
} else if r.Header.Get("Accept") == "application/nostr+json" {
l.HandleRelayInfo(w, r)
} else {
http.Error(w, "Upgrade required", http.StatusUpgradeRequired)
}
}
func (l *Listener) HandleWebsocket(w http.ResponseWriter, r *http.Request) {
log.I.F("websocket")
return
conn *websocket.Conn
}