//! @returns //! This function returns the line read if successful, and @tt{0@} if //! no more lines are available.
Doesn't say explicitly what happens for non-EOF errors, but basically none of the functions in Stdio.File and its derivates throw exceptions on I/O errors, instead they return some kind of failure code (typically zero) and set errno. (Not that I think that's a particularly good way to handle errors, but that's how it is. It's a bit connected with the lack of a good exception system, which has been discussed in another thread recently.)
I don't know anything about TLS.. Do you have an example somewhere ?
Protocols.HTTP.Query uses it for https. It's the SSL module and you'd use SSL.sslfile which is an Stdio.File lookalike.
/ Martin Stjernholm, Roxen IS
Previous text:
2003-10-09 08:47: Subject: Re: bugs and pop3
Some comments on the pike code: o Maybe combine send_user and send_password to one function? Or is it useful to do one without the other?
Mmmh no, one isn't usable without the other.
o This looks bogus:
do { recv = socket->gets(); } while(!recv);
Doesn't it hang the process if an I/O error occurs there or if the server has closed the connection?
I thought that socket->gets() would throw an error, thus breaking the loop. Isn't it the case ? What is the behaviour of gets() when an error occurs ?
o Fix support for encryption over TLS (aka SSL)?
I don't know anything about TLS.. Do you have an example somewhere ?
o Fix an asynchronous mode using callbacks?
Is it useful ? pop3 seems synchronous to my mind... there's no reason to ask a list of messages and do anything before having that list..
I agree with the other comments. Vincent.
/ Brevbäraren
pike-devel@lists.lysator.liu.se