@ Handler ( priority = 1000 ) public void onProtocolSwitchAccepted ( ProtocolSwitchAccepted event , IOSubchannel channel ) { event . requestEvent ( ) . associated ( Session . class ) . ifPresent ( session -> { channel . setAssociated ( Session . class , session ) ; } ) ; }
Associates the channel with the session from the upgrade request .