Thread: stop IP from changing

  1. #1
    Registered User
    Join Date
    Apr 2004
    Posts
    102

    stop IP from changing

    hello,
    i have a problem on my hands, i'm making/have made a chat program for windows, with my computer being the server. I Have cable, but sometimes my IP will change without warning, it could be in two days or two months, which means all people who will try to connect to my chat server will be stuck without my IP. So what i'm looking to do is either stop my IP from changing, or when it does change, find some way to inform all client programs that my IP has changed so they goto 'someplace' to get my Ip.

    which way is possible?(if any)
    does anybody have another idea of how to resolve this problem?

  2. #2
    & the hat of GPL slaying Thantos's Avatar
    Join Date
    Sep 2001
    Posts
    5,681
    Two ways to solve this:
    1) Contact your cable provider and ask them for a static ip address. They will most likely have a monthly charge for this.
    2) Look into some of the company's that provide free dynamic DNS services. Most require you subdomain off of them but thats ok. Then you just use a domain name instead of an IP address.

  3. #3
    Registered User
    Join Date
    Apr 2004
    Posts
    102
    thanks, i took suggestion 2, and it's now working

  4. #4
    Registered User
    Join Date
    Apr 2004
    Posts
    102
    just got another question:

    when i'm waiting for a client to connect using accept()
    my program is using about 99% cpu, why so much? is this a problem?

  5. #5
    Magically delicious LuckY's Avatar
    Join Date
    Oct 2001
    Posts
    856
    What does your code look like?

  6. #6
    Registered User
    Join Date
    Apr 2004
    Posts
    102
    stupid me, i just found the problem, and it was totaly unrelated to the accept() function.
    sorry

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Converting 32 bit binary IP to decimal IP (vice-versa)
    By Mankthetank19 in forum C Programming
    Replies: 15
    Last Post: 12-28-2009, 07:17 PM
  2. Changing IP Address Programmatically
    By jaro in forum Tech Board
    Replies: 5
    Last Post: 05-03-2007, 03:56 AM
  3. Changing IP
    By NotTaken in forum Windows Programming
    Replies: 1
    Last Post: 01-30-2003, 10:03 PM