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

Re: ReqProc procedure?



Sender: "Damon U" <damonu74@xxxxxxxxxxx>

D'Oh!

***Flashing Light Bulb Over My Head***

That makes sense and please feel free to berate my sloppy reading of the code!

Thanks Scott.

Damon


From: Scott Klement <sk@xxxxxxxxxxxxxxxx>
Reply-To: ftpapi@xxxxxxxxxxxxx
To: ftpapi@xxxxxxxxxxxxx
Subject: Re: ReqProc procedure?
Date: Mon, 22 Mar 2004 14:23:50 -0600 (CST)

Sender: Scott Klement <sk@xxxxxxxxxxxxxxxx>


Hi again,


> For most things in the code of HTTPAIP I can find documentation on IBM's
> site for the API's that get used (things like socket(),
> gsk_secure_soc_init(), etc.) but I couldn't find documentation anywhere on
> their site for the ReqProc, RespProc, etc.
>
> Just trying to be thorough in understanding the code as best I can. :)


Nonono...  ReqProc, RespProc are part of HTTPAPI, they're not system APIs.
The code is actually inside the HTTPAPIR4 member.

You see, what happens when you do an SSL request vs. a non-SSL request is
basically the same, you send the same strings of data to the server, and
you receive the same responses. The only thing that's different between
them is the actual code to send the strings over the network, since SSL
uses the GSKit API, where non-SSL uses the standard socket functions.

If you're doing an SSL post, ReqProc calls the SSL_SendReq() routine.  If
you're doing non-SSL, ReqProc calls the SendReq() routine.

How can you tell that from the code?   If you look at the prototype for
ReqProc() you'll see that it's got "ExtProc(peReqProc)" specified on it.
That means that whatever procedure is pointed to by the peReqProc
procedure pointer will be called when ReqProc() is called.  If you further
follow the code, you'll see that peReqProc is set to the address of
SSL_SendReq() or SendReq() depending on whether the conversation is SSL or
not.

If a new networking method is ever added to HTTPAPI (besides plain TCP
sockets or SSL sockets) you could simply pass a different set of
procedures to do_post to implement that method as well.
-----------------------------------------------------------------------
This is the FTPAPI mailing list.  To unsubsribe from the list send mail
to majordomo@xxxxxxxxxxxxx with the body: unsubscribe ftpapi mymailaddr
-----------------------------------------------------------------------

_________________________________________________________________
Get reliable access on MSN 9 Dial-up. 3 months for the price of 1! (Limited-time offer) http://click.atdmt.com/AVE/go/onm00200361ave/direct/01/


-----------------------------------------------------------------------
This is the FTPAPI mailing list.  To unsubsribe from the list send mail
to majordomo@xxxxxxxxxxxxx with the body: unsubscribe ftpapi mymailaddr
-----------------------------------------------------------------------