You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@trafficserver.apache.org by "JosiahWI (via GitHub)" <gi...@apache.org> on 2023/06/17 00:56:53 UTC

[GitHub] [trafficserver] JosiahWI commented on a diff in pull request #9869: Extract HttpUserAgent class from HttpSM

JosiahWI commented on code in PR #9869:
URL: https://github.com/apache/trafficserver/pull/9869#discussion_r1232917880


##########
proxy/http/HttpUserAgent.h:
##########
@@ -0,0 +1,110 @@
+/** @file
+
+  A brief file description
+
+  @section license License
+
+  Licensed to the Apache Software Foundation (ASF) under one
+  or more contributor license agreements.  See the NOTICE file
+  distributed with this work for additional information
+  regarding copyright ownership.  The ASF licenses this file
+  to you under the Apache License, Version 2.0 (the
+  "License"); you may not use this file except in compliance
+  with the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+ */
+
+#pragma once
+
+#include "I_IOBuffer.h"
+#include "I_VConnection.h"
+#include "I_VIO.h"
+#include "ProxyTransaction.h"
+
+class HttpSM;
+using HttpSMHandler = int (HttpSM::*)(int, void *);
+
+enum HttpVC_t {
+  HTTP_UNKNOWN = 0,
+  HTTP_UA_VC,
+  HTTP_SERVER_VC,
+  HTTP_TRANSFORM_VC,
+  HTTP_CACHE_READ_VC,
+  HTTP_CACHE_WRITE_VC,
+  HTTP_RAW_SERVER_VC
+};
+
+struct HttpVCTableEntry {
+  VConnection *vc;
+  MIOBuffer *read_buffer;
+  MIOBuffer *write_buffer;
+  VIO *read_vio;
+  VIO *write_vio;
+  HttpSMHandler vc_read_handler;
+  HttpSMHandler vc_write_handler;
+  HttpVC_t vc_type;
+  HttpSM *sm;
+  bool eos;
+  bool in_tunnel;
+};

Review Comment:
   Do you have a name in mind for this header file?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@trafficserver.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org