Hi,

I would like to clean some things in native2, so here is something
(concept probably) that's itching me.

First of all can we agree that we have a well defined communication
environment between the connector and the web server?
I think we can, cause there are no third party stuff intervening in our
communication channel.

So my question is what would be the 'real' purpose of the following for
example:

   public void end() {
        len=pos;
        int dLen=len-4;

        buf[0] = (byte)0x41;
        buf[1] = (byte)0x42;
        buf[2]=  (byte)((dLen>>>8 ) & 0xFF );
        buf[3] = (byte)(dLen & 0xFF);
    }

This is probably ok for the socket channels, but for the jni (shmem
perhaps) that is simply not needed and is waste of cpu cycles.

For example inside the JniHandler we are calling:
(the raw is always 0, from ChannelJni)

        int status=apr.jkInvoke( xEnv,
                                 nativeJkHandlerP,
                                 nativeContext,
                                 code, msg.getBuffer(), 0, msg.getLen(),
raw );

And inside the C part of AprImpl_jkInvoke

   if( raw == 0 ) {
        rc=ep->reply->checkHeader( env, ep->reply, ep );
    } else {
        ep->reply->len = len;
        ep->reply->pos= off;
    }

So we are checking the message length of the direct call with the
already defined length (by the call itself).

The purpose of this entire tirade is that I would like to write the
another MsgAjp for the jni only, that would also give me the needed java
module abstractions.

If I get some +1 for that I'll dig into it (as soon as I receive my
account password).
 
MT.


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to