test/handlers/HelloStreamRequestHandler.cpp
/// Handles a new inbound Stream requested by the other end.
Handles a new inbound Stream requested by the other end.
Handles a new inbound Stream requested by the other end .
Reference<Flowable<rsocket::Payload>>
HelloStreamRequestHandler::handleRequestStream(
    rsocket::Payload request,
    rsocket::StreamId streamId) {
  LOG(INFO) << "HelloStreamRequestHandler.handleRequestStream " << request;
  auto requestString = request.moveDataToString();
  return Flowables::range(1, 10)->map([name = std::move(requestString)](
      int64_t v) {
    std::stringstream ss;
    ss << "Hello " << name << " " << v << "!";
    std::string s = ss.str();
    return Payload(s, "metadata");
  });
}
Reference < Flowable < rsocket :: Payload > > HelloStreamRequestHandler :: handleRequestStream ( rsocket :: Payload request , rsocket :: StreamId streamId ) { LOG ( INFO ) << " " << request ; auto requestString = request . moveDataToString ( ) ; return Flowables :: range ( 1 , 10 ) -> map ( [ name = std :: move ( requestString ) ] ( int64_t v ) { std :: stringstream ss ; ss << " " << name << " " << v << " " ; std :: string s = ss . str ( ) ; return Payload ( s , " " ) ; } ) ; }
Handles a new inbound Stream requested by the other end.
Handles a new inbound Stream requested by the other end .
// string from payload data