コード例 #1
0
ファイル: cmain.cpp プロジェクト: mrkn/eventmachine
extern "C" float evma_get_comm_inactivity_timeout (const unsigned long binding)
{
	ensure_eventmachine("evma_get_comm_inactivity_timeout");
	EventableDescriptor *ed = dynamic_cast <EventableDescriptor*> (Bindable_t::GetObject (binding));
	if (ed) {
		return ((float)ed->GetCommInactivityTimeout() / 1000);
	}
	else
		return 0.0; //Perhaps this should be an exception. Access to an unknown binding.
}
コード例 #2
0
ファイル: cmain.cpp プロジェクト: btakita/eventmachine
extern "C" int evma_get_comm_inactivity_timeout (const char *binding, int *value)
{
	if (!EventMachine)
		throw std::runtime_error ("not initialized");
	EventableDescriptor *ed = dynamic_cast <EventableDescriptor*> (Bindable_t::GetObject (binding));
	if (ed) {
		return ed->GetCommInactivityTimeout (value);
	}
	else
		return 0; //Perhaps this should be an exception. Access to an unknown binding.
}