当前位置: 首页>>代码示例>>C++>>正文


C++ EventableDescriptor类代码示例

本文整理汇总了C++中EventableDescriptor的典型用法代码示例。如果您正苦于以下问题:C++ EventableDescriptor类的具体用法?C++ EventableDescriptor怎么用?C++ EventableDescriptor使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了EventableDescriptor类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: evma_get_outbound_data_size

extern "C" int evma_get_outbound_data_size (const char *binding)
{
	if (!EventMachine)
		throw std::runtime_error ("not initialized");
	EventableDescriptor *ed = dynamic_cast <EventableDescriptor*> (Bindable_t::GetObject (binding));
	return ed ? ed->GetOutboundDataSize() : 0;
}
开发者ID:btakita,项目名称:eventmachine,代码行数:7,代码来源:cmain.cpp

示例2: CloseConnection

void ConnectionDescriptor::CloseConnection (const char *binding, bool after_writing)
{
	// TODO: This is something of a hack, or at least it's a static method of the wrong class.
	EventableDescriptor *ed = dynamic_cast <EventableDescriptor*> (Bindable_t::GetObject (binding));
	if (ed)
		ed->ScheduleClose (after_writing);
}
开发者ID:alltom,项目名称:easyget,代码行数:7,代码来源:ed.cpp

示例3: evma_stop_proxy

extern "C" void evma_stop_proxy (const unsigned long from)
{
	ensure_eventmachine("evma_stop_proxy");
	EventableDescriptor *ed = dynamic_cast <EventableDescriptor*> (Bindable_t::GetObject (from));
	if (ed)
		ed->StopProxy();
}
开发者ID:mrkn,项目名称:eventmachine,代码行数:7,代码来源:cmain.cpp

示例4: evma_start_tls

extern "C" void evma_start_tls (const unsigned long binding)
{
	ensure_eventmachine("evma_start_tls");
	EventableDescriptor *ed = dynamic_cast <EventableDescriptor*> (Bindable_t::GetObject (binding));
	if (ed)
		ed->StartTls();
}
开发者ID:mrkn,项目名称:eventmachine,代码行数:7,代码来源:cmain.cpp

示例5: evma_start_proxy

extern "C" void evma_start_proxy (const unsigned long from, const unsigned long to, const unsigned long bufsize)
{
	ensure_eventmachine("evma_start_proxy");
	EventableDescriptor *ed = dynamic_cast <EventableDescriptor*> (Bindable_t::GetObject (from));
	if (ed)
		ed->StartProxy(to, bufsize);
}
开发者ID:mrkn,项目名称:eventmachine,代码行数:7,代码来源:cmain.cpp

示例6: evma_set_tls_parms

extern "C" void evma_set_tls_parms (const unsigned long binding, const char *privatekey_filename, const char *certchain_filename, int verify_peer)
{
	ensure_eventmachine("evma_set_tls_parms");
	EventableDescriptor *ed = dynamic_cast <EventableDescriptor*> (Bindable_t::GetObject (binding));
	if (ed)
		ed->SetTlsParms (privatekey_filename, certchain_filename, (verify_peer == 1 ? true : false));
}
开发者ID:mrkn,项目名称:eventmachine,代码行数:7,代码来源:cmain.cpp

示例7: evma_close_connection

extern "C" void evma_close_connection (const unsigned long binding, int after_writing)
{
	ensure_eventmachine("evma_close_connection");
	EventableDescriptor *ed = dynamic_cast <EventableDescriptor*> (Bindable_t::GetObject (binding));
	if (ed)
		ed->ScheduleClose (after_writing ? true : false);
}
开发者ID:mrkn,项目名称:eventmachine,代码行数:7,代码来源:cmain.cpp

示例8: evma_is_paused

extern "C" int evma_is_paused (const unsigned long binding)
{
    EventableDescriptor *cd = dynamic_cast <EventableDescriptor*> (Bindable_t::GetObject (binding));
    if (cd)
        return cd->IsPaused() ? 1 : 0;

    return 0;
}
开发者ID:bhicks,项目名称:EventMachine-LE,代码行数:8,代码来源:cmain.cpp

示例9: evma_set_tls_parms

extern "C" void evma_set_tls_parms (const char *binding, const char *privatekey_filename, const char *certchain_filename)
{
	if (!EventMachine)
		throw std::runtime_error ("not initialized");
	EventableDescriptor *ed = dynamic_cast <EventableDescriptor*> (Bindable_t::GetObject (binding));
	if (ed)
		ed->SetTlsParms (privatekey_filename, certchain_filename);
}
开发者ID:btakita,项目名称:eventmachine,代码行数:8,代码来源:cmain.cpp

示例10: ensure_eventmachine

extern "C" X509 *evma_get_peer_cert (const unsigned long binding)
{
	ensure_eventmachine("evma_get_peer_cert");
	EventableDescriptor *ed = dynamic_cast <EventableDescriptor*> (Bindable_t::GetObject (binding));
	if (ed)
		return ed->GetPeerCert();
	return NULL;
}
开发者ID:mrkn,项目名称:eventmachine,代码行数:8,代码来源:cmain.cpp

示例11: evma_report_connection_error_status

extern "C" int evma_report_connection_error_status (const unsigned long binding)
{
	ensure_eventmachine("evma_report_connection_error_status");
	EventableDescriptor *ed = dynamic_cast <EventableDescriptor*> (Bindable_t::GetObject (binding));
	if (ed)
		return ed->ReportErrorStatus();
	return -1;
}
开发者ID:mrkn,项目名称:eventmachine,代码行数:8,代码来源:cmain.cpp

示例12: evma_send_data_to_connection

extern "C" int evma_send_data_to_connection (const unsigned long binding, const char *data, int data_length)
{
	ensure_eventmachine("evma_send_data_to_connection");
	EventableDescriptor *ed = dynamic_cast <EventableDescriptor*> (Bindable_t::GetObject (binding));
	if (ed)
		return ed->SendOutboundData(data, data_length);
	return -1;
}
开发者ID:mrkn,项目名称:eventmachine,代码行数:8,代码来源:cmain.cpp

示例13: evma_start_tls

extern "C" void evma_start_tls (const char *binding)
{
	if (!EventMachine)
		throw std::runtime_error ("not initialized");
	EventableDescriptor *ed = dynamic_cast <EventableDescriptor*> (Bindable_t::GetObject (binding));
	if (ed)
		ed->StartTls();
}
开发者ID:btakita,项目名称:eventmachine,代码行数:8,代码来源:cmain.cpp

示例14: evma_get_last_activity_time

extern "C" uint64_t evma_get_last_activity_time(const unsigned long from)
{
    ensure_eventmachine("evma_get_last_activity_time");
    EventableDescriptor *ed = dynamic_cast <EventableDescriptor*> (Bindable_t::GetObject (from));
    if (ed)
        return ed->GetLastActivity();
    else
        return 0;
}
开发者ID:bhicks,项目名称:EventMachine-LE,代码行数:9,代码来源:cmain.cpp

示例15: evma_proxied_bytes

extern "C" unsigned long evma_proxied_bytes (const unsigned long from)
{
    ensure_eventmachine("evma_proxied_bytes");
    EventableDescriptor *ed = dynamic_cast <EventableDescriptor*> (Bindable_t::GetObject (from));
    if (ed)
        return ed->GetProxiedBytes();
    else
        return 0;
}
开发者ID:bhicks,项目名称:EventMachine-LE,代码行数:9,代码来源:cmain.cpp


注:本文中的EventableDescriptor类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。