On Tuesday, 4 February 2014 at 13:02:26 UTC, TheFlyingFiddle
wrote:
I'm trying to find my own ip address using std.socket with
little success. How would i go about doing this? (It should be
a AddressFamily.INET socket)
On Windows, you can use the Win32`GetAdaptersInfo`[1] function to
get a
On Tuesday, 4 February 2014 at 13:02:26 UTC, TheFlyingFiddle
wrote:
I'm trying to find my own ip address using std.socket with
little success. How would i go about doing this? (It should be
a AddressFamily.INET socket)
Sadly, the standard library doesn't seem to offer network
interface
On Tuesday, 4 February 2014 at 22:31:53 UTC, Dicebot wrote:
On Tuesday, 4 February 2014 at 20:19:14 UTC, TheFlyingFiddle
wrote:
I'm setting up a simple local network enabling me to connect
phones to the computer through the local wi-fi. The simplest
way i could think of to make this work
I'm trying to find my own ip address using std.socket with little
success. How would i go about doing this? (It should be a
AddressFamily.INET socket)
On Tuesday, 4 February 2014 at 13:02:26 UTC, TheFlyingFiddle
wrote:
I'm trying to find my own ip address using std.socket with
little success. How would i go about doing this? (It should be
a AddressFamily.INET socket)
You can have lot of different local IP addresses on a single
machine so
On Tuesday, 4 February 2014 at 13:02:26 UTC, TheFlyingFiddle
wrote:
I'm trying to find my own ip address using std.socket with
little success. How would i go about doing this? (It should be
a AddressFamily.INET socket)
Create a connection to another LAN machine with a known address
(e.g.
On Tuesday, 4 February 2014 at 13:21:54 UTC, Stanislav Blinov
wrote:
Create a connection to another LAN machine with a known address
(e.g. gateway or router), then use Socket's localAddress
property to get your IP.
Worth noting that this solution is not reliable in general either
because
On Tuesday, 4 February 2014 at 13:13:07 UTC, Dicebot wrote:
On Tuesday, 4 February 2014 at 13:02:26 UTC, TheFlyingFiddle
wrote:
I'm trying to find my own ip address using std.socket with
little success. How would i go about doing this? (It should be
a AddressFamily.INET socket)
You can have
On Tuesday, 4 February 2014 at 13:21:54 UTC, Stanislav Blinov
wrote:
On Tuesday, 4 February 2014 at 13:02:26 UTC, TheFlyingFiddle
wrote:
I'm trying to find my own ip address using std.socket with
little success. How would i go about doing this? (It should be
a AddressFamily.INET socket)
On Tuesday, 4 February 2014 at 13:31:27 UTC, TheFlyingFiddle
wrote:
Problem is that i don't know in what local network the server
will be running, so this is unfortunatly not an option for me.
But if that's the case, the hostname solution may as well just
give you your loopback address. :)
On Tuesday, 4 February 2014 at 15:48:50 UTC, Vladimir Panteleev
wrote:
On Tuesday, 4 February 2014 at 13:02:26 UTC, TheFlyingFiddle
wrote:
I'm trying to find my own ip address using std.socket with
little success. How would i go about doing this? (It should be
a AddressFamily.INET socket)
On Tuesday, 4 February 2014 at 16:02:33 UTC, Craig Dillabaugh
wrote:
However if I run /sbin/ifconfig I get:
enp7s0Link encap:Ethernet HWaddr 50:E5:49:9B:29:49
inet addr:10.1.101.52 Bcast:10.1.101.255
Mask:255.255.255.0
inet6 addr: fe80::52e5:49ff:fe9b:2949/64
On Tuesday, 4 February 2014 at 13:02:26 UTC, TheFlyingFiddle
wrote:
I'm trying to find my own ip address using std.socket with
little success. How would i go about doing this? (It should be
a AddressFamily.INET socket)
This program will print all of your computer's IP addresses:
import
On Tuesday, 4 February 2014 at 16:13:33 UTC, Dicebot wrote:
It results in all addresses you hostname resolvs to. On all
desktop linux machines /etc/hosts is configured to resolve
hostname to localhost by default. On servers it usually
resolves to externally accessible one.
Update: I have
On Tuesday, 4 February 2014 at 16:02:33 UTC, Craig Dillabaugh
wrote:
This computer is on a network with dynamically assigned IP
address (DHCP).
So shouldn't the 10.1.101.52 address have been reported?
Nope. In out-of-the-box simple network setups (i.e. home network
in the form PC/laptop -
On Tuesday, 4 February 2014 at 16:13:33 UTC, Dicebot wrote:
On Tuesday, 4 February 2014 at 16:02:33 UTC, Craig Dillabaugh
wrote:
However if I run /sbin/ifconfig I get:
enp7s0Link encap:Ethernet HWaddr 50:E5:49:9B:29:49
inet addr:10.1.101.52 Bcast:10.1.101.255
On Tuesday, 4 February 2014 at 13:24:59 UTC, Dicebot wrote:
On Tuesday, 4 February 2014 at 13:21:54 UTC, Stanislav Blinov
wrote:
Worth noting that this solution is not reliable in general
either because your server can possibly have complicated routing
configurations that will make, for
Am Tue, 04 Feb 2014 16:19:08 +
schrieb Stanislav Blinov stanislav.bli...@gmail.com:
On Tuesday, 4 February 2014 at 16:02:33 UTC, Craig Dillabaugh
wrote:
This computer is on a network with dynamically assigned IP
address (DHCP).
So shouldn't the 10.1.101.52 address have been
On Tuesday, 4 February 2014 at 20:19:14 UTC, TheFlyingFiddle
wrote:
I'm setting up a simple local network enabling me to connect
phones to the computer through the local wi-fi. The simplest
way i could think of to make this work without relying on an
external server was to simply broadcast the
19 matches
Mail list logo