Or maybe Michael Sperber's srfi-79.

Best Wishes,
Kon


On Feb 7, 2006, at 11:18 PM, felix winkelmann wrote:

On 2/7/06, Reed Sheridan <[EMAIL PROTECTED]> wrote:
The C function that my fastcgi library uses to read input has the prototype:

int FCGX_GetStr(char *str, int n, FCGX_Stream *stream);

I have defined a custom input port with make-input-port that uses this, but the read procedure provided by this only reads one byte at a time. This is too inefficient, so I'm forced to provide a separate read function which breaks the port abstraction, which I'd rather not do (especially since I want code to be portable from any *cgi protocol). Is there a way to read a
port which, at a low level, will call
FCGX_GetStr(str,some_large_number,streamp) ?


In fact, a read-string method for port objects (ports are basically just a collection of procedures) is already on my todo-list, but I just don't
get around doing this.

I think Thomas is right: perhaps you can read in advance in your custom
port and keep an intermediate buffer?


cheers,
felix


_______________________________________________
Chicken-users mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/chicken-users



_______________________________________________
Chicken-users mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/chicken-users

Reply via email to