game-gate/src/test/java/com/jzy/game/gate/server/ssl/AbstractTest.java
// This is for TLS re-entrance test

This is for TLS re-entrance test
This is for TLS re - entrance test
@Override
                public void messageReceived(IoSession session, Object message)
                        throws Exception {
                    if (!(message instanceof IoBuffer)) {
                        return;
                    }
                    IoBuffer buf = (IoBuffer) message;
                    buf.mark();
                    if (session.getFilterChain().contains("SSL")
                            && buf.remaining() == 1 && buf.get() == (byte) '.') {
                        LOGGER.info("TLS Reentrance");
                        ((SslFilter) session.getFilterChain().get("SSL"))
                                .startSsl(session);
                        buf.capacity(1);
                        buf.flip();
                        session.setAttribute(SslFilter.DISABLE_ENCRYPTION_ONCE);
                        session.write(buf);
                    } else {
                        buf.reset();
                        super.messageReceived(session, buf);
                    }
                }
@ Override public void messageReceived ( IoSession session , Object message ) throws Exception { if ( ! ( message instanceof IoBuffer ) ) { return ; } IoBuffer buf = ( IoBuffer ) message ; buf . mark ( ) ; if ( session . getFilterChain ( ) . contains ( "SSL" ) && buf . remaining ( ) == 1 && buf . get ( ) == ( byte ) '.' ) { LOGGER . info ( "TLS Reentrance" ) ; ( ( SslFilter ) session . getFilterChain ( ) . get ( "SSL" ) ) . startSsl ( session ) ; buf . capacity ( 1 ) ; buf . flip ( ) ; session . setAttribute ( SslFilter . DISABLE_ENCRYPTION_ONCE ) ; session . write ( buf ) ; } else { buf . reset ( ) ; super . messageReceived ( session , buf ) ; } }
This is for TLS re-entrance test
This is for TLS re - entrance test
// Send a response
