code: @Override
      protected void onPing(RTMPConnection conn, Channel channel, Header source, Ping ping) {
          switch (ping.getEventType()) {
              case Ping.CLIENT_BUFFER:
                  SetBuffer setBuffer = (SetBuffer) ping;
                  // get the stream id
                  int streamId = setBuffer.getStreamId();
                  // get requested buffer size in milliseconds
                  int buffer = setBuffer.getBufferLength();
                  log.debug("Client sent a buffer size: {} ms for stream id: {}", buffer, streamId);
                  IClientStream stream = null;
                  if (streamId != 0) {
                      // The client wants to set the buffer time
                      stream = conn.getStreamById(streamId);
                      if (stream != null) {
                          stream.setClientBufferDuration(buffer);
                          log.trace("Stream type: {}", stream.getClass().getName());
                      }
                  }
                  //catch-all to make sure buffer size is set
                  if (stream == null) {
                      // Remember buffer time until stream is created
                      conn.rememberStreamBufferDuration(streamId, buffer);
                      log.debug("Remembering client buffer on stream: {}", buffer);
                  }
                  break;
              case Ping.PONG_SERVER:
                  // This is the response to an IConnection.ping request
                  conn.pingReceived(ping);
                  break;
              default:
                  log.warn("Unhandled ping: {}", ping);
          }
      }
docs: {@inheritDoc}