Example #1
0
  public synchronized void receiveClose(short channel, Close close) {
    setClosedForInput(true);
    _connectionEventListener.closeReceived();
    switch (_state) {
      case UNOPENED:
      case AWAITING_OPEN:
        Error error = new Error();
        error.setCondition(ConnectionError.CONNECTION_FORCED);
        error.setDescription("Connection close sent before connection was opened");
        connectionError(error);
        break;
      case OPEN:
        sendClose(new Close());
        break;
      case CLOSE_SENT:

      default:
    }
  }