WebSockets should buffer events until event handlers are registered

Aperta
#104 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
25/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
c, r
Ambito
networking

Direzione di ricerca

Start by reading the linked Node.js stream documentation and tracing how httpuv currently dispatches WebSocket events; the issue names no files or tests. Define the behavior around events received before onMessage is registered, then add coverage showing that those messages are available after handler registration.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

It would be great if this, for example, didn't lose any messages:

app <- list(
  onWSOpen = function(ws) {
    later::later(~ws$onMessage(function(msg) {
      # Do something with msg
    }), 1000)
  }
)

This is something the Node.js community has dealt with (first lacking it, then having it):
https://nodejs.org/api/stream.html#stream_two_modes

Lingua principale
C
Stelle
252
Fork
87
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di rstudio/httpuv

Tutte le issue di rstudio/httpuv

Issue simili

Altre issue su C

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.