LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

network stream get IP address of the other side

Hello 

If I wire the reader url (computer A) input of the Writer Endpoint function in computer B, the Network Stream will run. Then how can I get the IP address of computer B in computer A.

Thanks.

0 Kudos
Message 1 of 4
(2,949 Views)

Henry,

I'm not sure if I understand correctly. Are you using a hostname to establish a connection and wish to resolve the hostname to an IP Address?

If you are using windows you can execute "nslookup $HOSTNAME" in a cmd shell. I'm sure there are similar functionalities for other operating systems. To do this in LabVIEW you can use the "System Exec" VI.

Regards

0 Kudos
Message 2 of 4
(2,910 Views)

or just use the host name as part of the URL.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 3 of 4
(2,890 Views)

I'm not sure what anyone else here is talking about, but I don't see a way for the server (the side that accepts connections) to determine the IP address of a network stream client. There's a possibility you could Shell Exec "netstat" and parse the results, but I'm not sure that would be reliable. If you switch to straight TCP communication, then you can get the IP address when a connection is established.

0 Kudos
Message 4 of 4
(2,870 Views)