本文整理汇总了C++中IpAddress::isUnicast方法的典型用法代码示例。如果您正苦于以下问题:C++ IpAddress::isUnicast方法的具体用法?C++ IpAddress::isUnicast怎么用?C++ IpAddress::isUnicast使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IpAddress
的用法示例。
在下文中一共展示了IpAddress::isUnicast方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: state
Qso::Qso(const IpAddress& addr, const string& callsign, const string& name,
const string& info)
: init_ok(false), sdes_length(0), state(STATE_DISCONNECTED), gsmh(0),
next_audio_seq(0), keep_alive_timer(0), connect_retry_cnt(0),
con_timeout_timer(0), callsign(callsign), name(name), local_stn_info(info),
send_buffer_cnt(0), remote_ip(addr), rx_indicator_timer(0),
remote_name("?"), remote_call("?"), is_remote_initiated(false),
receiving_audio(false), use_gsm_only(false), p(new Private),
rx_timeout_left(0)
{
if (!addr.isUnicast())
{
cerr << "IP address is not a unicast address: " << addr << endl;
return;
}
setLocalCallsign(callsign);
gsmh = gsm_create();
#ifdef SPEEX_MAJOR
speex_bits_init(&p->enc_bits);
speex_bits_init(&p->dec_bits);
p->enc_state = speex_encoder_init(&speex_nb_mode);
p->dec_state = speex_decoder_init(&speex_nb_mode);
int val = 25000;
speex_encoder_ctl(p->enc_state, SPEEX_SET_BITRATE, &val);
val = 8;
speex_encoder_ctl(p->enc_state, SPEEX_SET_QUALITY, &val);
val = 4;
speex_encoder_ctl(p->enc_state, SPEEX_SET_COMPLEXITY, &val);
#endif
if (!Dispatcher::instance()->registerConnection(this, &Qso::handleCtrlInput,
&Qso::handleAudioInput))
{
cerr << "Cannot create a new Qso object because registration with the "
"dispatcher object failed for some reason.\n";
return;
}
init_ok = true;
return;
} /* Qso::Qso */