00001 /** @file 00002 00003 A brief file description 00004 00005 @section license License 00006 00007 Licensed to the Apache Software Foundation (ASF) under one 00008 or more contributor license agreements. See the NOTICE file 00009 distributed with this work for additional information 00010 regarding copyright ownership. The ASF licenses this file 00011 to you under the Apache License, Version 2.0 (the 00012 "License"); you may not use this file except in compliance 00013 with the License. You may obtain a copy of the License at 00014 00015 http://www.apache.org/licenses/LICENSE-2.0 00016 00017 Unless required by applicable law or agreed to in writing, software 00018 distributed under the License is distributed on an "AS IS" BASIS, 00019 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 00020 See the License for the specific language governing permissions and 00021 limitations under the License. 00022 */ 00023 00024 #ifndef __HTTP2_SESSION_ACCEPT_H__ 00025 #define __HTTP2_SESSION_ACCEPT_H__ 00026 00027 #include "libts.h" 00028 #include "I_Net.h" 00029 00030 // XXX HttpSessionAccept::Options needs to be refactored and separated from HttpSessionAccept so that 00031 // it can generically apply to all protocol implementations. 00032 #include "http/HttpSessionAccept.h" 00033 00034 // HTTP/2 Session Accept. 00035 // 00036 // HTTP/2 needs to be explicitly enabled on a server port. The syntax is different for SSL and raw 00037 // ports. There's currently no support for the HTTP/1.1 upgrade path. The example below configures 00038 // HTTP/2 on port 80 and port 443 (with TLS). 00039 // 00040 // CONFIG proxy.config.http.server_ports STRING 80:proto=http2 443:ssl:proto=h2-12 00041 00042 struct Http2SessionAccept : public SessionAccept 00043 { 00044 explicit Http2SessionAccept(const HttpSessionAccept::Options&); 00045 ~Http2SessionAccept(); 00046 00047 void accept(NetVConnection *, MIOBuffer *, IOBufferReader *); 00048 int mainEvent(int event, void * netvc); 00049 00050 private: 00051 Http2SessionAccept(const Http2SessionAccept&); 00052 Http2SessionAccept& operator =(const Http2SessionAccept&); 00053 00054 HttpSessionAccept::Options options; 00055 }; 00056 00057 #endif // __HTTP2_SESSION_ACCEPT_H__