38 string[] servers_list = Array.Empty<
string>();
40 Console.WriteLine(
"<s> List available servers on the network\n" +
41 "<h> List available hardware on currently connected server\n" +
42 "<0-9> Enter numbers 0-9 to connect to a server by index\n" +
43 "<l> Set active server back to local server\n" +
48 char input = Console.ReadKey(
true).KeyChar;
56 Console.WriteLine(
"Available Servers:");
58 Print_Servers_List(servers_list);
60 else if(input >=
'0' && input <=
'9')
62 int index = input -
'0';
63 if(servers_list.Length > 0 && index < servers_list.Length)
66 Console.WriteLine(
"Server set to: " + servers_list[index]);
72 Console.WriteLine(
"Server set to: Local");
78 foreach(
string address
in addresses)
80 Console.WriteLine(address);
88 private static void Print_Servers_List(
string[] servers_list)
90 if(servers_list.Length == 0)
92 Console.WriteLine(
"none");
96 for(
int i = 0; i < servers_list.Length; i++)
98 Console.WriteLine(
"<" + i +
"> " + servers_list[i]);
const int GALIL_EXAMPLE_OK
Examples success code.
string[] GAddresses()
Return a string array of available connection addresses.
void GSetServer(string server_name)
Connects gclib to a new gcaps server
string[] GListServers()
Retrieves a list of gcaps servers that are advertising themselves on the local network
Provides a class that binds to gclib's unmanaged dll. Wraps each call and provides a more user-friend...
static int Remote_Client()
Accepts user input to publish to list and connect to available servers.