boostorg / boostorg/circular_buffer
Add interface to move the first/last elements pointers
- Lingua principale
- C++
- Stelle
- 65
- Fork
- 64
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
I would like to use circular_buffer with Asio. And I'm not the only one -> https://stackoverflow.com/questions/19859833/read-data-into-a-circular-buffer
I could do something like
beast::buffers_cat(
asio::buffer(array_one().first, array_one().second),
asio::buffer(array_two().first, array_two().second)
)
to inform asio's async_read() of where it can write the received data to.
async_read would tell me how many bytes it has actually written into the circular_buffer.... and here I hit the wall. I need an API in circular_buffer where I can tell it "advance the pointer X elements because, even if push_back has not been called, the data is there".
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Direzione di ricerca
Inizia esaminando le interfacce circular_buffer array_one() e array_two() e l’uso di Asio async_read() e beast::buffers_cat() descritto nell’issue. Definisci come l’avanzamento del puntatore debba interagire con il comportamento esistente di push_back, quindi aggiungi una copertura che mostri che i byte scritti esternamente possono essere committed e vengono segnalati come dati leggibili.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- cpp
- Ambito
- backend
- Tipo di issue
- Funzionalità
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 35/100