Solved

how to set SOCKADDR_IN.sin_addr???

Posted on 2002-03-25
6
2,668 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
Active Directory Webinar

We all know we need to protect and secure our privileges, but where to start? Join Experts Exchange and ManageEngine on Tuesday, April 11, 2017 10:00 AM PDT to learn how to track and secure privileged users in Active Directory.

 
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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

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…
What is C++ STL?: STL stands for Standard Template Library and is a part of standard C++ libraries. It contains many useful data structures (containers) and algorithms, which can spare you a lot of the time. Today we will look at the STL Vector. …
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.
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.

821 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