blob: ed4b648b6dfc17293a4fb2d9fb09d077001a23b4 [file] [log] [blame]
Bryan Duxburycd9aea12011-02-22 18:12:06 +00001// Copyright (c) 2009- Facebook
2// Distributed under the Thrift Software License
3//
4// See accompanying file LICENSE or visit the Thrift site at:
5// http://developers.facebook.com/thrift/
6
7#include "TSSLServerSocket.h"
8#include "TSSLSocket.h"
9
10namespace apache { namespace thrift { namespace transport {
11
12using namespace boost;
13
14/**
15 * SSL server socket implementation.
16 *
17 * @author Ping Li <pingli@facebook.com>
18 */
19TSSLServerSocket::TSSLServerSocket(int port,
20 shared_ptr<TSSLSocketFactory> factory):
21 TServerSocket(port), factory_(factory) {
22 factory_->server(true);
23}
24
25TSSLServerSocket::TSSLServerSocket(int port, int sendTimeout, int recvTimeout,
26 shared_ptr<TSSLSocketFactory> factory):
27 TServerSocket(port, sendTimeout, recvTimeout),
28 factory_(factory) {
29 factory_->server(true);
30}
31
32shared_ptr<TSocket> TSSLServerSocket::createSocket(int client) {
33 return factory_->createSocket(client);
34}
35
36}}}