public void connect(){
  if (writeThread != null)   throw new IllegalStateException("WebSocketClient objects are not reuseable");
  writeThread=new Thread(this);
  writeThread.start();
}

public void connect ( ) { if ( writeThread != null ) throw new IllegalStateException ( "WebSocketClient objects are not reuseable" ) ; writeThread = new Thread ( this ) ; writeThread . start ( ) ; }
initiates the websocket connection . this method does not block .
