All pastes #482587 Raw Edit

Untitled

public cpp v1 · immutable
·published 2007-05-11 10:16 UTC
rendered paste body
void c_socket::setAddress(string buffer){        struct hostent *host_ip;    m_sin.sin_addr.s_addr = inet_addr( buffer.c_str() );    if( (int)m_sin.sin_addr.s_addr == -1 )    {        cout<<"buffer avant gethostbyname: +"<<buffer.c_str()<<"+"<<endl;        host_ip = gethostbyname( buffer.c_str() );        if (host_ip == NULL) cout <<endl<< "host_ip est null"<<endl;        memcpy( (char *)&m_sin.sin_addr.s_addr, host_ip->h_addr, host_ip->h_length );    }}