Bryan Duxbury | cd9aea1 | 2011-02-22 18:12:06 +0000 | [diff] [blame] | 1 | // 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 | |
| 10 | namespace apache { namespace thrift { namespace transport { |
| 11 | |
| 12 | using namespace boost; |
| 13 | |
| 14 | /** |
| 15 | * SSL server socket implementation. |
| 16 | * |
| 17 | * @author Ping Li <pingli@facebook.com> |
| 18 | */ |
| 19 | TSSLServerSocket::TSSLServerSocket(int port, |
| 20 | shared_ptr<TSSLSocketFactory> factory): |
| 21 | TServerSocket(port), factory_(factory) { |
| 22 | factory_->server(true); |
| 23 | } |
| 24 | |
| 25 | TSSLServerSocket::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 | |
| 32 | shared_ptr<TSocket> TSSLServerSocket::createSocket(int client) { |
| 33 | return factory_->createSocket(client); |
| 34 | } |
| 35 | |
| 36 | }}} |