Skip to content

Commit

Permalink
Merge branch 'master' into server_time_ms
Browse files Browse the repository at this point in the history
  • Loading branch information
FZambia committed May 16, 2024
2 parents 9d310eb + 82b314f commit decfcb4
Show file tree
Hide file tree
Showing 47 changed files with 3,893 additions and 464 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ Library highlights:
* Possibility to register a custom PUB/SUB Broker and PresenceManager implementations
* Option to register custom Transport, like [Centrifugo does with WebTransport](https://centrifugal.dev/docs/transports/webtransport)
* Message recovery mechanism for channels to survive PUB/SUB delivery problems, short network disconnects or node restart
* Cache channels – a way to quickly deliver latest publication from channel history to the client upon subscription
* Delta compression for publications inside a channel to reduce bandwidth usage
* Out-of-the-box Prometheus instrumentation
* Client SDKs for main application environments all following [single behaviour spec](https://centrifugal.dev/docs/transports/client_api) (see list of SDKs below).

Expand Down
2 changes: 1 addition & 1 deletion _examples/chat_json/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@
// subscribe on channel and bind various event listeners. Actual
// subscription request will be sent after client connects to
// a server.
const sub = centrifuge.newSubscription(channel);
const sub = centrifuge.newSubscription(channel, {});

sub.on("publication", handlePublication)
.on("join", handleJoin)
Expand Down
3 changes: 2 additions & 1 deletion _examples/chat_json/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -250,11 +250,12 @@ func main() {

server := &http.Server{
Handler: mux,
Addr: ":" + strconv.Itoa(*port),
Addr: "127.0.0.1:" + strconv.Itoa(*port),
ReadTimeout: 10 * time.Second,
WriteTimeout: 10 * time.Second,
}

log.Print("Starting server, visit http://localhost:8000")
go func() {
if err := server.ListenAndServe(); err != nil && !errors.Is(err, http.ErrServerClosed) {
log.Fatal(err)
Expand Down
Loading

0 comments on commit decfcb4

Please sign in to comment.