[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: HTTPAPI and socket connection question



Hi Dan,

Are you calling the persistent routines, the ones named 
http_persist_xxx?  These routines exist purely to let you make multiple 
requests during the same TCP session on the same socket.  If you are 
calling http_url_post (or any of the other http_url_xxx or http_get_xxx, 
or http_post_xxx) routines, then the connections are not persistent -- 
they make a new socket and open a new TCP connection for every call.

Comm_Connect() is not a prototyped C call.  It's either calling 
commSSL_Connect(), or commTCP_Connect -- and both are written in RPG -- 
  depending on whether your socket is in SSL mode or non-SSL mode at the 
time.  (HTTPAPI switches comm_connect between commTCP and commSSL using 
a procedure pointer)  You'll find the code in the COMMTCPR4 and 
COMMSSLR4 source members.

Not sure what to tell you about setting on LR.   To give advice on that, 
I'd need to know a lot more about your app and your situation.  Whether 
your program does or does not set on LR has no impact on HTTPAPI (since 
HTTPAPI is a separate program in a separate disk object).  It only 
impacts your program...  and I don't know anything about your program.


Huesman, Dan wrote:
>    We use HTTPAPI to consume internal webservices; and we're wondering at
>    what point the socket connections are opened and closed.  Is this on a
>    per service call; or is there some way to control when sockets are
>    opened and closed?  From the debug log it appears then open and close
>    procedures are called during each http_url_post; but when I reach the
>    comm._connect call (which I believe is a prototyped "C" function); I'm
>    not sure a new socket connection is established or if an existing one
>    is used.
> 
> 
>    As a side question; do you feel it's best to leave LR off or set it on
>    open exiting each webservice consumer program?  I believe generally we
>    should leave LR off; but wanted other opinions.
> 
> 
>    I've searched the forum and haven't had any luck finding if this
>    question has already been discussed.
> 
> 
>    Thank You for your time.
> 
> 
> 
>    [cid:image002.gif@01C91FE1.7E0AA7E0]
> 
> 
>    Daniel G. Huesman
> 
>    Enterprise Integration Specialist
> 
>    Omnicare MIS Department
> 
> 
>    859-426-3107 (ph)
> 
>    859-426-3118 (fax)
> 
> 
>    This communication, together with any attachments hereto or links
>    contained herein, is for the sole use of the intended recipient(s) and
>    may contain information that is confidential or legally protected. If
>    you are not the intended recipient, you are hereby notified that any
>    review, disclosure, copying, dissemination, distribution or use of
>    this communication is STRICTLY PROHIBITED. If you have received this
>    communication in error, please notify the sender immediately by return
>    e-mail message and delete the original and all copies of the
>    communication, along with any attachments hereto or links herein, from
>    your system.
> 
>      _________________________________________________________________
> 
>    -- NOTICE -- The information transmitted is intended only for the
>    person or entity to which it is addressed and may contain confidential
>    and/or privileged material, the disclosure of which is governed by
>    applicable law. Any review, retransmission, dissemination or other use
>    of, or taking of any action in reliance upon, this information by
>    persons or entities other than the intended recipient is prohibited.
>    If you received this in error please contact the sender and destroy
>    the materials contained in this message. 
> 
> 
> 
> ------------------------------------------------------------------------
> 
> -----------------------------------------------------------------------
> This is the FTPAPI mailing list.  To unsubscribe, please go to:
> http://www.scottklement.com/mailman/listinfo/ftpapi
> -----------------------------------------------------------------------

-----------------------------------------------------------------------
This is the FTPAPI mailing list.  To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------