Skip to content

Commit

Permalink
Update doc.go
Browse files Browse the repository at this point in the history
chg: align client and server address in documentation sample

Prevent misunderstandings as in #163
  • Loading branch information
philippseith authored Mar 24, 2023
1 parent e11f4c1 commit e507d7a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions doc.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ servers context is canceled.
tcpConn, _ := listener.Accept()
go server.Serve(NewNetConnection(conn))
To server a HTTP connection, use server.MapHTTP(), which connects the server with a path in an http.ServeMux.
To serve a HTTP connection, use server.MapHTTP(), which connects the server with a path in an http.ServeMux.
The server then automatically negotiates which kind of connection (Websockets, Server-Sent Events) will be used.
// build a signalr.Server using your hub
Expand All @@ -75,7 +75,7 @@ The server then automatically negotiates which kind of connection (Websockets, S
// ask the signalr server to map it's server
// api routes to your custom baseurl
server.MapHTTP(signalr.WithHTTPServeMux(router), "/chat")
server.MapHTTP(signalr.WithHTTPServeMux(router), "/hub")
// in addition to mapping the signalr routes
// your mux will need to serve the static files
Expand Down

0 comments on commit e507d7a

Please sign in to comment.