private void send(String message) throws WebSocketException {
  if (getReadyState() != ReadyState.OPEN) {
    messages2send.add(message);
    return;
  }
  try {
    ws.send(message);
  }
 catch (  JavaScriptException e) {
    throw new WebSocketException(e.getMessage(),e);
  }
}

private void send ( String message ) throws WebSocketException { if ( getReadyState ( ) != ReadyState . OPEN ) { messages2send . add ( message ) ; return ; } try { ws . send ( message ) ; } catch ( JavaScriptException e ) { throw new WebSocketException ( e . getMessage ( ) , e ) ; } }
transmit text data over websocket .
