| gclib 1.34.15 Communications API for Galil controllers and PLCs |

## ◆ GSetServer()

GReturn GCALL GSetServer | ( | GCStringIn | server_name | ) |

Uses GUtility(), G_UTIL_GCAPS_SET_SERVER to set the new active server.

Note
  This function is only available on Windows 10 and Linux.

Parameters

  server_name | The name of the server to set as your new active server.

Use this function in conjunction with GListServers(). Choose a name received from GListServers() to set as your new active server.

After setting a new active server, all gclib calls will route through that new active server, unless explicitly noted otherwise.

To set your active server back to your local server, simply pass "Local" to GSetServer():

Returns
  The success status or error code of the function. See gclib_errors.h for possible values.

Definition at line 128 of file gclibo.c.

References G_GCAPS_OPEN_ERROR, G_NO_ERROR, G_UTIL_GCAPS_SET_SERVER, and GUtility().