blob: a4e659db97b2910743ffbba61f4a94dd55deb49a [file] [log] [blame]
Roger Meier0ae05422011-04-12 19:23:10 +00001/*
2 * Licensed to the Apache Software Foundation (ASF) under one
3 * or more contributor license agreements. See the NOTICE file
4 * distributed with this work for additional information
5 * regarding copyright ownership. The ASF licenses this file
6 * to you under the Apache License, Version 2.0 (the
7 * "License"); you may not use this file except in compliance
8 * with the License. You may obtain a copy of the License at
9 *
10 * http://www.apache.org/licenses/LICENSE-2.0
11 *
12 * Unless required by applicable law or agreed to in writing,
13 * software distributed under the License is distributed on an
14 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 * KIND, either express or implied. See the License for the
16 * specific language governing permissions and limitations
17 * under the License.
18 */
Bryan Duxburycd9aea12011-02-22 18:12:06 +000019
20#ifndef _THRIFT_TRANSPORT_TSSLSERVERSOCKET_H_
21#define _THRIFT_TRANSPORT_TSSLSERVERSOCKET_H_ 1
22
23#include <boost/shared_ptr.hpp>
24#include "TServerSocket.h"
25
26namespace apache { namespace thrift { namespace transport {
27
28class TSSLSocketFactory;
29
30/**
31 * Server socket that accepts SSL connections.
Bryan Duxburycd9aea12011-02-22 18:12:06 +000032 */
33class TSSLServerSocket: public TServerSocket {
34 public:
35 /**
36 * Constructor.
37 *
38 * @param port Listening port
39 * @param factory SSL socket factory implementation
40 */
41 TSSLServerSocket(int port, boost::shared_ptr<TSSLSocketFactory> factory);
42 /**
43 * Constructor.
44 *
45 * @param port Listening port
46 * @param sendTimeout Socket send timeout
47 * @param recvTimeout Socket receive timeout
48 * @param factory SSL socket factory implementation
49 */
50 TSSLServerSocket(int port, int sendTimeout, int recvTimeout,
51 boost::shared_ptr<TSSLSocketFactory> factory);
52 protected:
53 boost::shared_ptr<TSocket> createSocket(int socket);
54 boost::shared_ptr<TSSLSocketFactory> factory_;
55};
56
57}}}
58
59#endif