apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeff Trawick <traw...@attglobal.net>
Subject Re: ftell() equivalent???
Date Fri, 22 Nov 2002 19:32:57 GMT
Damir Dezeljin <programing@nib.si> writes:

> Hi.
> Is there any APR function to get current stream and/or file position.

for file position, apr_file_seek() can tell you where you are

offset = 0;
apr_file_seek(myfile, APR_CUR, &offset);
offset now has location in file

> Does this applay also to apr_socket_t ?

APR doesn't keep up with how many bytes have been read on a socket so
it can't give you any such position information.

Jeff Trawick | trawick@attglobal.net
Born in Roswell... married an alien...

View raw message