How to test for network connectivity to server?

Post in this thread issues and solution you find with the MainLobby 3 Client
Wysocki
Intermediate
Intermediate
Posts: 403
Joined: Mon Feb 03, 2003 10:50 pm
Location: Los Angeles Area
Contact:

How to test for network connectivity to server?

Postby Wysocki » Tue Aug 02, 2011 9:20 pm

I'm trying to create a scene that can tell me "the server is not accessible" (the machine, not MLserver). Obviously MLserver would never be running so I can't use a server variable. How can I test if the server (or any machine) is pingable and then use that info in a scene?

User avatar
CinemarDave
Site Admin
Site Admin
Posts: 10535
Joined: Fri Feb 07, 2003 8:56 am
Location: Planet Earth
Contact:

Re: How to test for network connectivity to server?

Postby CinemarDave » Tue Aug 02, 2011 11:35 pm

Just use the {{mlserverconnection}} variable.

Wysocki
Intermediate
Intermediate
Posts: 403
Joined: Mon Feb 03, 2003 10:50 pm
Location: Los Angeles Area
Contact:

Re: How to test for network connectivity to server?

Postby Wysocki » Wed Aug 03, 2011 11:10 am

The {{mlserverconnection}} variable appears to be TRUE if MLserver is running. I want to know if the actual computer is running and available on the network. Plus I'd like to query the online status of other computers on the network.

User avatar
rondepping
Expert
Expert
Posts: 638
Joined: Sat Jan 08, 2005 9:18 pm
Location: Grand Blanc, Mi
Contact:

Re: How to test for network connectivity to server?

Postby rondepping » Fri Aug 05, 2011 3:26 pm

Did you try using MLPing?

From the wiki, it been awhile sicne I looked at it but that might be a start.

MLPing|{{some IP address}} The ping is done as a MLWorker process and the results are returned in a server variable called server_{{some IP address}}_internetstate. The value will be 0 (not pingable) or 1 (pingable).

Edit: Opps I missed that you want use it for the MLserver machine. Maybe use IIS / Appache on the Client machine and have a web page that does the ping and displays the result and show that in a weblobby window?

Wysocki
Intermediate
Intermediate
Posts: 403
Joined: Mon Feb 03, 2003 10:50 pm
Location: Los Angeles Area
Contact:

Re: How to test for network connectivity to server?

Postby Wysocki » Fri Aug 05, 2011 3:55 pm

Yeah, my main issue is checking to see if the server machine is running. Sometimes my kids will be on that machine and somehow mlserver ends up terminated, but I'd like to know what's going on without having to run upstairs to see the server. I could create an information/diagnostics scene that would describe the problem if I could get the ping status of the server at the client.

All my clients do a Wake-On-Lan command to the server when they start up, but then I'd like to see if/when it responds.


Return to “MainLobby 3 Client”

Who is online

Users browsing this forum: No registered users and 0 guests