Members

Technology Zones

Articles

Hosted By

MaximumASP

Info

socket programming in C on Visual Studio

Last post 04-06-2008 12:38 AM by palmo. 0 replies.
Page 1 of 1 (1 items)
Sort Posts: Previous Next
  • 04-06-2008 12:38 AM

    • palmo
    • Not Ranked
    • Joined on 04-06-2008
    • Australia
    • New Member
    • Points 5

    socket programming in C on Visual Studio

    I have written a basic socket programming and i can execute it very well, but now i dont want to hard code the client and server's IP address and port no in the program. I want to intialize the ip add and port numbers from a text file and set tht as configuration file. Can anyone give me an idea about how i should write the text file which will contain the ip address and port numbers and what command do i use it to open this text file in server and client program.

    This is what i did in my client and server codes

    service.sin_addr.s_addr = inet_addr("127.0.0.1");
    service.sin_port = htons(55555);

    please help me 

    • Post Points: 5
Page 1 of 1 (1 items)