Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2694
  • Last Modified:

how to set SOCKADDR_IN.sin_addr???

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
krydea
Asked:
krydea
1 Solution
 
proskigCommented:
yes, you just do something like
socket.sin_addr.s_addr = inet_addr("xxx.xxx.xxx.xxx");

0
 
krydeaAuthor Commented:
can i now connect??
0
 
krydeaAuthor Commented:
no comment
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
griesshCommented:
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
 
krydeaAuthor Commented:
no respone..
0
 
MindphaserCommented:
Force accepted

** Mindphaser - Community Support Moderator **
0

Featured Post

Vote for the Most Valuable Expert

It’s time to recognize experts that go above and beyond with helpful solutions and engagement on site. Choose from the top experts in the Hall of Fame or on the right rail of your favorite topic page. Look for the blue “Nominate” button on their profile to vote.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now