Solved

how to set SOCKADDR_IN.sin_addr???

Posted on 2002-03-25
6
2,661 Views
Last Modified: 2006-11-17
hello,
does someone know if it's posible to set:
SOCKADDR_IN.sin_addr without the dns fucntion gethostbyname()?? case i don't whant to use a dns server only set the addr and thry to connect is this posible??

i thought it could be done with inet_aton() but i don't remember..

btw: i'm useing windows so winsock:-p
plz help...

Carlos Smith
0
Comment
Question by:krydea
6 Comments
 
LVL 5

Accepted Solution

by:
proskig earned 10 total points
Comment Utility
yes, you just do something like
socket.sin_addr.s_addr = inet_addr("xxx.xxx.xxx.xxx");

0
 

Author Comment

by:krydea
Comment Utility
can i now connect??
0
 

Author Comment

by:krydea
Comment Utility
no comment
0
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
LVL 11

Expert Comment

by:griessh
Comment Utility
Dear krdea

I think you forgot this question. I will ask Community Support to close it unless you finalize it within 7 days. You can always request to keep this question open. But remember, experts can only help you if you provide feedback to their questions.
Unless there is objection or further activity,  I will suggest to accept

     "proskig"

comment(s) as an answer.

If you think your question was not answered at all, you can post a request in Community support (please include this link) to refund your points. The link to the Community Support area is: http://www.experts-exchange.com/commspt/

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!
======
Werner
0
 

Author Comment

by:krydea
Comment Utility
no respone..
0
 
LVL 6

Expert Comment

by:Mindphaser
Comment Utility
Force accepted

** Mindphaser - Community Support Moderator **
0

Featured Post

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

When writing generic code, using template meta-programming techniques, it is sometimes useful to know if a type is convertible to another type. A good example of when this might be is if you are writing diagnostic instrumentation for code to generat…
This article will show you some of the more useful Standard Template Library (STL) algorithms through the use of working examples.  You will learn about how these algorithms fit into the STL architecture, how they work with STL containers, and why t…
The viewer will learn how to use the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.
The viewer will be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.

728 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now