Add-Ons & Services

An optimized circular buffer needed in POCO

Discussion of ideas for features and new projects based on POCO.

An optimized circular buffer needed in POCO

Postby Ryuka » 07 Oct 2011, 05:32

I am new to Poco. and I use it to write a TCP Server.I use my own protocol to split packets from the TCP stream .I need a circular buffer to buffer my not-complete packet data, but I can't find circular buffer implement in POCO library,so I have to write my own circular buffer class (just use std::deque to read/peek data from front and write data to back) . I wish POCO could add an optimized circular buffer implemention into the Foundation library . Thanks.

wish interface :
void putData(const Poco::UInt8 * databuffer,int size); // put data into the buffer's back
int getData(Poco::UInt8 * databuffer,int size); // read data from the buffer's front
int peekData(Poco::UInt8 * databuffer,int size); // just fetch out data, not remove them from buffer.
int getSize() const; // get the buffer's available data byte counts
Posts: 1
Joined: 07 Oct 2011, 05:18

Return to Wishlist

Who is online

Users browsing this forum: Baidu [Spider] and 1 guest