void TNonblockingServer::expireClose(stdcxx::shared_ptr<Runnable> task) {
  TConnection* connection = static_cast<TConnection::Task*>(task.get())->getTConnection();
  assert(connection && connection->getServer() && connection->getState() == APP_WAIT_TASK);
  connection->forceClose();
}
예제 #2
0
TJSONProtocol::TJSONProtocol(stdcxx::shared_ptr<TTransport> ptrans)
  : TVirtualProtocol<TJSONProtocol>(ptrans),
    trans_(ptrans.get()),
    context_(new TJSONContext()),
    reader_(*ptrans) {
}