Re: How can a server know its own IP address
From: Jonathan Bartlett (johnnyb_at_eskimo.com)
Date: 09/28/05
- Next message: eyal.rif_at_gmail.com: "Information Extracted from socket"
- Previous message: Pascal Bourguignon: "Re: socket lock in multithred programming"
- In reply to: au.faisal: "How can a server know its own IP address"
- Next in thread: Floyd L. Davidson: "Re: How can a server know its own IP address"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Wed, 28 Sep 2005 08:13:00 -0500
au.faisal wrote:
> Hi guys
>
> I am a newbie in socket programming. Can anyone tell me how can a
> server know on which IP address it is running.
It's configuration file. If it isn't specified, that usually means it
is running on all available IP addresses.
> To make it suppose a webserver is running on computer which has the IP
> address 131.100.0.1. How can the webserver get this IP server without
> hardcoding.
>
> is there any function for that?
Either the socket listens for all addresses (IIRC it's 0.0.0.0 to
specify) or it is specified in a config file.
Jon
---- Learn to program using Linux assembly language http://www.cafeshops.com/bartlettpublish.8640017
- Next message: eyal.rif_at_gmail.com: "Information Extracted from socket"
- Previous message: Pascal Bourguignon: "Re: socket lock in multithred programming"
- In reply to: au.faisal: "How can a server know its own IP address"
- Next in thread: Floyd L. Davidson: "Re: How can a server know its own IP address"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|