Package org.java_websocket.handshake

Examples of org.java_websocket.handshake.ServerHandshakeBuilder


                }
                ClientHandshake handshake = (ClientHandshake) tmphandshake;
                handshakestate = d.acceptHandshakeAsServer( handshake );
                if( handshakestate == HandshakeState.MATCHED ) {
                  resourceDescriptor = handshake.getResourceDescriptor();
                  ServerHandshakeBuilder response;
                  try {
                    response = wsl.onWebsocketHandshakeReceivedAsServer( this, d, handshake );
                  } catch ( InvalidDataException e ) {
                    flushAndClose( e.getCloseCode(), e.getMessage(), false );
                    return false;
View Full Code Here


    }

    if( role == Role.CLIENT ) {
      // translating/parsing the response from the SERVER
      handshake = new HandshakeImpl1Server();
      ServerHandshakeBuilder serverhandshake = (ServerHandshakeBuilder) handshake;
      serverhandshake.setHttpStatus( Short.parseShort( firstLineTokens[ 1 ] ) );
      serverhandshake.setHttpStatusMessage( firstLineTokens[ 2 ] );
    } else {
      // translating/parsing the request from the CLIENT
      ClientHandshakeBuilder clienthandshake = new HandshakeImpl1Client();
      clienthandshake.setResourceDescriptor( firstLineTokens[ 1 ] );
      handshake = clienthandshake;
View Full Code Here

TOP

Related Classes of org.java_websocket.handshake.ServerHandshakeBuilder

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.