Actually a sleep wouldn't be needed if select() was used with a
timeout value. rfc5321
states that the client should give the server 10 minutes to process
information after the DATA portion of the email ends.


On Mon, Oct 15, 2012 at 1:45 PM, Victor Hunt <xlcfdp@xxxxxxxxx> wrote:
I've run across an RPG program that uses socket APIs to send an email. Once
the socket is setup and opened, the program uses a subroutine to do all the
send/receive functions. Just after the send, the subroutine runs the sleep
API with a parameter of 1 second. It appears the original intent was to
give the email server and/or network time to produce/deliver a response
before the receive API runs. Does anyone think this built in delay is
really necessary? Depending on what is being sent, this program can run for
a very long time with these roughly 1 second delays. Also, the program
doesn't do anything with the received data collected after the send API. Is
it really necessary to do a receive after a send? Seems I can tighten this
up a bit.


This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives

This thread ...


Return to Archive home page | Return to MIDRANGE.COM home page