[Assorted-commits] SF.net SVN: assorted:[1253] cpp-commons/trunk/src/commons/st/st.h
Brought to you by:
yangzhang
From: <yan...@us...> - 2009-03-05 23:15:24
|
Revision: 1253 http://assorted.svn.sourceforge.net/assorted/?rev=1253&view=rev Author: yangzhang Date: 2009-03-05 23:15:15 +0000 (Thu, 05 Mar 2009) Log Message: ----------- - added rem, unread, reset to st_reader Modified Paths: -------------- cpp-commons/trunk/src/commons/st/st.h Modified: cpp-commons/trunk/src/commons/st/st.h =================================================================== --- cpp-commons/trunk/src/commons/st/st.h 2009-03-05 23:14:45 UTC (rev 1252) +++ cpp-commons/trunk/src/commons/st/st.h 2009-03-05 23:15:15 UTC (rev 1253) @@ -407,8 +407,11 @@ public: st_reader(st_netfd_t fd, char *buf, size_t len) : r_(st_read_fn(fd), st_read_fully_fn(fd), buf, len) {} + size_t unread() { return r_.unread(); } + size_t rem() { return r_.rem(); } sized_array<char> &buf() { return r_.buf(); } void reset_range(char *start, char *end) { r_.reset_range(start, end); } + void reset() { r_.reset(); } char *start() { return r_.start(); } char *end() { return r_.end(); } bool accum(size_t req) { return r_.accum(req); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |