#16 server: auto-conversion to IP

closed
Davis
5
2006-12-14
2006-12-13
No

Hi,

I would like to start a connection directly from the hostname:

if ( create_connection(target_conn, _targetport, _targethost) != 0 )

where _targethost is like 'www.google.com'.

For some kind of reason it cannot convert this to an S_addr or something over here... I had to do 'hostname_to_ip()' before it would be accepted...

It would be nice to have this automatically convert :)

Discussion

  • Davis

    Davis - 2006-12-13
    • labels: --> Extension to Component
    • assigned_to: nobody --> davisking
    • status: open --> pending
     
  • Davis

    Davis - 2006-12-13

    Logged In: YES
    user_id=1166290
    Originator: NO

    That is what it is supposed to do. But that has been irritating to me also for a while now.

    I don't want to mess with create_connection(), it is the way it is for a bunch of reasons. Instead I'll add something like:

    connection* con = connect("www.google.com",80);

    and have it throw an exception if it doesn't work.

    -Davis

     
  • Davis

    Davis - 2006-12-14
    • status: pending --> closed
     
  • Davis

    Davis - 2006-12-14

    Logged In: YES
    user_id=1166290
    Originator: NO

    Done and in the repository.

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks