Solved

how to set SOCKADDR_IN.sin_addr???

Posted on 2002-03-25
6
2,667 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
ID: 6894330
yes, you just do something like
socket.sin_addr.s_addr = inet_addr("xxx.xxx.xxx.xxx");

0
 

Author Comment

by:krydea
ID: 6901829
can i now connect??
0
 

Author Comment

by:krydea
ID: 6956111
no comment
0
Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

 
LVL 11

Expert Comment

by:griessh
ID: 6956114
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
ID: 6956127
no respone..
0
 
LVL 6

Expert Comment

by:Mindphaser
ID: 6979157
Force accepted

** Mindphaser - Community Support Moderator **
0

Featured Post

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Errors will happen. It is a fact of life for the programmer. How and when errors are detected have a great impact on quality and cost of a product. It is better to detect errors at compile time, when possible and practical. Errors that make their wa…
IntroductionThis article is the second in a three part article series on the Visual Studio 2008 Debugger.  It provides tips in setting and using breakpoints. If not familiar with this debugger, you can find a basic introduction in the EE article loc…
The viewer will learn how to pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.
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.

785 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