Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cf-dev] Access Log using DTLSConnector

Hi,

   I don't see exactly what you mean by "before DTLS authentication has taken place", but on DTLSConnector (since cf 2.0.0-M12) there is a protected method onInitializeHandshaker(final Handshaker handshaker). You can override DTLSConnector and use this method to add your SessionListener.

protected void onInitializeHandshaker(final Handshaker handshaker) {
        handshaker.addSessionListener(new SessionListener() {
            
            @Override
            public void sessionEstablished(Handshaker handshaker, DTLSSession establishedSession) throws HandshakeException {
            }
            
            @Override
            public void handshakeStarted(Handshaker handshaker) throws HandshakeException {
            }
            
            @Override
            public void handshakeFlightRetransmitted(Handshaker handshaker, int flight) {
            }
            
            @Override
            public void handshakeFailed(Handshaker handshaker, Throwable error) {
            }
            
            @Override
            public void handshakeCompleted(Handshaker handshaker) {
            }
        });
    }

see : https://github.com/eclipse/californium/issues/716

HTH

Simon

Le 19/10/2018 à 00:32, Jordan Sterling a écrit :
Hi Californium+Scandium,

I am using DTLSConnector and would like to implement an access log. I am interested in adding hooks before DTLS authentication has taken place. It seems like a few good places to attach to this are inside private methods (receiveNextDatagramFromNetwork, processRecord),  Or inside private class instances (Worker)

Are there any suggestions for good places to add this code?

Thanks,
Jordan



_______________________________________________
cf-dev mailing list
cf-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/cf-dev

Back to the top