blob: c18a8d2325fe21ab635d4eb2fcb40ec2a045f7e0 [file] [log] [blame]
#ifndef T_SERVER_SOCKET_H
#define T_SERVER_SOCKET_H
#include "transport/TServerTransport.h"
namespace facebook { namespace thrift { namespace transport {
class TSocket;
/**
* Server socket implementation of TServerTransport. Wrapper around a unix
* socket listen and accept calls.
*
* @author Mark Slee <mcslee@facebook.com>
*/
class TServerSocket : public TServerTransport {
public:
TServerSocket(int port);
~TServerSocket();
void listen();
void close();
protected:
TTransport* acceptImpl();
private:
int port_;
int serverSocket_;
int acceptBacklog_;
};
}}} // facebook::thrift::transport
#endif