Back to project page SimplePushDemoApp.
The source code is released under:
GNU General Public License
If you think the Android project SimplePushDemoApp listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package org.java_websocket.drafts; /*from w w w. j ava 2 s .c om*/ import org.java_websocket.exceptions.InvalidHandshakeException; import org.java_websocket.handshake.ClientHandshake; import org.java_websocket.handshake.ClientHandshakeBuilder; public class Draft_17 extends Draft_10 { @Override public HandshakeState acceptHandshakeAsServer( ClientHandshake handshakedata ) throws InvalidHandshakeException { int v = readVersion( handshakedata ); if( v == 13 ) return HandshakeState.MATCHED; return HandshakeState.NOT_MATCHED; } @Override public ClientHandshakeBuilder postProcessHandshakeRequestAsClient( ClientHandshakeBuilder request ) { super.postProcessHandshakeRequestAsClient( request ); request.put( "Sec-WebSocket-Version", "13" );// overwriting the previous return request; } @Override public Draft copyInstance() { return new Draft_17(); } }