Live555 can't get ip address solution under LINUX

  
 

Running live55 under linux shows the figure: not getting ip: ip is 0.0.0.0 live555 does not know the local IP address and network interface, through a local port to establish a UDP connection, then put This UDP connection joins
to a multicast group. Of course, the multicast group needs to be set accordingly, such as TTL, loopback, etc.; then a data is sent over the UDP connection; finally, the data is received through the UDP connection, and Analyze the corresponding sending address; the approximate process is like this.
The specific code snippet live555: groupsock/GroupsockHelper.cpp: So we set a fixed IP address:
First set the IP: execute the command: vi /etc/sysconfig/network-scripts/ifcfg-eth0 My settings are as follows:

A gateway must also be set up afterwards! ! !
Execute the command: vi /etc/sysconfig/network My settings are as follows;
Restart the service after saving and exiting: service network restart
or run /etc/sysconfig/network-scripts/ifup eth0 Start
At this time ifconfig looks as follows: Run live555 as follows:

At this point live555 server is started, and can correctly obtain the local IP address using VLC player can play media files under linux server under windows

Copyright © Windows knowledge All Rights Reserved