01-14-06 03:40 AM
<lroland@gmail.com> wrote in message
news:1136996615.836340.16000@f14g2000cwb.googlegroups.com...
> I have a pice of C code where I want to perform the action
>
> out("150\r\n");
>
> every 30 seconds which will cause a SMTP connection to be kept alive
> until I get some output from the following command:
>
> qmail_close(&qq)
[snip]
> in short form
>
> while (command has not returned)
> {
> yield 30 seconds;
> perform keep alive action;
> continue loop;
> }
This shouldn't be too hard to do with another process (or thread, probably,
but I don't know much about that). However, I think you are wasting your
time trying to keep the connection alive. You presumably don't have control
over the client - maybe it will timeout despite your 150 responses. Also,
you shouldn't need to keep the client waiting long enough for it to be an
issue in the first place (*that* is the problem you should be solving, if
indeed it is a problem). In addition, although I think what you propose is
in accordance with the RFC, it may break some (badly written) clients that
don't expect 1xx responses.
Alex
[ Post a follow-up to this message ]
|