Esempio n. 1
0
void InetAddrSIM::setAddress(const std::string& address,
                                          const vpr::Uint32 port)
{
   mAddress = vpr::sim::DNS::instance()->lookupAddress(address);
   setPort( port );
   setFamily( vpr::SocketTypes::INET );
   setDebugData();
}
bool V8PerContextDebugData::setContextDebugData(v8::Handle<v8::Context> context, const char* worldName, int debugId)
{
    if (!debugData(context)->IsUndefined())
        return false;
    v8::HandleScope scope(context->GetIsolate());
    v8::Handle<v8::Value> debugData = createDebugData(worldName, debugId, context->GetIsolate());
    setDebugData(context, debugData);
    return true;
}
Esempio n. 3
0
void InetAddrSIM::setAddress(const std::string& address)
{
   std::string::size_type pos;
   std::string host_addr, host_port;
   vpr::Uint32 port;

   // Extract the address and the port number from the given string.
   pos       = address.find( ":" );
   host_addr = address.substr( 0, pos );
   host_port = address.substr( pos + 1 );
   port      = (vpr::Uint32) atoi( host_port.c_str() );

   //setAddress( host_addr );
   mAddress = vpr::sim::DNS::instance()->lookupAddress( host_addr );
   setPort( port );
   setFamily( vpr::SocketTypes::INET );
   setDebugData();
}