socketBuffer = tmpHandshakeBytes;
}
socketBuffer.mark();
try {
if( draft == null ) {
HandshakeState isflashedgecase = isFlashEdgeCase( socketBuffer );
if( isflashedgecase == HandshakeState.MATCHED ) {
try {
write( ByteBuffer.wrap( Charsetfunctions.utf8Bytes( wsl.getFlashPolicy( this ) ) ) );
close( CloseFrame.FLASHPOLICY, "" );
} catch ( InvalidDataException e ) {
close( CloseFrame.ABNORMAL_CLOSE, "remote peer closed connection before flashpolicy could be transmitted", true );
}
return false;
}
}
HandshakeState handshakestate = null;
try {
if( role == Role.SERVER ) {
if( draft == null ) {
for( Draft d : knownDrafts ) {