MCPcopy Create free account
hub / github.com/AimRT/AimRT / HandleClientMagic

Method HandleClientMagic

src/plugins/grpc_plugin/http2/server_session.cc:172–192  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

170}
171
172int ServerSession::HandleClientMagic(std::string_view in) {
173 if (in.empty()) {
174 return -1;
175 }
176
177 if (in.size() < NGHTTP2_CLIENT_MAGIC_LEN) {
178 return 0;
179 }
180
181 if (!in.starts_with(NGHTTP2_CLIENT_MAGIC)) {
182 return -1;
183 }
184
185 auto parse_ok = Session::ParseRecvMessage(in);
186 if (parse_ok != 0) {
187 return -1;
188 }
189
190 good_client_magic_ = true;
191 return 0;
192}
193
194void ServerSession::OnFullRequest(const RequestPtr& request_ptr) {
195 full_request_list_.push_front(request_ptr);

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected